hexsha stringlengths 40 40 | size int64 6 1.04M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 247 | max_stars_repo_name stringlengths 4 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 368k ⌀ | 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 247 | max_issues_repo_name stringlengths 4 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | 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 247 | max_forks_repo_name stringlengths 4 130 | max_forks_repo_head_hexsha stringlengths 40 78 | 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 1 1.04M | avg_line_length float64 1.53 618k | max_line_length int64 1 1.02M | alphanum_fraction float64 0 1 | original_content stringlengths 6 1.04M | filtered:remove_non_ascii int64 0 538k | filtered:remove_decorators int64 0 917k | filtered:remove_async int64 0 722k | filtered:remove_classes int64 -45 1M | filtered:remove_generators int64 0 814k | filtered:remove_function_no_docstring int64 -102 850k | filtered:remove_class_no_docstring int64 -3 5.46k | filtered:remove_unused_imports int64 -1,350 52.4k | filtered:remove_delete_markers int64 0 59.6k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4a6c085dc6e2a012ab7070e69161ed5cb000b171 | 62,922 | py | Python | tests/services/inventory/test_data/mock_gcp_results.py | ajayakumar-jayaraj/forseti-security | ba1e3d4a10c0c6076012963b581fcde46242b792 | [
"Apache-2.0"
] | null | null | null | tests/services/inventory/test_data/mock_gcp_results.py | ajayakumar-jayaraj/forseti-security | ba1e3d4a10c0c6076012963b581fcde46242b792 | [
"Apache-2.0"
] | null | null | null | tests/services/inventory/test_data/mock_gcp_results.py | ajayakumar-jayaraj/forseti-security | ba1e3d4a10c0c6076012963b581fcde46242b792 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 The Forseti Security 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 ap... | 28.216143 | 352 | 0.607101 | # Copyright 2017 The Forseti Security 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 ap... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
0bf1501a4b5a9b31b89b73800843e61e572e29f0 | 8,868 | py | Python | surround/django/redis.py | sniegu/django-surround | e076ec92a6611a056899f3f4f74a24e676dafb5c | [
"MIT"
] | 1 | 2016-07-29T13:10:40.000Z | 2016-07-29T13:10:40.000Z | surround/django/redis.py | sniegu/django-surround | e076ec92a6611a056899f3f4f74a24e676dafb5c | [
"MIT"
] | null | null | null | surround/django/redis.py | sniegu/django-surround | e076ec92a6611a056899f3f4f74a24e676dafb5c | [
"MIT"
] | null | null | null | from __future__ import absolute_import
import redis
from surround.django.logging import setupModuleLogger
setupModuleLogger(globals())
redis.StrictRedis.set_pickled = set_pickled
redis.StrictRedis.get_pickled = get_pickled
# make_key cannot be used here, since the key is already in its final shape
| 30.474227 | 169 | 0.644339 | from __future__ import absolute_import
from redis_cache import get_redis_connection
import pickle
import redis
from django.conf import settings
from surround.django.utils import CacheKey
from surround.django import execution
import datetime
from redis import WatchError
from surround.django.logging import setupModuleLo... | 0 | 87 | 0 | 6,890 | 0 | 1,037 | 0 | 64 | 475 |
e94d0aa34fe010cfea4676242323630d81e92c93 | 1,043 | py | Python | caspy/lw.py | altaurog/django-caspy | c4ec0d39ed94b74a68784878018d6a3ff5e2dba3 | [
"BSD-3-Clause"
] | 1 | 2017-01-30T23:37:27.000Z | 2017-01-30T23:37:27.000Z | caspy/lw.py | altaurog/django-caspy | c4ec0d39ed94b74a68784878018d6a3ff5e2dba3 | [
"BSD-3-Clause"
] | null | null | null | caspy/lw.py | altaurog/django-caspy | c4ec0d39ed94b74a68784878018d6a3ff5e2dba3 | [
"BSD-3-Clause"
] | null | null | null | """
Lightweight objects
"""
| 24.255814 | 78 | 0.59348 | """
Lightweight objects
"""
import collections
from caspy import str
class Lightweight(collections.Mapping):
def __init__(self, *args, **kwargs):
for f in self._fields:
setattr(self, f, get(f, *args, **kwargs))
def copy(self, **kwargs):
return self.__class__(self, **kwargs)
d... | 0 | 0 | 0 | 660 | 0 | 242 | 0 | -3 | 113 |
1353b02ca4e0c7185d4e79893ec5229fe1ca26c0 | 2,255 | py | Python | skultrafast/nlo.py | Tillsten/skultrafast | 778eaf1539b6d85f21ac53b011472605673ef7e8 | [
"BSD-3-Clause"
] | 10 | 2019-02-17T15:57:51.000Z | 2021-11-15T02:00:33.000Z | skultrafast/nlo.py | cZahn/skultrafast | 23572ba9ea32238f34a8a15390fb572ecd8bc6fa | [
"BSD-3-Clause"
] | 1 | 2019-01-17T11:56:38.000Z | 2019-07-11T15:30:58.000Z | skultrafast/nlo.py | cZahn/skultrafast | 23572ba9ea32238f34a8a15390fb572ecd8bc6fa | [
"BSD-3-Clause"
] | 6 | 2018-11-08T14:11:06.000Z | 2021-09-01T14:53:02.000Z | """
Module containing helpers for small calculation involing nonlinear optics
"""
# %%
from skultrafast.unit_conversions import c
from scipy.optimize import minimize_scalar
import numpy as np
def tl_pulse_from_nm(center_wl: float, fhwm: float, shape: str = 'gauss') -> float:
"""
Calculates the transformlimted ... | 22.107843 | 83 | 0.616408 | """
Module containing helpers for small calculation involing nonlinear optics
"""
# %%
from skultrafast.unit_conversions import c
from scipy.optimize import minimize_scalar
import numpy as np
def tl_pulse_from_nm(center_wl: float, fhwm: float, shape: str = 'gauss') -> float:
"""
Calculates the transformlimted ... | 2 | 0 | 0 | 0 | 0 | 189 | 0 | 0 | 46 |
37f04f1a1d916c12b42cc715866ec72998795c87 | 4,870 | py | Python | data_management/test/test_build_elevation/TestBuildElevationMosaic.py | helyx-rterry/solutions-geoprocessing-toolbox | ddd12da92e58ea39a4d6f3beac05fa755499539a | [
"Apache-2.0"
] | null | null | null | data_management/test/test_build_elevation/TestBuildElevationMosaic.py | helyx-rterry/solutions-geoprocessing-toolbox | ddd12da92e58ea39a4d6f3beac05fa755499539a | [
"Apache-2.0"
] | null | null | null | data_management/test/test_build_elevation/TestBuildElevationMosaic.py | helyx-rterry/solutions-geoprocessing-toolbox | ddd12da92e58ea39a4d6f3beac05fa755499539a | [
"Apache-2.0"
] | null | null | null | #------------------------------------------------------------------------------
# Copyright 2013 Esri
# 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/LICENS... | 45.092593 | 131 | 0.700205 | #------------------------------------------------------------------------------
# Copyright 2013 Esri
# 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/LICENS... | 0 | 0 | 0 | 18 | 0 | 0 | 0 | 0 | 23 |
678f4145fa288ccac9613f16b1e2d9029f5bc2e7 | 8,370 | py | Python | demisto_sdk/tests/integration_tests/doc_review_integration_test.py | SergeBakharev/demisto-sdk | 17d00942a1bd33039a8aba9ddffecfd81008d275 | [
"MIT"
] | null | null | null | demisto_sdk/tests/integration_tests/doc_review_integration_test.py | SergeBakharev/demisto-sdk | 17d00942a1bd33039a8aba9ddffecfd81008d275 | [
"MIT"
] | null | null | null | demisto_sdk/tests/integration_tests/doc_review_integration_test.py | SergeBakharev/demisto-sdk | 17d00942a1bd33039a8aba9ddffecfd81008d275 | [
"MIT"
] | null | null | null | from click.testing import CliRunner
from demisto_sdk.__main__ import main
from TestSuite.test_tools import ChangeCWD
DOC_REVIEW = 'doc-review'
def test_spell_integration_dir_valid(repo):
"""
Given
- a integration directory.
When
- Running doc-review on it.
Then
- Ensure spell check run... | 35.769231 | 109 | 0.663321 | from click.testing import CliRunner
from demisto_sdk.__main__ import main
from TestSuite.test_tools import ChangeCWD
DOC_REVIEW = 'doc-review'
def test_spell_integration_dir_valid(repo):
"""
Given
- a integration directory.
When
- Running doc-review on it.
Then
- Ensure spell check run... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
38369937f3dba2d1ac68935076f8fee7a829e691 | 34 | py | Python | tests/test_decoder.py | gchhablani/vformer | c7dc7d14e33aa5b2974667d281e7910e17538b34 | [
"MIT"
] | null | null | null | tests/test_decoder.py | gchhablani/vformer | c7dc7d14e33aa5b2974667d281e7910e17538b34 | [
"MIT"
] | null | null | null | tests/test_decoder.py | gchhablani/vformer | c7dc7d14e33aa5b2974667d281e7910e17538b34 | [
"MIT"
] | null | null | null | import vformer.decoder as decoder
| 17 | 33 | 0.852941 | import vformer.decoder as decoder
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
b21df7ef0542cc510be893064e6ba173c34cee88 | 9,812 | py | Python | ct_charachterization/_third_algorithm.py | s-mostafa-a/non-central-gamma-for-ct-scans | 349a017c6d79852fd33dc1854ee9226bf02be4d7 | [
"Apache-2.0"
] | 1 | 2020-09-14T04:34:36.000Z | 2020-09-14T04:34:36.000Z | ct_charachterization/_third_algorithm.py | s-mostafa-a/CT-noise-statistical-characterization | c29bb8b96b682ca8a0c7a192887082ef6c83fc4a | [
"Apache-2.0"
] | null | null | null | ct_charachterization/_third_algorithm.py | s-mostafa-a/CT-noise-statistical-characterization | c29bb8b96b682ca8a0c7a192887082ef6c83fc4a | [
"Apache-2.0"
] | null | null | null | from .utility.utils import expand
| 63.714286 | 120 | 0.711985 | import numpy as onp
from .utility.utils import broadcast_tile, block_matrix, sum_over_each_neighborhood_on_blocked_matrix, expand
from ._second_algorithm import run_second_algorithm
from ct_charachterization.utility.utils import expand, contract
def run_third_algorithm_gamma_instead_of_pi(y: onp.array, mu: onp.array,... | 0 | 0 | 0 | 0 | 0 | 9,470 | 0 | 146 | 158 |
601790757cb8bf528ef752c37ce8563c0c01ac42 | 13,009 | py | Python | awx/main/expect/run.py | afraser502/awx | 0273d2add58d6273a0e067f2192da498fe6c945f | [
"Apache-2.0"
] | 1 | 2018-09-28T16:02:30.000Z | 2018-09-28T16:02:30.000Z | awx/main/expect/run.py | afraser502/awx | 0273d2add58d6273a0e067f2192da498fe6c945f | [
"Apache-2.0"
] | null | null | null | awx/main/expect/run.py | afraser502/awx | 0273d2add58d6273a0e067f2192da498fe6c945f | [
"Apache-2.0"
] | 1 | 2018-11-02T23:41:47.000Z | 2018-11-02T23:41:47.000Z | #! /usr/bin/env python
import argparse
import collections
import logging
import json
import os
import stat
import re
import signal
import sys
import thread
import time
import pexpect
import psutil
import six
logger = logging.getLogger('awx.main.utils.expect')
def open_fifo_write(path, data):
'''open_fifo_wr... | 39.302115 | 115 | 0.6115 | #! /usr/bin/env python
import argparse
import base64
import codecs
import collections
import StringIO
import logging
import json
import os
import stat
import pipes
import re
import signal
import sys
import thread
import time
import pexpect
import psutil
import six
logger = logging.getLogger('awx.main.utils.expect')... | 0 | 0 | 0 | 0 | 0 | 1,593 | 0 | -31 | 157 |
cad462b46d744a7bb97f4a59e074561b900bafaa | 169 | py | Python | app/app/calc.py | josekang/recipe-app-api | 059e5b048d09943ccb11442d584d83a5f4e036df | [
"MIT"
] | null | null | null | app/app/calc.py | josekang/recipe-app-api | 059e5b048d09943ccb11442d584d83a5f4e036df | [
"MIT"
] | null | null | null | app/app/calc.py | josekang/recipe-app-api | 059e5b048d09943ccb11442d584d83a5f4e036df | [
"MIT"
] | null | null | null | def add(x, y):
""" Add two numbers and return their sum"""
return x+y
def subtract(x, y):
""" Subtract to numbers and return their results"""
return x-y | 24.142857 | 55 | 0.621302 | def add(x, y):
""" Add two numbers and return their sum"""
return x+y
def subtract(x, y):
""" Subtract to numbers and return their results"""
return x-y | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
edde5d6b5964dff1706789e56ebba46a7c9bbf45 | 9,906 | py | Python | docs/generate_docs.py | 5nafu/OpenManage-Enterprise | edef767324d963c24b2d560896862299769ce21d | [
"Apache-2.0"
] | 1 | 2020-07-18T13:05:48.000Z | 2020-07-18T13:05:48.000Z | docs/generate_docs.py | 5nafu/OpenManage-Enterprise | edef767324d963c24b2d560896862299769ce21d | [
"Apache-2.0"
] | 11 | 2020-07-22T07:33:14.000Z | 2020-08-20T12:01:55.000Z | docs/generate_docs.py | 5nafu/OpenManage-Enterprise | edef767324d963c24b2d560896862299769ce21d | [
"Apache-2.0"
] | 4 | 2020-06-03T11:38:34.000Z | 2020-08-11T10:38:57.000Z | #
# Python script for generating new documentation
#
# _author_ = Grant Curell <grant_curell@dell.com>
#
#
# Copyright (c) 2020 Dell EMC Corporation
#
# 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 Licen... | 47.171429 | 118 | 0.590349 | #
# Python script for generating new documentation
#
# _author_ = Grant Curell <grant_curell@dell.com>
#
#
# Copyright (c) 2020 Dell EMC Corporation
#
# 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 Licen... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
b643480d651874e835d6b2778a8703ac72af7388 | 4,279 | py | Python | lineage/tests/test_LineageInputOutput.py | meyer-lab/tHMM | 22e51a2035e76c39a2b1355d1e44ad9ed977dfd4 | [
"MIT"
] | 1 | 2022-03-17T21:05:23.000Z | 2022-03-17T21:05:23.000Z | lineage/tests/test_LineageInputOutput.py | meyer-lab/tHMM | 22e51a2035e76c39a2b1355d1e44ad9ed977dfd4 | [
"MIT"
] | 310 | 2020-07-08T14:14:08.000Z | 2022-03-23T18:04:57.000Z | lineage/tests/test_LineageInputOutput.py | meyer-lab/tHMM | 22e51a2035e76c39a2b1355d1e44ad9ed977dfd4 | [
"MIT"
] | 1 | 2020-12-21T04:54:56.000Z | 2020-12-21T04:54:56.000Z | """" Unit test file. """
| 40.367925 | 87 | 0.582846 | """" Unit test file. """
import unittest
import math
import pandas as pd
from ..LineageInputOutput import import_exp_data, tryRecursion
from ..CellVar import CellVar as c
class TestModel(unittest.TestCase):
"""
Unit test class for importing data.
"""
def setUp(self):
"""
Gets the pat... | 0 | 0 | 0 | 4,083 | 0 | 0 | 0 | 36 | 134 |
0f1a726075f7be2aa97e0c273719ec6f20f11329 | 772 | py | Python | CodeChef/Practice/Dynamic Programming/JAIN.py | mishrakeshav/Competitive-Programming | b25dcfeec0fb9a9c71bf3a05644b619f4ca83dd2 | [
"MIT"
] | 2 | 2020-06-25T21:10:32.000Z | 2020-12-10T06:53:45.000Z | CodeChef/Practice/Dynamic Programming/JAIN.py | mishrakeshav/Competitive-Programming | b25dcfeec0fb9a9c71bf3a05644b619f4ca83dd2 | [
"MIT"
] | null | null | null | CodeChef/Practice/Dynamic Programming/JAIN.py | mishrakeshav/Competitive-Programming | b25dcfeec0fb9a9c71bf3a05644b619f4ca83dd2 | [
"MIT"
] | 3 | 2020-05-15T14:17:09.000Z | 2021-07-25T13:18:20.000Z | """
https://www.codechef.com/problems/JAIN
Type: Dynamic Programming
"""
if __name__ == '__main__':
for t in range(int(input())):
solve() | 20.315789 | 41 | 0.395078 | """
https://www.codechef.com/problems/JAIN
Type: Dynamic Programming
"""
def solve():
n = int(input())
freq = dict()
for i in range(32):
freq[i] = 0
for i in range(n):
s = set(input())
si = 0
if 'a' in s:
si += 1<<0
if 'e' in s:
si += 1<<... | 0 | 0 | 0 | 0 | 0 | 598 | 0 | 0 | 23 |
a5a66a2255cde9f6b079aa65e2e29420d7d8e202 | 3,779 | py | Python | mini_gplus/resources/circles.py | KTachibanaM/pill-city | 8a5a9c6a46c79f2e5c33c598d931360c319b75f4 | [
"MIT"
] | 16 | 2021-08-03T07:03:15.000Z | 2021-09-23T09:09:57.000Z | mini_gplus/resources/circles.py | KTachibanaM/pill-city | 8a5a9c6a46c79f2e5c33c598d931360c319b75f4 | [
"MIT"
] | 193 | 2021-07-29T09:43:54.000Z | 2021-10-05T05:18:55.000Z | mini_gplus/resources/circles.py | KTachibanaM/mini-gplus | 1881bef983797fe99e1499fb794976cb48863c70 | [
"MIT"
] | 3 | 2021-09-14T10:08:41.000Z | 2021-09-20T12:47:40.000Z | from flask_restful import fields, reqparse
from .users import user_fields
circle_fields = {
'id': fields.String(attribute='eid'),
'owner': fields.Nested(user_fields),
'name': fields.String,
'members': fields.List(fields.Nested(user_fields))
}
circle_parser = reqparse.RequestParser()
circle_parser.add_... | 30.723577 | 119 | 0.620005 | from flask_restful import Resource, fields, marshal_with, reqparse
from flask_jwt_extended import jwt_required, get_jwt_identity
from mini_gplus.daos.user import find_user
from mini_gplus.daos.circle import create_circle, get_circles, find_circle, toggle_member, delete_circle, rename_circle
from mini_gplus.daos.excepti... | 0 | 2,845 | 0 | 19 | 0 | 0 | 0 | 209 | 365 |
dbf93baa075190a525d65c3a6289cc630451fc3a | 167 | py | Python | family_api/admin.py | zchuhui/django-rest-framework-example | 82ee470b581473a0e9f5772ede75a90f2dfe1c54 | [
"Apache-2.0"
] | null | null | null | family_api/admin.py | zchuhui/django-rest-framework-example | 82ee470b581473a0e9f5772ede75a90f2dfe1c54 | [
"Apache-2.0"
] | null | null | null | family_api/admin.py | zchuhui/django-rest-framework-example | 82ee470b581473a0e9f5772ede75a90f2dfe1c54 | [
"Apache-2.0"
] | null | null | null | from django.contrib import admin
# Register your models here.
from .models import Relationship, Person
admin.site.register(Relationship)
admin.site.register(Person)
| 18.555556 | 39 | 0.814371 | from django.contrib import admin
# Register your models here.
from .models import Relationship,Person
admin.site.register(Relationship)
admin.site.register(Person)
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | -1 | 0 |
4d20e6040c4d26b84e140284e927cc5b71601759 | 7,090 | py | Python | pystella/output.py | zachjweiner/pystella | 2d994d1b9f3d2a39a41bbb821fa37fafec699e0c | [
"MIT"
] | 14 | 2019-10-16T15:08:44.000Z | 2022-02-06T10:26:11.000Z | pystella/output.py | zachjweiner/pystella | 2d994d1b9f3d2a39a41bbb821fa37fafec699e0c | [
"MIT"
] | null | null | null | pystella/output.py | zachjweiner/pystella | 2d994d1b9f3d2a39a41bbb821fa37fafec699e0c | [
"MIT"
] | 2 | 2021-04-13T09:32:55.000Z | 2021-08-15T13:16:05.000Z | __copyright__ = "Copyright (C) 2019 Zachary J Weiner"
__license__ = """
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, c... | 38.956044 | 85 | 0.585896 | __copyright__ = "Copyright (C) 2019 Zachary J Weiner"
__license__ = """
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, c... | 0 | 0 | 0 | 5,132 | 0 | 719 | 0 | -13 | 123 |
ff97cadf9b8ef006c57b729cde681d8bb84129be | 1,108 | py | Python | chapter_5/output-stream-buffering.py | bimri/programming_python | ba52ccd18b9b4e6c5387bf4032f381ae816b5e77 | [
"MIT"
] | null | null | null | chapter_5/output-stream-buffering.py | bimri/programming_python | ba52ccd18b9b4e6c5387bf4032f381ae816b5e77 | [
"MIT"
] | null | null | null | chapter_5/output-stream-buffering.py | bimri/programming_python | ba52ccd18b9b4e6c5387bf4032f381ae816b5e77 | [
"MIT"
] | null | null | null | "Output stream buffering: A first look"
'''
By default, standard output is fully buffered when connected to a pipe like this; its only
line-buffered when connected to a terminal:
>>> pipe = os.popen('python testexit_os.py')
>>> pipe.read() # streams not flushed on exit
''
>>> pipe = os.popen('python -u testexit_os.py')... | 41.037037 | 91 | 0.731949 | "Output stream buffering: A first look"
'''
By default, standard output is fully buffered when connected to a pipe like this; it’s only
line-buffered when connected to a terminal:
>>> pipe = os.popen('python testexit_os.py')
>>> pipe.read() # streams not flushed on exit
''
>>> pipe = os.popen('python -u testexit_os.py'... | 18 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
8f49ed710af1d529097e426ef71f9ebdafc2c93e | 2,543 | py | Python | examples/fetch.py | rayattack/supersql | 0a592e7f303ac18b8df7bebac226b26f38f6d192 | [
"MIT"
] | 2 | 2019-11-04T00:19:30.000Z | 2020-10-04T01:24:04.000Z | examples/fetch.py | tersoo/supersql | 4d20bd72a9de50e485ce79285c355a1a7ac04b55 | [
"MIT"
] | 2 | 2021-03-31T14:07:04.000Z | 2021-03-31T14:07:20.000Z | examples/fetch.py | tersoo/supersql | 4d20bd72a9de50e485ce79285c355a1a7ac04b55 | [
"MIT"
] | 2 | 2021-03-30T21:40:14.000Z | 2022-03-17T20:52:25.000Z | from supersql import Query
from .schemas.actor import Actor
query = Query(
user='postgres',
password='postgres',
vendor='postrgres',
host='localhost:5432/mydatabase'
)
actor = Actor()
prep = query.SELECT(
actor.actor_id,
actor.first_name
).FROM(
actor
).WHERE(
actor.last_name == 'Con... | 23.990566 | 134 | 0.680299 | from supersql import Query
from .schemas.actor import Actor
from .schemas.staff import Staff
query = Query(
user='postgres',
password='postgres',
vendor='postrgres',
host='localhost:5432/mydatabase'
)
actor = Actor()
prep = query.SELECT(
actor.actor_id,
actor.first_name
).FROM(
actor
).W... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 11 | 22 |
27c4c7489747186d84bec4d3c0220c86040a6bb8 | 5,602 | py | Python | django_sha2/hashers.py | fwenzel/django-sha2 | f4519bf0cc9b1dd7a7d78394fa4aec4504bc86e9 | [
"BSD-3-Clause"
] | 9 | 2015-01-20T23:21:32.000Z | 2020-05-03T14:33:12.000Z | django_sha2/hashers.py | h4ck3rm1k3/django-sha2 | f4519bf0cc9b1dd7a7d78394fa4aec4504bc86e9 | [
"BSD-3-Clause"
] | 1 | 2016-01-28T10:32:28.000Z | 2017-04-12T21:15:47.000Z | django_sha2/hashers.py | h4ck3rm1k3/django-sha2 | f4519bf0cc9b1dd7a7d78394fa4aec4504bc86e9 | [
"BSD-3-Clause"
] | 3 | 2015-01-11T22:08:47.000Z | 2021-12-06T19:40:29.000Z | import logging
from django.conf import settings
log = logging.getLogger('common.hashers')
algo_name = lambda hmac_id: 'bcrypt{0}'.format(hmac_id.replace('-', '_'))
def get_hasher(hmac_id):
"""
Dynamically create password hashers based on hmac_id.
This class takes the hmac_id corresponding to an HMAC_K... | 35.455696 | 102 | 0.643699 | import base64
import hmac
import hashlib
import logging
import bcrypt
from django.conf import settings
from django.contrib.auth.hashers import (BCryptPasswordHasher,
BasePasswordHasher, mask_hash)
from django.utils.crypto import constant_time_compare
from django.utils.encoding... | 0 | 0 | 0 | 4,183 | 0 | 0 | 0 | 163 | 319 |
e3b607ebbf3d9780052d8182db3dc0160f1ee743 | 9,786 | py | Python | python2.7/site-packages/twisted/internet/iocpreactor/abstract.py | 84KaliPleXon3/sslstrip-hsts-openwrt | f875ded48078a3ed84bffef1e69dcbeaf2e77ae3 | [
"MIT"
] | 4 | 2020-10-31T19:52:05.000Z | 2021-09-22T11:39:27.000Z | python2.7/site-packages/twisted/internet/iocpreactor/abstract.py | 84KaliPleXon3/sslstrip-hsts-openwrt | f875ded48078a3ed84bffef1e69dcbeaf2e77ae3 | [
"MIT"
] | null | null | null | python2.7/site-packages/twisted/internet/iocpreactor/abstract.py | 84KaliPleXon3/sslstrip-hsts-openwrt | f875ded48078a3ed84bffef1e69dcbeaf2e77ae3 | [
"MIT"
] | 2 | 2020-02-27T08:28:35.000Z | 2020-09-13T12:39:26.000Z | # Copyright (c) 2001-2004 Twisted Matrix Laboratories.
# See LICENSE for details.
| 35.846154 | 134 | 0.649193 | # Copyright (c) 2001-2004 Twisted Matrix Laboratories.
# See LICENSE for details.
from sets import Set
import warnings
from twisted.internet import interfaces, defer, main
from twisted.persisted import styles
from twisted.python import log, failure
from ops import ReadFileOp, WriteFileOp
from util import StateEvent... | 0 | 0 | 0 | 9,350 | 0 | 0 | 0 | 127 | 225 |
9a35cb66f57610d57563861ff9e7b827fe1b1c18 | 322 | py | Python | dspftwplot/__init__.py | dspftw/dspftwplot | 2dd7e7300bfb86062a978fbc2b7afe583fa96c05 | [
"MIT"
] | null | null | null | dspftwplot/__init__.py | dspftw/dspftwplot | 2dd7e7300bfb86062a978fbc2b7afe583fa96c05 | [
"MIT"
] | 1 | 2021-05-05T14:10:16.000Z | 2021-05-05T14:10:16.000Z | dspftwplot/__init__.py | dspftw/dspftwplot | 2dd7e7300bfb86062a978fbc2b7afe583fa96c05 | [
"MIT"
] | null | null | null | # vim: expandtab tabstop=4 shiftwidth=4
| 29.272727 | 59 | 0.838509 | # vim: expandtab tabstop=4 shiftwidth=4
from dspftw import *
from .constellation_plot import conplot, constellation_plot
from .plot_3d_complex import plot_3d_complex, plot3c
from .plot_complex import plotc, plot_complex
from .plot_slider import plot_slider, plots
from .plot_func_slider import plot_func_slider, plotfs... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 147 | 134 |
aef865d7076e98734cf84e2a00de5b4bbd35b325 | 4,729 | py | Python | chalicelib/ddb.py | aws-samples/amazon-dynamodb-chat-sample | 3aa8ee3bcf9315b9e63e3e1fd6236c1c1043fca4 | [
"MIT-0"
] | 15 | 2019-11-07T05:13:39.000Z | 2022-03-12T15:45:06.000Z | chalicelib/ddb.py | aws-samples/amazon-dynamodb-chat-sample | 3aa8ee3bcf9315b9e63e3e1fd6236c1c1043fca4 | [
"MIT-0"
] | null | null | null | chalicelib/ddb.py | aws-samples/amazon-dynamodb-chat-sample | 3aa8ee3bcf9315b9e63e3e1fd6236c1c1043fca4 | [
"MIT-0"
] | 7 | 2019-11-07T05:13:43.000Z | 2021-11-05T04:45:39.000Z | # -*- coding: utf-8 -*-
import logging
logging.basicConfig(format='%(levelname)s:%(message)s', level=logging.INFO)
"""
if __name__ == "__main__":
ddb = DdbChat()
table = ddb.createConnection('chat')
name = 'oranie'
comment = ''
chat_room = 'chat'
ddb.putComment(table, name, comment, chat_... | 31.738255 | 118 | 0.593995 | # -*- coding: utf-8 -*-
import logging
import os
from datetime import datetime
import boto3
from boto3.dynamodb.conditions import Key
logging.basicConfig(format='%(levelname)s:%(message)s', level=logging.INFO)
def create_connection(table_name):
ddb = None
if os.getenv('API_ENDPOINT') != 'localhost':
... | 30 | 0 | 0 | 3,218 | 0 | 267 | 0 | 7 | 135 |
1c6bfeb05b83c65766976650f9df80384dcb92d8 | 390 | py | Python | mayaunittest/__main__.py | robertjoosten/maya-unittest | 251b8713179a870820b46d6bab50fd7dd92bc45e | [
"MIT"
] | 1 | 2022-02-15T03:25:55.000Z | 2022-02-15T03:25:55.000Z | mayaunittest/__main__.py | robertjoosten/maya-unittest | 251b8713179a870820b46d6bab50fd7dd92bc45e | [
"MIT"
] | null | null | null | mayaunittest/__main__.py | robertjoosten/maya-unittest | 251b8713179a870820b46d6bab50fd7dd92bc45e | [
"MIT"
] | null | null | null |
if __name__ == "__main__":
main()
| 21.666667 | 57 | 0.684615 | def main():
import os
import atexit
import unittest
import maya.standalone
maya.standalone.initialize()
program = unittest.main(module=None, exit=False)
maya.standalone.uninitialize()
atexit._run_exitfuncs()
ret_code = not program.result.wasSuccessful()
os._exit(ret_code) # sy... | 0 | 0 | 0 | 0 | 0 | 328 | 0 | 0 | 22 |
f0dbe1a90f4e050cc18595a21a7c1d0d47b977c9 | 2,976 | py | Python | httphandler.py | chmller/HTTPHandler | 91f4bb112245b7e505bc43db276d472a30f1a9f4 | [
"MIT"
] | 1 | 2022-03-13T13:10:55.000Z | 2022-03-13T13:10:55.000Z | httphandler.py | chmller/HTTPHandler | 91f4bb112245b7e505bc43db276d472a30f1a9f4 | [
"MIT"
] | null | null | null | httphandler.py | chmller/HTTPHandler | 91f4bb112245b7e505bc43db276d472a30f1a9f4 | [
"MIT"
] | null | null | null | import logging
| 36.292683 | 109 | 0.528562 | import logging
import logging.handlers
class HTTPHandler(logging.Handler):
"""
A class Based on Vinay Sajip HTTPHandler-class which sends records to a Web server,
using either GET or POST semantics. It supports HTTP, HTTPS and basic authorization.
"""
def __init__(self, host, url, method="GET", se... | 0 | 0 | 0 | 2,913 | 0 | 0 | 0 | 2 | 45 |
8f8584e9f9d3c43ec5a2db315fe06cc231113ce0 | 888 | py | Python | source/python-application/modules/splash.py | Tectors/Archive | fc2c745f077b97b17acad64a4bd6433032944c93 | [
"MIT"
] | 8 | 2021-08-06T09:50:15.000Z | 2022-03-06T21:36:08.000Z | source/python-application/modules/splash.py | Tectors/Archive | fc2c745f077b97b17acad64a4bd6433032944c93 | [
"MIT"
] | null | null | null | source/python-application/modules/splash.py | Tectors/Archive | fc2c745f077b97b17acad64a4bd6433032944c93 | [
"MIT"
] | 2 | 2021-11-25T18:47:59.000Z | 2022-03-06T21:36:12.000Z | #!/usr/bin/python3
# Gets the splash for the game
| 31.714286 | 115 | 0.621622 | #!/usr/bin/python3
from requests import get
import base64
# Gets the splash for the game
def get_splash(version, type="mobileBgImg"):
# The endpoint
endpoint = 'https://www.epicgames.com/fortnite/en-US/api/page?slug={0}&type=battle-pass'
# Parse the version into correct numbers (ex: 17 to 27)
version... | 0 | 0 | 0 | 0 | 0 | 775 | 0 | -5 | 67 |
1895f06c48bd78465fc25caf92bad81148b6bf5f | 2,432 | py | Python | sdk/python/feast/sdk/resources/feature_set.py | tims/feast | 3499b6576b55afd5b37fa1b9a38c817ed6aa1b1a | [
"Apache-2.0"
] | null | null | null | sdk/python/feast/sdk/resources/feature_set.py | tims/feast | 3499b6576b55afd5b37fa1b9a38c817ed6aa1b1a | [
"Apache-2.0"
] | null | null | null | sdk/python/feast/sdk/resources/feature_set.py | tims/feast | 3499b6576b55afd5b37fa1b9a38c817ed6aa1b1a | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 The Feast Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wr... | 25.072165 | 75 | 0.629934 | # Copyright 2018 The Feast Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wr... | 0 | 471 | 0 | 1,236 | 0 | 0 | 0 | 48 | 92 |
17ce5c54fc7801ee1542ef8fc4b3c9609498fc0a | 41 | py | Python | nostril/__init__.py | pekapa/nostril | 1a8872013d254d631b04bf8d60a930c90dd898bc | [
"MIT"
] | null | null | null | nostril/__init__.py | pekapa/nostril | 1a8872013d254d631b04bf8d60a930c90dd898bc | [
"MIT"
] | null | null | null | nostril/__init__.py | pekapa/nostril | 1a8872013d254d631b04bf8d60a930c90dd898bc | [
"MIT"
] | null | null | null | from .core import run
__all__ = ['run']
| 10.25 | 21 | 0.658537 | from .core import run
__all__ = ['run']
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
9c151f7639a2e580fc789524504c699c992254c0 | 6,481 | py | Python | train_sppe/src/train.py | DatatangAILAB/SuanFaShiXun04 | f478e40dd84240ac71cbb54e6bacf9ff556fbb3e | [
"Apache-2.0"
] | 5 | 2021-04-10T12:50:10.000Z | 2022-03-13T12:02:30.000Z | train_sppe/src/train.py | DatatangAILAB/SuanFaShiXun04 | f478e40dd84240ac71cbb54e6bacf9ff556fbb3e | [
"Apache-2.0"
] | 1 | 2021-03-12T01:13:59.000Z | 2021-03-12T01:13:59.000Z | train_sppe/src/train.py | DatatangAILAB/SuanFaShiXun04 | f478e40dd84240ac71cbb54e6bacf9ff556fbb3e | [
"Apache-2.0"
] | 2 | 2021-04-10T04:40:13.000Z | 2022-03-22T03:41:49.000Z | # -----------------------------------------------------
# Copyright (c) Shanghai Jiao Tong University. All rights reserved.
# Written by Jiefeng Li (jeff.lee.sjtu@gmail.com)
# -----------------------------------------------------
import torch
if __name__ == '__main__':
main()
| 30.42723 | 106 | 0.555624 | # -----------------------------------------------------
# Copyright (c) Shanghai Jiao Tong University. All rights reserved.
# Written by Jiefeng Li (jeff.lee.sjtu@gmail.com)
# -----------------------------------------------------
import torch
import torch.utils.data
from utils.dataset import coco
from opt import opt
f... | 0 | 0 | 0 | 0 | 0 | 5,822 | 0 | 82 | 290 |
a370f084c1a5af873d7b2244a72a26806457859a | 3,810 | py | Python | zconnect/zc_billing/_models/bills.py | zconnect-iot/zconnect-django | 5c569f54f100e23d72e2ac4de795739ea461a431 | [
"MIT"
] | 2 | 2018-08-19T16:16:39.000Z | 2019-06-11T02:23:50.000Z | zconnect/zc_billing/_models/bills.py | zconnect-iot/zconnect-django | 5c569f54f100e23d72e2ac4de795739ea461a431 | [
"MIT"
] | 2 | 2018-07-05T09:51:54.000Z | 2018-07-06T13:12:04.000Z | zconnect/zc_billing/_models/bills.py | zconnect-iot/zconnect-django | 5c569f54f100e23d72e2ac4de795739ea461a431 | [
"MIT"
] | null | null | null | import logging
from zconnect.zc_billing.util import BillingPeriod
logger = logging.getLogger(__name__)
CURRENCIES = [
("USD", "USD"),
("GBP", "GBP"),
("EUR", "EUR"),
]
BILLING_PERIODS = [
("WEEKLY", BillingPeriod.weekly),
("MONTHLY", BillingPeriod.monthly),
("YEARLY", BillingPeriod.yearly),... | 30.97561 | 83 | 0.674541 | from itertools import groupby
import logging
from django.conf import settings
from django.db import models
from zconnect._models.base import ModelBase
from zconnect.models import Product
from zconnect.zc_billing.util import BillingPeriod, next_bill_period
logger = logging.getLogger(__name__)
CURRENCIES = [
("U... | 0 | 874 | 0 | 2,373 | 0 | 0 | 0 | 80 | 158 |
5b00a5f3fb30e13e895912418f99c3d5d9ddb059 | 4,736 | py | Python | apps/payment/views.py | Xtuden-com/onlineweb4 | 04b17ba43e150a16481255213f1bc49e38d7e2af | [
"MIT"
] | null | null | null | apps/payment/views.py | Xtuden-com/onlineweb4 | 04b17ba43e150a16481255213f1bc49e38d7e2af | [
"MIT"
] | 1 | 2021-04-22T12:22:17.000Z | 2021-04-29T12:47:45.000Z | apps/payment/views.py | tor0405/onlineweb4 | 1dd5ebcfb18504d6c280f5ed1d91b945ed9029b7 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import logging
logger = logging.getLogger(__name__)
| 33.588652 | 87 | 0.673353 | # -*- coding: utf-8 -*-
import logging
import stripe
from django.utils.translation import gettext as _
from rest_framework import permissions, status, viewsets
from rest_framework.response import Response
from stripe.error import InvalidRequestError, StripeError
from apps.common.rest_framework.mixins import MultiSer... | 0 | 0 | 0 | 3,754 | 0 | 0 | 0 | 608 | 292 |
c48c95f453df4d83d47b46ecf7e0a81df5ee771a | 212 | py | Python | unbalanced_dataset/combine/tests/test_smote_enn.py | kmike/UnbalancedDataset | 777f26cee73c04ae2f3d59e43c990cbfd1725b23 | [
"MIT"
] | 6 | 2016-06-02T09:27:41.000Z | 2021-04-21T06:46:12.000Z | unbalanced_dataset/combine/tests/test_smote_enn.py | kmike/UnbalancedDataset | 777f26cee73c04ae2f3d59e43c990cbfd1725b23 | [
"MIT"
] | null | null | null | unbalanced_dataset/combine/tests/test_smote_enn.py | kmike/UnbalancedDataset | 777f26cee73c04ae2f3d59e43c990cbfd1725b23 | [
"MIT"
] | 1 | 2018-08-25T03:11:05.000Z | 2018-08-25T03:11:05.000Z | """Test the module SMOTE ENN."""
from __future__ import print_function
def test_smote_enn():
"""Test the SMOTE ENN function."""
print('Test SMOTE ENN')
| 19.272727 | 47 | 0.731132 | """Test the module SMOTE ENN."""
from __future__ import print_function
from unbalanced_dataset.combine import SMOTEENN
def test_smote_enn():
"""Test the SMOTE ENN function."""
print('Test SMOTE ENN')
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 26 | 23 |
e7df4eb8cdc06811a19d18707c03fc2726d5a2c5 | 5,804 | py | Python | speech-command/model.py | caisq/tfjs-dump | 73b7f867ad701a3b37d23a140e8811663f698d34 | [
"Apache-2.0"
] | 1 | 2018-11-26T07:58:37.000Z | 2018-11-26T07:58:37.000Z | speech-command/model.py | caisq/tfjs-dump | 73b7f867ad701a3b37d23a140e8811663f698d34 | [
"Apache-2.0"
] | 6 | 2020-07-16T22:27:38.000Z | 2022-02-12T08:37:39.000Z | speech-command/model.py | caisq/tfjs-dump | 73b7f867ad701a3b37d23a140e8811663f698d34 | [
"Apache-2.0"
] | 1 | 2018-11-26T09:15:51.000Z | 2018-11-26T09:15:51.000Z | """
Usage example:
```sh
# To train model on all words:
python model.py "${HOME}/ml-data/speech-command-browser" 232
# To train model on a subset of the words (in addition to _background_noise
# and _unknown_):
python model.py \
--include_words=left,right,up,down \
"${HOME}/ml-data/speech-command-browser" 232... | 28.875622 | 78 | 0.631289 | """
Usage example:
```sh
# To train model on all words:
python model.py "${HOME}/ml-data/speech-command-browser" 232
# To train model on a subset of the words (in addition to _background_noise
# and _unknown_):
python model.py \
--include_words=left,right,up,down \
"${HOME}/ml-data/speech-command-browser" 232... | 0 | 0 | 0 | 0 | 0 | 3,334 | 0 | -13 | 180 |
53a838c3259271fdbbdcdd593a7285260b21da67 | 4,938 | py | Python | Client_Examine.py | fathhrohman/RPC-OnlineTest | 6d591ba59f36e400da99606bcc4a462541be5d4f | [
"MIT"
] | null | null | null | Client_Examine.py | fathhrohman/RPC-OnlineTest | 6d591ba59f36e400da99606bcc4a462541be5d4f | [
"MIT"
] | null | null | null | Client_Examine.py | fathhrohman/RPC-OnlineTest | 6d591ba59f36e400da99606bcc4a462541be5d4f | [
"MIT"
] | null | null | null | import xmlrpc.client
import getpass
import os
import time
from prettytable import PrettyTable
SERVER_IP = 'localhost'
SERVER_PORT = '8000'
server = xmlrpc.client.ServerProxy(
'http://{ip}:{port}'.format(ip=SERVER_IP, port=SERVER_PORT)
)
while True:
if menu_awal() == 1:
os.system('clear')... | 38.88189 | 93 | 0.373836 | import xmlrpc.client
import getpass
import os
import time
from prettytable import PrettyTable
SERVER_IP = 'localhost'
SERVER_PORT = '8000'
server = xmlrpc.client.ServerProxy(
'http://{ip}:{port}'.format(ip=SERVER_IP, port=SERVER_PORT)
)
def menu_awal():
os.system('clear')
print("SELAMAT DATANG... | 0 | 0 | 0 | 0 | 0 | 471 | 0 | 0 | 46 |
f7198e330d6123f84319f87eb566ae8978c38f58 | 7,124 | py | Python | corehq/apps/reports/urls.py | dimagilg/commcare-hq | ea1786238eae556bb7f1cbd8d2460171af1b619c | [
"BSD-3-Clause"
] | 1 | 2020-07-14T13:00:23.000Z | 2020-07-14T13:00:23.000Z | corehq/apps/reports/urls.py | dimagilg/commcare-hq | ea1786238eae556bb7f1cbd8d2460171af1b619c | [
"BSD-3-Clause"
] | 94 | 2020-12-11T06:57:31.000Z | 2022-03-15T10:24:06.000Z | corehq/apps/reports/urls.py | dimagilg/commcare-hq | ea1786238eae556bb7f1cbd8d2460171af1b619c | [
"BSD-3-Clause"
] | null | null | null | import logging
from django.conf.urls import include, url
from django.core.exceptions import ImproperlyConfigured
from corehq.apps.reports.standard.forms.reports import ReprocessXFormErrorView
from corehq.apps.userreports.reports.view import (ConfigurableReportView, CustomConfigurableReportDispatcher)
from corehq.apps... | 44.525 | 114 | 0.701291 | import logging
from django.conf.urls import include, url
from django.core.exceptions import ImproperlyConfigured
from corehq.apps.reports.standard.forms.reports import ReprocessXFormErrorView
from corehq.apps.userreports.reports.view import (
ConfigurableReportView,
CustomConfigurableReportDispatcher,
)
from ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 180 | 0 |
606db58d7fe61a1f9a0aaa203e0894ce4e4f4b5a | 44,992 | py | Python | task4/task4_crnn.py | ankitshah009/dcase2018_baseline | 96203adc37ce8feb6bdd3e99d4b31dcf7061eebe | [
"MIT"
] | 132 | 2018-04-11T08:10:09.000Z | 2022-03-12T06:54:23.000Z | task4/task4_crnn.py | jayjay-cpu/dcase2018_baseline | 5c5a0f6aff27280c0b86d73d90a84bacf51adb24 | [
"MIT"
] | 26 | 2018-04-16T14:27:58.000Z | 2019-08-19T07:54:34.000Z | task4/task4_crnn.py | jayjay-cpu/dcase2018_baseline | 5c5a0f6aff27280c0b86d73d90a84bacf51adb24 | [
"MIT"
] | 86 | 2018-04-10T07:11:17.000Z | 2022-03-20T05:47:49.000Z | # !/usr/bin/env python
# -*- coding: utf-8 -*-
#########################################################################
# This code is an adaptation from Toni Heittola's code [task1 baseline dcase 2018](https://github.com/DCASE-REPO/dcase2018_baseline/tree/master/task1/)
# Copyright Nicolas Turpault, Romain Serizel, H... | 43.095785 | 151 | 0.542585 | # !/usr/bin/env python
# -*- coding: utf-8 -*-
#########################################################################
# This code is an adaptation from Toni Heittola's code [task1 baseline dcase 2018](https://github.com/DCASE-REPO/dcase2018_baseline/tree/master/task1/)
# Copyright Nicolas Turpault, Romain Serizel, H... | 0 | 0 | 0 | 0 | 2,139 | 41,381 | 0 | 95 | 156 |
6a8e52b422973234a36fd6f11cbb2ed6a33f7392 | 1,108 | py | Python | benchmarks/detection/convert-pretrain-to-detectron2.py | Qianna00/openselfsup | 8d811716ace9096a5d117338344dd1eab98a0453 | [
"Apache-2.0"
] | 1 | 2021-08-01T08:44:39.000Z | 2021-08-01T08:44:39.000Z | benchmarks/detection/convert-pretrain-to-detectron2.py | Qianna00/openselfsup | 8d811716ace9096a5d117338344dd1eab98a0453 | [
"Apache-2.0"
] | null | null | null | benchmarks/detection/convert-pretrain-to-detectron2.py | Qianna00/openselfsup | 8d811716ace9096a5d117338344dd1eab98a0453 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
import pickle as pkl
import sys
import torch
if __name__ == "__main__":
input = sys.argv[1]
obj = torch.load(input, map_location="cpu")
obj = obj["state_dict"]
newmodel = {}
for k, v in obj.items():
... | 28.410256 | 70 | 0.536101 | #!/usr/bin/env python
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
import pickle as pkl
import sys
import torch
if __name__ == "__main__":
input = sys.argv[1]
obj = torch.load(input, map_location="cpu")
obj = obj["state_dict"]
newmodel = {}
for k, v in obj.items():
... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
36644bc61c24d2ab62807cd09b964a863c858053 | 411 | py | Python | listRemoveDuplicates.py | elijahanderson/Python-Practice | 881f3dad9d6050d4f3c268172187e6a17ed39426 | [
"MIT"
] | null | null | null | listRemoveDuplicates.py | elijahanderson/Python-Practice | 881f3dad9d6050d4f3c268172187e6a17ed39426 | [
"MIT"
] | null | null | null | listRemoveDuplicates.py | elijahanderson/Python-Practice | 881f3dad9d6050d4f3c268172187e6a17ed39426 | [
"MIT"
] | null | null | null | # No. 14: Removing duplicates in a list:
x = [1,1,2,2,3,3,4,4,1]
print(removeDuplicates2(x))
print(removeDuplicates1(x))
| 18.681818 | 40 | 0.559611 | # No. 14: Removing duplicates in a list:
def removeDuplicates1(oList) :
nList = []
for i in range(len(oList)) :
if oList[i] not in nList :
nList.append(oList[i])
return str(nList)
def removeDuplicates2(oList) :
nSet = set(oList)
re... | 0 | 0 | 0 | 0 | 0 | 243 | 0 | 0 | 46 |
63638ff9459fd9b8351686e9853de03c07ff1d5f | 8,147 | py | Python | plaidbench/plaidbench.py | TolyaTalamanov/plaidml | 275a79cd640def34c1b7bc7053397f5989ef55c2 | [
"Apache-2.0"
] | 1 | 2019-09-11T11:18:50.000Z | 2019-09-11T11:18:50.000Z | plaidbench/plaidbench.py | HubBucket-Team/plaidml | 762d5fff6467b43a15623f927502892ce8df91a4 | [
"Apache-2.0"
] | 9 | 2020-01-28T23:12:54.000Z | 2022-02-26T06:15:40.000Z | plaidbench/plaidbench.py | HubBucket-Team/plaidml | 762d5fff6467b43a15623f927502892ce8df91a4 | [
"Apache-2.0"
] | 1 | 2019-09-11T11:18:52.000Z | 2019-09-11T11:18:52.000Z | #!/usr/bin/env python
#
# Copyright 2018 Intel Corporation
#
# 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... | 38.611374 | 96 | 0.593593 | #!/usr/bin/env python
#
# Copyright 2018 Intel Corporation
#
# 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... | 0 | 0 | 0 | 0 | 0 | 6,778 | 0 | -18 | 114 |
1205711237983cb257bd2d8e827b3d6e41499a39 | 1,237 | py | Python | python exercises/dek_program010.py | dek-odoo/python-samples | 0109d19e0aec3f40ea39973948d99657f7c27135 | [
"Apache-2.0"
] | 3 | 2015-01-30T07:06:26.000Z | 2020-08-04T05:09:23.000Z | python exercises/dek_program010.py | dek-odoo/python-samples | 0109d19e0aec3f40ea39973948d99657f7c27135 | [
"Apache-2.0"
] | null | null | null | python exercises/dek_program010.py | dek-odoo/python-samples | 0109d19e0aec3f40ea39973948d99657f7c27135 | [
"Apache-2.0"
] | 7 | 2017-06-15T23:27:48.000Z | 2021-12-28T17:34:16.000Z | #!/user/bin/python
# -*- coding: utf-8 -*-
# Author : (DEK) Devendra Kavthekar
# program010 :
# Write a program that accepts a sequence of whitespace
# separated words as input and prints the words after
# removing all duplicate words and sorting
# them alphanumerically.
# Suppose the following input is supplied to t... | 30.925 | 69 | 0.725141 | #!/user/bin/python
# -*- coding: utf-8 -*-
# Author : (DEK) Devendra Kavthekar
# program010 :
# Write a program that accepts a sequence of whitespace
# separated words as input and prints the words after
# removing all duplicate words and sorting
# them alphanumerically.
# Suppose the following input is supplied to t... | 0 | 0 | 0 | 0 | 0 | 474 | 0 | 0 | 23 |
f3420752ed0c50477608e6c6acbf30af5c655cc3 | 519 | py | Python | python3/async-queue.py | voidabhi/python-scripts | a6d06bd3ccf4ec24df521a3cf305d22176f68a18 | [
"MIT"
] | 2 | 2015-06-01T18:33:38.000Z | 2018-11-21T19:40:37.000Z | python3/async-queue.py | voidabhi/python-scripts | a6d06bd3ccf4ec24df521a3cf305d22176f68a18 | [
"MIT"
] | 102 | 2015-01-20T17:26:52.000Z | 2017-12-28T17:32:51.000Z | python3/async-queue.py | voidabhi/python-scripts | a6d06bd3ccf4ec24df521a3cf305d22176f68a18 | [
"MIT"
] | 3 | 2020-03-02T06:54:18.000Z | 2021-01-07T16:36:35.000Z |
# http://stackoverflow.com/questions/23864341/equivalent-of-asyncio-queues-with-worker-threads
import asyncio
q = asyncio.Queue()
loop = asyncio.get_event_loop()
loop.create_task(produce())
loop.create_task(consume())
loop.run_forever()
| 19.961538 | 94 | 0.695568 |
# http://stackoverflow.com/questions/23864341/equivalent-of-asyncio-queues-with-worker-threads
import asyncio, random
q = asyncio.Queue()
@asyncio.coroutine
def produce():
while True:
yield from q.put(random.random())
yield from asyncio.sleep(0.5 + random.random())
@asyncio.coroutine
def consum... | 0 | 222 | 0 | 0 | 0 | 0 | 0 | 8 | 46 |
849923bdd5cdf7c37ae4d171af748d4a424dc335 | 1,497 | py | Python | IPython/kernel/tests/test_kernelmanager.py | pyarnold/ipython | c4797f7f069d0a974ddfa1e4251c7550c809dba0 | [
"BSD-3-Clause-Clear"
] | 1 | 2020-12-18T01:07:55.000Z | 2020-12-18T01:07:55.000Z | IPython/kernel/tests/test_kernelmanager.py | pyarnold/ipython | c4797f7f069d0a974ddfa1e4251c7550c809dba0 | [
"BSD-3-Clause-Clear"
] | null | null | null | IPython/kernel/tests/test_kernelmanager.py | pyarnold/ipython | c4797f7f069d0a974ddfa1e4251c7550c809dba0 | [
"BSD-3-Clause-Clear"
] | null | null | null | """Tests for the notebook kernel and session manager"""
| 27.218182 | 80 | 0.637275 | """Tests for the notebook kernel and session manager"""
from subprocess import PIPE
import time
from unittest import TestCase
from IPython.testing import decorators as dec
from IPython.config.loader import Config
from IPython.kernel import KernelManager
class TestKernelManager(TestCase):
def _get_tcp_km(self)... | 0 | 92 | 0 | 1,124 | 0 | 0 | 0 | 66 | 158 |
76a1f7414152f1a84e38fe56f174dace029e5ca5 | 871 | py | Python | code_examples/popart/block_sparse/examples/sparse_softmax/test_sparse_softmax_subblock.py | kew96/GraphcoreExamples | 22dc0d7e3755b0a7f16cdf694c6d10c0f91ee8eb | [
"MIT"
] | null | null | null | code_examples/popart/block_sparse/examples/sparse_softmax/test_sparse_softmax_subblock.py | kew96/GraphcoreExamples | 22dc0d7e3755b0a7f16cdf694c6d10c0f91ee8eb | [
"MIT"
] | null | null | null | code_examples/popart/block_sparse/examples/sparse_softmax/test_sparse_softmax_subblock.py | kew96/GraphcoreExamples | 22dc0d7e3755b0a7f16cdf694c6d10c0f91ee8eb | [
"MIT"
] | null | null | null | # Copyright (c) 2020 Graphcore Ltd. All rights reserved.
import os
# NOTE: The import below is dependent on 'pytest.ini' in the root of
# the repository
from examples_tests.test_util import run_python_script_helper
def run_sparse_softmax_subblock(**kwargs):
"""Helper function to run popart sparse softmax with sub... | 28.096774 | 96 | 0.703789 | # Copyright (c) 2020 Graphcore Ltd. All rights reserved.
import os
import unittest
import re
import pytest
# NOTE: The import below is dependent on 'pytest.ini' in the root of
# the repository
from examples_tests.test_util import run_python_script_helper, run_test_helper
def run_sparse_softmax_subblock(**kwargs):
... | 0 | 211 | 0 | 9 | 0 | 0 | 0 | -9 | 117 |
3a3aa8da403e472ed2e0b7150550d91b55d30071 | 1,156 | py | Python | upsid_phonename_scape.py | AdamKing11/LangTypo | 35675cfd586e236e380b757fd9cdbcd3108af332 | [
"MIT"
] | null | null | null | upsid_phonename_scape.py | AdamKing11/LangTypo | 35675cfd586e236e380b757fd9cdbcd3108af332 | [
"MIT"
] | null | null | null | upsid_phonename_scape.py | AdamKing11/LangTypo | 35675cfd586e236e380b757fd9cdbcd3108af332 | [
"MIT"
] | null | null | null | url = 'http://web.phonetik.uni-frankfurt.de/S/S00002.html'
if __name__ == '__main__':
main()
| 24.083333 | 62 | 0.665225 | import os, sys, re, csv
from bs4 import BeautifulSoup
import requests, time
from tqdm import tqdm
url = 'http://web.phonetik.uni-frankfurt.de/S/S00002.html'
def get_phoneme_and_description(url):
req = requests.get(url)
soup = BeautifulSoup(req.text, 'html.parser')
tds = soup.find_all('td')
# if we don't find any... | 0 | 0 | 0 | 0 | 0 | 913 | 0 | 10 | 134 |
053681f0c116ef0ad617ff2fa6c4a62e58f7a04e | 4,590 | py | Python | scripts/benchmarks_test_n_stats.py | Marghrid/Forest | 2f1730fd7cb1e3579fcce222c67b91c5bb1aa5f4 | [
"Apache-2.0"
] | 7 | 2020-06-24T12:14:40.000Z | 2022-01-19T17:01:02.000Z | scripts/benchmarks_test_n_stats.py | Marghrid/Forest | 2f1730fd7cb1e3579fcce222c67b91c5bb1aa5f4 | [
"Apache-2.0"
] | null | null | null | scripts/benchmarks_test_n_stats.py | Marghrid/Forest | 2f1730fd7cb1e3579fcce222c67b91c5bb1aa5f4 | [
"Apache-2.0"
] | null | null | null | # noinspection PyTypeChecker
exclude_instances = ["datetime2"] # , "color", "date", "date7", "id1", "date3"]
if __name__ == '__main__':
main()
| 35.581395 | 100 | 0.623529 | import argparse
import glob
# noinspection PyTypeChecker
from dataclasses import dataclass
from operator import add
from statistics import median, mean
from termcolor import colored
from forest.parse_examples import parse_resnax, parse_file
exclude_instances = ["datetime2"] # , "color", "date", "date7", "id1", "dat... | 0 | 104 | 0 | 0 | 0 | 4,049 | 0 | 58 | 225 |
3748270548690274a46aef4bbf98478fcc07582a | 222 | py | Python | area.py | SharmaSatvik/PYTHON | abdaab6d185d005dd9979b521dc426b8f0fdd9b4 | [
"Apache-2.0"
] | null | null | null | area.py | SharmaSatvik/PYTHON | abdaab6d185d005dd9979b521dc426b8f0fdd9b4 | [
"Apache-2.0"
] | null | null | null | area.py | SharmaSatvik/PYTHON | abdaab6d185d005dd9979b521dc426b8f0fdd9b4 | [
"Apache-2.0"
] | null | null | null | main()
| 24.666667 | 56 | 0.594595 | def area_rectangle(l,b):
return l*b
def main():
l=input('What is the length of the rectangle? \n')
b=input('What is the breadth of the rectangle? \n')
a=l*b
print "Area is the: "+ str(a)
main()
| 0 | 0 | 0 | 0 | 0 | 168 | 0 | 0 | 46 |
a1feb5c12b0bf9ffbfcb40dc393266265ada3aaa | 1,106 | py | Python | python/leetcode/520_detect_capital.py | yxun/Notebook | 680ae89a32d3f7d4fdcd541e66cea97e29efbd26 | [
"Apache-2.0"
] | 1 | 2021-10-04T13:26:32.000Z | 2021-10-04T13:26:32.000Z | python/leetcode/520_detect_capital.py | yxun/Notebook | 680ae89a32d3f7d4fdcd541e66cea97e29efbd26 | [
"Apache-2.0"
] | 3 | 2020-03-24T19:34:42.000Z | 2022-01-21T20:15:39.000Z | python/leetcode/520_detect_capital.py | yxun/Notebook | 680ae89a32d3f7d4fdcd541e66cea97e29efbd26 | [
"Apache-2.0"
] | 1 | 2021-04-01T20:56:50.000Z | 2021-04-01T20:56:50.000Z | #%%
"""
- Detect Capital
- https://leetcode.com/problems/detect-capital/
- Easy
Given a word, you need to judge whether the usage of capitals in it is right or not.
We define the usage of capitals in a word to be right when one of the following cases holds:
All letters in this word are capitals, like "USA".
All lett... | 22.571429 | 93 | 0.653707 | #%%
"""
- Detect Capital
- https://leetcode.com/problems/detect-capital/
- Easy
Given a word, you need to judge whether the usage of capitals in it is right or not.
We define the usage of capitals in a word to be right when one of the following cases holds:
All letters in this word are capitals, like "USA".
All lett... | 0 | 0 | 0 | 351 | 0 | 0 | 0 | 0 | 44 |
9c6019646c5a3031843b1eca1d1685949b1abd34 | 169 | py | Python | django_database/tags/admin.py | SyedArsalanAmin/webdev | 28fd7fc6c865588604c9e965a4416c7e0eb4a1c8 | [
"MIT"
] | null | null | null | django_database/tags/admin.py | SyedArsalanAmin/webdev | 28fd7fc6c865588604c9e965a4416c7e0eb4a1c8 | [
"MIT"
] | null | null | null | django_database/tags/admin.py | SyedArsalanAmin/webdev | 28fd7fc6c865588604c9e965a4416c7e0eb4a1c8 | [
"MIT"
] | null | null | null | # Register your models here. | 24.142857 | 33 | 0.775148 | from django.contrib import admin
from .models import Tag
# Register your models here.
@admin.register(Tag)
class TagAdmin(admin.ModelAdmin):
search_fields=['label'] | 0 | 61 | 0 | 0 | 0 | 0 | 0 | 13 | 67 |
7f35333dd0d0cc626b4ca735f6555f40ac00f3a8 | 293 | py | Python | setup.py | anfederico/Tableize | caa80be5408faedc2466c6b8cf1647e8b7a1065e | [
"MIT"
] | 13 | 2017-01-22T21:59:59.000Z | 2019-07-11T09:22:07.000Z | setup.py | anfederico/Tableize | caa80be5408faedc2466c6b8cf1647e8b7a1065e | [
"MIT"
] | null | null | null | setup.py | anfederico/Tableize | caa80be5408faedc2466c6b8cf1647e8b7a1065e | [
"MIT"
] | 4 | 2018-01-10T13:17:37.000Z | 2019-11-20T20:01:48.000Z | from distutils.core import setup
setup(name='tableize',
version='v1.0',
description='Turn lists into tables with ease',
author='Anthony Federico',
author_email='dephoona@gmail.com',
url='https://github.com/anfederico/Tableize',
packages=['tableize']
) | 29.3 | 53 | 0.658703 | from distutils.core import setup
setup(name='tableize',
version='v1.0',
description='Turn lists into tables with ease',
author='Anthony Federico',
author_email='dephoona@gmail.com',
url='https://github.com/anfederico/Tableize',
packages=['tableize']
) | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
c13f9738a03ec104ea77b79cc5d13e2046ed4b8d | 16,512 | py | Python | server/wkr_serving/server/__init__.py | RyanDam/Worker-as-service | f8da724a597d7a4e535be8cdee8db250fbbeb776 | [
"MIT"
] | 3 | 2021-01-18T09:11:09.000Z | 2021-01-18T09:11:37.000Z | server/wkr_serving/server/__init__.py | RyanDam/Worker-as-service | f8da724a597d7a4e535be8cdee8db250fbbeb776 | [
"MIT"
] | null | null | null | server/wkr_serving/server/__init__.py | RyanDam/Worker-as-service | f8da724a597d7a4e535be8cdee8db250fbbeb776 | [
"MIT"
] | 1 | 2021-01-18T09:11:42.000Z | 2021-01-18T09:11:42.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Han Xiao <artex.xh@gmail.com> <https://hanxiao.github.io>
from .hard_worker import WKRHardWorker
__all__ = ['__version__', 'WKRServer', 'WKRHardWorker']
__version__ = '2.1.0' | 44.747967 | 211 | 0.586543 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Han Xiao <artex.xh@gmail.com> <https://hanxiao.github.io>
import multiprocessing
import os
import random
import sys
import threading
import time
from collections import defaultdict
from datetime import datetime
from itertools import chain
from multiprocessing import Proce... | 0 | 7,029 | 0 | 8,708 | 0 | 0 | 0 | 64 | 488 |
d7f7839ae82bfa72cba18b1a46e544578a1db9f1 | 3,842 | py | Python | cs101/HW9/Code Snippets.py | rootulp/school | cdf7b3f261e9f0f6991a4740790c5f54747079b5 | [
"MIT"
] | null | null | null | cs101/HW9/Code Snippets.py | rootulp/school | cdf7b3f261e9f0f6991a4740790c5f54747079b5 | [
"MIT"
] | null | null | null | cs101/HW9/Code Snippets.py | rootulp/school | cdf7b3f261e9f0f6991a4740790c5f54747079b5 | [
"MIT"
] | null | null | null | # Code Snippets for Flow Solver
# Below are a few code snippets, intended to save you the time and tedium
# of typing in file name lists. Copy and paste these into your program as needed.
# Snippet number 1: List of colors used. Not sure if you need this or not.
# By the way, the "white" files are really gray.
... | 39.608247 | 130 | 0.609058 | # Code Snippets for Flow Solver
# Below are a few code snippets, intended to save you the time and tedium
# of typing in file name lists. Copy and paste these into your program as needed.
# Snippet number 1: List of colors used. Not sure if you need this or not.
# By the way, the "white" files are really gray.
... | 0 | 0 | 0 | 0 | 0 | 616 | 0 | 0 | 48 |
270713a01112cdee0d2783004b1a5e1fda5a3fd0 | 393 | py | Python | venv/Lib/site-packages/mcipc/rcon/je/commands/locatebiome.py | Svesnav2/Discord-Bot-Minecraft-server-status | ee34948e741930567a3adb557197523f9d32ace1 | [
"Unlicense"
] | null | null | null | venv/Lib/site-packages/mcipc/rcon/je/commands/locatebiome.py | Svesnav2/Discord-Bot-Minecraft-server-status | ee34948e741930567a3adb557197523f9d32ace1 | [
"Unlicense"
] | null | null | null | venv/Lib/site-packages/mcipc/rcon/je/commands/locatebiome.py | Svesnav2/Discord-Bot-Minecraft-server-status | ee34948e741930567a3adb557197523f9d32ace1 | [
"Unlicense"
] | null | null | null | """Implementation of the locatebiome command."""
__all__ = ['locatebiome']
| 23.117647 | 52 | 0.748092 | """Implementation of the locatebiome command."""
from mcipc.rcon.client import Client
from mcipc.rcon.functions import parsed
from mcipc.rcon.je.types import Biome
from mcipc.rcon.response_types.location import parse
__all__ = ['locatebiome']
@parsed(parse)
def locatebiome(self: Client, biome: Biome) -> str:
"... | 0 | 123 | 0 | 0 | 0 | 0 | 0 | 80 | 112 |
aaae761b8a0ec413f37371ef7bba12f769741840 | 6,109 | py | Python | model.py | pianomania/LSGAN | ddd1db70f246c9697fd36696e315fa3bcee72241 | [
"MIT"
] | 2 | 2019-01-09T04:57:49.000Z | 2022-03-24T09:33:46.000Z | model.py | pianomania/LSGAN | ddd1db70f246c9697fd36696e315fa3bcee72241 | [
"MIT"
] | null | null | null | model.py | pianomania/LSGAN | ddd1db70f246c9697fd36696e315fa3bcee72241 | [
"MIT"
] | null | null | null | import tensorflow as tf
batch_norm = tf.contrib.layers.batch_norm
w_init = tf.contrib.layers.variance_scaling_initializer()
b_init = tf.constant_initializer(0.0)
| 27.394619 | 112 | 0.560648 | import tensorflow as tf
from config import *
batch_norm = tf.contrib.layers.batch_norm
w_init = tf.contrib.layers.variance_scaling_initializer()
b_init = tf.constant_initializer(0.0)
def lrelu(x, leak=0.2, name="lrelu"):
with tf.variable_scope(name):
f1 = 0.5 * (1 + leak)
f2 = 0.5 * (1 - leak)
... | 0 | 0 | 0 | 5,637 | 0 | 150 | 0 | -1 | 160 |
1d597ce2b665b200a91c118be2735fbf2d3e9e6b | 1,634 | py | Python | remote_works/temp.py | tetyanaloskutova/saleor | b3bb51e9c0c4c2febf4aa1e2a7d893e77c331e89 | [
"BSD-3-Clause"
] | 7 | 2019-05-17T14:27:13.000Z | 2021-12-17T22:52:40.000Z | remote_works/temp.py | tetyanaloskutova/saleor | b3bb51e9c0c4c2febf4aa1e2a7d893e77c331e89 | [
"BSD-3-Clause"
] | 9 | 2019-04-13T09:24:28.000Z | 2019-09-09T15:35:05.000Z | remote_works/temp.py | tetyanaloskutova/remote-works | b3bb51e9c0c4c2febf4aa1e2a7d893e77c331e89 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
import pandas as pd
pd.set_option("display.max_colwidth", 10000)
pd.options.mode.chained_assignment = None # to not make too many copies
import os
import glob
rootdir_glob = 'C:\\conda\\remote_works\\remote_works\\remote_works\\**/*' # Note the added asterisks
# This will return absolute pat... | 30.830189 | 101 | 0.577111 | # -*- coding: utf-8 -*-
import pandas as pd
pd.set_option("display.max_colwidth", 10000)
pd.options.mode.chained_assignment = None # to not make too many copies
import os
import numpy as np
import glob
rootdir_glob = 'C:\\conda\\remote_works\\remote_works\\remote_works\\**/*' # Note the added asterisks
# This will ... | 0 | 0 | 0 | 0 | 0 | 412 | 0 | -3 | 61 |
891ea3f96517f7c0f9f5c767ea019d7b27f2a9ac | 3,310 | py | Python | lib/spack/spack/cmd/versions.py | player1537-forks/spack | 822b7632222ec5a91dc7b7cda5fc0e08715bd47c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 11 | 2015-10-04T02:17:46.000Z | 2018-02-07T18:23:00.000Z | lib/spack/spack/cmd/versions.py | player1537-forks/spack | 822b7632222ec5a91dc7b7cda5fc0e08715bd47c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 22 | 2017-08-01T22:45:10.000Z | 2022-03-10T07:46:31.000Z | lib/spack/spack/cmd/versions.py | player1537-forks/spack | 822b7632222ec5a91dc7b7cda5fc0e08715bd47c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 4 | 2016-06-10T17:57:39.000Z | 2018-09-11T04:59:38.000Z | # Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from __future__ import print_function
import llnl.util.tty as tty
import spack.cmd.common.arguments as arguments
descri... | 36.373626 | 76 | 0.622659 | # Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from __future__ import print_function
import sys
import llnl.util.tty as tty
from llnl.util.tty.colify import colify
im... | 0 | 0 | 0 | 0 | 0 | 2,739 | 0 | 30 | 135 |
4b9e1f33a4576ef24ece7bcf02746c623a408029 | 5,372 | py | Python | tests/utils/processinvokes_test.py | AndreyRub/AlexBerUtils | b2d79c98c083533534470b62632a36dfd730be48 | [
"BSD-2-Clause"
] | null | null | null | tests/utils/processinvokes_test.py | AndreyRub/AlexBerUtils | b2d79c98c083533534470b62632a36dfd730be48 | [
"BSD-2-Clause"
] | 8 | 2019-12-15T05:13:27.000Z | 2021-02-16T20:03:40.000Z | tests/utils/processinvokes_test.py | AndreyRub/AlexBerUtils | b2d79c98c083533534470b62632a36dfd730be48 | [
"BSD-2-Clause"
] | 2 | 2019-12-12T03:52:37.000Z | 2021-05-21T21:14:34.000Z | import logging
import pytest
import alexber.utils.processinvokes as processinvokes
logger = logging.getLogger(__name__)
process_invokes_logger = None
_process_invokes_logger_log = None
if __name__ == "__main__":
pytest.main([__file__])
| 36.794521 | 136 | 0.661765 | import logging
import shlex
import os as _os
import tempfile
from pathlib import Path
import pytest
import alexber.utils.processinvokes as processinvokes
from alexber.utils.processinvokes import LogPipe, LogSubProcessCall
logger = logging.getLogger(__name__)
process_invokes_logger = None
_process_invokes_logger_log = ... | 0 | 850 | 0 | 46 | 0 | 3,858 | 0 | 29 | 340 |
9319a4f9799ae964325e1e7c36342df7e023c6d4 | 1,857 | py | Python | src/embit/liquid/addresses.py | kdmukai/embit | b9ed820b306d2543d413662d01021eb0599d34fb | [
"MIT"
] | null | null | null | src/embit/liquid/addresses.py | kdmukai/embit | b9ed820b306d2543d413662d01021eb0599d34fb | [
"MIT"
] | null | null | null | src/embit/liquid/addresses.py | kdmukai/embit | b9ed820b306d2543d413662d01021eb0599d34fb | [
"MIT"
] | null | null | null | from .. import bech32, ec, script, base58
# TODO: refactor with network
| 34.388889 | 89 | 0.556812 | from .. import bech32, ec, script, base58
from . import blech32
import hmac
from .networks import NETWORKS
def address(script, blinding_key=None, network=NETWORKS['liquidv1']):
if script.data == b"":
return "Fee"
if script.script_type() == "p2sh":
data = script.data[2:-1]
if blinding_ke... | 0 | 0 | 0 | 0 | 0 | 1,673 | 0 | -1 | 111 |
018b7ce3648a1d964c16e571f9faa308c48925ee | 963 | py | Python | Solutions/session_one/src/arda_service.py | TextZip/ROS_SMP | 5b8c1d502cb629dd40890992dd81b36caf8708bd | [
"MIT"
] | null | null | null | Solutions/session_one/src/arda_service.py | TextZip/ROS_SMP | 5b8c1d502cb629dd40890992dd81b36caf8708bd | [
"MIT"
] | null | null | null | Solutions/session_one/src/arda_service.py | TextZip/ROS_SMP | 5b8c1d502cb629dd40890992dd81b36caf8708bd | [
"MIT"
] | null | null | null | #! /usr/bin/env python3
import rospy
from session_one.srv import laser_service
laser_max = 0.00
laser_min = 0.00
rospy.init_node('arda_service_server_node')
my_service = rospy.Service('/Arda',laser_service,service_callback_function)
rospy.spin()
| 24.692308 | 75 | 0.750779 | #! /usr/bin/env python3
import rospy
from session_one.srv import laser_service,laser_serviceResponse
from sensor_msgs.msg import LaserScan
laser_max = 0.00
laser_min = 0.00
def laser_callback(data):
global laser_sub
global laser_max
global laser_min
laser_max = max(data.ranges)
laser_min = min(da... | 0 | 0 | 0 | 0 | 0 | 606 | 0 | 38 | 68 |
ba58de22ade0a5a923c23151e04f9f91105b1558 | 1,375 | py | Python | resc/cachetools.py | DougAF/joblib-demo | 00e64fe2b9d0d8b040c764f6391f4f08f5513058 | [
"MIT"
] | null | null | null | resc/cachetools.py | DougAF/joblib-demo | 00e64fe2b9d0d8b040c764f6391f4f08f5513058 | [
"MIT"
] | null | null | null | resc/cachetools.py | DougAF/joblib-demo | 00e64fe2b9d0d8b040c764f6391f4f08f5513058 | [
"MIT"
] | null | null | null | """Tools to implement caching."""
# pylint: disable=too-few-public-methods
def _make_key(args, kwargs):
"""Creates a hashable key. A simplified version of functools._make_key."""
# create a key for the memo from args and kwargs
key = args
if kwargs:
# marks the start of the keyword argument... | 22.540984 | 94 | 0.602182 | """Tools to implement caching."""
# pylint: disable=too-few-public-methods
import functools
def _make_key(args, kwargs):
"""Creates a hashable key. A simplified version of functools._make_key."""
# create a key for the memo from args and kwargs
key = args
if kwargs:
# marks the start of th... | 0 | 186 | 0 | 513 | 0 | 0 | 0 | -5 | 73 |
0cd1ccbb3cb542d9510f493b4baa931bd8f169cc | 32,385 | py | Python | test/test_derivatives.py | fyumoto/RBMs | 57a3b2a346cea940bd83f0174c741e8760594112 | [
"MIT"
] | 124 | 2017-02-01T23:52:58.000Z | 2022-03-03T11:51:15.000Z | test/test_derivatives.py | fyumoto/RBMs | 57a3b2a346cea940bd83f0174c741e8760594112 | [
"MIT"
] | 58 | 2017-01-29T15:55:57.000Z | 2021-08-25T14:53:18.000Z | test/test_derivatives.py | fyumoto/RBMs | 57a3b2a346cea940bd83f0174c741e8760594112 | [
"MIT"
] | 37 | 2017-02-12T12:55:51.000Z | 2022-03-06T16:57:50.000Z | import pytest
# ----- Functional Programs with Gradients ----- #
# ----- Layer Methods ----- #
if __name__ == "__main__":
pytest.main([__file__])
| 35.983333 | 101 | 0.66784 | from paysage import backends as be
from paysage import layers
from paysage.models import BoltzmannMachine
from paysage.models import gradient_util as gu
from paysage.models.state import StateTAP
import pytest
from copy import deepcopy
from cytoolz import partial
import math
# ----- Functional Programs with Gradients -... | 0 | 0 | 0 | 0 | 0 | 31,435 | 0 | 85 | 705 |
dbd52df89f4757230fa9f00bc9edf46bff0cd371 | 14,429 | py | Python | sdk/python/pulumi_vault/identity/group_member_entity_ids.py | pulumi/pulumi-vault | 1682875f4a5d7d508f36e166529ad2b8aec34090 | [
"ECL-2.0",
"Apache-2.0"
] | 10 | 2019-10-07T17:44:18.000Z | 2022-03-30T20:46:33.000Z | sdk/python/pulumi_vault/identity/group_member_entity_ids.py | pulumi/pulumi-vault | 1682875f4a5d7d508f36e166529ad2b8aec34090 | [
"ECL-2.0",
"Apache-2.0"
] | 79 | 2019-10-11T18:13:07.000Z | 2022-03-31T21:09:41.000Z | sdk/python/pulumi_vault/identity/group_member_entity_ids.py | pulumi/pulumi-vault | 1682875f4a5d7d508f36e166529ad2b8aec34090 | [
"ECL-2.0",
"Apache-2.0"
] | 2 | 2019-10-28T10:08:40.000Z | 2020-03-17T14:20:55.000Z | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import pulumi
from .. import _utilities
__all__ = ['GroupMemberEntityIdsArgs', 'GroupMemberEntityIds']
| 39.531507 | 203 | 0.628526 | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import... | 0 | 11,815 | 0 | 2,146 | 0 | 0 | 0 | 41 | 136 |
540b15270cfc284ffcf6ce5f32b01d3a423f216e | 1,171 | py | Python | build/font/generate_font.py | DAnn2012/skeleton-elements | 558564b8087dc7c05d871982bf0c4c9ca721cdf4 | [
"MIT"
] | null | null | null | build/font/generate_font.py | DAnn2012/skeleton-elements | 558564b8087dc7c05d871982bf0c4c9ca721cdf4 | [
"MIT"
] | null | null | null | build/font/generate_font.py | DAnn2012/skeleton-elements | 558564b8087dc7c05d871982bf0c4c9ca721cdf4 | [
"MIT"
] | null | null | null | import fontforge
import os
import md5
import subprocess
import tempfile
import json
import copy
SCRIPT_PATH = os.path.dirname(os.path.abspath(__file__))
SQUARE_PATH = os.path.join(SCRIPT_PATH, 'square.svg')
OUTPUT_FONT_DIR = os.path.join(SCRIPT_PATH, '..', '..', 'src/fonts')
AUTO_WIDTH = False
KERNING = 0
m = md5.new... | 24.395833 | 172 | 0.704526 | import fontforge
import os
import md5
import subprocess
import tempfile
import json
import copy
SCRIPT_PATH = os.path.dirname(os.path.abspath(__file__))
SQUARE_PATH = os.path.join(SCRIPT_PATH, 'square.svg')
OUTPUT_FONT_DIR = os.path.join(SCRIPT_PATH, '..', '..', 'src/fonts')
AUTO_WIDTH = False
KERNING = 0
m = md5.new... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
0099ebe6a752563f875ebc48c7bacab0636072ed | 72,314 | py | Python | Dictator_service/auto_commands.py | FurqanKhan1/Dictator | 74e29c12a8f92292ab3275661622c0632cdd0a7b | [
"Unlicense"
] | 5 | 2019-03-14T10:17:22.000Z | 2019-10-23T14:04:12.000Z | Dictator_service/auto_commands.py | FurqanKhan1/Dictator | 74e29c12a8f92292ab3275661622c0632cdd0a7b | [
"Unlicense"
] | null | null | null | Dictator_service/auto_commands.py | FurqanKhan1/Dictator | 74e29c12a8f92292ab3275661622c0632cdd0a7b | [
"Unlicense"
] | 14 | 2019-03-14T10:34:02.000Z | 2021-10-31T17:34:13.000Z | """
@Author :Furqan Khan
@Email :furqankhan08@gmail.com
@Date :12/30/2016
Objective :
The purpose of this file /module /Class is to actually execute the external scripts for vulnerability assessment and scanning.It runs metasploit modules ,external python ,ruby,bash,shell,java class files and some perl as w... | 40.832298 | 386 | 0.681237 | """
@Author :Furqan Khan
@Email :furqankhan08@gmail.com
@Date :12/30/2016
Objective :
The purpose of this file /module /Class is to actually execute the external scripts for vulnerability assessment and scanning.It runs metasploit modules ,external python ,ruby,bash,shell,java class files and some perl as w... | 0 | 0 | 0 | 70,545 | 0 | 0 | 0 | -96 | 441 |
77ad11f3b2a84b25b6cf5ec432bbb56f5a8faa2a | 31,161 | py | Python | opsgenie_swagger/api/policy_api.py | Logicworks/opsgenie-python-sdk | 244c4c40ddcc25e70df5ba4425ab8d7c8da59c18 | [
"Apache-2.0"
] | null | null | null | opsgenie_swagger/api/policy_api.py | Logicworks/opsgenie-python-sdk | 244c4c40ddcc25e70df5ba4425ab8d7c8da59c18 | [
"Apache-2.0"
] | null | null | null | opsgenie_swagger/api/policy_api.py | Logicworks/opsgenie-python-sdk | 244c4c40ddcc25e70df5ba4425ab8d7c8da59c18 | [
"Apache-2.0"
] | 1 | 2020-11-07T11:27:13.000Z | 2020-11-07T11:27:13.000Z | # coding: utf-8
"""
OpsGenie REST API
OpsGenie OpenAPI Specification # noqa: E501
OpenAPI spec version: 2.0.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
# python 2 and python 3 compatibility library
| 38.805729 | 129 | 0.610924 | # coding: utf-8
"""
OpsGenie REST API
OpsGenie OpenAPI Specification # noqa: E501
OpenAPI spec version: 2.0.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import re # noqa: F401
# python 2 and python 3 compatibility library
imp... | 0 | 0 | 0 | 30,758 | 0 | 0 | 0 | 5 | 105 |
60c14ce7f841f37a22ed7172cbdceff4268b7d11 | 287 | py | Python | automatia/__init__.py | ShadowJonathan/automatia.py | 555d473c11372b2eec14bcd7508b4593be4fba7f | [
"MIT"
] | 1 | 2018-01-01T21:41:46.000Z | 2018-01-01T21:41:46.000Z | automatia/__init__.py | ShadowJonathan/automatia.py | 555d473c11372b2eec14bcd7508b4593be4fba7f | [
"MIT"
] | null | null | null | automatia/__init__.py | ShadowJonathan/automatia.py | 555d473c11372b2eec14bcd7508b4593be4fba7f | [
"MIT"
] | null | null | null | import automatia.const.priority as priority
| 35.875 | 47 | 0.787456 | from .module import AutomatiaModule
import automatia.const.priority as priority
from automatia.const.state import *
from .main import Debug, Inform, Warn, Error, \
setdebug, setcli, setauto, isauto, \
FinishResult, FinishFinal, FinishNow
from .internal.util import import_exists
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 155 | 88 |
4a7eb8e9c54d18e5eb31946b9c0e01d77aa33660 | 6,771 | py | Python | ezodf2/text.py | iwschris/ezodf2 | 061c4aa3f26e9157ad46155d8ce92db7187b0574 | [
"MIT"
] | 4 | 2015-03-15T22:32:35.000Z | 2019-12-23T12:13:13.000Z | ezodf2/text.py | iwschris/ezodf2 | 061c4aa3f26e9157ad46155d8ce92db7187b0574 | [
"MIT"
] | 3 | 2017-08-17T09:36:42.000Z | 2021-12-13T19:43:28.000Z | ezodf2/text.py | iwschris/ezodf2 | 061c4aa3f26e9157ad46155d8ce92db7187b0574 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#coding:utf-8
# Purpose: text objects
# Created: 03.01.2011
# Copyright (C) 2011, Manfred Moitzi
# License: MIT
from __future__ import unicode_literals, print_function, division
__author__ = "mozman <mozman@gmx.at>"
| 34.545918 | 108 | 0.620883 | #!/usr/bin/env python
#coding:utf-8
# Purpose: text objects
# Created: 03.01.2011
# Copyright (C) 2011, Manfred Moitzi
# License: MIT
from __future__ import unicode_literals, print_function, division
__author__ = "mozman <mozman@gmx.at>"
from.compatibility import is_string
from .xmlns import CN, register_cla... | 0 | 5,917 | 0 | 0 | 0 | 0 | 0 | 208 | 388 |
c4c2c1b10eae9ed738012025597c385bba0273fa | 23,731 | py | Python | manual_keypoints.py | rpng/suo_slam | 5de01433d177fde5cac4423f05fd554e3c00794e | [
"MIT"
] | 5 | 2022-03-28T04:41:35.000Z | 2022-03-30T12:34:41.000Z | manual_keypoints.py | rpng/suo_slam | 5de01433d177fde5cac4423f05fd554e3c00794e | [
"MIT"
] | null | null | null | manual_keypoints.py | rpng/suo_slam | 5de01433d177fde5cac4423f05fd554e3c00794e | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import os
import cv2
import argparse
import numpy as np
import pandas as pd
# sudo apt install libfreetype6-dev
# sudo apt install libglfw3
np.random.seed(666)
# Rendering image size.
IMG_WH = 420
if __name__ == '__main__':
parser = argparse.ArgumentParser("./manual_keypoints.py")
pa... | 43.147273 | 100 | 0.510767 | #!/usr/bin/env python3
import os
import cv2
import json
import math
import time
import argparse
import numpy as np
import pandas as pd
# sudo apt install libfreetype6-dev
# sudo apt install libglfw3
from thirdparty.bop_toolkit.bop_toolkit_lib.renderer import create_renderer
from lib.utils.utils import euler2R
from l... | 0 | 0 | 0 | 20,178 | 0 | 0 | 0 | 51 | 156 |
85ab2eb79ef450ce91522a9d9946c1811f1721f9 | 188 | py | Python | Python How to/Python How to/05_Generating_Password_in_python3/main.py | jmmedel/Python-How-To-tutorial- | 03a9675a7c744c85fd2412b313f4d9d4b833ebe3 | [
"MIT"
] | null | null | null | Python How to/Python How to/05_Generating_Password_in_python3/main.py | jmmedel/Python-How-To-tutorial- | 03a9675a7c744c85fd2412b313f4d9d4b833ebe3 | [
"MIT"
] | null | null | null | Python How to/Python How to/05_Generating_Password_in_python3/main.py | jmmedel/Python-How-To-tutorial- | 03a9675a7c744c85fd2412b313f4d9d4b833ebe3 | [
"MIT"
] | null | null | null | import hashlib
from getpass import getpass
print('Username: ' )
passwd = getpass('Password: ')
h = hashlib.md5()
h.update(passwd.encode())
passwd_encrypt = h.hexdigest() | 20.888889 | 31 | 0.707447 | import os
import hashlib
from getpass import getpass
print('Username: ' )
passwd = getpass('Password: ')
h = hashlib.md5()
h.update(passwd.encode())
passwd_encrypt = h.hexdigest() | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -12 | 23 |
4dad649d4ade5235b84547819707892c6acd4641 | 326 | py | Python | Python_Basics/08_For_Loop/07_Odd_Even_Sum.py | Dochko0/Python | e9612c4e842cfd3d9a733526cc7485765ef2238f | [
"MIT"
] | null | null | null | Python_Basics/08_For_Loop/07_Odd_Even_Sum.py | Dochko0/Python | e9612c4e842cfd3d9a733526cc7485765ef2238f | [
"MIT"
] | null | null | null | Python_Basics/08_For_Loop/07_Odd_Even_Sum.py | Dochko0/Python | e9612c4e842cfd3d9a733526cc7485765ef2238f | [
"MIT"
] | null | null | null | count_num = int(input())
odd = 0
even = 0
for i in range(1, count_num + 1):
curr_num = int(input())
if i % 2 == 0:
odd += curr_num
else:
even += curr_num
if odd == even:
print(f'Yes, sum = {odd}')
elif odd > even:
print(f'No, diff = {odd-even}')
else:
print(f'No, diff = {even-o... | 18.111111 | 35 | 0.530675 | count_num = int(input())
odd = 0
even = 0
for i in range(1, count_num + 1):
curr_num = int(input())
if i % 2 == 0:
odd += curr_num
else:
even += curr_num
if odd == even:
print(f'Yes, sum = {odd}')
elif odd > even:
print(f'No, diff = {odd-even}')
else:
print(f'No, diff = {even-o... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
f7645d912e665b7e69a40375fedcfecd8bff8f6f | 5,018 | py | Python | enn/losses/utils.py | MaxGhenis/enn | d830c31da16ea912ea3700aaf79e5e2f841eba8d | [
"Apache-2.0"
] | 130 | 2021-07-21T16:50:07.000Z | 2022-02-21T13:02:29.000Z | enn/losses/utils.py | MaxGhenis/enn | d830c31da16ea912ea3700aaf79e5e2f841eba8d | [
"Apache-2.0"
] | 4 | 2021-07-27T16:46:58.000Z | 2022-01-29T09:27:36.000Z | enn/losses/utils.py | LaudateCorpus1/enn | d830c31da16ea912ea3700aaf79e5e2f841eba8d | [
"Apache-2.0"
] | 26 | 2021-07-23T16:27:17.000Z | 2022-01-06T08:14:36.000Z | # python3
# pylint: disable=g-bad-file-header
# Copyright 2021 DeepMind Technologies Limited. 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... | 37.17037 | 80 | 0.680151 | # python3
# pylint: disable=g-bad-file-header
# Copyright 2021 DeepMind Technologies Limited. 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... | 0 | 155 | 0 | 0 | 0 | 1,912 | 0 | 4 | 145 |
125a249fcd04cd194527ef71dede4d4b1955d8d7 | 9,695 | py | Python | aerosandbox/performance/operating_point.py | raihaan123/AeroSandbox | 1e7c78f04b066415f671237a4833ba98901bb9ec | [
"MIT"
] | null | null | null | aerosandbox/performance/operating_point.py | raihaan123/AeroSandbox | 1e7c78f04b066415f671237a4833ba98901bb9ec | [
"MIT"
] | null | null | null | aerosandbox/performance/operating_point.py | raihaan123/AeroSandbox | 1e7c78f04b066415f671237a4833ba98901bb9ec | [
"MIT"
] | null | null | null |
if __name__ == '__main__':
op_point = OperatingPoint()
| 37.432432 | 170 | 0.564621 | from aerosandbox.geometry import *
from aerosandbox import Atmosphere
import aerosandbox.numpy as np
from typing import Tuple, Union
class OperatingPoint(AeroSandboxObject):
def __init__(self,
atmosphere: Atmosphere = Atmosphere(altitude=0),
velocity: float = 1.,
... | 0 | 0 | 0 | 9,477 | 0 | 0 | 0 | 45 | 111 |
617aa78656477bc4b757fc252bf54f3a6d2791c3 | 256 | py | Python | pg_rest_api/settings/environments/staging.py | PartyGwam/api | f580e29762990eabdb3bb5e317dee22c6c441696 | [
"MIT"
] | 1 | 2018-06-24T08:10:12.000Z | 2018-06-24T08:10:12.000Z | pg_rest_api/settings/environments/staging.py | PartyGwam/api | f580e29762990eabdb3bb5e317dee22c6c441696 | [
"MIT"
] | 48 | 2018-06-24T12:30:15.000Z | 2022-01-13T00:48:24.000Z | pg_rest_api/settings/environments/staging.py | PartyGwam/api | f580e29762990eabdb3bb5e317dee22c6c441696 | [
"MIT"
] | null | null | null | import django_heroku
import dj_database_url
HOST = 'https://partygwam-staging.herokuapp.com'
DEBUG = True
ALLOWED_HOSTS = [
'herokuapp.com',
]
DATABASES = {
'default': dj_database_url.config(ssl_require=True)
}
django_heroku.settings(locals())
| 16 | 55 | 0.742188 | import django_heroku
import dj_database_url
HOST = 'https://partygwam-staging.herokuapp.com'
DEBUG = True
ALLOWED_HOSTS = [
'herokuapp.com',
]
DATABASES = {
'default': dj_database_url.config(ssl_require=True)
}
django_heroku.settings(locals())
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
141c05ed87b99199b4a8411bd3e3b8b9af4a44b1 | 1,610 | py | Python | SfMLearner.py | HongqiangWei/SfMLearner | 55c05225c5944ca3f2fcf9b56c6619ecff16790e | [
"MIT"
] | null | null | null | SfMLearner.py | HongqiangWei/SfMLearner | 55c05225c5944ca3f2fcf9b56c6619ecff16790e | [
"MIT"
] | null | null | null | SfMLearner.py | HongqiangWei/SfMLearner | 55c05225c5944ca3f2fcf9b56c6619ecff16790e | [
"MIT"
] | 1 | 2020-04-03T12:54:50.000Z | 2020-04-03T12:54:50.000Z | from __future__ import division | 35 | 74 | 0.626708 | from __future__ import division
import tensorflow as tf
from nets import *
class SfMLearner(object):
def __init__(self,
batch_size=4,
img_height=128,
img_width=416):
self.batch_size = batch_size
self.img_height = img_height
self.img_width... | 0 | 0 | 0 | 1,513 | 0 | 0 | 0 | -1 | 67 |
3c3ad2ae3e0de717eb98a40a4509c2f93a19ce24 | 665 | py | Python | scripts/prepare_example_data.py | kaizen36/dash-visualisation | a21c30e20f5d900bc7b6928de8bcb2641cd1f461 | [
"MIT"
] | null | null | null | scripts/prepare_example_data.py | kaizen36/dash-visualisation | a21c30e20f5d900bc7b6928de8bcb2641cd1f461 | [
"MIT"
] | 5 | 2019-04-19T15:12:18.000Z | 2019-10-13T19:43:59.000Z | scripts/prepare_example_data.py | kaizen36/dash-visualisation | a21c30e20f5d900bc7b6928de8bcb2641cd1f461 | [
"MIT"
] | null | null | null |
if __name__=='__main__':
main()
| 26.6 | 64 | 0.586466 | import networkx as nx
import json
def main():
g = nx.DiGraph()
g.add_node('A', node_type='entity')
for i in list('abcdefg'):
g.add_node(i, node_type='field', type='string')
g.add_edge('A', i)
g.add_node('B', node_type='entity')
for i in list('hijklmnop'):
g.add_node(i, node_... | 0 | 0 | 0 | 0 | 0 | 571 | 0 | -10 | 67 |
46b2765bdabf47cf27e833e8306c4c1a53c268a7 | 3,000 | py | Python | predictPlot.py | MohithGowdaHR/Watt-Movies-Backend | 28750263a306802d3e54968e6f56ad3031df138c | [
"MIT"
] | null | null | null | predictPlot.py | MohithGowdaHR/Watt-Movies-Backend | 28750263a306802d3e54968e6f56ad3031df138c | [
"MIT"
] | null | null | null | predictPlot.py | MohithGowdaHR/Watt-Movies-Backend | 28750263a306802d3e54968e6f56ad3031df138c | [
"MIT"
] | null | null | null | #!pip install pymysql
#predictPlot()
| 30.30303 | 119 | 0.741 | #!pip install pymysql
import pandas as pd
from sqlalchemy import create_engine
from sqlalchemy import insert
import pymysql
import mysql.connector as msql
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.metrics.pairwise import linear_kernel
def predictPlot():
#Start MySQL connection
db_... | 0 | 0 | 0 | 0 | 0 | 2,693 | 0 | 90 | 177 |
fd07a9317133512ee513aab8bf04f11ba4bfea09 | 4,762 | py | Python | evennia/scripts/migrations/0001_initial.py | Jaykingamez/evennia | cf7cab1fea99ede3efecb70a65c3eb0fba1d3745 | [
"BSD-3-Clause"
] | 1,544 | 2015-01-01T22:16:31.000Z | 2022-03-31T19:17:45.000Z | evennia/scripts/migrations/0001_initial.py | Jaykingamez/evennia | cf7cab1fea99ede3efecb70a65c3eb0fba1d3745 | [
"BSD-3-Clause"
] | 1,686 | 2015-01-02T18:26:31.000Z | 2022-03-31T20:12:03.000Z | evennia/scripts/migrations/0001_initial.py | Jaykingamez/evennia | cf7cab1fea99ede3efecb70a65c3eb0fba1d3745 | [
"BSD-3-Clause"
] | 867 | 2015-01-02T21:01:54.000Z | 2022-03-29T00:28:27.000Z | # -*- coding: utf-8 -*-
| 40.016807 | 255 | 0.431961 | # -*- coding: utf-8 -*-
from django.db import models, migrations
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
("objects", "0001_initial"),
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
("typeclasses", "0001_initial"),
]
o... | 0 | 0 | 0 | 4,638 | 0 | 0 | 0 | 30 | 68 |
b1251486d7e14ca20c3208f9e9783f598ada2f51 | 546 | py | Python | ML/Webscrap/image_extractor.py | praveenpmin/Python | 513fcde7430b03a187e2c7e58302b88645388eed | [
"MIT"
] | null | null | null | ML/Webscrap/image_extractor.py | praveenpmin/Python | 513fcde7430b03a187e2c7e58302b88645388eed | [
"MIT"
] | null | null | null | ML/Webscrap/image_extractor.py | praveenpmin/Python | 513fcde7430b03a187e2c7e58302b88645388eed | [
"MIT"
] | null | null | null | from urllib.request import urljoin
if __name__ == '__main__':
target_url = 'http://www.apress.com/'
# target_url = 'http://www.sainsbury.co.uk'
apress = download_page(target_url)
image_locations = extract_image_locations(apress)
for src in image_locations:
print(urljoin(target_url, src)) | 36.4 | 58 | 0.697802 | from urllib.request import urlopen, urljoin
import re
def download_page(url):
return urlopen(url).read().decode('utf-8')
def extract_image_locations(page):
img_regex = re.compile('<img[^>]+src=["\'](.*?)["\']',
re.IGNORECASE)
return img_regex.findall(page)
if __name__ == '__main__':
target_url = 'ht... | 0 | 0 | 0 | 0 | 0 | 175 | 0 | -3 | 66 |
5b09b7d34cd559bde3052a0943e6f6420d078c32 | 5,600 | py | Python | appengine/findit/waterfall/test/analyze_build_failure_pipeline_test.py | mcgreevy/chromium-infra | 09064105713603f7bf75c772e8354800a1bfa256 | [
"BSD-3-Clause"
] | 1 | 2018-01-02T05:47:07.000Z | 2018-01-02T05:47:07.000Z | appengine/findit/waterfall/test/analyze_build_failure_pipeline_test.py | mcgreevy/chromium-infra | 09064105713603f7bf75c772e8354800a1bfa256 | [
"BSD-3-Clause"
] | null | null | null | appengine/findit/waterfall/test/analyze_build_failure_pipeline_test.py | mcgreevy/chromium-infra | 09064105713603f7bf75c772e8354800a1bfa256 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
| 41.176471 | 80 | 0.619464 | # Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import os
from common import constants
from common.waterfall import failure_type
from gae_libs.pipeline_wrapper import pipeline_handlers
from libs import an... | 0 | 0 | 0 | 4,965 | 0 | 0 | 0 | 205 | 267 |
2441d6a6ba39095dfed8b709f6f66727ab8980b9 | 3,068 | py | Python | ooobuild/lo/accessibility/x_accessible_text_attributes.py | Amourspirit/ooo_uno_tmpl | 64e0c86fd68f24794acc22d63d8d32ae05dd12b8 | [
"Apache-2.0"
] | null | null | null | ooobuild/lo/accessibility/x_accessible_text_attributes.py | Amourspirit/ooo_uno_tmpl | 64e0c86fd68f24794acc22d63d8d32ae05dd12b8 | [
"Apache-2.0"
] | null | null | null | ooobuild/lo/accessibility/x_accessible_text_attributes.py | Amourspirit/ooo_uno_tmpl | 64e0c86fd68f24794acc22d63d8d32ae05dd12b8 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
#
# Copyright 2022 :Barry-Thomas-Paul: Moss
#
# 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 applicab... | 43.828571 | 295 | 0.72751 | # coding: utf-8
#
# Copyright 2022 :Barry-Thomas-Paul: Moss
#
# 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 applicab... | 0 | 1,464 | 0 | 637 | 0 | 0 | 0 | 67 | 71 |
b4ebe3fa10452b3bc95649ccfa277aba343be7f5 | 1,441 | py | Python | generate_embeddings.py | sharanramjee/wegl-gbt | edb034764c2bb383e14b7ebe02ca29a2c950c9dc | [
"MIT"
] | null | null | null | generate_embeddings.py | sharanramjee/wegl-gbt | edb034764c2bb383e14b7ebe02ca29a2c950c9dc | [
"MIT"
] | null | null | null | generate_embeddings.py | sharanramjee/wegl-gbt | edb034764c2bb383e14b7ebe02ca29a2c950c9dc | [
"MIT"
] | null | null | null | # Import required modules
import torch
from ogb.graphproppred import PygGraphPropPredDataset
from WEGL.WEGL import WEGL
# Set the random seed
random_seed = 55
# Load the dataset
dataset = PygGraphPropPredDataset(name="ogbg-molhiv")
print('# of graphs = {0}\n# of classes = {1}\n# of node features = {2}\n# of... | 34.309524 | 106 | 0.711312 | # Import required modules
import torch
import ogb
from ogb.graphproppred import PygGraphPropPredDataset
from WEGL.WEGL import WEGL
# Set the random seed
random_seed = 55
# Load the dataset
dataset = PygGraphPropPredDataset(name="ogbg-molhiv")
print('# of graphs = {0}\n# of classes = {1}\n# of node features... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -11 | 23 |
36996814767de40bd70af2592f8f78cad9d48650 | 3,928 | py | Python | python/pyJvsip/vsipAddendum.py | rrjudd/jvsip | 56a965fff595b027139ff151d27d434f2480b9e8 | [
"MIT"
] | 10 | 2016-01-16T04:10:13.000Z | 2022-03-22T02:17:44.000Z | python/pyJvsip/vsipAddendum.py | rrjudd/jvsip | 56a965fff595b027139ff151d27d434f2480b9e8 | [
"MIT"
] | 1 | 2015-09-11T04:48:03.000Z | 2015-09-11T13:44:29.000Z | python/pyJvsip/vsipAddendum.py | rrjudd/jvsip | 56a965fff595b027139ff151d27d434f2480b9e8 | [
"MIT"
] | 4 | 2017-06-13T21:48:23.000Z | 2020-08-26T15:07:44.000Z | #Spline, Sort, Permute; Interpolate
#spline is a class in pyJvsip.py
# pyJvsip Functions
| 48.493827 | 115 | 0.660896 | from vsip import *
#Spline, Sort, Permute; Interpolate
#spline is a class in pyJvsip.py
# pyJvsip Functions
def linear(x0,y0,*args):
major={'ROW':VSIP_ROW,'COL':VSIP_COL,0:VSIP_ROW,1:VSIP_COL}
f={'vview_fvview_f':vsip_vinterp_linear_f, 'vview_dvview_d':vsip_vinterp_linear_d,
'vview_fmview_f':vsip_minter... | 0 | 0 | 0 | 0 | 0 | 3,749 | 0 | -3 | 88 |
6fb26f8d6d231168db967996e99c098476a8c3ba | 1,675 | py | Python | api/main.py | cyyeh/dog-breed-classifier-web | 9995dba24129996370d80ee0400ef38b46c0b428 | [
"MIT"
] | 2 | 2021-01-21T08:42:35.000Z | 2021-02-09T05:29:20.000Z | api/main.py | cyyeh/dog-breed-classifier-web | 9995dba24129996370d80ee0400ef38b46c0b428 | [
"MIT"
] | 7 | 2021-03-10T22:02:02.000Z | 2022-02-27T06:30:13.000Z | api/main.py | cyyeh/dog-breed-classifier-web | 9995dba24129996370d80ee0400ef38b46c0b428 | [
"MIT"
] | null | null | null |
from fastapi import FastAPI
from fastapi.middleware.cors import CORSMiddleware
# keep model as global variable so we don't have to reload
# it in case of warm invocations
model = None
BASE64_IMAGE_PATTERN = '^data:image/.+;base64,'
app = FastAPI()
# cors setting
app.add_middleware(
CORSMiddleware,
allow_or... | 27.459016 | 87 | 0.675224 | import re
import base64
from io import BytesIO
from fastapi import FastAPI, HTTPException
from fastapi.middleware.cors import CORSMiddleware
from pydantic import BaseModel
from dog_breed_classifier import DogBreedPrediction
# keep model as global variable so we don't have to reload
# it in case of warm invocations
m... | 0 | 855 | 0 | 22 | 0 | 0 | 0 | 35 | 180 |
e51e83c10a85905a3a0c4d27964d50f2ebfb72bc | 2,968 | py | Python | figures/Fig9_bif3.py | gstonge/influential-groups | d828adeada32ad354f1af864407c66066db20144 | [
"MIT"
] | null | null | null | figures/Fig9_bif3.py | gstonge/influential-groups | d828adeada32ad354f1af864407c66066db20144 | [
"MIT"
] | null | null | null | figures/Fig9_bif3.py | gstonge/influential-groups | d828adeada32ad354f1af864407c66066db20144 | [
"MIT"
] | null | null | null | import pickle
import matplotlib.pyplot as plt
#infection
nu = 1.5
beta = lambda n,i,trate,nu: trate*i**nu
#structure
mmax = 10
gm = np.zeros(mmax+1)
gm[mmax] += 1
nmax = 50
gamma_n = 3
pn = np.zeros(nmax+1)
pn[2:] = (np.arange(2,nmax+1)*1.)**(-gamma_n)
pn /= np.sum(pn)
state_meta = get_state_meta(mmax, nmax, gm, pn)... | 34.114943 | 83 | 0.680593 | import pickle
from gcm import *
import matplotlib.pyplot as plt
#infection
nu = 1.5
beta = lambda n,i,trate,nu: trate*i**nu
#structure
mmax = 10
gm = np.zeros(mmax+1)
gm[mmax] += 1
nmax = 50
gamma_n = 3
pn = np.zeros(nmax+1)
pn[2:] = (np.arange(2,nmax+1)*1.)**(-gamma_n)
pn /= np.sum(pn)
state_meta = get_state_meta(m... | 0 | 267 | 0 | 0 | 0 | 0 | 0 | -4 | 44 |
6cc4638370e5e7f90ecceea26b9baf10ba08bd26 | 989 | py | Python | rig/mik/viba/customShapeRoll/shapeFromGeo.py | Zeplaro/Maya | d1fb1c6c14984d5d4dbf6a8a422026d935256729 | [
"MIT"
] | null | null | null | rig/mik/viba/customShapeRoll/shapeFromGeo.py | Zeplaro/Maya | d1fb1c6c14984d5d4dbf6a8a422026d935256729 | [
"MIT"
] | null | null | null | rig/mik/viba/customShapeRoll/shapeFromGeo.py | Zeplaro/Maya | d1fb1c6c14984d5d4dbf6a8a422026d935256729 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding:utf-8
""":mod:`shapeFromGeo`
===================================
.. module:: moduleName
:platform: Unix
:synopsis: module idea
:author: viba
:date: 2016.10
"""
| 23.547619 | 79 | 0.644085 | #!/usr/bin/env python
# coding:utf-8
""":mod:`shapeFromGeo`
===================================
.. module:: moduleName
:platform: Unix
:synopsis: module idea
:author: viba
:date: 2016.10
"""
import maya.cmds as mc
def build_shape(edge_sel, custom_curve_name='custom1'):
out_curve = mc.polyToCurve(edg... | 0 | 0 | 0 | 0 | 0 | 666 | 0 | 1 | 115 |
bc4b36068d0b64f89bc9eaa9427de72554b7dd03 | 486 | py | Python | module/function/sanitizeStr.py | Saverio976/Chat-App-TUI | 274960550613199225cf2b892c37e6f788ae52b7 | [
"MIT"
] | 3 | 2021-03-16T09:03:06.000Z | 2022-02-27T08:49:30.000Z | module/function/sanitizeStr.py | Saverio976/Chat-App-TUI | 274960550613199225cf2b892c37e6f788ae52b7 | [
"MIT"
] | null | null | null | module/function/sanitizeStr.py | Saverio976/Chat-App-TUI | 274960550613199225cf2b892c37e6f788ae52b7 | [
"MIT"
] | null | null | null | """File with only sanitizeStr function."""
def sanitizeStr(data):
"""
Escape all char that will trigger an error.
Parameters
----------
data: str
the str to sanitize
Returns
-------
str
The sanitized data.
"""
data = " ".join(data.split())
... | 21.130435 | 48 | 0.495885 | """File with only sanitizeStr function."""
def sanitizeStr(data):
"""
Escape all char that will trigger an error.
Parameters
----------
data: str
the str to sanitize
Returns
-------
str
The sanitized data.
"""
data = " ".join(data.split())
... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
3fb7ddb51fab38cacda981a36fea75fbbdf17bbe | 2,573 | py | Python | mapApp/utils/weather.py | amitra/BikeMaps | eb80eed2e3159ad9c4e46427a9f488e1221794fa | [
"MIT"
] | null | null | null | mapApp/utils/weather.py | amitra/BikeMaps | eb80eed2e3159ad9c4e46427a9f488e1221794fa | [
"MIT"
] | null | null | null | mapApp/utils/weather.py | amitra/BikeMaps | eb80eed2e3159ad9c4e46427a9f488e1221794fa | [
"MIT"
] | null | null | null | # Alex Goudine
# GEOG 490 - Webscraping and Database Design
# Scrapes weather data from forecast.io and returns a dict of the relevant information
# Modified by Taylor Denouden
# Shortened script and made into a simple function in which geom and date data can be passed
# Added more efficient and robust cardinal direct... | 46.781818 | 132 | 0.672367 | # Alex Goudine
# GEOG 490 - Webscraping and Database Design
# Scrapes weather data from forecast.io and returns a dict of the relevant information
# Modified by Taylor Denouden
# Shortened script and made into a simple function in which geom and date data can be passed
# Added more efficient and robust cardinal direct... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
6b2af32e0ef34779158cb3dc230a9db13ba224d1 | 2,075 | py | Python | libqtile/widget/backlight.py | CharString/qtile | 7dc1448fa866d4c3a2a5c2738c5cf3fcd10b0631 | [
"MIT"
] | 1 | 2015-03-02T21:18:17.000Z | 2015-03-02T21:18:17.000Z | libqtile/widget/backlight.py | WnP/qtile | 7b3b21d602320df3a43155814e112c850f660fa9 | [
"MIT"
] | null | null | null | libqtile/widget/backlight.py | WnP/qtile | 7b3b21d602320df3a43155814e112c850f660fa9 | [
"MIT"
] | null | null | null |
BACKLIGHT_DIR = '/sys/class/backlight'
FORMAT = '{percent: 2.0%}'
| 27.666667 | 77 | 0.558072 | import cairo
import os
from libqtile import bar
import base
BACKLIGHT_DIR = '/sys/class/backlight'
FORMAT = '{percent: 2.0%}'
class Backlight(base._TextBox):
"""
A simple widget to show the current brightness of a monitor.
"""
filenames = {}
defaults = [
('backlight_name', 'acpi_vi... | 0 | 0 | 0 | 1,923 | 0 | 0 | 0 | -28 | 111 |
ff281611c02e6c0ec557764d511a8abdeaf54478 | 7,468 | py | Python | mop/modules/corrective.py | HolisticCoders/mop | dc464021c7e69975fa9fcc06595cc91113768e5e | [
"MIT"
] | 8 | 2019-09-21T07:17:54.000Z | 2022-02-09T03:33:24.000Z | mop/modules/corrective.py | ProjectBorealis/master-of-puppets | dc464021c7e69975fa9fcc06595cc91113768e5e | [
"MIT"
] | 102 | 2019-01-10T21:00:28.000Z | 2019-03-28T11:32:45.000Z | mop/modules/corrective.py | HolisticCoders/mop | dc464021c7e69975fa9fcc06595cc91113768e5e | [
"MIT"
] | 3 | 2020-01-12T01:37:34.000Z | 2021-10-08T11:34:08.000Z | import maya.cmds as cmds
import mop.metadata
import mop.dag
exported_rig_modules = [Corrective]
| 40.150538 | 122 | 0.631896 | import maya.cmds as cmds
import mop.vendor.node_calculator.core as noca
from mop.modules.leaf import Leaf
from mop.core.fields import IntField, ObjectField
import mop.metadata
import mop.dag
import mop.attributes
class Corrective(Leaf):
vector_base = ObjectField(
displayable=True,
editable=True,... | 0 | 0 | 0 | 7,192 | 0 | 0 | 0 | 65 | 112 |
c42948f96ab9ef4461c993448979a8b222d732d6 | 2,727 | py | Python | tests/unit-tests/test_sphinx_image_candidate.py | bob-schumaker/confluencebuilder | 4e767395e4abbedb1955c7b1b1449244886ecb24 | [
"BSD-2-Clause"
] | 158 | 2019-03-18T13:42:40.000Z | 2022-03-25T09:46:59.000Z | tests/unit-tests/test_sphinx_image_candidate.py | bob-schumaker/confluencebuilder | 4e767395e4abbedb1955c7b1b1449244886ecb24 | [
"BSD-2-Clause"
] | 192 | 2019-03-15T14:12:25.000Z | 2022-03-27T18:35:48.000Z | tests/unit-tests/test_sphinx_image_candidate.py | bob-schumaker/confluencebuilder | 4e767395e4abbedb1955c7b1b1449244886ecb24 | [
"BSD-2-Clause"
] | 54 | 2019-03-22T14:14:31.000Z | 2022-03-08T06:54:28.000Z | # -*- coding: utf-8 -*-
"""
:copyright: Copyright 2017-2020 Sphinx Confluence Builder Contributors (AUTHORS)
:license: BSD-2-Clause (LICENSE)
"""
| 37.875 | 80 | 0.63183 | # -*- coding: utf-8 -*-
"""
:copyright: Copyright 2017-2020 Sphinx Confluence Builder Contributors (AUTHORS)
:license: BSD-2-Clause (LICENSE)
"""
from sphinxcontrib.confluencebuilder.std.confluence import SUPPORTED_IMAGE_TYPES
from tests.lib import build_sphinx
from tests.lib import parse
from tests.lib import prepare... | 0 | 122 | 0 | 2,153 | 0 | 0 | 0 | 62 | 244 |
81790a92aa8ecb0d549c1e3803948c236cd6ca22 | 630 | py | Python | var/spack/repos/builtin/packages/sailfish/package.py | player1537-forks/spack | 822b7632222ec5a91dc7b7cda5fc0e08715bd47c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 3 | 2021-09-29T02:14:40.000Z | 2022-01-27T20:50:36.000Z | var/spack/repos/builtin/packages/sailfish/package.py | player1537-forks/spack | 822b7632222ec5a91dc7b7cda5fc0e08715bd47c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 6 | 2022-01-08T08:41:11.000Z | 2022-03-14T19:28:07.000Z | var/spack/repos/builtin/packages/sailfish/package.py | player1537-forks/spack | 822b7632222ec5a91dc7b7cda5fc0e08715bd47c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | # Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
| 33.157895 | 96 | 0.738095 | # Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class Sailfish(CMakePackage):
"""Sailfish is a tool for transcript quantification from RNA-seq d... | 0 | 0 | 0 | 388 | 0 | 0 | 0 | -2 | 46 |
3f929f5eaa9eec4573d4be3a62fe6ffb56d0c980 | 3,420 | py | Python | brutekey.py | cyberheartmi9/brute-force-secret-key | 92d85a1b999445cc2f3642e6fbf85b38cee9b7ae | [
"MIT"
] | 3 | 2018-03-08T08:13:25.000Z | 2020-05-18T15:24:35.000Z | brutekey.py | An0nYm0u5101/brute-force-secret-key | 92d85a1b999445cc2f3642e6fbf85b38cee9b7ae | [
"MIT"
] | null | null | null | brutekey.py | An0nYm0u5101/brute-force-secret-key | 92d85a1b999445cc2f3642e6fbf85b38cee9b7ae | [
"MIT"
] | 3 | 2017-10-01T16:55:15.000Z | 2020-05-18T15:24:35.000Z | import hmac
import hashlib
import urllib
from optparse import OptionParser
parse=OptionParser("""
__ __ ______
/ | / | / \
$$ |___... | 46.849315 | 191 | 0.224561 | import hmac
import hashlib
import urllib
from optparse import OptionParser
def brutekey(s,m):
return hmac.new(s,m,hashlib.sha1).hexdigest()
parse=OptionParser("""
__ __ ______
/ | ... | 0 | 0 | 0 | 0 | 0 | 52 | 0 | 0 | 25 |
a66e62568d7bb0cb110fdae27bdbac3e6e434eb8 | 3,182 | py | Python | bgpvpn_dashboard/dashboards/project/bgpvpn/tables.py | cgoncalves/networking-bgpvpn | 3ec876c4ead840874e08d6dc876a36814d5f1f81 | [
"Apache-2.0"
] | 38 | 2015-06-23T08:06:16.000Z | 2022-01-25T16:03:10.000Z | bgpvpn_dashboard/dashboards/project/bgpvpn/tables.py | cgoncalves/networking-bgpvpn | 3ec876c4ead840874e08d6dc876a36814d5f1f81 | [
"Apache-2.0"
] | null | null | null | bgpvpn_dashboard/dashboards/project/bgpvpn/tables.py | cgoncalves/networking-bgpvpn | 3ec876c4ead840874e08d6dc876a36814d5f1f81 | [
"Apache-2.0"
] | 17 | 2015-11-28T00:45:22.000Z | 2021-07-22T09:22:30.000Z | # Copyright (c) 2016 Orange.
# 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 a... | 34.586957 | 78 | 0.685104 | # Copyright (c) 2016 Orange.
# 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 a... | 0 | 0 | 0 | 1,795 | 0 | 347 | 0 | 89 | 317 |
3a8bbfaac85e0c4688030fad8381e398c1f38a95 | 677 | py | Python | convertName.py | khayam-hafezi/CRNN-keras-persian | 3f99838e5b3b0e0ca79899e25b0648940b7fdfac | [
"MIT"
] | null | null | null | convertName.py | khayam-hafezi/CRNN-keras-persian | 3f99838e5b3b0e0ca79899e25b0648940b7fdfac | [
"MIT"
] | null | null | null | convertName.py | khayam-hafezi/CRNN-keras-persian | 3f99838e5b3b0e0ca79899e25b0648940b7fdfac | [
"MIT"
] | null | null | null | # encoding: utf-8
import glob
import os
from shutil import copyfile
from mapdict import FarsiMapenDict
mypath = "./Plate_farsi/"
destPath ="./Plate_en/"
plate_list = glob.glob(mypath + "*")
print(len(plate_list))
for plate_path in plate_list:
plate_name = os.path.basename(plate_path)
plate_name = plate_name_mo... | 30.772727 | 82 | 0.728213 | # encoding: utf-8
import glob
import os
from shutil import copyfile
from mapdict import FarsiMapenDict
def plate_name_modify(plate_name, dict_map):
plate_name_modify = plate_name[6:8] + dict_map[plate_name[5]] + plate_name[:5]
return plate_name_modify
mypath = "./Plate_farsi/"
destPath ="./Plate_en/"
plate_li... | 0 | 0 | 0 | 0 | 0 | 135 | 0 | 0 | 23 |
acbbbddf180036b1fff0294764791ea5c6e24b33 | 1,517 | py | Python | houseplants/houseplants_api/test_resolvers.py | galihmelon/houseplants-server-pyramid | d0f37beea2cf963184c888da143fc995bb2436e2 | [
"MIT"
] | null | null | null | houseplants/houseplants_api/test_resolvers.py | galihmelon/houseplants-server-pyramid | d0f37beea2cf963184c888da143fc995bb2436e2 | [
"MIT"
] | null | null | null | houseplants/houseplants_api/test_resolvers.py | galihmelon/houseplants-server-pyramid | d0f37beea2cf963184c888da143fc995bb2436e2 | [
"MIT"
] | null | null | null | import pytest
pytestmark = pytest.mark.django_db
| 26.155172 | 84 | 0.736322 | from datetime import date, timedelta
import pytest
from .resolvers import (
resolve_all_plants,
resolve_plants_to_care,
resolve_water_plant,
)
from .test_factories import PlantFactory, WateringLogFactory
pytestmark = pytest.mark.django_db
def test_resolve_all_plants():
plant_1 = PlantFactory()
p... | 0 | 0 | 0 | 0 | 0 | 1,144 | 0 | 136 | 182 |
7468e7042adc1bae95db9fe1308c168d0115ac42 | 2,591 | py | Python | src/qiskit_trebugger/model/circuit_comparator.py | kdk/qiskit-timeline-debugger | 80f56894af67ff881cda0fb8613e324e34d0015f | [
"Apache-2.0"
] | 7 | 2021-12-23T19:47:40.000Z | 2022-03-18T10:41:12.000Z | src/qiskit_trebugger/model/circuit_comparator.py | kdk/qiskit-timeline-debugger | 80f56894af67ff881cda0fb8613e324e34d0015f | [
"Apache-2.0"
] | null | null | null | src/qiskit_trebugger/model/circuit_comparator.py | kdk/qiskit-timeline-debugger | 80f56894af67ff881cda0fb8613e324e34d0015f | [
"Apache-2.0"
] | 3 | 2021-12-04T10:01:32.000Z | 2021-12-25T11:57:10.000Z | from numpy import zeros, uint16
# make the global DP array
LCS_DP = zeros((2000, 2000), dtype=uint16)
| 31.216867 | 75 | 0.501737 | from qiskit import QuantumCircuit
from qiskit.converters import dag_to_circuit, circuit_to_dag
from numpy import zeros, uint16
# make the global DP array
LCS_DP = zeros((2000, 2000), dtype=uint16)
class CircuitComparator:
@staticmethod
def get_moments(dag):
moments = [l["graph"] for l in l... | 0 | 2,272 | 0 | 3 | 0 | 0 | 0 | 51 | 156 |
84047555bb1228bf70738adc2a9340313bf8eb09 | 1,534 | py | Python | next_action/todotxt/__init__.py | fniessink/next-action | 292832886371abf46569b3fbcec7b2da9550ca92 | [
"Apache-2.0"
] | 10 | 2018-06-13T02:06:05.000Z | 2021-09-13T15:50:27.000Z | next_action/todotxt/__init__.py | fniessink/next-action | 292832886371abf46569b3fbcec7b2da9550ca92 | [
"Apache-2.0"
] | 460 | 2018-05-06T21:15:03.000Z | 2022-03-29T10:48:20.000Z | next_action/todotxt/__init__.py | fniessink/next-action | 292832886371abf46569b3fbcec7b2da9550ca92 | [
"Apache-2.0"
] | 1 | 2018-05-06T16:10:43.000Z | 2018-05-06T16:10:43.000Z | """Package for dealing with the todo.txt format."""
import fileinput
import os
from typing import cast, List, Sequence
from .task import Task
from .tasks import Tasks
def uncompleted_task_on(line: str) -> bool:
"""Return whether there's an uncompleted task on the line."""
return bool(line.strip() and not li... | 38.35 | 114 | 0.673403 | """Package for dealing with the todo.txt format."""
import fileinput
import os
from typing import cast, List, Sequence
from .task import Task
from .tasks import Tasks
def uncompleted_task_on(line: str) -> bool:
"""Return whether there's an uncompleted task on the line."""
return bool(line.strip() and not li... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
5c27402df2b586e5881be45350ea7e8f868b6f4e | 12,264 | py | Python | srl/rl/alphazero.py | pocokhc/simple_rl | 765f12f392f87e6897027905d74f1bced6a2b7bf | [
"MIT"
] | 1 | 2022-03-01T09:16:57.000Z | 2022-03-01T09:16:57.000Z | srl/rl/alphazero.py | pocokhc/simple_rl | 765f12f392f87e6897027905d74f1bced6a2b7bf | [
"MIT"
] | null | null | null | srl/rl/alphazero.py | pocokhc/simple_rl | 765f12f392f87e6897027905d74f1bced6a2b7bf | [
"MIT"
] | null | null | null | import tensorflow.keras as keras
from srl.base.rl.registration import register
# ------------------------------------------------------
# config
# ------------------------------------------------------
register(
Config,
__name__ + ":RemoteMemory",
__name__ + ":Parameter",
__name__ + ":Trainer",
... | 32.617021 | 114 | 0.55773 | import pickle
import random
from dataclasses import dataclass
from typing import Any, Tuple, cast
import numpy as np
import tensorflow as tf
import tensorflow.keras as keras
from srl.base.define import RLObservationType
from srl.base.env.base import EnvRun
from srl.base.rl.algorithms.discrete_action import DiscreteAct... | 494 | 810 | 0 | 9,514 | 0 | 0 | 0 | 354 | 441 |
d44c126981ed09b6a488faaa05f90285464f2dd7 | 6,183 | py | Python | lokahi_dropbox/search/views.py | y4ahmed/Crowdfunding-Web-Application | 52beab945ee88f8fd773f942577137c770a601c1 | [
"MIT"
] | 4 | 2017-09-28T04:26:33.000Z | 2022-01-04T22:51:17.000Z | lokahi_dropbox/search/views.py | y4ahmed/Crowdfunding-Web-Application | 52beab945ee88f8fd773f942577137c770a601c1 | [
"MIT"
] | null | null | null | lokahi_dropbox/search/views.py | y4ahmed/Crowdfunding-Web-Application | 52beab945ee88f8fd773f942577137c770a601c1 | [
"MIT"
] | 1 | 2021-01-17T23:11:21.000Z | 2021-01-17T23:11:21.000Z | # from django.contrib.auth.models import User
# Create your views here.
| 36.370588 | 100 | 0.513828 | from django.views.decorators.csrf import csrf_protect
from django.shortcuts import render
from search.forms import BasicSearchForm, AdvancedSearchForm
from frontend.models import BaseUser
from django.http import HttpResponseRedirect
from django.core.exceptions import ValidationError
# from django.contrib.auth.models im... | 0 | 5,625 | 0 | 0 | 0 | 104 | 0 | 152 | 224 |
a8a65086cbff897d9f41b6c7c19508c31e73a0ec | 17,006 | py | Python | icebath/core/bergxr.py | JessicaS11/icebath | 4073254fc58763109c346086209ce458306a0d00 | [
"BSD-3-Clause"
] | 2 | 2021-01-28T01:30:56.000Z | 2021-08-01T23:24:22.000Z | icebath/core/bergxr.py | JessicaS11/icebath | 4073254fc58763109c346086209ce458306a0d00 | [
"BSD-3-Clause"
] | null | null | null | icebath/core/bergxr.py | JessicaS11/icebath | 4073254fc58763109c346086209ce458306a0d00 | [
"BSD-3-Clause"
] | 1 | 2021-03-10T17:07:06.000Z | 2021-03-10T17:07:06.000Z | # import scipy.io as spio
# import scipy.stats as stats
# import ogr
# import os
# import fnmatch
| 42.515 | 151 | 0.585617 | import geopandas as gpd
import pandas as pd
import numpy as np
# import scipy.io as spio
# import scipy.stats as stats
# import ogr
# import os
# import fnmatch
import pyproj
import rasterio.features
from rasterio.vrt import WarpedVRT
import rioxarray
from shapely.geometry import box
from shapely.geometry import Polygo... | 0 | 16,468 | 0 | 0 | 0 | 0 | 0 | 108 | 332 |
d8faa4b5de60aa33d8e449a7270770982babe6af | 2,887 | py | Python | miniImagenet/ExpandConvDec.py | OpenBanboo/AgileNet | d75baa20b9f762cb56b249dca272150de9ae8def | [
"BSD-3-Clause"
] | null | null | null | miniImagenet/ExpandConvDec.py | OpenBanboo/AgileNet | d75baa20b9f762cb56b249dca272150de9ae8def | [
"BSD-3-Clause"
] | null | null | null | miniImagenet/ExpandConvDec.py | OpenBanboo/AgileNet | d75baa20b9f762cb56b249dca272150de9ae8def | [
"BSD-3-Clause"
] | null | null | null | from __future__ import print_function
import torch.nn as nn
import torch.optim as optim
| 48.116667 | 167 | 0.608244 | from __future__ import print_function
import argparse
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.autograd import Function
import torch.optim as optim
from torchvision import datasets, transforms
from torch.autograd import Variable
import create_dic_fuc
from FCDecomp import FCDecomp
im... | 0 | 0 | 0 | 2,534 | 0 | 0 | 0 | 44 | 221 |
7f734efaa9a9b56a3d776eae094b99c010b9d15d | 113 | py | Python | thingconnector/settings_tmpl.py | MaximilianV/thingberry | 3d2034574752a04a639fefc08c2db113e2406d72 | [
"MIT"
] | 1 | 2018-05-29T06:41:09.000Z | 2018-05-29T06:41:09.000Z | thingconnector/settings_tmpl.py | MaximilianV/thingberry | 3d2034574752a04a639fefc08c2db113e2406d72 | [
"MIT"
] | null | null | null | thingconnector/settings_tmpl.py | MaximilianV/thingberry | 3d2034574752a04a639fefc08c2db113e2406d72 | [
"MIT"
] | 1 | 2018-05-19T09:38:02.000Z | 2018-05-19T09:38:02.000Z | # Basic Auth User
username = ""
password = ""
basic_auth = "Basic "
# Application
api_token = ""
namespace = ""
| 12.555556 | 21 | 0.646018 | # Basic Auth User
username = ""
password = ""
basic_auth = "Basic "
# Application
api_token = ""
namespace = ""
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |