hexsha
stringlengths
40
40
size
int64
3
1.03M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
3
972
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
3
972
max_issues_repo_name
stringlengths
6
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
3
972
max_forks_repo_name
stringlengths
6
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
3
1.03M
avg_line_length
float64
1.13
941k
max_line_length
int64
2
941k
alphanum_fraction
float64
0
1
c746a9da5d46f23a901f0635dd6416c5fa3743a1
9,724
py
Python
views/ayarlar_form.py
pyproject23/kackisivar
752438c51d0d6145ce3a385ca18a471d8b7f3013
[ "MIT" ]
5
2020-12-13T20:09:34.000Z
2021-01-05T16:17:01.000Z
views/ayarlar_form.py
pyproject23/kackisivar
752438c51d0d6145ce3a385ca18a471d8b7f3013
[ "MIT" ]
null
null
null
views/ayarlar_form.py
pyproject23/kackisivar
752438c51d0d6145ce3a385ca18a471d8b7f3013
[ "MIT" ]
8
2020-12-13T19:09:26.000Z
2020-12-13T21:15:45.000Z
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'ayarlar.ui' # # Created by: PyQt5 UI code generator 5.15.1 # # WARNING: Any manual changes made to this file will be lost when pyuic5 is # run again. Do not edit this file unless you know what you are doing. from PyQt5 import QtCore, QtGu...
50.38342
102
0.715961
31e37fd31d24467bd9bea780adfd47ff3d39313c
16,282
py
Python
applications/tensorflow/cnns/training/inception_v1/slim/net/inception_v1.py
Splendon/examples
ed4a8a01857b6ddca49559141acf5d0986eb01e1
[ "MIT" ]
null
null
null
applications/tensorflow/cnns/training/inception_v1/slim/net/inception_v1.py
Splendon/examples
ed4a8a01857b6ddca49559141acf5d0986eb01e1
[ "MIT" ]
null
null
null
applications/tensorflow/cnns/training/inception_v1/slim/net/inception_v1.py
Splendon/examples
ed4a8a01857b6ddca49559141acf5d0986eb01e1
[ "MIT" ]
null
null
null
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
49.339394
80
0.633337
2cb2e9d2485c9611c36abd2b05473cf05d3c7abe
28,529
py
Python
Lib/site-packages/aiohttp/connector.py
StoneZhu2017/learning-python
f7aa7a0908cb4e156278494930e8be6a20aeba57
[ "bzip2-1.0.6" ]
169
2016-12-18T16:37:48.000Z
2022-03-08T11:37:49.000Z
lib-linux_x64/aiohttp/connector.py
Element84/lambda-text-extractor
6da52d077a2fc571e38bfe29c33ae68f6443cd5a
[ "Apache-2.0" ]
5
2017-05-11T21:33:59.000Z
2019-01-31T10:09:53.000Z
lib-linux_x64/aiohttp/connector.py
Element84/lambda-text-extractor
6da52d077a2fc571e38bfe29c33ae68f6443cd5a
[ "Apache-2.0" ]
42
2016-12-23T03:27:12.000Z
2021-10-01T13:46:21.000Z
import asyncio import functools import ssl import sys import traceback import warnings from collections import defaultdict from hashlib import md5, sha1, sha256 from itertools import cycle, islice from time import monotonic from types import MappingProxyType from . import hdrs, helpers from .client_exceptions import (...
33.682409
82
0.577202
6bc8cc605bdb44c3071e465f4614b72d4d80e4e7
1,310
py
Python
config.py
FredrickWambua/Blog
a27f37f3c9d59cea858452813f1e37b949b15efd
[ "Unlicense" ]
null
null
null
config.py
FredrickWambua/Blog
a27f37f3c9d59cea858452813f1e37b949b15efd
[ "Unlicense" ]
null
null
null
config.py
FredrickWambua/Blog
a27f37f3c9d59cea858452813f1e37b949b15efd
[ "Unlicense" ]
null
null
null
import os class Config: ''' This is the general configuration parent class ''' SQLALCHEMY_TRACK_MODIFICATIONS = False UPLOADED_PHOTOS_DEST='app/static/photos' SECRET_KEY='987654321!' # email configurations MAIL_SERVER = 'smtp.googlemail.com' MAIL_PORT = 587 MAIL_USE_TLS = ...
26.2
99
0.698473
07912b96e1eb818c8d60af5853aaf8d0707504a5
31,373
py
Python
cave/com.raytheon.viz.gfe/python/autotest/Hazard_HLS_TestScript.py
srcarter3/awips2
37f31f5e88516b9fd576eaa49d43bfb762e1d174
[ "Apache-2.0" ]
null
null
null
cave/com.raytheon.viz.gfe/python/autotest/Hazard_HLS_TestScript.py
srcarter3/awips2
37f31f5e88516b9fd576eaa49d43bfb762e1d174
[ "Apache-2.0" ]
null
null
null
cave/com.raytheon.viz.gfe/python/autotest/Hazard_HLS_TestScript.py
srcarter3/awips2
37f31f5e88516b9fd576eaa49d43bfb762e1d174
[ "Apache-2.0" ]
1
2021-10-30T00:03:05.000Z
2021-10-30T00:03:05.000Z
## # This software was developed and / or modified by Raytheon Company, # pursuant to Contract DG133W-05-CQ-1067 with the US Government. # # U.S. EXPORT CONTROLLED TECHNICAL DATA # This software product contains export-restricted data whose # export/transfer/disclosure is restricted by U.S. law. Dissemination # to non...
45.8
167
0.505339
7e3930b887ec751d1949c7da8bee65a64fb26c03
616
py
Python
app/serializers.py
impressai/cloudfront-django-setup
0758fddc6986e999421ea4cb7713ce257cacad26
[ "MIT" ]
1
2020-09-18T16:31:57.000Z
2020-09-18T16:31:57.000Z
app/serializers.py
impressai/cloudfront-django-setup
0758fddc6986e999421ea4cb7713ce257cacad26
[ "MIT" ]
10
2019-12-05T04:34:23.000Z
2022-03-11T23:56:27.000Z
app/serializers.py
impressai/cloudfront-django-setup
0758fddc6986e999421ea4cb7713ce257cacad26
[ "MIT" ]
null
null
null
from rest_framework.serializers import ModelSerializer from .models import PublicImage, PrivateImage class PublicImageModelSerializer(ModelSerializer): """ A ModelSerializer that takes an additional `fields` argument that controls which fields should be displayed. """ class Meta: model = Pu...
28
69
0.715909
6b37f0acda31fe7bf0332dfd96053830f2f893cc
2,608
py
Python
yaglm/extmath.py
ngierty/yaglm
57e212b576af7c5c0f0d62f9d6ad2484b9e25f10
[ "MIT" ]
15
2021-10-19T15:00:12.000Z
2022-03-24T22:24:54.000Z
yaglm/extmath.py
ngierty/yaglm
57e212b576af7c5c0f0d62f9d6ad2484b9e25f10
[ "MIT" ]
13
2021-07-22T21:52:55.000Z
2021-10-07T11:50:10.000Z
yaglm/extmath.py
ngierty/yaglm
57e212b576af7c5c0f0d62f9d6ad2484b9e25f10
[ "MIT" ]
2
2021-11-12T18:45:12.000Z
2021-12-14T14:57:42.000Z
from sklearn.utils.sparsefuncs import mean_variance_axis from scipy.sparse import issparse from scipy.special import loggamma import numpy as np def log_binom(n, k): """ log (n choose k) Parameters ---------- n, k: int Output ------ log_binom: float """ return loggamma(n + 1)...
26.886598
161
0.625383
9c1c76a004a39c956f87bfe0641b694d3759ec40
25,025
py
Python
lib/tool_shed/galaxy_install/tools/tool_panel_manager.py
bensellak/galaxy
020b145c8c0ee5f61543e87e5d1867ae717a6871
[ "CC-BY-3.0" ]
1
2021-02-05T13:19:58.000Z
2021-02-05T13:19:58.000Z
lib/tool_shed/galaxy_install/tools/tool_panel_manager.py
bensellak/galaxy
020b145c8c0ee5f61543e87e5d1867ae717a6871
[ "CC-BY-3.0" ]
4
2021-02-08T20:28:34.000Z
2022-03-02T02:52:55.000Z
lib/tool_shed/galaxy_install/tools/tool_panel_manager.py
bensellak/galaxy
020b145c8c0ee5f61543e87e5d1867ae717a6871
[ "CC-BY-3.0" ]
1
2018-05-30T07:38:54.000Z
2018-05-30T07:38:54.000Z
import logging from xml.etree import ElementTree as XmlET from galaxy.util import xml_to_string from galaxy.util.renamed_temporary_file import RenamedTemporaryFile from tool_shed.util import basic_util from tool_shed.util import common_util from tool_shed.util import repository_util from tool_shed.util import shed_uti...
55.121145
131
0.611708
abf5630b07785b9c2cf1491678402cfc8719518f
1,864
py
Python
dags/oss_know/libs/util/base.py
linruoma/airflow-jobs
fda122a74c6a030ec542828dd14d22d7fbbba622
[ "Apache-2.0" ]
null
null
null
dags/oss_know/libs/util/base.py
linruoma/airflow-jobs
fda122a74c6a030ec542828dd14d22d7fbbba622
[ "Apache-2.0" ]
null
null
null
dags/oss_know/libs/util/base.py
linruoma/airflow-jobs
fda122a74c6a030ec542828dd14d22d7fbbba622
[ "Apache-2.0" ]
null
null
null
import urllib3 import redis from tenacity import * from opensearchpy import OpenSearch from ..util.log import logger class HttpGetException(Exception): def __init__(self, message, status): super().__init__(message, status) self.message = message self.status = status # retry 防止SSL解密错误,请正...
33.890909
103
0.678648
ea10c9fdb6b8440c79afca439ec7d511f9e5b1f7
734
py
Python
Monk and Inversion.py
rGarikinaRajesh/HackerearthProblems
b7b11b94b3d9e88ed7e46aae8229fa72b35ab74f
[ "Apache-2.0" ]
null
null
null
Monk and Inversion.py
rGarikinaRajesh/HackerearthProblems
b7b11b94b3d9e88ed7e46aae8229fa72b35ab74f
[ "Apache-2.0" ]
null
null
null
Monk and Inversion.py
rGarikinaRajesh/HackerearthProblems
b7b11b94b3d9e88ed7e46aae8229fa72b35ab74f
[ "Apache-2.0" ]
null
null
null
for _ in range(int(input())): n=int(input()) lis=[] lis2=[] for i in range(n): k=list(map(int,input().split())) lis.append(k) lis2+=k count=0 if(sorted(lis2)==lis2): print(0) else: for i in range(n): for j in range(n): ...
22.9375
71
0.302452
bf5e730c086b64654939a0834f58488bfb32fbaa
2,660
py
Python
chemex/optimize/minimizer.py
gbouvignies/chemex
b021650928b6db930281957222529bc6bcab8aa2
[ "BSD-3-Clause" ]
11
2015-03-16T16:45:42.000Z
2018-09-17T08:43:58.000Z
chemex/optimize/minimizer.py
gbouvignies/chemex
b021650928b6db930281957222529bc6bcab8aa2
[ "BSD-3-Clause" ]
33
2015-01-12T16:46:48.000Z
2018-03-29T15:01:15.000Z
chemex/optimize/minimizer.py
gbouvignies/chemex
b021650928b6db930281957222529bc6bcab8aa2
[ "BSD-3-Clause" ]
8
2015-01-15T21:53:16.000Z
2018-01-04T15:33:52.000Z
from __future__ import annotations import sys from contextlib import nullcontext from copy import deepcopy from dataclasses import dataclass from dataclasses import field import numpy as np from lmfit import Minimizer from lmfit import Parameters from rich.live import Live from rich.padding import Padding from rich.t...
29.230769
85
0.645489
f659a1627f1d0d84398322e4854dade4a67f6bdb
3,043
py
Python
examples/gw/full_gw_example.py
Rodrigo-Tenorio/nessai
2b4175da61b3a7250d1154a126ad93481836df0d
[ "MIT" ]
16
2021-02-18T00:04:54.000Z
2021-09-01T03:25:45.000Z
examples/gw/full_gw_example.py
Rodrigo-Tenorio/nessai
2b4175da61b3a7250d1154a126ad93481836df0d
[ "MIT" ]
59
2021-03-09T11:05:37.000Z
2022-03-30T14:21:14.000Z
examples/gw/full_gw_example.py
Rodrigo-Tenorio/nessai
2b4175da61b3a7250d1154a126ad93481836df0d
[ "MIT" ]
1
2022-03-25T12:28:16.000Z
2022-03-25T12:28:16.000Z
#!/usr/bin/env python """ Example of running nessai with bilby on a gravitational wave likelihood. This examples includes all 15 parameters for CBC and should take around 2 hours to run. Based on the Bilby example: https://git.ligo.org/lscsoft/bilby """ import bilby import numpy as np outdir = './outdir/' label = 'f...
30.737374
78
0.760434
d2a998df224e57e06d4a3d3a826b0412e57589d3
1,721
py
Python
compiler/tests/10_write_mask_and_array_1rw_1r_test.py
lekez2005/OpenRAM
608e4b81f1763727e7efe087d591c76956869fe6
[ "BSD-3-Clause" ]
null
null
null
compiler/tests/10_write_mask_and_array_1rw_1r_test.py
lekez2005/OpenRAM
608e4b81f1763727e7efe087d591c76956869fe6
[ "BSD-3-Clause" ]
null
null
null
compiler/tests/10_write_mask_and_array_1rw_1r_test.py
lekez2005/OpenRAM
608e4b81f1763727e7efe087d591c76956869fe6
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 # See LICENSE for licensing information. # # Copyright (c) 2016-2019 Regents of the University of California and The Board # of Regents for the Oklahoma Agricultural and Mechanical College # (acting for and on behalf of Oklahoma State University) # All rights reserved. # import unittest from test...
33.745098
102
0.718768
22f785190343960609342d4734766c648b9e3f93
6,413
py
Python
realtime_facenet_git.py
hemanthsavasere/real-time-deep-face-recogniton
ba5e0b7c233089ca8fa059d323981e7bba07aea1
[ "MIT" ]
null
null
null
realtime_facenet_git.py
hemanthsavasere/real-time-deep-face-recogniton
ba5e0b7c233089ca8fa059d323981e7bba07aea1
[ "MIT" ]
null
null
null
realtime_facenet_git.py
hemanthsavasere/real-time-deep-face-recogniton
ba5e0b7c233089ca8fa059d323981e7bba07aea1
[ "MIT" ]
1
2018-06-24T02:18:34.000Z
2018-06-24T02:18:34.000Z
from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow as tf from scipy import misc import cv2 import matplotlib.pyplot as plt import numpy as np import argparse import facenet import detect_face import os from os.path import join as ...
43.331081
121
0.530641
f548820c34dd6f727c83d1383d4d663dcd9fb61b
3,646
py
Python
intersight/models/qatask_fail_async_task_ref.py
ategaw-cisco/intersight-python
9d6476620507281b1dc358e29ac452d56081bbb0
[ "Apache-2.0" ]
null
null
null
intersight/models/qatask_fail_async_task_ref.py
ategaw-cisco/intersight-python
9d6476620507281b1dc358e29ac452d56081bbb0
[ "Apache-2.0" ]
null
null
null
intersight/models/qatask_fail_async_task_ref.py
ategaw-cisco/intersight-python
9d6476620507281b1dc358e29ac452d56081bbb0
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Intersight REST API This is Intersight REST API OpenAPI spec version: 1.0.9-262 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six import iteritems import re class QataskFailAsyncTaskRef(object): """ NOTE: Thi...
24.306667
77
0.546078
d3dabd5874a9c49b1babcbeb6ae260de714f254f
3,070
py
Python
dash_core_components/Location.py
lufli/dash-core-components
bf3c15255b7a89ab0a399579feeafc6fa07910a6
[ "MIT" ]
null
null
null
dash_core_components/Location.py
lufli/dash-core-components
bf3c15255b7a89ab0a399579feeafc6fa07910a6
[ "MIT" ]
null
null
null
dash_core_components/Location.py
lufli/dash-core-components
bf3c15255b7a89ab0a399579feeafc6fa07910a6
[ "MIT" ]
null
null
null
# AUTO GENERATED FILE - DO NOT EDIT from dash.development.base_component import Component, _explicitize_args class Location(Component): """A Location component. Update and track the current window.location object through the window.history state. Use in conjunction with the `dash_core_components.Link` component ...
48.730159
195
0.58241
8f12a1262354d149e372ac7ad1bcc4706603acd8
2,642
py
Python
django/contrib/sessions/middleware.py
jedie/django
09f2cdbe1a43e79e31f5ea509b59d4c87db29832
[ "BSD-3-Clause" ]
2
2015-11-03T14:29:21.000Z
2018-08-25T01:37:05.000Z
django/contrib/sessions/middleware.py
jedie/django
09f2cdbe1a43e79e31f5ea509b59d4c87db29832
[ "BSD-3-Clause" ]
null
null
null
django/contrib/sessions/middleware.py
jedie/django
09f2cdbe1a43e79e31f5ea509b59d4c87db29832
[ "BSD-3-Clause" ]
15
2016-01-08T14:28:41.000Z
2019-04-19T08:33:31.000Z
import time from importlib import import_module from django.conf import settings from django.utils.cache import patch_vary_headers from django.utils.http import cookie_date class SessionMiddleware(object): def __init__(self): engine = import_module(settings.SESSION_ENGINE) self.SessionStore = eng...
45.551724
87
0.596139
65a36396a3638fa1eea76c68bfae128308301d30
3,526
py
Python
suite/benchmark.py
arizvisa/capstone
e1998a28c4cacbf70f3d4ca148aa0eac23213475
[ "BSD-3-Clause" ]
null
null
null
suite/benchmark.py
arizvisa/capstone
e1998a28c4cacbf70f3d4ca148aa0eac23213475
[ "BSD-3-Clause" ]
null
null
null
suite/benchmark.py
arizvisa/capstone
e1998a28c4cacbf70f3d4ca148aa0eac23213475
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/python # Simple benchmark for Capstone by disassembling random code. By Nguyen Anh Quynh, 2014 # Syntax: # ./suite/benchmark.py --> Benchmark all archs # ./suite/benchmark.py x86 --> Benchmark all X86 (all 16bit, 32bit, 64bit) # ./suite/benchmark.py x86-32 --> Benchmark X86-32 arch only # ./...
27.76378
107
0.5692
0861134dd405effeeb45f7c731297cdda4c6509d
43,040
py
Python
tests/test_scan.py
parvathirajan/pycln
d65c5d7866d19f7f3e967c9e38ff84001306a817
[ "MIT" ]
1
2022-03-23T10:58:49.000Z
2022-03-23T10:58:49.000Z
tests/test_scan.py
parvathirajan/pycln
d65c5d7866d19f7f3e967c9e38ff84001306a817
[ "MIT" ]
null
null
null
tests/test_scan.py
parvathirajan/pycln
d65c5d7866d19f7f3e967c9e38ff84001306a817
[ "MIT" ]
null
null
null
"""pycln/utils/scan.py tests.""" # pylint: disable=R0201,W0613 import ast import sys from importlib import import_module from pathlib import Path from typing import Optional from unittest import mock import pytest from pycln.utils import _nodes, scan from pycln.utils._exceptions import UnexpandableImportStar, Unparsa...
34.267516
88
0.477974
0b4a4f5f1b41a2cc52e703c0b2e8626b6f917864
15,814
py
Python
tensorflow/python/kernel_tests/pooling_ops_3d_test.py
ln0119/tensorflow-fast-rcnn
e937e6394818c9a320754237651d7fe083b1020d
[ "Apache-2.0" ]
73
2017-01-05T09:06:08.000Z
2021-11-06T14:00:50.000Z
tensorflow/python/kernel_tests/pooling_ops_3d_test.py
minhhoai2/tensorflow
da88903d5e29230d68d861053aa1dea1432c0696
[ "Apache-2.0" ]
8
2017-04-10T10:36:20.000Z
2021-02-07T01:02:32.000Z
tensorflow/python/kernel_tests/pooling_ops_3d_test.py
minhhoai2/tensorflow
da88903d5e29230d68d861053aa1dea1432c0696
[ "Apache-2.0" ]
151
2016-11-10T09:01:15.000Z
2022-01-18T08:13:49.000Z
# Copyright 2016 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
43.806094
80
0.454597
76285e24bb0f28a5474f419e5d9837714981e87d
1,928
py
Python
test/com/facebook/buck/android/testdata/android_project/tools/redex/fake_redex.py
lakshmi2005/buck
012a59d5d2e5a45b483e85fb190d2b67ea0c56ab
[ "Apache-2.0" ]
1
2018-02-28T06:26:56.000Z
2018-02-28T06:26:56.000Z
test/com/facebook/buck/android/testdata/android_project/tools/redex/fake_redex.py
lakshmi2005/buck
012a59d5d2e5a45b483e85fb190d2b67ea0c56ab
[ "Apache-2.0" ]
1
2018-12-10T15:54:22.000Z
2018-12-10T19:30:37.000Z
test/com/facebook/buck/android/testdata/android_project/tools/redex/fake_redex.py
lakshmi2005/buck
012a59d5d2e5a45b483e85fb190d2b67ea0c56ab
[ "Apache-2.0" ]
null
null
null
from __future__ import (absolute_import, division, print_function, unicode_literals) import json import optparse import os from zipfile import ZipFile from os.path import dirname, join def main(): parser = optparse.OptionParser() parser.add_option('--config') parser.add_option('--...
28.352941
62
0.60944
706f235eadea69c1afafa485eafc6496db247f35
970
py
Python
redash/handlers/organization.py
kikinteractive/redash
8df2391a775204131fe1eb21df95bd9d4f9ae6b3
[ "BSD-2-Clause" ]
4
2018-07-31T09:39:33.000Z
2019-05-22T23:56:18.000Z
redash/handlers/organization.py
kikinteractive/redash
8df2391a775204131fe1eb21df95bd9d4f9ae6b3
[ "BSD-2-Clause" ]
60
2019-05-31T06:11:35.000Z
2021-06-25T15:20:33.000Z
redash/handlers/organization.py
hackebrot/redash
3f3a86eac324ee6c03450b8e3eb9e8fbe1e58a38
[ "BSD-2-Clause" ]
1
2020-01-04T07:24:45.000Z
2020-01-04T07:24:45.000Z
import json from flask import request from flask_login import current_user, login_required from redash import models from redash.handlers import routes from redash.handlers.base import json_response, org_scoped_rule from redash.authentication import current_org from redash.permissions import require_admin @routes.ro...
42.173913
106
0.774227
e3bd884dc21419ec1a73d65c03bb3e38946b1934
272
py
Python
test/tests/uuid_test.py
lameiro/pyston
838e0ac98d5926ba942224951cd1e8bad5483b5e
[ "BSD-2-Clause", "Apache-2.0" ]
null
null
null
test/tests/uuid_test.py
lameiro/pyston
838e0ac98d5926ba942224951cd1e8bad5483b5e
[ "BSD-2-Clause", "Apache-2.0" ]
null
null
null
test/tests/uuid_test.py
lameiro/pyston
838e0ac98d5926ba942224951cd1e8bad5483b5e
[ "BSD-2-Clause", "Apache-2.0" ]
null
null
null
import uuid print len(str(uuid.uuid1())) print len(str(uuid.uuid4())) print uuid.uuid3(uuid.NAMESPACE_DNS, 'python.org') print uuid.uuid5(uuid.NAMESPACE_DNS, 'python.org') x = uuid.UUID('{00010203-0405-0607-0809-0a0b0c0d0e0f}') print str(x) print uuid.UUID(bytes=x.bytes)
30.222222
55
0.75
0b83cebb82b249c680651be8cb59e63990b6425f
78
py
Python
trainer/__init__.py
marsggbo/CovidNet3D
0aeca91a775f938a0e568dd88d8162473dacf3ce
[ "MIT" ]
5
2021-02-23T06:43:31.000Z
2021-07-05T15:24:05.000Z
trainer/__init__.py
etherx-dev/CovidNet3D
b107d7d965cad07f1890ee492857273f3468cc01
[ "MIT" ]
1
2021-06-08T21:06:10.000Z
2021-06-08T21:06:10.000Z
trainer/__init__.py
etherx-dev/CovidNet3D
b107d7d965cad07f1890ee492857273f3468cc01
[ "MIT" ]
4
2021-02-01T03:29:16.000Z
2021-08-05T09:13:37.000Z
from .build import * from .base_trainer import * from .onehot_trainer import *
26
29
0.782051
7634902b584e4f069eba55b28e8bce2b8fdbb0b4
10,824
py
Python
tests/pegasus/test_tokenization_pegasus.py
dctelus/transformers
6786cbc4b14ebff0ac59c768cadd109391db9a08
[ "Apache-2.0" ]
3
2022-01-15T08:06:07.000Z
2022-03-10T07:13:18.000Z
tests/pegasus/test_tokenization_pegasus.py
arron1227/transformers
b18dfd95e1f60ae65a959a7b255fc06522170d1b
[ "Apache-2.0" ]
1
2022-03-23T19:49:13.000Z
2022-03-23T19:49:13.000Z
tests/pegasus/test_tokenization_pegasus.py
arron1227/transformers
b18dfd95e1f60ae65a959a7b255fc06522170d1b
[ "Apache-2.0" ]
1
2022-01-12T14:45:41.000Z
2022-01-12T14:45:41.000Z
# Copyright 2020 The HuggingFace Team. 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 applicabl...
51.789474
1,929
0.65789
6b9a389058e03a8d03b49490be89017376682513
14,190
py
Python
tests/unittests/test_http_functions.py
ankitkumarr/azure-functions-python-worker
ff38583164b43a3e61f8b306e3171ce9bdbbe8a4
[ "MIT" ]
null
null
null
tests/unittests/test_http_functions.py
ankitkumarr/azure-functions-python-worker
ff38583164b43a3e61f8b306e3171ce9bdbbe8a4
[ "MIT" ]
null
null
null
tests/unittests/test_http_functions.py
ankitkumarr/azure-functions-python-worker
ff38583164b43a3e61f8b306e3171ce9bdbbe8a4
[ "MIT" ]
null
null
null
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. import hashlib import pathlib import filecmp import typing import os from azure_functions_worker import testutils class TestHttpFunctions(testutils.WebHostTestCase): @classmethod def get_script_dir(cls): re...
39.636872
80
0.624524
e1bcb92000f431691ac645b584d866f7fb9a8e55
609
py
Python
jesse/indicators/cci.py
laughingwithu/jesse
c21adf59074ad62e4aa775261b4ad86c542ec4d5
[ "MIT" ]
10
2020-05-24T17:31:11.000Z
2022-03-18T00:31:14.000Z
jesse/indicators/cci.py
laughingwithu/jesse
c21adf59074ad62e4aa775261b4ad86c542ec4d5
[ "MIT" ]
null
null
null
jesse/indicators/cci.py
laughingwithu/jesse
c21adf59074ad62e4aa775261b4ad86c542ec4d5
[ "MIT" ]
4
2020-07-08T19:24:45.000Z
2022-01-26T12:53:04.000Z
import numpy as np import talib from typing import Union def cci(candles: np.ndarray, period=14, sequential=False) -> Union[float, np.ndarray]: """ CCI - Commodity Channel Index :param candles: np.ndarray :param period: int - default=14 :param sequential: bool - default=False :return: float...
23.423077
86
0.632184
25005bda510d32235b985e549ca1020c538be7c2
4,387
py
Python
debug/process_html.py
erv4gen/Research-Salvage-Autos
2db44e10b18b20387e80184d721d4e979089f9bb
[ "MIT" ]
null
null
null
debug/process_html.py
erv4gen/Research-Salvage-Autos
2db44e10b18b20387e80184d721d4e979089f9bb
[ "MIT" ]
null
null
null
debug/process_html.py
erv4gen/Research-Salvage-Autos
2db44e10b18b20387e80184d721d4e979089f9bb
[ "MIT" ]
null
null
null
import pandas as pd import numpy as np import glob, sys, os, time , itertools , warnings , re from bs4 import BeautifulSoup from tqdm import tqdm import matplotlib.pyplot as plt import multiprocessing as mp # from DataProcessing import import uszipcode , pickle from TempFolder.TempFolder import Temp warnings.filter...
37.495726
163
0.555733
068c1a0d59cd77920273bb83c4ca43033e3613dd
8,250
py
Python
predict_with_generate.py
txg11/t5-pegasus-chinese
ef8de37ff2e2911ae308f5de937547a71945cdeb
[ "MIT" ]
1
2022-02-25T03:05:46.000Z
2022-02-25T03:05:46.000Z
predict_with_generate.py
txg11/t5-pegasus-chinese
ef8de37ff2e2911ae308f5de937547a71945cdeb
[ "MIT" ]
null
null
null
predict_with_generate.py
txg11/t5-pegasus-chinese
ef8de37ff2e2911ae308f5de937547a71945cdeb
[ "MIT" ]
null
null
null
from bert4torch.model import * from transformers import MT5ForConditionalGeneration import jieba from transformers import BertTokenizer, BatchEncoding from torch._six import container_abcs, string_classes, int_classes import torch from torch.utils.data import DataLoader, Dataset import re import os import csv import ar...
35.407725
94
0.634667
51a2ccb154c2264f4eb674dc42e8bdcd0df48811
2,869
py
Python
test_vidstab_utils.py
supersom/python_video_stab
b6edd5cae79c3ef8a554243c55e97d6f945c9527
[ "MIT" ]
null
null
null
test_vidstab_utils.py
supersom/python_video_stab
b6edd5cae79c3ef8a554243c55e97d6f945c9527
[ "MIT" ]
null
null
null
test_vidstab_utils.py
supersom/python_video_stab
b6edd5cae79c3ef8a554243c55e97d6f945c9527
[ "MIT" ]
null
null
null
import pytest import numpy as np import cv2 import vidstab.vidstab_utils as utils import imutils.feature.factories as kp_factory kp_detector = kp_factory.FeatureDetector_create('GFTT') frame_1 = np.zeros((200, 200, 3), dtype='uint8') frame_2 = np.zeros((200, 200, 3), dtype='uint8') cv2.rectangle(frame_1, (20, 50), (1...
37.25974
101
0.671663
ece19ae791adde1f5059b6b9b923cdfbea1c9490
23
py
Python
data/studio21_generated/introductory/3195/starter_code.py
vijaykumawat256/Prompt-Summarization
614f5911e2acd2933440d909de2b4f86653dc214
[ "Apache-2.0" ]
null
null
null
data/studio21_generated/introductory/3195/starter_code.py
vijaykumawat256/Prompt-Summarization
614f5911e2acd2933440d909de2b4f86653dc214
[ "Apache-2.0" ]
null
null
null
data/studio21_generated/introductory/3195/starter_code.py
vijaykumawat256/Prompt-Summarization
614f5911e2acd2933440d909de2b4f86653dc214
[ "Apache-2.0" ]
null
null
null
def braces_status(s):
11.5
21
0.73913
ddae03ae0757e59670d8ef15db27d4d3832685d5
26,007
py
Python
tests/support/gitfs.py
babs/salt
c536ea716d5308880b244e7980f4b659d86fc104
[ "Apache-2.0" ]
2
2015-08-21T01:05:03.000Z
2015-09-02T07:30:45.000Z
tests/support/gitfs.py
babs/salt
c536ea716d5308880b244e7980f4b659d86fc104
[ "Apache-2.0" ]
2
2021-04-30T21:38:06.000Z
2021-12-13T20:51:39.000Z
tests/support/gitfs.py
babs/salt
c536ea716d5308880b244e7980f4b659d86fc104
[ "Apache-2.0" ]
1
2020-06-02T14:15:24.000Z
2020-06-02T14:15:24.000Z
""" Base classes for gitfs/git_pillar integration tests """ import errno import logging import os import shutil import tempfile import textwrap import attr import pytest import salt.utils.files import salt.utils.path import salt.utils.platform import salt.utils.yaml from salt.fileserver import gitfs from salt.pillar ...
35.002692
91
0.585266
11c703abbc273cda93c9358a62f1d2f9da48ba21
6,013
py
Python
manual_classify_helper.py
skbly7/usefulness
ed11cd55080d553cf62873999a5e00b154057fbc
[ "MIT" ]
null
null
null
manual_classify_helper.py
skbly7/usefulness
ed11cd55080d553cf62873999a5e00b154057fbc
[ "MIT" ]
null
null
null
manual_classify_helper.py
skbly7/usefulness
ed11cd55080d553cf62873999a5e00b154057fbc
[ "MIT" ]
null
null
null
import csv input_file_name = 'random_2500.csv' output_file_name = 'random_2500_classified.csv' data = [] nice_but_check_length = [ ' function not implemented', 'Method too long', 'Too many arguments', 'Repetitive code', 'hardcoded', 'Lazy class', 'cyclomatic complexity', 'Long Function...
25.054167
88
0.590055
570dc18a83013dbf8076346483243f8accfe0f31
913
py
Python
Lua/extractMinimap.py
telecombcn-dl/2017-dlai-team2
cb50d6004b8cfc8f9ae07f9222234ba280804758
[ "MIT" ]
1
2019-03-01T16:34:31.000Z
2019-03-01T16:34:31.000Z
Lua/extractMinimap.py
telecombcn-dl/2017-dlai-team2
cb50d6004b8cfc8f9ae07f9222234ba280804758
[ "MIT" ]
null
null
null
Lua/extractMinimap.py
telecombcn-dl/2017-dlai-team2
cb50d6004b8cfc8f9ae07f9222234ba280804758
[ "MIT" ]
null
null
null
#extractMinimap.py import cv2 import numpy as np import pre_processing from create_map_mask import create_map_mask from crop_map import crop_map from pre_processing import pre_processing #"image vector" num_frames = 8 #"number of frames" frame_vec = [] frame_vec.append(["frame"+str(n+1)+".png" for n in range(num_fr...
22.825
110
0.738226
86d57ea69db5f6dbde87ede7b0587f23fdc38181
267
py
Python
nyumbafix/config/desktop.py
proenterprise/nyumbafix
57af2355c991c4b6e29cf6a6c7850e6e852702dc
[ "MIT" ]
null
null
null
nyumbafix/config/desktop.py
proenterprise/nyumbafix
57af2355c991c4b6e29cf6a6c7850e6e852702dc
[ "MIT" ]
null
null
null
nyumbafix/config/desktop.py
proenterprise/nyumbafix
57af2355c991c4b6e29cf6a6c7850e6e852702dc
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals from frappe import _ def get_data(): return [ { "module_name": "Nyumbafix", "color": "blue", "icon": "octicon octicon-file-directory", "type": "module", "label": _("Nyumbafix") } ]
17.8
44
0.617978
996c513dd2c9ad967b52a653bc12c020e87184fe
22,878
py
Python
allennlp_semparse/parsimonious_languages/worlds/atis_world.py
nitishgupta/allennlp-semparse
0315b59df482c27ad36808cf7a992f01e07e36b1
[ "Apache-2.0" ]
105
2019-08-28T14:16:31.000Z
2022-03-26T20:51:22.000Z
allennlp_semparse/parsimonious_languages/worlds/atis_world.py
nitishgupta/allennlp-semparse
0315b59df482c27ad36808cf7a992f01e07e36b1
[ "Apache-2.0" ]
44
2019-09-09T20:52:40.000Z
2022-03-28T03:04:38.000Z
allennlp_semparse/parsimonious_languages/worlds/atis_world.py
nitishgupta/allennlp-semparse
0315b59df482c27ad36808cf7a992f01e07e36b1
[ "Apache-2.0" ]
19
2019-09-09T17:34:27.000Z
2021-09-08T08:22:08.000Z
from typing import List, Dict, Tuple, Set, Callable from collections import defaultdict from copy import copy import numpy from nltk import ngrams, bigrams from parsimonious.grammar import Grammar from parsimonious.expressions import Expression, OneOf, Sequence, Literal from allennlp.data.tokenizers import Token, Tok...
43.166038
112
0.615526
e52cc5a1f471d5eb485bbf12152fe7c536bfe423
6,929
py
Python
venv/lib/python2.7/site-packages/ansible/modules/network/aireos/aireos_command.py
haind27/test01
7f86c0a33eb0874a6c3f5ff9a923fd0cfc8ef852
[ "MIT" ]
37
2017-08-15T15:02:43.000Z
2021-07-23T03:44:31.000Z
ansible/ansible/modules/network/aireos/aireos_command.py
SergeyCherepanov/ansible
875711cd2fd6b783c812241c2ed7a954bf6f670f
[ "MIT" ]
12
2018-01-10T05:25:25.000Z
2021-11-28T06:55:48.000Z
ansible/ansible/modules/network/aireos/aireos_command.py
SergeyCherepanov/ansible
875711cd2fd6b783c812241c2ed7a954bf6f670f
[ "MIT" ]
49
2017-08-15T09:52:13.000Z
2022-03-21T17:11:54.000Z
#!/usr/bin/python # # Copyright: Ansible Team # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], ...
31.930876
92
0.661134
5578bce48e43e7ab4f07a5139923cca740ff6a3e
9,133
py
Python
onnx_chainer/replace_func.py
zjzh/chainer
e9da1423255c58c37be9733f51b158aa9b39dc93
[ "MIT" ]
3,705
2017-06-01T07:36:12.000Z
2022-03-30T10:46:15.000Z
onnx_chainer/replace_func.py
zjzh/chainer
e9da1423255c58c37be9733f51b158aa9b39dc93
[ "MIT" ]
5,998
2017-06-01T06:40:17.000Z
2022-03-08T01:42:44.000Z
onnx_chainer/replace_func.py
zjzh/chainer
e9da1423255c58c37be9733f51b158aa9b39dc93
[ "MIT" ]
1,150
2017-06-02T03:39:46.000Z
2022-03-29T02:29:32.000Z
import inspect import chainer class WrappedFunctionNode(chainer.FunctionNode): """Wrap the target function and operate as ``FunctionNode`` Arguments: name (str): name of the function node func (func): the target function args (list): args for the function kwargs (dict): kwarg...
36.386454
79
0.597613
56225f86e04a3f432d1e8d246b8cdc0cf9667f93
2,421
py
Python
zipline/finance/transaction.py
chalant/pluto
e7bfd35a2c1fc0e0753bd2f840b0a4385b5124fc
[ "Apache-2.0" ]
null
null
null
zipline/finance/transaction.py
chalant/pluto
e7bfd35a2c1fc0e0753bd2f840b0a4385b5124fc
[ "Apache-2.0" ]
null
null
null
zipline/finance/transaction.py
chalant/pluto
e7bfd35a2c1fc0e0753bd2f840b0a4385b5124fc
[ "Apache-2.0" ]
null
null
null
# # Copyright 2015 Quantopian, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wr...
28.482353
77
0.65758
febe9338395661bc44adf78aa4fe2570268e4568
2,292
py
Python
src/walklets.py
qlinhta/Walklets-learning-multiscale-representations-of-vertices-in-a-network
5a0b0d40cd9e8d2d38dcc6d88326e9c62eeeb277
[ "MIT" ]
null
null
null
src/walklets.py
qlinhta/Walklets-learning-multiscale-representations-of-vertices-in-a-network
5a0b0d40cd9e8d2d38dcc6d88326e9c62eeeb277
[ "MIT" ]
null
null
null
src/walklets.py
qlinhta/Walklets-learning-multiscale-representations-of-vertices-in-a-network
5a0b0d40cd9e8d2d38dcc6d88326e9c62eeeb277
[ "MIT" ]
null
null
null
import numpy as np import pandas as pd from gensim.models.word2vec import Word2Vec from helper import walk_transformer, create_graph from walkers import FirstOrderRandomWalker, SecondOrderRandomWalker class WalkletMachine: def __init__(self, args): self.args = args self.graph = create_graph(self.a...
36.967742
89
0.618674
d071eb5f5e08488801e0d5931affbca511388f00
10,586
py
Python
firepit/raft.py
imolloy/firepit
315c15763a38817a462b51e982c471c0839bb01c
[ "Apache-2.0" ]
null
null
null
firepit/raft.py
imolloy/firepit
315c15763a38817a462b51e982c471c0839bb01c
[ "Apache-2.0" ]
null
null
null
firepit/raft.py
imolloy/firepit
315c15763a38817a462b51e982c471c0839bb01c
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python """ Raft: Streaming processing of STIX data. EXPERIMENTAL - you probably don't want to use this for anything serious. """ import re from collections import OrderedDict import ijson import orjson import ujson import requests INVERTED_REFS = { 'x_child_of_ref': 'parent_ref', 'x_resolves...
32.078788
102
0.537125
6d6e0a170c4ea1e951475949fe84c6f99e093ac4
2,098
py
Python
ireval/main.py
arosh/ireval
fa2c19b83efc5f8b660eb770adadaefb1fa1bdab
[ "BSD-3-Clause" ]
null
null
null
ireval/main.py
arosh/ireval
fa2c19b83efc5f8b660eb770adadaefb1fa1bdab
[ "BSD-3-Clause" ]
null
null
null
ireval/main.py
arosh/ireval
fa2c19b83efc5f8b660eb770adadaefb1fa1bdab
[ "BSD-3-Clause" ]
null
null
null
# coding: UTF-8 from __future__ import absolute_import, division, print_function, unicode_literals import argparse import sys import numpy import ireval def _parse_args(argv): parser = argparse.ArgumentParser() parser.add_argument('-g', '--goldstandard', metavar='GOLD_STANDARD', dest...
31.787879
99
0.609628
bb056c6ba8ff9e8368398ce286c9ced520fabd2f
304
py
Python
RLBotPack/Rocketnoodles/src/drone_reference.py
L0laapk3/RLBotPack
f54038475d2a57428f3784560755f96bfcf8015f
[ "MIT" ]
13
2019-05-25T20:25:51.000Z
2022-03-19T13:36:23.000Z
RLBotPack/Rocketnoodles/src/drone_reference.py
L0laapk3/RLBotPack
f54038475d2a57428f3784560755f96bfcf8015f
[ "MIT" ]
53
2019-06-07T13:31:59.000Z
2022-03-28T22:53:47.000Z
RLBotPack/Rocketnoodles/src/drone_reference.py
L0laapk3/RLBotPack
f54038475d2a57428f3784560755f96bfcf8015f
[ "MIT" ]
78
2019-06-30T08:42:13.000Z
2022-03-23T20:11:42.000Z
from pathlib import Path from rlbot.agents.hivemind.drone_agent import DroneAgent class RocketNoodlesDroneAgent(DroneAgent): """"Drone agent class used by the PythonHivemind class.""" hive_path = str(Path(__file__).parent / 'main.py') hive_key = 'noodle-hive' hive_name = 'NoodleHive'
27.636364
62
0.740132
907dd074198115ccf3887f489fbb91a601202af5
4,756
py
Python
desktop/core/ext-py/urllib3-1.22/dummyserver/proxy.py
kokosing/hue
2307f5379a35aae9be871e836432e6f45138b3d9
[ "Apache-2.0" ]
14
2020-02-12T07:03:12.000Z
2022-01-08T22:15:59.000Z
desktop/core/ext-py/urllib3-1.22/dummyserver/proxy.py
zks888/hue
93a8c370713e70b216c428caa2f75185ef809deb
[ "Apache-2.0" ]
140
2019-02-12T21:15:52.000Z
2021-08-01T21:13:48.000Z
desktop/core/ext-py/urllib3-1.22/dummyserver/proxy.py
zks888/hue
93a8c370713e70b216c428caa2f75185ef809deb
[ "Apache-2.0" ]
9
2017-10-25T14:19:24.000Z
2022-01-31T17:09:16.000Z
#!/usr/bin/env python # # Simple asynchronous HTTP proxy with tunnelling (CONNECT). # # GET/POST proxying based on # http://groups.google.com/group/python-tornado/msg/7bea08e7a049cf26 # # Copyright (C) 2012 Senko Rasic <senko.rasic@dobarkod.hr> # # Permission is hereby granted, free of charge, to any person obtaining a...
33.971429
79
0.629941
6e81b46d1463480ffb050af7b4a9c262f7193c0d
2,990
py
Python
rlpy/agents/count_based_bonus.py
kngwyu/rlpy
329166de28d311d8f87358a62c38f40a7318fe07
[ "BSD-3-Clause" ]
3
2019-12-07T13:34:02.000Z
2021-03-29T10:20:05.000Z
rlpy/agents/count_based_bonus.py
kngwyu/rlpy
329166de28d311d8f87358a62c38f40a7318fe07
[ "BSD-3-Clause" ]
14
2019-09-29T03:09:09.000Z
2022-01-13T03:17:48.000Z
rlpy/agents/count_based_bonus.py
kngwyu/rlpy3
329166de28d311d8f87358a62c38f40a7318fe07
[ "BSD-3-Clause" ]
null
null
null
"""Wrapper agent for count based bonus """ from collections import defaultdict import numpy as np from rlpy.representations import Enumerable, Hashable from .agent import Agent class CountBasedBonus(Agent): """ A meta agent which wraps a agent and give him count-based bonuses. """ COUNT_MODES = ["s",...
33.977273
83
0.625084
7fd3329e97f4d0b47e0b2604ffe2a6456a05e699
4,737
py
Python
carla_walker_agent/src/carla_walker_agent/carla_walker_agent.py
SebastianHuch/ros-bridge
8a7dae3c75e95200e83f94ec807c37246c417227
[ "MIT" ]
314
2018-11-30T14:00:31.000Z
2022-03-31T08:27:59.000Z
carla_walker_agent/src/carla_walker_agent/carla_walker_agent.py
SebastianHuch/ros-bridge
8a7dae3c75e95200e83f94ec807c37246c417227
[ "MIT" ]
346
2018-11-30T14:15:53.000Z
2022-03-29T05:06:54.000Z
carla_walker_agent/src/carla_walker_agent/carla_walker_agent.py
SebastianHuch/ros-bridge
8a7dae3c75e95200e83f94ec807c37246c417227
[ "MIT" ]
243
2018-11-30T15:13:35.000Z
2022-03-31T12:20:12.000Z
#!/usr/bin/env python # # Copyright (c) 2020 Intel Corporation # # This work is licensed under the terms of the MIT license. # For a copy, see <https://opensource.org/licenses/MIT>. # """ Agent for Walker """ import math import ros_compatibility as roscomp from ros_compatibility.exceptions import ROSInterruptExceptio...
30.56129
99
0.622124
c0f6d1d21a86864b875e07bedee663107d57ebd7
1,447
py
Python
src/extractors.py
Sumukh/rodeo
3adbfdfd0353d2a8a18ca66b6116d8e895ebcd58
[ "MIT" ]
null
null
null
src/extractors.py
Sumukh/rodeo
3adbfdfd0353d2a8a18ca66b6116d8e895ebcd58
[ "MIT" ]
null
null
null
src/extractors.py
Sumukh/rodeo
3adbfdfd0353d2a8a18ca66b6116d8e895ebcd58
[ "MIT" ]
null
null
null
""" Extracts schema from folders or files. """ import os import predictors class Extractor: supported_extensions = [] corresponding_predictor = None @classmethod def supports_file(cls, filename): return any(filename.endswith(x) for x in cls.supported_extensions) @staticmethod def sche...
26.796296
118
0.671044
bc00f57d8bd72613dd096dc6865c9d11747d905d
255
py
Python
tests/__init__.py
bentiss/ratbag-emu
df2a34931935443589f269818596c20b1df68749
[ "MIT" ]
null
null
null
tests/__init__.py
bentiss/ratbag-emu
df2a34931935443589f269818596c20b1df68749
[ "MIT" ]
null
null
null
tests/__init__.py
bentiss/ratbag-emu
df2a34931935443589f269818596c20b1df68749
[ "MIT" ]
null
null
null
# SPDX-License-Identifier: MIT import os import sys f = os.readlink(__file__) if os.path.islink(__file__) else __file__ path = os.path.realpath(os.path.join(f, "..", "..", "src")) if path not in sys.path: sys.path.insert(0, path) import ratbag_emu
21.25
67
0.698039
bf3789f3d656114d1db963fd398a41d20feeb758
6,433
py
Python
utils/selenium_utils.py
pnvang/PhoenixBot
128b4088a657690590d22be1dc22262e689f3818
[ "MIT" ]
2
2021-07-27T03:54:47.000Z
2022-02-13T04:45:57.000Z
utils/selenium_utils.py
pnvang/PhoenixBot
128b4088a657690590d22be1dc22262e689f3818
[ "MIT" ]
1
2021-12-13T20:54:04.000Z
2021-12-13T20:54:04.000Z
utils/selenium_utils.py
cdpeca/PhoenixBot
9750b6e9257566ce1207f1f505543432370c9d8f
[ "MIT" ]
3
2021-08-12T00:25:55.000Z
2021-08-23T17:04:04.000Z
from chromedriver_py import binary_path as driver_path from selenium.webdriver import DesiredCapabilities from selenium.webdriver import Chrome, ChromeOptions # TODO: Combine these two dependencies. Leaving it for now since it touches too many sites atm. from selenium.webdriver.chrome.options import Options from seleni...
30.201878
148
0.646666
40d977694edac42ba515ccaeaf6bcb662c85c4b5
1,257
py
Python
ExerciciosPYTHON/PythonCeV/045.py
Samuel-Melo890/Python-Desafios
2abc7734d6a6c1f5ab67421f792d6889d93bac94
[ "MIT" ]
null
null
null
ExerciciosPYTHON/PythonCeV/045.py
Samuel-Melo890/Python-Desafios
2abc7734d6a6c1f5ab67421f792d6889d93bac94
[ "MIT" ]
2
2022-03-18T16:06:07.000Z
2022-03-18T16:55:29.000Z
ExerciciosPYTHON/PythonCeV/045.py
Samuel-Melo890/Python-Desafios
2abc7734d6a6c1f5ab67421f792d6889d93bac94
[ "MIT" ]
null
null
null
print('='*8,'Pedra, Papel ou Tesoura','='*8) print('''Escolha uma opcao para jogar: [0] Pedra [1] Papel [2] Tesoura''') j = int(input('Opcao escolhida: ')) l = ['Pedra','Papel','Tesoura'] from random import choice c = choice(l) from time import sleep print('JO') sleep(1) print('KEN') sleep(1) print('PO!') sleep(0.5) ...
26.1875
66
0.529037
1f0b49fa41070cc6d8673107663ba54018f87bce
2,215
py
Python
holdem/analyzer.py
hckynumber9/nn-holdem
ef49a91369733eb1453c5db71c77f644ca91fa23
[ "Unlicense", "MIT" ]
50
2016-10-07T02:21:12.000Z
2022-01-18T04:15:28.000Z
holdem/analyzer.py
hckynumber9/nn-holdem
ef49a91369733eb1453c5db71c77f644ca91fa23
[ "Unlicense", "MIT" ]
null
null
null
holdem/analyzer.py
hckynumber9/nn-holdem
ef49a91369733eb1453c5db71c77f644ca91fa23
[ "Unlicense", "MIT" ]
19
2017-04-10T01:28:49.000Z
2021-04-18T04:50:22.000Z
from deuces.deuces import Deck, Card, Evaluator # hand strength estimator (same class as in https://github.com/neynt/pokertude but uses Deuces Deck, Card and Evaluator classes for the inner workings) class Analyzer: def __init__(self): self.deck = Deck() self.reset() self._evaluator = Evalu...
34.076923
151
0.604515
e38168082a720a6b53b4f1acab42dff3ed09fecf
12,568
py
Python
gdalhelpers/classes/DEM.py
JanCaha/gdalhelpers
925ecb2552b697b5970617484f1fc259f844ba04
[ "MIT" ]
null
null
null
gdalhelpers/classes/DEM.py
JanCaha/gdalhelpers
925ecb2552b697b5970617484f1fc259f844ba04
[ "MIT" ]
null
null
null
gdalhelpers/classes/DEM.py
JanCaha/gdalhelpers
925ecb2552b697b5970617484f1fc259f844ba04
[ "MIT" ]
null
null
null
import gdal from gdal import osr, ogr from typing import List, Union from numpy import floor, array import os import math import warnings import gdalhelpers.helpers.math_helpers as math_helpers from gdalhelpers.checks import geometry_checks class DEM: """ Class representing digital elevation model. Based on `...
32.143223
120
0.531031
d4765b57c7110b1ed9620bc7ebb9119bf2ddecf2
13,655
py
Python
deepchem/feat/mol_graphs.py
n3011/deepchem
c316d998c462ce01032f0dae883856b400ea4765
[ "MIT" ]
null
null
null
deepchem/feat/mol_graphs.py
n3011/deepchem
c316d998c462ce01032f0dae883856b400ea4765
[ "MIT" ]
null
null
null
deepchem/feat/mol_graphs.py
n3011/deepchem
c316d998c462ce01032f0dae883856b400ea4765
[ "MIT" ]
null
null
null
""" Data Structures used to represented molecules for convolutions. """ from __future__ import division from __future__ import unicode_literals __author__ = "Han Altae-Tran and Bharath Ramsundar" __copyright__ = "Copyright 2016, Stanford University" __license__ = "MIT" import csv import random import numpy as np de...
32.667464
87
0.68085
9f0e376f414b181bdd75e575841b16e3f8780e79
10,737
py
Python
ads/jobs/builders/runtimes/artifact.py
oracle/accelerated-data-science
d594ed0c8c1365daf4cf9e860daebc760fa9a24b
[ "UPL-1.0", "Apache-2.0" ]
20
2022-02-22T19:07:09.000Z
2022-03-16T17:21:42.000Z
ads/jobs/builders/runtimes/artifact.py
oracle/accelerated-data-science
d594ed0c8c1365daf4cf9e860daebc760fa9a24b
[ "UPL-1.0", "Apache-2.0" ]
null
null
null
ads/jobs/builders/runtimes/artifact.py
oracle/accelerated-data-science
d594ed0c8c1365daf4cf9e860daebc760fa9a24b
[ "UPL-1.0", "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8; -*- # Copyright (c) 2021, 2022 Oracle and/or its affiliates. # Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/ import contextlib import logging import os import shutil import tempfile import zipfile from io import DEFAULT...
38.483871
127
0.608177
106a964cb258428b458219681220be18e25862ff
1,693
py
Python
aoc6.1.py
th3tard1sparadox/Advent_of_Code_2018
c7435dc09899fc5f3f144d1574e3281c03cec2d0
[ "MIT" ]
null
null
null
aoc6.1.py
th3tard1sparadox/Advent_of_Code_2018
c7435dc09899fc5f3f144d1574e3281c03cec2d0
[ "MIT" ]
null
null
null
aoc6.1.py
th3tard1sparadox/Advent_of_Code_2018
c7435dc09899fc5f3f144d1574e3281c03cec2d0
[ "MIT" ]
null
null
null
import math with open("coordinates.txt") as file: inputs = file.readlines() inputs = [(int(line.split(',')[0]), int(line.split(',')[1])) for line in inputs] def manhattan_dist(point1, point2): dist = abs(point1[0] - point2[0]) + abs(point1[1] - point2[1]) return dist highestx = 0 lowestx = 10**10 high...
26.453125
80
0.574719
36e2c06a5ae7f328f62ee632c88969d48d1e94ab
13,540
py
Python
sympy/calculus/finite_diff.py
ovolve/sympy
0a15782f20505673466b940454b33b8014a25c13
[ "BSD-3-Clause" ]
1
2016-02-22T22:46:50.000Z
2016-02-22T22:46:50.000Z
sympy/calculus/finite_diff.py
ovolve/sympy
0a15782f20505673466b940454b33b8014a25c13
[ "BSD-3-Clause" ]
7
2017-05-01T14:15:32.000Z
2017-09-06T20:44:24.000Z
sympy/calculus/finite_diff.py
ovolve/sympy
0a15782f20505673466b940454b33b8014a25c13
[ "BSD-3-Clause" ]
1
2020-09-09T15:20:27.000Z
2020-09-09T15:20:27.000Z
""" Finite difference weights ========================= This module implements an algorithm for efficient generation of finite difference weights for ordinary differentials of functions for derivatives from 0 (interpolation) up to arbitrary order. The core algorithm is provided in the finite difference weight generat...
34.452926
78
0.589513
60a8bb0d47f6d0bc0a7cc2d0bd5a4387bb14b3a6
14,921
py
Python
tests/unit/stats/test_measure_to_view_map.py
geobeau/opencensus-python
84e8f9a2dc8604584e8bb79444c3a76c1ee6e095
[ "Apache-2.0" ]
null
null
null
tests/unit/stats/test_measure_to_view_map.py
geobeau/opencensus-python
84e8f9a2dc8604584e8bb79444c3a76c1ee6e095
[ "Apache-2.0" ]
1
2021-06-10T23:12:23.000Z
2021-06-10T23:12:23.000Z
tests/unit/stats/test_measure_to_view_map.py
geobeau/opencensus-python
84e8f9a2dc8604584e8bb79444c3a76c1ee6e095
[ "Apache-2.0" ]
null
null
null
# Copyright 2018, OpenCensus Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in w...
39.16273
79
0.656792
4bb72538ca0c76cae9cdc89be08909ea5adc837a
1,801
py
Python
routes/cloud_routes.py
Davis-Software/SWC_interface
2a9584ac8e4a9dd0562a76e2e5ff71042673caad
[ "MIT" ]
null
null
null
routes/cloud_routes.py
Davis-Software/SWC_interface
2a9584ac8e4a9dd0562a76e2e5ff71042673caad
[ "MIT" ]
null
null
null
routes/cloud_routes.py
Davis-Software/SWC_interface
2a9584ac8e4a9dd0562a76e2e5ff71042673caad
[ "MIT" ]
null
null
null
from __init__ import * from user_data.user_auth import auth_required from route_helpers import cloud_request_handler as request_handler from utils import api_utils @app.route("/cloud", defaults={"cloud_path": ""}, methods=["GET", "POST"]) @app.route("/cloud/<path:cloud_path>", methods=["GET", "POST"]) @auth_required ...
30.525424
108
0.725708
754fef12a1ee1c714b03857038bc711925d24037
4,007
py
Python
backend/app/controllers/user_controller.py
codestrange/calendario-matcom
fa5a742d3ae3e8f6c7635022a6984409b731ea92
[ "MIT" ]
8
2019-02-12T20:03:03.000Z
2020-09-08T03:51:25.000Z
backend/app/controllers/user_controller.py
codestrange/calendario-matcom
fa5a742d3ae3e8f6c7635022a6984409b731ea92
[ "MIT" ]
11
2021-02-01T05:17:42.000Z
2021-04-27T05:13:46.000Z
backend/app/controllers/user_controller.py
codestrange/calendario-matcom
fa5a742d3ae3e8f6c7635022a6984409b731ea92
[ "MIT" ]
4
2019-03-06T22:13:56.000Z
2021-02-03T05:37:43.000Z
from flask import jsonify, request, g from . import api from ..auth import auth, auth_simple, auth_token, generate_auth_token, \ generate_confirmation_token, verify_confirmation_token from ..database import db, User from ..errors import bad_request from ..utils import check_json, json_load @api.route('/token') @a...
32.844262
100
0.648615
56da019eeac224b757ef344f05f18476ce3ed59b
457
py
Python
src/compas_ghpython/__init__.py
robin-oval/compas
e4dc751e95648c5ffb9449f239f3879d39f19887
[ "MIT" ]
1
2019-03-27T22:32:56.000Z
2019-03-27T22:32:56.000Z
src/compas_ghpython/__init__.py
robin-oval/compas
e4dc751e95648c5ffb9449f239f3879d39f19887
[ "MIT" ]
null
null
null
src/compas_ghpython/__init__.py
robin-oval/compas
e4dc751e95648c5ffb9449f239f3879d39f19887
[ "MIT" ]
null
null
null
""" ******************************************************************************** compas_ghpython ******************************************************************************** .. currentmodule:: compas_ghpython .. toctree:: :maxdepth: 1 compas_ghpython.artists compas_ghpython.geometry compas_gh...
18.28
80
0.452954
1f66f572b4cfbfcb5b0b57264d3893321bb3dc7a
75,232
py
Python
calysto_lc3/lc3.py
Calysto/calysto_littlecomputer
12f3913eca6e03c9d979c6ae54f4e3d4df4bce82
[ "BSD-2-Clause" ]
4
2015-08-20T16:07:08.000Z
2018-03-01T13:16:16.000Z
calysto_lc3/lc3.py
Calysto/calysto_lc3
12f3913eca6e03c9d979c6ae54f4e3d4df4bce82
[ "BSD-2-Clause" ]
null
null
null
calysto_lc3/lc3.py
Calysto/calysto_lc3
12f3913eca6e03c9d979c6ae54f4e3d4df4bce82
[ "BSD-2-Clause" ]
null
null
null
""" This code based on: http://www.daniweb.com/software-development/python/code/367871/ assembler-for-little-computer-3-lc-3-in-python Order of BRanch flags relaxed, BR without flags interpreted as BRnzp (always). """ from array import array import sys try: from IPython.display import HTML except: pass def a...
33.721201
622
0.537391
3a7a059033533978c010047a18c6f4cf01dc39db
1,008
py
Python
maro/simulator/scenarios/cim/frame_builder.py
anukaal/maro
21c88f4ef93729d51fc1a5b1a957150c51af2574
[ "MIT" ]
2
2021-03-24T07:30:10.000Z
2021-06-15T14:00:48.000Z
maro/simulator/scenarios/cim/frame_builder.py
gx9702/maro
38c796f0a7ed1e0f64c299d96c6e0df032401fa9
[ "MIT" ]
2
2020-11-16T11:56:52.000Z
2020-11-16T12:46:08.000Z
maro/simulator/scenarios/cim/frame_builder.py
gx9702/maro
38c796f0a7ed1e0f64c299d96c6e0df032401fa9
[ "MIT" ]
1
2021-10-01T09:17:43.000Z
2021-10-01T09:17:43.000Z
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. from maro.backends.frame import FrameBase, FrameNode from .matrix import gen_matrix from .port import Port from .vessel import gen_vessel_definition def gen_cim_frame(port_num: int, vessel_num: int, stop_nums: tuple, snapshots_num: int): "...
31.5
88
0.703373
7b352a7795c7a0efdbc71aad53c3b7b5f5fe4cef
653
py
Python
ch07/myproject_virtualenv/src/django-myproject/myproject/apps/viral_videos/checks.py
PacktPublishing/Django-3-Web-Development-Cookbook
6ffe6e0add93a43a9abaff62e0147dc1f4f5351a
[ "MIT" ]
159
2019-11-13T14:11:39.000Z
2022-03-24T05:47:10.000Z
ch07/myproject_virtualenv/src/django-myproject/myproject/apps/viral_videos/checks.py
PacktPublishing/Django-3-Web-Development-Cookbook
6ffe6e0add93a43a9abaff62e0147dc1f4f5351a
[ "MIT" ]
34
2019-11-06T08:32:48.000Z
2022-01-14T11:31:29.000Z
ch07/myproject_virtualenv/src/django-myproject/myproject/apps/viral_videos/checks.py
PacktPublishing/Django-3-Web-Development-Cookbook
6ffe6e0add93a43a9abaff62e0147dc1f4f5351a
[ "MIT" ]
103
2019-08-15T21:35:26.000Z
2022-03-20T05:29:11.000Z
from django.core.checks import Warning, register, Tags @register(Tags.compatibility) def settings_check(app_configs, **kwargs): from django.conf import settings errors = [] if not settings.ADMINS: errors.append(Warning( """ The system admins are not set in the project settings """, ...
24.185185
65
0.592649
47fe41561041ac05f38c6b0ca21705be7f86b667
2,416
py
Python
src/apps/ecidadania/accounts/admin.py
sdaityari/e-cidadania
2fc7f312145e7cd674033f3d765ff9ff8d4fb23c
[ "Apache-2.0" ]
40
2015-03-26T20:46:16.000Z
2022-02-28T09:15:30.000Z
src/apps/ecidadania/accounts/admin.py
zixtor/e-cidadania
2fc7f312145e7cd674033f3d765ff9ff8d4fb23c
[ "Apache-2.0" ]
1
2017-07-29T09:44:12.000Z
2017-08-08T16:27:22.000Z
src/apps/ecidadania/accounts/admin.py
zixtor/e-cidadania
2fc7f312145e7cd674033f3d765ff9ff8d4fb23c
[ "Apache-2.0" ]
19
2015-01-13T20:40:49.000Z
2021-11-02T03:53:39.000Z
# -*- coding: utf-8 -*- # # Copyright (c) 2013 Clione Software # Copyright (c) 2010-2013 Cidadania S. Coop. Galega # # 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.or...
40.949153
131
0.724752
ab2b674c13510d6773acdfb66277cb46ef7d3d55
3,983
py
Python
test_hsm.py
hmaerki/HierarchicalStateMachine
82543b58da1b933927c27c1c5cf3def383f0009b
[ "MIT" ]
null
null
null
test_hsm.py
hmaerki/HierarchicalStateMachine
82543b58da1b933927c27c1c5cf3def383f0009b
[ "MIT" ]
null
null
null
test_hsm.py
hmaerki/HierarchicalStateMachine
82543b58da1b933927c27c1c5cf3def383f0009b
[ "MIT" ]
null
null
null
import hsm class test_hsm(hsm.Statemachine): ''' This is a sample Statemachine as in figure 6.2 on page 170 in 'Practical Statecharts in C/C++', ISBN 1-57820-110-1. ''' def __init__(self): super().__init__() self.foo = False def state_0(self, objSignal): 'This is State "0"!' if objSign...
26.203947
68
0.658047
fb3fa4b16999d9671974cd8dd953a01f2f48bc4e
6,753
py
Python
tools/generate-ibilinear-chw-test.py
peterjc123/XNNPACK
0d00baa0d6e9342f6abe827cfd520515b2b05b16
[ "BSD-3-Clause" ]
2
2021-11-04T02:29:48.000Z
2021-11-04T02:30:13.000Z
tools/generate-ibilinear-chw-test.py
peterjc123/XNNPACK
0d00baa0d6e9342f6abe827cfd520515b2b05b16
[ "BSD-3-Clause" ]
1
2021-04-06T08:53:46.000Z
2021-04-07T10:55:44.000Z
tools/generate-ibilinear-chw-test.py
peterjc123/XNNPACK
0d00baa0d6e9342f6abe827cfd520515b2b05b16
[ "BSD-3-Clause" ]
2
2021-04-05T13:17:54.000Z
2021-04-09T00:23:23.000Z
#!/usr/bin/env python # Copyright 2020 Google LLC # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. import argparse import codecs import os import re import sys import yaml sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))) ...
29.880531
107
0.649785
88800594502703c6d11543c4c227f430f4846f13
418
py
Python
problems/generate-parentheses/solution-2.py
MleMoe/LeetCode-1
14f275ba3c8079b820808da17c4952fcf9c8253c
[ "MIT" ]
2
2021-03-25T01:58:55.000Z
2021-08-06T12:47:13.000Z
problems/generate-parentheses/solution-2.py
MleMoe/LeetCode-1
14f275ba3c8079b820808da17c4952fcf9c8253c
[ "MIT" ]
3
2019-08-27T13:25:42.000Z
2021-08-28T17:49:34.000Z
problems/generate-parentheses/solution-2.py
MleMoe/LeetCode-1
14f275ba3c8079b820808da17c4952fcf9c8253c
[ "MIT" ]
1
2021-08-14T08:49:39.000Z
2021-08-14T08:49:39.000Z
class Solution: def generateParenthesis(self, n: int) -> [str]: ans = [] def backtrack(S = '', left = 0, right = 0): if len(S) == 2 * n: ans.append(S) return if left < n: backtrack(S + '(', left + 1, right) if right ...
32.153846
51
0.413876
79f81dd4cd793f361d59a2413634b3a4899d22dc
822
py
Python
aoc2021/21/d21_1.py
kewbish/ka-algorithms
7a893fdaebd99530eaf0d9633c2721763707e92f
[ "MIT" ]
null
null
null
aoc2021/21/d21_1.py
kewbish/ka-algorithms
7a893fdaebd99530eaf0d9633c2721763707e92f
[ "MIT" ]
null
null
null
aoc2021/21/d21_1.py
kewbish/ka-algorithms
7a893fdaebd99530eaf0d9633c2721763707e92f
[ "MIT" ]
null
null
null
with open("input.txt") as x: p1, p2 = x.read().splitlines() p1 = int(p1[28:]) - 1 p2 = int(p2[28:]) - 1 track = [x for x in range(1, 11)] p1_score = 0 p2_score = 0 dice_state = 0 def roll(): global dice_state steps = (dice_state) % 100 + 1 dice_state += 1 return steps def step(p1_playin...
20.04878
61
0.60219
249687c0d8c9b5743923cd2bc04418a57e2f2905
52,108
py
Python
source/state_machine_handler.py
andrea-defraia/aws-control-tower-customizations
474a69ef01554a128752c98366a0d63f4a7ae50a
[ "Apache-2.0" ]
155
2020-01-21T19:50:58.000Z
2021-10-08T23:31:38.000Z
source/state_machine_handler.py
andrea-defraia/aws-control-tower-customizations
474a69ef01554a128752c98366a0d63f4a7ae50a
[ "Apache-2.0" ]
77
2020-03-26T15:12:03.000Z
2021-10-14T20:27:58.000Z
source/state_machine_handler.py
andrea-defraia/aws-control-tower-customizations
474a69ef01554a128752c98366a0d63f4a7ae50a
[ "Apache-2.0" ]
76
2020-01-21T19:54:35.000Z
2021-10-14T02:54:29.000Z
############################################################################## # Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # # # Licensed under the Apache License, Version 2.0 (the "License"). # # Y...
43.825063
80
0.557131
91bb07b395b2b242188b8384ef35b212499985a8
5,152
py
Python
acq4/util/FileLoader/FileLoader.py
aleonlein/acq4
4b1fcb9ad2c5e8d4595a2b9cf99d50ece0c0f555
[ "MIT" ]
1
2020-06-04T17:04:53.000Z
2020-06-04T17:04:53.000Z
acq4/util/FileLoader/FileLoader.py
aleonlein/acq4
4b1fcb9ad2c5e8d4595a2b9cf99d50ece0c0f555
[ "MIT" ]
24
2016-09-27T17:25:24.000Z
2017-03-02T21:00:11.000Z
acq4/util/FileLoader/FileLoader.py
sensapex/acq4
9561ba73caff42c609bd02270527858433862ad8
[ "MIT" ]
4
2016-10-19T06:39:36.000Z
2019-09-30T21:06:45.000Z
# -*- coding: utf-8 -*- from __future__ import print_function from . import template from acq4.util import Qt from acq4.util.HelpfulException import HelpfulException from acq4.Manager import logMsg, logExc, getManager class FileLoader(Qt.QWidget): """Interface for 1) displaying directory tree and 2) loading a fil...
37.064748
139
0.609472
b7d0225b4bd5b28988ba8f52cbf7e11ee365e20b
881
py
Python
Data Structures/Strings/4.py
michal0janczyk/udacity_data_structures_and_algorithms_nanodegree
3ec4bb94158d4dee59056703e63cb0fab07cb18c
[ "Unlicense" ]
1
2021-09-27T10:18:14.000Z
2021-09-27T10:18:14.000Z
Data Structures/Strings/4.py
michal0janczyk/udacity_data_structures_and_algorithms_nanodegree
3ec4bb94158d4dee59056703e63cb0fab07cb18c
[ "Unlicense" ]
1
2021-05-10T18:11:07.000Z
2021-05-10T18:11:07.000Z
strings/4.py
henryto/ds
514bd20c933cf05f8f6550add1fc3df28f3eac0b
[ "BSD-3-Clause" ]
null
null
null
# Solution def hamming_distance(str1, str2): """ Calculate the hamming distance of the two strings Args: str1(string),str2(string): Strings to be used for finding the hamming distance Returns: int: Hamming Distance """ if len(str1) == len(str2): count = 0 for c...
27.53125
93
0.623156
9363de01df34f2ef9f7dcc364c9df915479c2151
28,424
py
Python
environment.py
AaronKFC/iRDPG-for-Quantitative-Trading-on-Stock-Index-Futures
4f85a3c210c468774a8ec417bb771636f4716587
[ "Apache-2.0" ]
4
2021-09-01T23:05:31.000Z
2022-03-26T14:58:58.000Z
environment.py
AaronKFC/iRDPG-for-Quantitative-Trading-on-Stock-Index-Futures
4f85a3c210c468774a8ec417bb771636f4716587
[ "Apache-2.0" ]
1
2021-12-13T04:57:09.000Z
2021-12-13T05:35:42.000Z
environment.py
AaronKFC/iRDPG-for-Quantitative-Trading-on-Stock-Index-Futures
4f85a3c210c468774a8ec417bb771636f4716587
[ "Apache-2.0" ]
null
null
null
# import talib import argparse import random import time import pandas as pd import numpy as np import matplotlib.pyplot as plt from copy import deepcopy from datetime import timedelta,datetime def randomDate(start, end, frmt): #random選時間idx,IC:9:31~15:00 #random選擇哪日期idx stime = time.mktime(time.strptim...
41.923304
258
0.568041
b378640a870cede74557794e7b6946fc9f6f638e
697
py
Python
NeuroGPU_Base/scripts/template/cell.py
roybens/neuroGPU
667d266af133e98013904effe75670b44119d424
[ "MIT" ]
16
2019-08-07T09:29:33.000Z
2022-03-30T05:44:32.000Z
NeuroGPU_Base/scripts/template/cell.py
roybens/neuroGPU
667d266af133e98013904effe75670b44119d424
[ "MIT" ]
6
2021-08-04T04:46:56.000Z
2022-03-12T00:59:59.000Z
NeuroGPU_Base/scripts/template/cell.py
roybens/neuroGPU
667d266af133e98013904effe75670b44119d424
[ "MIT" ]
6
2016-03-24T05:00:28.000Z
2021-11-05T10:32:42.000Z
import numpy as np def cell_numel(input): out = np.zeros(input.shape[0]) if input.size == 0: return None for i in range(input.size): out[i] = len(input[i]) return out def cell_2_vec(input): if len(input.shape) > 2: raise ValueError("Expected a 2-d array (cell) for an input.") cn = cell_numel(input) cs = ...
22.483871
63
0.652798
551f9d329b0ea6d6c3543b4afa6e0a7fec09bb13
233,715
py
Python
google-cloud-sdk/lib/googlecloudsdk/third_party/apis/dialogflow/v2/dialogflow_v2_messages.py
bopopescu/Social-Lite
ee05d6a7431c36ff582c8d6b58bb20a8c5f550bf
[ "Apache-2.0" ]
null
null
null
google-cloud-sdk/lib/googlecloudsdk/third_party/apis/dialogflow/v2/dialogflow_v2_messages.py
bopopescu/Social-Lite
ee05d6a7431c36ff582c8d6b58bb20a8c5f550bf
[ "Apache-2.0" ]
4
2020-07-21T12:51:46.000Z
2022-01-22T10:29:25.000Z
google-cloud-sdk/lib/googlecloudsdk/third_party/apis/dialogflow/v2/dialogflow_v2_messages.py
bopopescu/Social-Lite
ee05d6a7431c36ff582c8d6b58bb20a8c5f550bf
[ "Apache-2.0" ]
1
2020-07-25T18:17:57.000Z
2020-07-25T18:17:57.000Z
"""Generated message classes for dialogflow version v2. Builds conversational interfaces (for example, chatbots, and voice-powered apps and devices). """ # NOTE: This file is autogenerated and should not be edited by hand. from apitools.base.protorpclite import messages as _messages from apitools.base.py import encod...
42.679876
141
0.747821
2a28c188dc89dc71a8f52a9be7c14321ccb2cef2
285
py
Python
sdk/python/pulumi_azure_nextgen/azurestackhci/v20201001/__init__.py
test-wiz-sec/pulumi-azure-nextgen
20a695af0d020b34b0f1c336e1b69702755174cc
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_nextgen/azurestackhci/v20201001/__init__.py
test-wiz-sec/pulumi-azure-nextgen
20a695af0d020b34b0f1c336e1b69702755174cc
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_nextgen/azurestackhci/v20201001/__init__.py
test-wiz-sec/pulumi-azure-nextgen
20a695af0d020b34b0f1c336e1b69702755174cc
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** # Export this package's modules as members: from .cluster import * from .get_cluster import * from . import outputs
31.666667
80
0.715789
f20c21737c5d1a449fdd0b13d6534fd8ff6779fb
1,143
py
Python
Chapter 08/Chap08_Example8.102.py
bpbpublications/Programming-Techniques-using-Python
49b785f37e95a3aad1d36cef51e219ac56e5e9f0
[ "MIT" ]
null
null
null
Chapter 08/Chap08_Example8.102.py
bpbpublications/Programming-Techniques-using-Python
49b785f37e95a3aad1d36cef51e219ac56e5e9f0
[ "MIT" ]
null
null
null
Chapter 08/Chap08_Example8.102.py
bpbpublications/Programming-Techniques-using-Python
49b785f37e95a3aad1d36cef51e219ac56e5e9f0
[ "MIT" ]
null
null
null
# Parent class class MyEngineer: # making protected data members _myname = None _myrollno = None _mybranch = None # a constructor def __init__(self, myname, myrollno, mybranch): self._myname = myname self._myrollno = myrollno s...
30.078947
74
0.569554
c3dc92823170a382e97d47bd5f70d978bdb22892
393
py
Python
C18/18-4/pizzeria/wsgi.py
Triple-Z/Python-Crash-Course
7e59104420f6110e4d60668314264105534016ce
[ "MIT" ]
null
null
null
C18/18-4/pizzeria/wsgi.py
Triple-Z/Python-Crash-Course
7e59104420f6110e4d60668314264105534016ce
[ "MIT" ]
null
null
null
C18/18-4/pizzeria/wsgi.py
Triple-Z/Python-Crash-Course
7e59104420f6110e4d60668314264105534016ce
[ "MIT" ]
null
null
null
""" WSGI config for pizzeria project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/2.0/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_SETT...
23.117647
78
0.78626
fc705343fc83a60f88e020023e46a4f443863a0a
985
py
Python
kfkCheck/conf/settings.py
hsingpu5/telex
fac1c792811f7c42b6c7380a0e6f26c0d1441d42
[ "Apache-2.0" ]
null
null
null
kfkCheck/conf/settings.py
hsingpu5/telex
fac1c792811f7c42b6c7380a0e6f26c0d1441d42
[ "Apache-2.0" ]
null
null
null
kfkCheck/conf/settings.py
hsingpu5/telex
fac1c792811f7c42b6c7380a0e6f26c0d1441d42
[ "Apache-2.0" ]
null
null
null
import os BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) #======================================================================== USER = 'root' PWD = 'XXXX' # ENGINE示例 agent ssh salt ENGINE = 'ssh' ENGINE_DICT = { 'agent': 'src.engine.agent.AgentHandler', 'ssh': 'src.engine...
20.957447
73
0.607107
d1fad7f63b83fa46f73b16b7d481886b3894ac5a
438
py
Python
testsuite/mergeinstances-vararray/run.py
LongerVision/OpenShadingLanguage
30d2a4a089c5c9d521b27519329c205763dfe483
[ "BSD-3-Clause" ]
1,105
2015-01-02T20:47:19.000Z
2021-01-25T13:20:56.000Z
testsuite/mergeinstances-vararray/run.py
LongerVision/OpenShadingLanguage
30d2a4a089c5c9d521b27519329c205763dfe483
[ "BSD-3-Clause" ]
696
2015-01-07T23:42:08.000Z
2021-01-25T03:55:08.000Z
testsuite/mergeinstances-vararray/run.py
LongerVision/OpenShadingLanguage
30d2a4a089c5c9d521b27519329c205763dfe483
[ "BSD-3-Clause" ]
248
2015-01-05T13:41:28.000Z
2021-01-24T23:29:55.000Z
#!/usr/bin/env python # Copyright Contributors to the Open Shading Language project. # SPDX-License-Identifier: BSD-3-Clause # https://github.com/AcademySoftwareFoundation/OpenShadingLanguage # This is a regression test for a bug in which instance merging was # done incorrectly for shaders that differed only in the v...
36.5
69
0.794521
825d282d9e70603d78fcb8b762c396b4732158fd
13,418
py
Python
examples/fastspeech/fastspeech_dataset.py
ashishpatel26/TensorflowTTS
bd29c3eefa51041b76fd355d94025b4c13084296
[ "Apache-2.0" ]
2
2020-06-01T07:39:25.000Z
2021-11-08T09:31:33.000Z
examples/fastspeech/fastspeech_dataset.py
ashishpatel26/TensorflowTTS
bd29c3eefa51041b76fd355d94025b4c13084296
[ "Apache-2.0" ]
null
null
null
examples/fastspeech/fastspeech_dataset.py
ashishpatel26/TensorflowTTS
bd29c3eefa51041b76fd355d94025b4c13084296
[ "Apache-2.0" ]
1
2020-10-05T06:06:20.000Z
2020-10-05T06:06:20.000Z
# -*- coding: utf-8 -*- # Copyright 2020 Minh Nguyen (@dathudeptrai) # # 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 ...
36.661202
115
0.613281
4352b8e4d2328ea0c56a3540d4bd2076342f348b
824
py
Python
mininet/examples/test/test_multitest.py
helllb/Distrinet
6cf32b5fe1023d67dedd56acae383a4577fdf6a5
[ "MIT" ]
16
2019-08-27T13:57:21.000Z
2021-12-10T12:24:10.000Z
mininet/examples/test/test_multitest.py
helllb/Distrinet
6cf32b5fe1023d67dedd56acae383a4577fdf6a5
[ "MIT" ]
56
2019-08-22T14:16:27.000Z
2022-01-15T20:33:31.000Z
mininet/examples/test/test_multitest.py
helllb/Distrinet
6cf32b5fe1023d67dedd56acae383a4577fdf6a5
[ "MIT" ]
7
2019-08-11T13:11:20.000Z
2021-12-09T04:03:33.000Z
#!/usr/bin/env python """ Test for multitest.py """ import unittest from mininet.util import pexpect class testMultiTest( unittest.TestCase ): prompt = 'mininet>' def testMultiTest( self ): "Verify pingall (0% dropped) and hX-eth0 interface for each host (ifconfig)" p = pexpect.spawn( 'pyth...
24.969697
84
0.54733
320f16a4a9b6b599a9b28b90d7c360a5732df5b6
1,415
py
Python
Leetcode/581.shortest-unsorted-continuous-subarray.py
EdwaRen/Competitve-Programming
e8bffeb457936d28c75ecfefb5a1f316c15a9b6c
[ "MIT" ]
1
2021-05-03T21:48:25.000Z
2021-05-03T21:48:25.000Z
Leetcode/581.shortest-unsorted-continuous-subarray.py
EdwaRen/Competitve_Programming
e8bffeb457936d28c75ecfefb5a1f316c15a9b6c
[ "MIT" ]
null
null
null
Leetcode/581.shortest-unsorted-continuous-subarray.py
EdwaRen/Competitve_Programming
e8bffeb457936d28c75ecfefb5a1f316c15a9b6c
[ "MIT" ]
null
null
null
class Solution(object): def findUnsortedSubarray(self, nums): # Handle edge case if len(nums) == 0: return 0 # Keep track of min and max value that breaks ascending order min_val = nums[-1] max_val = nums[0] # Detect smallest value after ascending order ...
31.444444
92
0.551237
9272f5c02d28aefe034e845d4563b83aa61eed81
397
py
Python
website/home/migrations/0013_auto_20200923_1307.py
Udbhav18/the-code-builders
037b09c713fcbd9c6468dcfe1bdfb2c4f8a97a5c
[ "MIT" ]
null
null
null
website/home/migrations/0013_auto_20200923_1307.py
Udbhav18/the-code-builders
037b09c713fcbd9c6468dcfe1bdfb2c4f8a97a5c
[ "MIT" ]
null
null
null
website/home/migrations/0013_auto_20200923_1307.py
Udbhav18/the-code-builders
037b09c713fcbd9c6468dcfe1bdfb2c4f8a97a5c
[ "MIT" ]
1
2021-12-25T13:02:23.000Z
2021-12-25T13:02:23.000Z
# Generated by Django 3.1.1 on 2020-09-23 07:37 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('home', '0012_auto_20200923_1204'), ] operations = [ migrations.AlterField( model_name='participant', name='paid', ...
20.894737
61
0.602015
8f11b7b9c8d7840cea587addbda85ece7d5f4ce8
35,007
py
Python
cirq-core/cirq/ops/clifford_gate.py
anonymousr007/Cirq
fae0d85f79440e046ef365b58d86605ce35d4626
[ "Apache-2.0" ]
null
null
null
cirq-core/cirq/ops/clifford_gate.py
anonymousr007/Cirq
fae0d85f79440e046ef365b58d86605ce35d4626
[ "Apache-2.0" ]
null
null
null
cirq-core/cirq/ops/clifford_gate.py
anonymousr007/Cirq
fae0d85f79440e046ef365b58d86605ce35d4626
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 The Cirq Developers # # 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 ...
39.735528
100
0.629188
05fff4199623daaa9d8e3a4b179c223e6e6d7af6
6,976
py
Python
tests/vectorizers/test_union_vectorizers.py
alesanmed/asr-twitter
04b2e1151c38415aa2d3755ee863ac1e0515472c
[ "Apache-2.0" ]
null
null
null
tests/vectorizers/test_union_vectorizers.py
alesanmed/asr-twitter
04b2e1151c38415aa2d3755ee863ac1e0515472c
[ "Apache-2.0" ]
null
null
null
tests/vectorizers/test_union_vectorizers.py
alesanmed/asr-twitter
04b2e1151c38415aa2d3755ee863ac1e0515472c
[ "Apache-2.0" ]
null
null
null
import matplotlib.pyplot as plt import numpy as np import utils from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.pipeline import Pipeline, FeatureUnion from NLTKVectorizer import NLTKVectorizer from sklearn.naive_bayes import MultinomialNB from sklearn.grid_search import GridSearchCV from sklea...
52.848485
124
0.554329
4008d8038f1d8040e5fb7eaeabbd65ab92bc86e8
36,056
py
Python
src/analysis/proper_experiments/v400/analyse_all_statistical_tests.py
Michael-Beukman/NEATNoveltyPCG
2441d80eb0f6dd288a00ebb56c432963cefc879d
[ "MIT" ]
5
2022-01-26T23:19:46.000Z
2022-02-10T20:24:19.000Z
src/analysis/proper_experiments/v400/analyse_all_statistical_tests.py
Michael-Beukman/NEATNoveltyPCG
2441d80eb0f6dd288a00ebb56c432963cefc879d
[ "MIT" ]
null
null
null
src/analysis/proper_experiments/v400/analyse_all_statistical_tests.py
Michael-Beukman/NEATNoveltyPCG
2441d80eb0f6dd288a00ebb56c432963cefc879d
[ "MIT" ]
null
null
null
""" This file attempts to be a central place where we compare different results (from both Mario and Maze) for different metrics, using different statistical tests, etc. """ from collections import defaultdict from email.policy import default import glob import os import pickle import pprint import re import sy...
40.603604
174
0.57003
3f05a240ebe8e6b08c8853688b5b626e17f54ae4
9,483
py
Python
third_party/legacy_roslaunch/depends.py
mvukov/rules_ros
0919c94fae4c84f40c9ec23164345f6db8aef853
[ "Apache-2.0" ]
14
2021-05-02T00:58:45.000Z
2022-01-11T07:01:27.000Z
third_party/legacy_roslaunch/depends.py
mvukov/rules_ros
0919c94fae4c84f40c9ec23164345f6db8aef853
[ "Apache-2.0" ]
null
null
null
third_party/legacy_roslaunch/depends.py
mvukov/rules_ros
0919c94fae4c84f40c9ec23164345f6db8aef853
[ "Apache-2.0" ]
1
2022-02-07T00:17:23.000Z
2022-02-07T00:17:23.000Z
# Software License Agreement (BSD License) # # Copyright (c) 2008, Willow Garage, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code must retain the above...
39.18595
133
0.611199
b396cf4a6fe370512cf742da5dbd830211bb2df8
19,218
py
Python
pahap/scripts/rrtServer.py
buivn/ara_navigation
5f9f1bb713882cede745523acea86499db34387a
[ "BSD-2-Clause" ]
null
null
null
pahap/scripts/rrtServer.py
buivn/ara_navigation
5f9f1bb713882cede745523acea86499db34387a
[ "BSD-2-Clause" ]
null
null
null
pahap/scripts/rrtServer.py
buivn/ara_navigation
5f9f1bb713882cede745523acea86499db34387a
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/env python import rospy import roslib import sys import numpy as np import random import math from mpl_toolkits import mplot3d from geometry_msgs.msg import Point # from pahap.srv import displayData, displayDataResponse from pahap.srv import rrt, rrtResponse from numpy import expand_dims import sys from sk...
33.077453
129
0.578624
456a8780e0bdb416953bed50fb36290ccd7cddf8
40,462
py
Python
tensorflow/python/distribute/collective_all_reduce_strategy.py
ashutom/tensorflow-upstream
c16069c19de9e286dd664abb78d0ea421e9f32d4
[ "Apache-2.0" ]
8
2021-08-03T03:57:10.000Z
2021-12-13T01:19:02.000Z
tensorflow/python/distribute/collective_all_reduce_strategy.py
ashutom/tensorflow-upstream
c16069c19de9e286dd664abb78d0ea421e9f32d4
[ "Apache-2.0" ]
null
null
null
tensorflow/python/distribute/collective_all_reduce_strategy.py
ashutom/tensorflow-upstream
c16069c19de9e286dd664abb78d0ea421e9f32d4
[ "Apache-2.0" ]
2
2021-11-02T15:46:38.000Z
2022-03-08T11:39:35.000Z
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
42.235908
134
0.714547
3c18dbcb0e561ebdd2edc39c76674a66bbd94986
3,432
py
Python
setup.py
aphp/edsnlp
a39ea23ff193764a8b1a42c5de463cd43202c134
[ "BSD-3-Clause" ]
32
2022-03-08T16:45:09.000Z
2022-03-31T15:21:00.000Z
setup.py
aphp/edsnlp
a39ea23ff193764a8b1a42c5de463cd43202c134
[ "BSD-3-Clause" ]
19
2022-03-09T11:44:43.000Z
2022-03-31T14:32:06.000Z
setup.py
aphp/edsnlp
a39ea23ff193764a8b1a42c5de463cd43202c134
[ "BSD-3-Clause" ]
1
2022-03-11T16:14:21.000Z
2022-03-11T16:14:21.000Z
from distutils.sysconfig import get_python_inc import numpy from Cython.Build import cythonize from setuptools import Extension, find_packages, setup def get_lines(relative_path): with open(relative_path) as f: return f.readlines() def get_version(path): with open(path, "r") as f: for line ...
30.918919
77
0.661131
9e06a139fdd8ab33294b68969246ea585fd6c5ad
3,359
py
Python
baselines.py
Bollegala/Meta-Embedding-Framework
26d05a1e23a559dc498aef50598f6c1a2c9c5f3b
[ "MIT" ]
null
null
null
baselines.py
Bollegala/Meta-Embedding-Framework
26d05a1e23a559dc498aef50598f6c1a2c9c5f3b
[ "MIT" ]
null
null
null
baselines.py
Bollegala/Meta-Embedding-Framework
26d05a1e23a559dc498aef50598f6c1a2c9c5f3b
[ "MIT" ]
null
null
null
""" Implement baseline methods such as averaging and SVD. """ import argparse import numpy as np import time import sys from wordreps import WordReps from sklearn.utils.extmath import randomized_svd def save_model(embed_matrix, ix_to_word, fname): """ Write the word embeddings in the embed_matrix to fname. ...
35.357895
171
0.64156
76cfcb6aac51ff69d000a4089ae82cb65ee03336
864
py
Python
bug_user_app/admin.py
NoelKling/bugtracker
57cfd12f0dedd62e7bd7909e2af4609717115a95
[ "MIT" ]
null
null
null
bug_user_app/admin.py
NoelKling/bugtracker
57cfd12f0dedd62e7bd7909e2af4609717115a95
[ "MIT" ]
null
null
null
bug_user_app/admin.py
NoelKling/bugtracker
57cfd12f0dedd62e7bd7909e2af4609717115a95
[ "MIT" ]
null
null
null
from django.contrib import admin from django.contrib.auth.admin import UserAdmin from django.contrib.auth.forms import UserChangeForm from bug_user_app.models import CustomUser from django.utils.translation import ugettext_lazy as _ # Based on Stack Overflow user nip3o's solution and neverwalkaloner's comment class C...
36
89
0.721065
97e6171413bcc9bffdc308acca341baaabc90873
31,666
py
Python
Codes/Nets.py
Junjieli0704/TMP2
a8ad1004bbfdf5682c723688965e94339e273df5
[ "MIT" ]
23
2018-07-24T14:56:35.000Z
2021-11-21T09:54:48.000Z
Codes/Nets.py
Junjieli0704/TMP2
a8ad1004bbfdf5682c723688965e94339e273df5
[ "MIT" ]
2
2018-07-24T14:58:07.000Z
2019-07-16T13:17:47.000Z
Codes/Nets.py
Junjieli0704/TMP2
a8ad1004bbfdf5682c723688965e94339e273df5
[ "MIT" ]
6
2018-09-04T02:11:27.000Z
2020-06-20T12:33:47.000Z
# Codes From https://github.com/cedias/Hierarchical-Sentiment import torch import torch.nn as nn import torch.nn.functional as F import torch.nn.init as I from torch.autograd import Variable class Attention(nn.Module): def __init__(self, hid_size, att_size): super(Attention, self).__init__() self...
46.295322
155
0.574591
f60f82245ff7459ff079e8eea5e5517dca18fa40
24,683
py
Python
earth_enterprise/src/server/wsgi/serve/snippets/data/metainfo_by_fieldpath.py
ezeeyahoo/earthenterprise
b6cac9e6228946f2f17d1edb75e118aeb3e8e8c9
[ "Apache-2.0" ]
2,661
2017-03-20T22:12:50.000Z
2022-03-30T09:43:19.000Z
earth_enterprise/src/server/wsgi/serve/snippets/data/metainfo_by_fieldpath.py
ezeeyahoo/earthenterprise
b6cac9e6228946f2f17d1edb75e118aeb3e8e8c9
[ "Apache-2.0" ]
1,531
2017-03-24T17:20:32.000Z
2022-03-16T18:11:14.000Z
earth_enterprise/src/server/wsgi/serve/snippets/data/metainfo_by_fieldpath.py
ezeeyahoo/earthenterprise
b6cac9e6228946f2f17d1edb75e118aeb3e8e8c9
[ "Apache-2.0" ]
990
2017-03-24T11:54:28.000Z
2022-03-22T11:51:47.000Z
#!/usr/bin/env python2.7 # # Copyright 2017 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
38.32764
479
0.687558
2a660a3009df41736f8ddf77a0320f5c560efffa
815
py
Python
logical/converter/qiskit/tools/jupyter/jupyter_magics.py
malcolmregan/GateCircuit-to-AnnealerEmbedding
33a1a4ea2ebd707ade0677e0df468d5120a861db
[ "Apache-2.0" ]
null
null
null
logical/converter/qiskit/tools/jupyter/jupyter_magics.py
malcolmregan/GateCircuit-to-AnnealerEmbedding
33a1a4ea2ebd707ade0677e0df468d5120a861db
[ "Apache-2.0" ]
1
2019-04-09T02:22:38.000Z
2019-04-09T02:22:38.000Z
logical/converter/qiskit/tools/jupyter/jupyter_magics.py
malcolmregan/GateCircuit-to-AnnealerEmbedding
33a1a4ea2ebd707ade0677e0df468d5120a861db
[ "Apache-2.0" ]
null
null
null
import time import threading from IPython.display import display # pylint: disable=import-error from IPython.core import magic_arguments # pylint: disable=import-error from IPython.core.magic import cell_magic, Magics, magics_class # pylint: disable=import-error ...
20.897436
95
0.666258
17bc51445b8c8ef6a82011f84932779d968ac0dd
3,870
py
Python
data_augmentation.py
Sepehr79h/Monumentum
e2818f60bea5cfc0e4bb9c4a4878470315ac228e
[ "MIT" ]
null
null
null
data_augmentation.py
Sepehr79h/Monumentum
e2818f60bea5cfc0e4bb9c4a4878470315ac228e
[ "MIT" ]
null
null
null
data_augmentation.py
Sepehr79h/Monumentum
e2818f60bea5cfc0e4bb9c4a4878470315ac228e
[ "MIT" ]
null
null
null
import cv2 import os import numpy as np import matplotlib.pyplot as plt import statistics from skimage.util import random_noise from skimage.transform import rotate import random from scipy import ndimage, misc import skimage as sk import imgaug.augmenters as iaa def load_images_from_folder(folder): images = [] ...
33.652174
103
0.703359
1e85d84f11dd9690707da8568bf5d59e11b1156a
1,452
py
Python
examples/formula/parametric_design.py
yarikoptic/NiPy-OLD
8759b598ac72d3b9df7414642c7a662ad9c55ece
[ "BSD-3-Clause" ]
1
2015-08-22T16:14:45.000Z
2015-08-22T16:14:45.000Z
examples/formula/parametric_design.py
yarikoptic/NiPy-OLD
8759b598ac72d3b9df7414642c7a662ad9c55ece
[ "BSD-3-Clause" ]
null
null
null
examples/formula/parametric_design.py
yarikoptic/NiPy-OLD
8759b598ac72d3b9df7414642c7a662ad9c55ece
[ "BSD-3-Clause" ]
null
null
null
""" In this example, we create a regression model for an event-related design in which the response to an event at time T[i] is modeled as depending on the amount of time since the last stimulus T[i-1] """ import numpy as np import nipy.testing as niptest import sympy from nipy.modalities.fmri import utils, formula,...
29.04
82
0.676997
1b3f158af1eaa1935c6011c37f6b66fb6a2f328f
6,955
py
Python
tests/sabr/test_stats.py
Shinichi-Nakagawa/sabr
8ba73960ddbcbb23809287c80f9114a980d80b8d
[ "MIT" ]
7
2017-09-08T02:14:45.000Z
2021-10-01T15:11:00.000Z
tests/sabr/test_stats.py
Shinichi-Nakagawa/sabr
8ba73960ddbcbb23809287c80f9114a980d80b8d
[ "MIT" ]
4
2017-04-15T05:15:18.000Z
2017-11-11T05:55:12.000Z
tests/sabr/test_stats.py
Shinichi-Nakagawa/sabr
8ba73960ddbcbb23809287c80f9114a980d80b8d
[ "MIT" ]
2
2017-04-15T09:39:15.000Z
2017-12-10T03:35:34.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- __author__ = 'Shinichi Nakagawa' import unittest from sabr.stats import Stats class TestStats(unittest.TestCase): """ Stats Class Tests """ def setUp(self): pass def tearDown(self): pass def test_ip(self): """ ...
24.149306
85
0.489863
3798a7d29ccf77c78df8881741b93dc4a6b684f1
1,160
py
Python
blobxfer/version.py
Azure/blobxfer
c6c6c143e8ee413d09a1110abafdb92e9e8afc39
[ "MIT" ]
147
2016-07-27T06:24:38.000Z
2022-03-12T05:43:30.000Z
blobxfer/version.py
Azure/blobxfer
c6c6c143e8ee413d09a1110abafdb92e9e8afc39
[ "MIT" ]
127
2016-09-01T08:06:51.000Z
2022-02-18T02:52:42.000Z
blobxfer/version.py
Azure/blobxfer
c6c6c143e8ee413d09a1110abafdb92e9e8afc39
[ "MIT" ]
47
2016-07-25T16:19:01.000Z
2022-01-25T17:59:49.000Z
# Copyright (c) Microsoft Corporation # # All rights reserved. # # MIT 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...
44.615385
77
0.774138
69fc080ba0ef585740d2a3cb0762009e957b81d2
41
py
Python
tests/__init__.py
FlyBrainLab/EOScircuits
2ade33db402997f5001f1707f136370c660dce33
[ "BSD-3-Clause" ]
null
null
null
tests/__init__.py
FlyBrainLab/EOScircuits
2ade33db402997f5001f1707f136370c660dce33
[ "BSD-3-Clause" ]
null
null
null
tests/__init__.py
FlyBrainLab/EOScircuits
2ade33db402997f5001f1707f136370c660dce33
[ "BSD-3-Clause" ]
null
null
null
"""Unit test package for eoscircuits."""
20.5
40
0.707317