hexsha stringlengths 40 40 | size int64 2 1.05M | ext stringclasses 9
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 193 | max_stars_repo_name stringlengths 6 109 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 36.6k ⌀ | 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 193 | max_issues_repo_name stringlengths 6 109 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 29.8k ⌀ | 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 193 | max_forks_repo_name stringlengths 6 109 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 11.2k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 2 1.05M | avg_line_length float64 1 404k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1a788874ab95f928be02f575990e5bd6f2612661 | 1,546 | py | Python | conohadnsclient/v2/blacklists.py | naototty/python-conohadns-client | 04f360450d2e1a6020d2870272d8125cb112fa01 | [
"Apache-2.0"
] | null | null | null | conohadnsclient/v2/blacklists.py | naototty/python-conohadns-client | 04f360450d2e1a6020d2870272d8125cb112fa01 | [
"Apache-2.0"
] | null | null | null | conohadnsclient/v2/blacklists.py | naototty/python-conohadns-client | 04f360450d2e1a6020d2870272d8125cb112fa01 | [
"Apache-2.0"
] | null | null | null | # Copyright 2015 Hewlett-Packard Development Company, L.P.
#
# Author: Endre Karlson <endre.karlson@hp.com>
#
# 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/lice... | 31.55102 | 75 | 0.686287 |
1a789db7f6a54c77c1dfaa85b36e92f39ffbd00e | 19,992 | py | Python | whatstatts_v5.py | ausathe/whatsapp-statistics | 8a3bf0b800765cb3f1310f138b8611bb7f9e573b | [
"MIT"
] | null | null | null | whatstatts_v5.py | ausathe/whatsapp-statistics | 8a3bf0b800765cb3f1310f138b8611bb7f9e573b | [
"MIT"
] | null | null | null | whatstatts_v5.py | ausathe/whatsapp-statistics | 8a3bf0b800765cb3f1310f138b8611bb7f9e573b | [
"MIT"
] | null | null | null | import re, math, os
from bokeh.plotting import figure, output_file, show
from bokeh.layouts import gridplot, row, layout
from bokeh.models import ColumnDataSource, ranges, LabelSet, Div, SingleIntervalTicker, LinearAxis
from datetime import datetime, timedelta, date
from dateutil.relativedelta import relativedelta
cla... | 45.333333 | 174 | 0.686074 |
1a78c3b85e96c8f880252e582a7c54d9e717d22c | 515 | py | Python | tests/config.py | abbas123456/django-right-to-left | b52945ba908a29c13f8c7e20e08f9e81e1fd3e80 | [
"BSD-3-Clause"
] | 4 | 2015-09-29T18:05:35.000Z | 2020-09-18T22:47:24.000Z | tests/config.py | abbas123456/django-right-to-left | b52945ba908a29c13f8c7e20e08f9e81e1fd3e80 | [
"BSD-3-Clause"
] | 3 | 2020-02-11T23:20:52.000Z | 2021-06-10T18:39:15.000Z | tests/config.py | abbas123456/django-right-to-left | b52945ba908a29c13f8c7e20e08f9e81e1fd3e80 | [
"BSD-3-Clause"
] | 2 | 2018-07-31T05:55:06.000Z | 2018-12-05T13:52:55.000Z | import os
from django.conf import settings
def configure(nose_args=None):
# Helper function to extract absolute path
location = lambda x: os.path.join(
os.path.dirname(os.path.realpath(__file__)), x)
settings.configure(
DATABASES={
'default': {
'ENGINE': '... | 22.391304 | 55 | 0.537864 |
1a78d23aa3486edffa514181069dd8c9b229a5c8 | 175 | py | Python | django-project/npr_api/story_api/__init__.py | KBIAnews/PodCastle | 39d8fd10802b2e37fea846be33ff046b161a4540 | [
"MIT"
] | null | null | null | django-project/npr_api/story_api/__init__.py | KBIAnews/PodCastle | 39d8fd10802b2e37fea846be33ff046b161a4540 | [
"MIT"
] | 6 | 2020-02-24T19:11:26.000Z | 2021-05-07T13:44:56.000Z | django-project/npr_api/story_api/__init__.py | KBIAnews/PodCastle | 39d8fd10802b2e37fea846be33ff046b161a4540 | [
"MIT"
] | 1 | 2018-07-31T16:13:42.000Z | 2018-07-31T16:13:42.000Z | """
NPR Story API specific implementations.
"""
from get_story import get_story_dict
from get_tag import get_tag_dict
from ApiStory import ApiStory
from ApiTag import ApiTag
| 19.444444 | 39 | 0.822857 |
1a78d6b3d9beff9171cd09b743b7d831091a0f1a | 303 | py | Python | ruia_shell/cli.py | python-ruia/ruia-shell | b0488434dd11fd794178d46ef37924be52e6d08b | [
"Apache-2.0"
] | 1 | 2021-01-07T15:44:39.000Z | 2021-01-07T15:44:39.000Z | ruia_shell/cli.py | python-ruia/ruia-shell | b0488434dd11fd794178d46ef37924be52e6d08b | [
"Apache-2.0"
] | null | null | null | ruia_shell/cli.py | python-ruia/ruia-shell | b0488434dd11fd794178d46ef37924be52e6d08b | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""
Created by howie.hu at 2021/1/7.
"""
import fire
from ruia_shell.shell import Shell
def ruia_shell(url_or_request):
"""
Start a Ruia shell
:param url_or_request:
:return:
"""
Shell().start(url_or_request)
def execute():
fire.Fire(ruia_shell)
| 13.772727 | 34 | 0.653465 |
1a78e43df0989968013f0769b7659d60f07324d6 | 47,725 | py | Python | Code_for_Signal_Processing/plot_subject_f_comparason.py | puyaraimondii/biometric-classification-of-frequency-following-responses | f5b5dca516592be451a3133acb8fa178519bc991 | [
"MIT"
] | 1 | 2021-04-20T14:47:40.000Z | 2021-04-20T14:47:40.000Z | Code_for_Signal_Processing/plot_subject_f_comparason.py | puyaraimondii/biometric-classification-of-frequency-following-responses | f5b5dca516592be451a3133acb8fa178519bc991 | [
"MIT"
] | null | null | null | Code_for_Signal_Processing/plot_subject_f_comparason.py | puyaraimondii/biometric-classification-of-frequency-following-responses | f5b5dca516592be451a3133acb8fa178519bc991 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Aug 9 17:02:59 2018
@author: bruce
"""
import pandas as pd
import numpy as np
from scipy import fftpack
from scipy import signal
import matplotlib.pyplot as plt
from matplotlib.colors import LinearSegmentedColormap
def correlation_matrix(corr_mx, c... | 42.535651 | 153 | 0.723101 |
1a78ea6d95738771e24cba1e86e3997416a0b97f | 89 | py | Python | API/src/main/resources/Lib/xlrd/info.py | TagExpress/SikuliX1 | de9da11794dd94b3821eddc5c01b534d3f2fe828 | [
"MIT"
] | null | null | null | API/src/main/resources/Lib/xlrd/info.py | TagExpress/SikuliX1 | de9da11794dd94b3821eddc5c01b534d3f2fe828 | [
"MIT"
] | null | null | null | API/src/main/resources/Lib/xlrd/info.py | TagExpress/SikuliX1 | de9da11794dd94b3821eddc5c01b534d3f2fe828 | [
"MIT"
] | null | null | null | # Copyright (c) 2010-2020, sikuli.org, sikulix.com - MIT license
__VERSION__ = "0.9.3"
| 22.25 | 65 | 0.685393 |
1a7901c6c864ede54c8521828d4ff34e6ce39820 | 50,841 | py | Python | pypeit/core/flexure.py | brackham/PypeIt | 8769f06ae8e8f18d3a55d12b01dd3dde50b98040 | [
"BSD-3-Clause"
] | 107 | 2018-08-06T07:07:20.000Z | 2022-02-28T14:33:42.000Z | pypeit/core/flexure.py | brackham/PypeIt | 8769f06ae8e8f18d3a55d12b01dd3dde50b98040 | [
"BSD-3-Clause"
] | 889 | 2018-07-26T12:14:33.000Z | 2022-03-18T22:49:42.000Z | pypeit/core/flexure.py | brackham/PypeIt | 8769f06ae8e8f18d3a55d12b01dd3dde50b98040 | [
"BSD-3-Clause"
] | 74 | 2018-09-25T17:03:07.000Z | 2022-03-10T23:59:24.000Z | """ Module for flexure routines
.. include common links, assuming primary doc root is up one directory
.. include:: ../include/links.rst
"""
import inspect
from pkg_resources import resource_filename
import numpy as np
import copy, os
from matplotlib import pyplot as plt
from matplotlib import gridspec
import matplo... | 41.469005 | 131 | 0.579926 |
1a792a99a48cf0af966b0f8a4e94fa050e49927f | 246 | py | Python | gcs/frontend/channel_1.py | cuspaceflight/m4-gcs | 577aed522c541d5910010fd48d123a1e0c622552 | [
"MIT"
] | null | null | null | gcs/frontend/channel_1.py | cuspaceflight/m4-gcs | 577aed522c541d5910010fd48d123a1e0c622552 | [
"MIT"
] | null | null | null | gcs/frontend/channel_1.py | cuspaceflight/m4-gcs | 577aed522c541d5910010fd48d123a1e0c622552 | [
"MIT"
] | null | null | null | from PyQt5 import QtCore, QtGui, QtWidgets
from .Ui_channel_1 import Ui_channel_1
class channel_1(QtWidgets.QWidget, Ui_channel_1):
def __init__(self, parent=None):
QtWidgets.QWidget.__init__(self, parent)
self.setupUi(self)
| 30.75 | 49 | 0.752033 |
1a7980e6ef71e948becb6669227d1800b0c627f9 | 2,199 | py | Python | examples/extra_tests/test_stress_size.py | fearaschiarrai/gxpy | 4c5e7594b24e530a8cd94df1eef562c5c6ce3e92 | [
"BSD-2-Clause"
] | 25 | 2017-07-14T06:39:37.000Z | 2022-03-09T21:39:51.000Z | examples/extra_tests/test_stress_size.py | fearaschiarrai/gxpy | 4c5e7594b24e530a8cd94df1eef562c5c6ce3e92 | [
"BSD-2-Clause"
] | 100 | 2016-12-13T17:30:41.000Z | 2021-08-01T20:21:13.000Z | examples/extra_tests/test_stress_size.py | fearaschiarrai/gxpy | 4c5e7594b24e530a8cd94df1eef562c5c6ce3e92 | [
"BSD-2-Clause"
] | 28 | 2016-12-12T17:34:40.000Z | 2022-03-16T15:39:39.000Z | import numpy as np
import gc
import unittest
import geosoft
import geosoft.gxapi as gxapi
import geosoft.gxpy.gx as gx
import geosoft.gxpy.va as gxva
import geosoft.gxpy.vv as gxvv
import geosoft.gxpy.gdb as gxdb
class Test(unittest.TestCase):
@classmethod
def setUpClass(cls):
cls.gx = gx.GXpy(log=pr... | 26.817073 | 109 | 0.530241 |
1a79856a6cecdcdc0ad444679085fa79130224dd | 991 | py | Python | projects/hanon/hanon.py | aisipos/sebastian | 4e460c3aeab332b45c74fe78e65e76ec87d5cfa8 | [
"MIT"
] | 47 | 2015-01-07T16:25:27.000Z | 2022-03-07T07:21:27.000Z | projects/hanon/hanon.py | calebsmith/sebastian | 615db3bede05a394522a59d6b4f37efda507a6ef | [
"MIT"
] | 1 | 2015-02-02T20:25:15.000Z | 2015-02-02T20:25:15.000Z | projects/hanon/hanon.py | calebsmith/sebastian | 615db3bede05a394522a59d6b4f37efda507a6ef | [
"MIT"
] | 10 | 2015-02-02T19:48:57.000Z | 2021-03-19T17:45:17.000Z | #!/usr/bin/env python
from sebastian.midi.write_midi import SMF
from sebastian.core import OSequence, DURATION_64
from sebastian.core.notes import Key, major_scale
from sebastian.core.transforms import degree_in_key_with_octave, midi_pitch, transpose
# Hanon 1
up_degrees = [1, 3, 4, 5, 6, 5, 4, 3]
down_degrees = [6... | 23.595238 | 86 | 0.67003 |
1a7989e7052a00724be7b7126730b2ca735c90fc | 3,662 | py | Python | deeppavlov/dataset_readers/amazon_ecommerce_reader.py | ineersa/DeepPavlov | 8200bf9a0f0b378baad4ee0eb75b59453f516004 | [
"Apache-2.0"
] | 1 | 2019-05-22T08:34:33.000Z | 2019-05-22T08:34:33.000Z | deeppavlov/dataset_readers/amazon_ecommerce_reader.py | ineersa/DeepPavlov | 8200bf9a0f0b378baad4ee0eb75b59453f516004 | [
"Apache-2.0"
] | null | null | null | deeppavlov/dataset_readers/amazon_ecommerce_reader.py | ineersa/DeepPavlov | 8200bf9a0f0b378baad4ee0eb75b59453f516004 | [
"Apache-2.0"
] | 1 | 2019-03-17T13:47:44.000Z | 2019-03-17T13:47:44.000Z | # Copyright 2018 Neural Networks and Deep Learning lab, MIPT
# 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... | 36.62 | 96 | 0.598853 |
1a79a216f008f03012e06b9a055cf118634029f4 | 29,460 | py | Python | datumaro/plugins/voc_format/converter.py | yasakova-anastasia/datumaro | 7082fc4f50291d3b3c2022f069f76628e9fd07bb | [
"MIT"
] | 237 | 2020-09-07T14:29:26.000Z | 2022-03-31T12:53:48.000Z | datumaro/plugins/voc_format/converter.py | openvinotoolkit/datumaro | 0a279e386551fedff4708e54f731a50799e60326 | [
"MIT"
] | 330 | 2020-09-09T21:27:29.000Z | 2022-03-31T12:36:18.000Z | datumaro/plugins/voc_format/converter.py | yasakova-anastasia/datumaro | 7082fc4f50291d3b3c2022f069f76628e9fd07bb | [
"MIT"
] | 63 | 2020-09-09T07:44:28.000Z | 2022-03-17T16:07:26.000Z | # Copyright (C) 2020-2021 Intel Corporation
#
# SPDX-License-Identifier: MIT
from collections import OrderedDict, defaultdict
from enum import Enum, auto
from itertools import chain
import logging as log
import os
import os.path as osp
# Disable B410: import_lxml - the library is used for writing
from lxml import etr... | 40.746888 | 82 | 0.554549 |
1a79b577931f102edf05163ee9574f74ef7db42a | 4,338 | py | Python | venv/lib/python3.6/site-packages/kubernetes/client/models/v1_handler.py | DiptoChakrabarty/Kube-Automate | 2072d1aadd58eb405c7308ff5cfecbf50300ead3 | [
"MIT"
] | null | null | null | venv/lib/python3.6/site-packages/kubernetes/client/models/v1_handler.py | DiptoChakrabarty/Kube-Automate | 2072d1aadd58eb405c7308ff5cfecbf50300ead3 | [
"MIT"
] | null | null | null | venv/lib/python3.6/site-packages/kubernetes/client/models/v1_handler.py | DiptoChakrabarty/Kube-Automate | 2072d1aadd58eb405c7308ff5cfecbf50300ead3 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
Kubernetes
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
OpenAPI spec version: release-1.15
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
class V1Han... | 26.290909 | 124 | 0.568004 |
1a79bf3ac79b858f48e1416f699174dd30c42e5b | 18,628 | py | Python | venv/lib/python2.7/site-packages/py2neo/packages/jsonstream/pyjsonstream.py | KairosSystems/drMouse | f98d04084eb1210db88df4c9888eea149ae31b2c | [
"MIT"
] | 9 | 2017-07-15T08:45:22.000Z | 2021-07-06T08:32:03.000Z | venv/lib/python2.7/site-packages/py2neo/packages/jsonstream/pyjsonstream.py | KairosSystems/drMouse | f98d04084eb1210db88df4c9888eea149ae31b2c | [
"MIT"
] | 6 | 2017-05-05T13:11:51.000Z | 2019-01-25T22:46:30.000Z | venv/lib/python2.7/site-packages/py2neo/packages/jsonstream/pyjsonstream.py | KairosSystems/drMouse | f98d04084eb1210db88df4c9888eea149ae31b2c | [
"MIT"
] | 3 | 2018-03-16T14:11:52.000Z | 2020-03-04T02:08:31.000Z | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
# Copyright 2012-2014 Nigel Small
#
# 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
#
# Unles... | 34.949343 | 80 | 0.480728 |
1a79dca941d882c1273972dc67628e47bcec6b18 | 17 | py | Python | alphastarmini/core/ma/__init__.py | liuruoze/mini-AlphaStar | cf9de2507d526a5fb8ef67676aab2ffb92738640 | [
"Apache-2.0"
] | 108 | 2021-02-10T13:24:56.000Z | 2022-03-21T09:58:28.000Z | alphastarmini/core/ma/__init__.py | liuruoze/Raw-vs-Human-in-AlphaStar | 99acae772eb5c93000dca87b78d6acdf7699f331 | [
"Apache-2.0"
] | 21 | 2021-04-09T18:46:05.000Z | 2022-03-29T02:44:15.000Z | alphastarmini/core/ma/__init__.py | liuruoze/Raw-vs-Human-in-AlphaStar | 99acae772eb5c93000dca87b78d6acdf7699f331 | [
"Apache-2.0"
] | 19 | 2021-08-03T01:49:02.000Z | 2022-03-30T10:21:13.000Z | print("lt init")
| 8.5 | 16 | 0.647059 |
1a7a0165607bd086041881b87ba9915f6487fa47 | 1,721 | py | Python | conda/cli/find_commands.py | melund/conda | 2348aa1863c2bd0c536f29c510a97fbc85a2ad89 | [
"BSD-3-Clause"
] | null | null | null | conda/cli/find_commands.py | melund/conda | 2348aa1863c2bd0c536f29c510a97fbc85a2ad89 | [
"BSD-3-Clause"
] | null | null | null | conda/cli/find_commands.py | melund/conda | 2348aa1863c2bd0c536f29c510a97fbc85a2ad89 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import print_function, division, absolute_import
import re
import os
import sys
import subprocess
from os.path import isdir, isfile, join
if sys.platform == 'win32':
dir_paths = [join(sys.prefix, 'Scripts')]
else:
dir_paths = [join(sys.prefix, 'bin')]
dir_paths.extend(os.environ['PATH'].spl... | 23.575342 | 64 | 0.568274 |
1a7a2ffe7bc350d73f22ae158cc548618bbb1b8d | 5,412 | py | Python | csvloader.py | mobetat49008/autotrader | 33a538800d50bbbb714854a366975a1708a451b1 | [
"MIT"
] | 28 | 2015-03-14T22:39:58.000Z | 2021-09-23T10:15:00.000Z | csvloader.py | Wenyn/autotrader | b60fd4d619c56f55113563ef8e984c0f2d7fe796 | [
"MIT"
] | null | null | null | csvloader.py | Wenyn/autotrader | b60fd4d619c56f55113563ef8e984c0f2d7fe796 | [
"MIT"
] | 18 | 2015-01-21T02:11:24.000Z | 2021-07-05T20:12:14.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
A tool load stock history data from csv file
Author: TerryH, email: terryh.tp at gmail.com,
License: BSD
"""
import datetime
import sys
import getopt
import string
import os
#import mmap
def csvtolist(filename="",backbars=300,maxbars=False,start="",end=""):
"""... | 30.066667 | 105 | 0.4466 |
1a7a3767921f0e71ff2c827a5d5c1a3438b0c6b9 | 65,952 | py | Python | twod_phase.py | youngmp/park_and_ermentrout_2017 | 1b3b6af46ddbba16f850438571d0103e8eda177c | [
"MIT"
] | 8 | 2018-01-19T02:40:21.000Z | 2019-05-24T09:44:30.000Z | twod_phase.py | youngmp/park_and_ermentrout_2017 | 1b3b6af46ddbba16f850438571d0103e8eda177c | [
"MIT"
] | null | null | null | twod_phase.py | youngmp/park_and_ermentrout_2017 | 1b3b6af46ddbba16f850438571d0103e8eda177c | [
"MIT"
] | null | null | null | """
2D neural field phase model
all evaluations on NxN matrix.
convolutions performed on 0,2pi x 0,2pi domain. plotted on -pi,pi x -pi,pi domain.
notes:
-
todo:
-include methods to get and view slices, steady-state bumps
"""
import numpy as np
np.random.seed(0)
import matplotlib
#matplotlib.use("Agg")
#matplot... | 32.860987 | 237 | 0.515921 |
1a7aa50f913edc6674e396d4d1099b2c9aede28c | 1,859 | py | Python | march_madness/source/tune_models.py | lucabasa/kaggle_competitions | 15296375dc303218093aa576533fb809a4540bb8 | [
"Apache-2.0"
] | 1 | 2021-01-31T19:33:30.000Z | 2021-01-31T19:33:30.000Z | march_madness/source/tune_models.py | lucabasa/kaggle_competitions | 15296375dc303218093aa576533fb809a4540bb8 | [
"Apache-2.0"
] | 4 | 2021-08-23T21:00:16.000Z | 2021-08-23T21:07:45.000Z | march_madness/source/tune_models.py | lucabasa/kaggle_competitions | 15296375dc303218093aa576533fb809a4540bb8 | [
"Apache-2.0"
] | null | null | null | __author__ = 'lucabasa'
__version__ = '1.0.0'
__status__ = 'development'
import numpy as np
import pandas as pd
from sklearn.metrics import mean_squared_error, log_loss
from sklearn.model_selection import KFold, RandomizedSearchCV
from sklearn.ensemble import RandomForestClassifier, ExtraTreesClassifier
def tune... | 31.508475 | 99 | 0.646046 |
1a7b283f1df5697045242d46ab3f2c1500d881c4 | 4,296 | py | Python | comancpipeline/Analysis/Flagging.py | SharperJBCA/COMAPreduce | 6722c2f59b4968c24b81be4a0f4b12955e270d2b | [
"MIT"
] | 5 | 2019-03-05T11:56:13.000Z | 2022-02-16T17:24:07.000Z | comancpipeline/Analysis/Flagging.py | SharperJBCA/COMAPreduce | 6722c2f59b4968c24b81be4a0f4b12955e270d2b | [
"MIT"
] | null | null | null | comancpipeline/Analysis/Flagging.py | SharperJBCA/COMAPreduce | 6722c2f59b4968c24b81be4a0f4b12955e270d2b | [
"MIT"
] | 2 | 2021-02-12T14:32:51.000Z | 2021-03-10T08:44:44.000Z | import numpy as np
from matplotlib import pyplot
import h5py
from comancpipeline.Analysis import BaseClasses
from comancpipeline.Analysis.FocalPlane import FocalPlane
from comancpipeline.Analysis import SourceFitting
from comancpipeline.Tools import Coordinates, Types, stats
from comancpipeline.Tools.median_filter imp... | 34.368 | 112 | 0.634078 |
1a7b74d2fe91c043a74b1a1f44d3bf5d63d04297 | 25 | py | Python | rllite/RainbowDQN/__init__.py | ZJU-RL/zjurl | 6aab83aaba7249bc43d112f21787c45b111d8aa4 | [
"MIT"
] | 3 | 2019-03-07T13:24:21.000Z | 2019-08-08T12:49:51.000Z | rllite/RainbowDQN/__init__.py | tyGavinZJU/rllite | 5c85eb11babb69a09604a04f0eb7bdc5a96f08f0 | [
"MIT"
] | null | null | null | rllite/RainbowDQN/__init__.py | tyGavinZJU/rllite | 5c85eb11babb69a09604a04f0eb7bdc5a96f08f0 | [
"MIT"
] | null | null | null | from .RainbowDQN import * | 25 | 25 | 0.8 |
1a7b830a3f7f73a3c2cdbd61f0eb9173d1e4ac32 | 2,841 | py | Python | bindings/python/pinocchio/shortcuts.py | yDMhaven/pinocchio | fabed17d5ad0dc1c8d251c64cfa656a0215469a5 | [
"BSD-2-Clause-FreeBSD"
] | 1 | 2020-04-07T07:23:34.000Z | 2020-04-07T07:23:34.000Z | bindings/python/pinocchio/shortcuts.py | yDMhaven/pinocchio | fabed17d5ad0dc1c8d251c64cfa656a0215469a5 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | bindings/python/pinocchio/shortcuts.py | yDMhaven/pinocchio | fabed17d5ad0dc1c8d251c64cfa656a0215469a5 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | #
# Copyright (c) 2018-2019 CNRS INRIA
#
## In this file, some shortcuts are provided ##
from . import libpinocchio_pywrap as pin
nle = pin.nonLinearEffects
def buildModelsFromUrdf(filename, package_dirs=None, root_joint=None, verbose=False, meshLoader=None, geometry_types=[pin.GeometryType.COLLISION,pin.GeometryTy... | 50.732143 | 178 | 0.720873 |
1a7bbe1609f59f543f064213c1261dcb4bc10086 | 144 | py | Python | pytree/models/__init__.py | AntoineSimoulin/pytree | 9408799c4b8d4d59b1103e2205ffe7b250614f92 | [
"Apache-2.0"
] | 18 | 2021-11-10T13:34:02.000Z | 2021-12-17T13:28:00.000Z | pytree/models/__init__.py | AntoineSimoulin/pytree | 9408799c4b8d4d59b1103e2205ffe7b250614f92 | [
"Apache-2.0"
] | null | null | null | pytree/models/__init__.py | AntoineSimoulin/pytree | 9408799c4b8d4d59b1103e2205ffe7b250614f92 | [
"Apache-2.0"
] | null | null | null | from .child_sum import ChildSumConfig, ChildSumTree
from .n_ary import NaryConfig, NaryTree
from .similarity import Similarity, SimilarityConfig | 48 | 52 | 0.861111 |
1a7bcc4c1fd407552ea3f58c9345bdd9d95c6329 | 1,037 | py | Python | symneqsys/minpack/_setup_minpack.py | bjodah/symneqsys | 677307d6b94e452262f7ffe944ec2bed6314d34b | [
"BSD-2-Clause"
] | 1 | 2015-01-10T09:00:04.000Z | 2015-01-10T09:00:04.000Z | symneqsys/minpack/_setup_minpack.py | bjodah/symneqsys | 677307d6b94e452262f7ffe944ec2bed6314d34b | [
"BSD-2-Clause"
] | null | null | null | symneqsys/minpack/_setup_minpack.py | bjodah/symneqsys | 677307d6b94e452262f7ffe944ec2bed6314d34b | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
import os
from pycodeexport.codeexport import make_PCEExtension_for_prebuilding_Code
"""
Precompiles Levenberg Marquardt sources of netlib/minpack (downloaded
when needed) to object files for speeding up compilations further ahead.
"""
websrc = 'http://www.netlib.org/minpack/'
src_md5 = {
... | 29.628571 | 74 | 0.72999 |
1a7bd730314b662e988e654162a51ee5d952e7c1 | 2,302 | py | Python | src/arche/rules/duplicates.py | manycoding/arche | 5c5ea7707e799e214193ae0ce3ec60e39f533afc | [
"MIT"
] | 52 | 2019-03-18T21:12:59.000Z | 2022-01-24T05:49:23.000Z | src/arche/rules/duplicates.py | manycoding/arche | 5c5ea7707e799e214193ae0ce3ec60e39f533afc | [
"MIT"
] | 173 | 2019-03-18T15:50:14.000Z | 2019-12-09T18:03:07.000Z | src/arche/rules/duplicates.py | manycoding/arche | 5c5ea7707e799e214193ae0ce3ec60e39f533afc | [
"MIT"
] | 21 | 2019-03-20T17:14:22.000Z | 2022-01-30T18:33:22.000Z | from collections import Iterable
from typing import Any, Generator, List, Union
from arche.readers.schema import TaggedFields
from arche.rules.result import Result, Outcome
import pandas as pd
def find_by(df: pd.DataFrame, uniques: List[Union[str, List[str]]]) -> Result:
"""Find equal items rows in `df` by `uniq... | 35.415385 | 93 | 0.655517 |
1a7be3fcf9c6d5a2d7aa98a1f403bcb6369b983d | 1,314 | py | Python | trac/util/tests/concurrency.py | mikiec84/trac | d51a7119b9fcb9061d7fe135c7d648fa671555dd | [
"BSD-3-Clause"
] | null | null | null | trac/util/tests/concurrency.py | mikiec84/trac | d51a7119b9fcb9061d7fe135c7d648fa671555dd | [
"BSD-3-Clause"
] | null | null | null | trac/util/tests/concurrency.py | mikiec84/trac | d51a7119b9fcb9061d7fe135c7d648fa671555dd | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright (C) 2010-2020 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at https://trac.edgewall.org/wiki/TracLicense.
#
# This software cons... | 29.2 | 67 | 0.67656 |
1a7c0236e202f39506c118c5424ea792007592dd | 1,650 | py | Python | results/errorAnalysis/main_FWDTrafo_eRMS_Gauss.py | omelchert/dFBT-FJ | 31ba7b2733558ad3096fa0de689407a22bbda5e8 | [
"BSD-3-Clause"
] | 1 | 2020-12-16T10:58:25.000Z | 2020-12-16T10:58:25.000Z | results/errorAnalysis/main_FWDTrafo_eRMS_Gauss.py | omelchert/dFBT-FJ | 31ba7b2733558ad3096fa0de689407a22bbda5e8 | [
"BSD-3-Clause"
] | null | null | null | results/errorAnalysis/main_FWDTrafo_eRMS_Gauss.py | omelchert/dFBT-FJ | 31ba7b2733558ad3096fa0de689407a22bbda5e8 | [
"BSD-3-Clause"
] | null | null | null | import sys; sys.path.append('../../src/')
import numpy as np
import FourierBesselPairs as FBP
import discreteFourierBesselTrafo as dFBT
def eRMS(Fn,Fx):
"""Compute root mean square error for input arrays.
Implements root mean square error (eRMS) according to Eq (25) in Ref
Algorithms to Numerically Ev... | 31.730769 | 79 | 0.590909 |
1a7c4d33f5345d2276b5bb9bdcee5a10d06e3e42 | 16,113 | py | Python | cities_light/management/commands/cities_light.py | affan2/django-cities-light | 5b65d47adc63e203879dc55bff5a360380adc5e4 | [
"MIT"
] | null | null | null | cities_light/management/commands/cities_light.py | affan2/django-cities-light | 5b65d47adc63e203879dc55bff5a360380adc5e4 | [
"MIT"
] | null | null | null | cities_light/management/commands/cities_light.py | affan2/django-cities-light | 5b65d47adc63e203879dc55bff5a360380adc5e4 | [
"MIT"
] | 2 | 2019-11-29T15:55:46.000Z | 2020-01-08T09:06:33.000Z | from __future__ import division, unicode_literals
import collections
import itertools
import os
import datetime
import time
import os.path
import logging
import optparse
import sys
if sys.platform != 'win32':
import resource
try:
import cPickle as pickle
except ImportError:
import pickle
from django.db i... | 33.429461 | 93 | 0.553714 |
1a7c4fd3daad66a0151fb4c8bb7247947af8fd50 | 1,921 | py | Python | var/spack/repos/builtin/packages/py-pyutilib/package.py | BenWibking/spack | 49b3b43a4a9375210b578635d9240875a5f3106b | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 348 | 2015-12-30T04:05:54.000Z | 2022-02-21T10:57:53.000Z | var/spack/repos/builtin/packages/py-pyutilib/package.py | BenWibking/spack | 49b3b43a4a9375210b578635d9240875a5f3106b | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 3,994 | 2015-12-09T09:43:00.000Z | 2017-11-04T02:46:39.000Z | var/spack/repos/builtin/packages/py-pyutilib/package.py | flatironinstitute/spack | 71a7b1b5fadbe16bcdb36fb679aa828cd7d83b02 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 359 | 2015-12-16T18:25:55.000Z | 2017-11-02T14:51:13.000Z | # Copyright 2013-2021 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 PyPyutilib(PythonPackage):
"""The PyUtilib project supports a collection of Python utilit... | 54.885714 | 95 | 0.780323 |
1a7c6b441e11e8fcb09175ea5840205f0a8a81c8 | 5,038 | py | Python | tests/test_api.py | adborden/openFEC | 53a0a2b1a56292c5ca8e7a3185832baaed4a63d9 | [
"CC0-1.0"
] | null | null | null | tests/test_api.py | adborden/openFEC | 53a0a2b1a56292c5ca8e7a3185832baaed4a63d9 | [
"CC0-1.0"
] | null | null | null | tests/test_api.py | adborden/openFEC | 53a0a2b1a56292c5ca8e7a3185832baaed4a63d9 | [
"CC0-1.0"
] | 1 | 2020-03-04T00:21:16.000Z | 2020-03-04T00:21:16.000Z | import sqlalchemy as sa
from tests import factories
from tests.common import ApiBaseTest
from webservices import rest
from webservices.rest import api
from webservices.resources.search import CandidateNameSearch, CommitteeNameSearch
from webservices.resources.candidates import CandidateList
class OverallTest(ApiBas... | 42.336134 | 89 | 0.653831 |
1a7c83f68dae4f167951eaccd079ba06f7f67cc3 | 5,922 | py | Python | test/integration/gen_libs/chk_crt_file.py | deepcoder42/python-lib | 249f456fdd41a6883206fea8e19c9e098cc969e5 | [
"MIT"
] | null | null | null | test/integration/gen_libs/chk_crt_file.py | deepcoder42/python-lib | 249f456fdd41a6883206fea8e19c9e098cc969e5 | [
"MIT"
] | null | null | null | test/integration/gen_libs/chk_crt_file.py | deepcoder42/python-lib | 249f456fdd41a6883206fea8e19c9e098cc969e5 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# Classification (U)
"""Program: chk_crt_file.py
Description: Unit testing of chk_crt_file in gen_libs.py.
Usage:
test/integration/gen_libs/chk_crt_file.py
Arguments:
"""
# Libraries and Global Variables
# Standard
import sys
import os
if sys.version_info < (2, 7):
im... | 22.776923 | 75 | 0.597264 |
1a7cab94959843da7ed11f7d02745e38d1e90c6c | 4,319 | py | Python | srcd/contrib/docker/bootstrap.py | warenlg/sourced-ui | c8ff53b369e182ee2b9715a67b00ac1688995732 | [
"Apache-2.0"
] | null | null | null | srcd/contrib/docker/bootstrap.py | warenlg/sourced-ui | c8ff53b369e182ee2b9715a67b00ac1688995732 | [
"Apache-2.0"
] | null | null | null | srcd/contrib/docker/bootstrap.py | warenlg/sourced-ui | c8ff53b369e182ee2b9715a67b00ac1688995732 | [
"Apache-2.0"
] | null | null | null | import os
from flask import g
from flask_migrate import upgrade as db_upgrade
from superset import app, conf, db, security_manager
from superset.connectors.connector_registry import ConnectorRegistry
from superset.models import core as models
from superset.models.user_attributes import UserAttribute
from superset.uti... | 35.991667 | 89 | 0.648298 |
1a7cf18eb5914f2859c28d54aeecc384ee75c6bb | 4,480 | py | Python | opt/unittest_gp_bandit.py | MJHutchinson/nasbot | 2a982b1e917d2481a3110bdafd4ed2b390abf4a0 | [
"MIT"
] | null | null | null | opt/unittest_gp_bandit.py | MJHutchinson/nasbot | 2a982b1e917d2481a3110bdafd4ed2b390abf4a0 | [
"MIT"
] | null | null | null | opt/unittest_gp_bandit.py | MJHutchinson/nasbot | 2a982b1e917d2481a3110bdafd4ed2b390abf4a0 | [
"MIT"
] | null | null | null | """
Unit tests for GP-Bandits
-- kandasamy@cs.cmu.edu
"""
# pylint: disable=no-member
# pylint: disable=maybe-no-member
# pylint: disable=invalid-name
import numpy as np
# Local
from utils.syn_functions import get_syn_function_caller_from_name
from opt.worker_manager import SyntheticWorkerManager
import opt.gp_ba... | 42.666667 | 84 | 0.727902 |
1a7d1b6a111f6425e2b8d883a0654fb20b03f493 | 9,913 | py | Python | radio/models/metrics.py | kmader/radio | b7897a72c6750bd848504f57bf6e31d27785dfb3 | [
"Apache-2.0"
] | null | null | null | radio/models/metrics.py | kmader/radio | b7897a72c6750bd848504f57bf6e31d27785dfb3 | [
"Apache-2.0"
] | null | null | null | radio/models/metrics.py | kmader/radio | b7897a72c6750bd848504f57bf6e31d27785dfb3 | [
"Apache-2.0"
] | 1 | 2018-08-24T09:40:48.000Z | 2018-08-24T09:40:48.000Z | """ Contain different metrics functions. """
import numpy as np
def log_loss(y_true, y_pred, epsilon=10e-7):
""" Compute log-loss.
Parameters
----------
y_pred : ndarray(batch_size, ...)
numpy array containing predictions of model.
y_true : ndarray(batch_size, ...)
numpy array co... | 26.647849 | 102 | 0.610108 |
1a7d20d235d1f5a0d896d4c796c8bd8443b2363b | 1,853 | py | Python | fileshare/permission/migrations/0001_initial.py | nijatrajab/fileshare | f364788f318ffe8b731ccb68e9c275bfa73c0292 | [
"MIT"
] | 1 | 2021-07-08T06:51:28.000Z | 2021-07-08T06:51:28.000Z | fileshare/permission/migrations/0001_initial.py | nijatrajab/fileshareproject | f364788f318ffe8b731ccb68e9c275bfa73c0292 | [
"MIT"
] | null | null | null | fileshare/permission/migrations/0001_initial.py | nijatrajab/fileshareproject | f364788f318ffe8b731ccb68e9c275bfa73c0292 | [
"MIT"
] | null | null | null | # Generated by Django 3.2.7 on 2021-09-08 21:14
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('contenttypes', '0002_remove_content_type_name'),
('auth', '0012... | 40.282609 | 128 | 0.634647 |
1a7d323424b7086bd43bbdd17d8d04569158c267 | 4,140 | py | Python | autobuilder/utils/logutils.py | Xeralux/autobuilder | 880a56ff12c578f4b002f18bee7338d7f7b006c0 | [
"MIT"
] | null | null | null | autobuilder/utils/logutils.py | Xeralux/autobuilder | 880a56ff12c578f4b002f18bee7338d7f7b006c0 | [
"MIT"
] | null | null | null | autobuilder/utils/logutils.py | Xeralux/autobuilder | 880a56ff12c578f4b002f18bee7338d7f7b006c0 | [
"MIT"
] | null | null | null | """
logutils
Simplified logging interface, implementing a Log class with
methods similar to those used in bitbake. Supports StreamHandler
output only.
Note that setting a debug level implies verbose as well.
To use:
from logutils import Log
log = Log(...)
"""
import logging
import sys
class Log:
"""
Cla... | 25.875 | 75 | 0.572705 |
1a7d48ec2691e5d84eb99f1d1ed5cf0dbf558d7c | 17,786 | py | Python | libs/common/bitcoin/psbt.py | valerio-vaccaro/esp32_embit | dff76b14e90b281ca2b98a669a930c9980a1a9c5 | [
"MIT"
] | 2 | 2021-03-26T22:41:55.000Z | 2021-05-27T17:38:53.000Z | libs/common/bitcoin/psbt.py | valerio-vaccaro/esp32_embit | dff76b14e90b281ca2b98a669a930c9980a1a9c5 | [
"MIT"
] | null | null | null | libs/common/bitcoin/psbt.py | valerio-vaccaro/esp32_embit | dff76b14e90b281ca2b98a669a930c9980a1a9c5 | [
"MIT"
] | 2 | 2021-03-27T10:16:21.000Z | 2021-06-07T18:01:03.000Z | # ref: https://github.com/bitcoin-core/HWI/blob/master/hwilib/serializations.py
from collections import OrderedDict
from .transaction import Transaction, TransactionOutput, SIGHASH
from . import compact
from . import bip32
from . import ec
from . import hashes
from .script import Script, Witness
from . import script
... | 38.004274 | 103 | 0.533847 |
1a7d4a665df52ad20bb968787024bd9e5b709f56 | 470 | py | Python | setup.py | gunpowder78/webdnn | c659ea49007f91d178ce422a1eebe289516a71ee | [
"MIT"
] | 1 | 2018-07-26T13:52:21.000Z | 2018-07-26T13:52:21.000Z | setup.py | gunpowder78/webdnn | c659ea49007f91d178ce422a1eebe289516a71ee | [
"MIT"
] | null | null | null | setup.py | gunpowder78/webdnn | c659ea49007f91d178ce422a1eebe289516a71ee | [
"MIT"
] | null | null | null | import sys
if sys.version_info < (3, 6):
sys.stderr.write("Sorry, this library only works with python >= 3.6\n")
sys.exit(1)
import json
from setuptools import setup, find_packages
with open("./package.json") as f:
version = json.load(f)["version"]
setup(
name="webdnn",
version=version,
pack... | 23.5 | 75 | 0.670213 |
1a7d6c4763718e91fc76ac572b828c32af52ff6f | 3,253 | py | Python | src/create_init.py | dragozzine/multimoon | a9886212629ef4020457e1b8a9d12c376ecf0821 | [
"MIT"
] | 1 | 2022-01-22T02:11:39.000Z | 2022-01-22T02:11:39.000Z | src/create_init.py | dragozzine/multimoon | a9886212629ef4020457e1b8a9d12c376ecf0821 | [
"MIT"
] | 2 | 2022-02-08T08:10:36.000Z | 2022-03-22T22:47:04.000Z | src/create_init.py | dragozzine/multimoon | a9886212629ef4020457e1b8a9d12c376ecf0821 | [
"MIT"
] | null | null | null | import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import corner
import numpy as np
import pandas as pd
import emcee
import sys
import os
import mm_likelihood
from astropy.time import Time
import commentjson as json
import mm_param
import mm_make_geo_pos
from mm_SPINNY.spinny_plots import spinny_pl... | 35.358696 | 134 | 0.691362 |
1a7da94fa2bafeacdf005f5b496e75d424783f32 | 2,827 | py | Python | Bio/PDB/MMCIF2Dict.py | erasche/biopython | fba3c8a926a07b8b6b821759db8c71d93c51be86 | [
"PostgreSQL"
] | 1 | 2020-05-26T22:51:14.000Z | 2020-05-26T22:51:14.000Z | Bio/PDB/MMCIF2Dict.py | erasche/biopython | fba3c8a926a07b8b6b821759db8c71d93c51be86 | [
"PostgreSQL"
] | null | null | null | Bio/PDB/MMCIF2Dict.py | erasche/biopython | fba3c8a926a07b8b6b821759db8c71d93c51be86 | [
"PostgreSQL"
] | null | null | null | # Copyright (C) 2002, Thomas Hamelryck (thamelry@binf.ku.dk)
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
"""Turn an mmCIF file into a dictionary."""
from __future__ import print_function
from B... | 28.846939 | 70 | 0.432614 |
1a7db46297243a3280399b97711a431079ad2bc2 | 105 | py | Python | python/treelas/idx.py | EQt/treelas | 24a5cebf101180822198806c0a4131b0efb7a36d | [
"MIT"
] | 3 | 2020-06-18T13:31:26.000Z | 2021-04-05T17:42:56.000Z | python/treelas/idx.py | EQt/treelas | 24a5cebf101180822198806c0a4131b0efb7a36d | [
"MIT"
] | null | null | null | python/treelas/idx.py | EQt/treelas | 24a5cebf101180822198806c0a4131b0efb7a36d | [
"MIT"
] | null | null | null | from graphidx.idx import ( # noqa
BiAdjacent,
ChildrenIndex,
PartitionIndex,
cluster,
)
| 15 | 34 | 0.657143 |
1a7e61d8a122a0e766d4b364a40dc7de924dec5e | 6,696 | py | Python | GPdoemd/models/model.py | scwolof/GPdoemd | 485265a66585a8ebe88d1ba3da957199159dbcbf | [
"MIT"
] | 28 | 2018-07-04T21:46:18.000Z | 2022-01-10T07:48:59.000Z | GPdoemd/models/model.py | scwolof/GPdoemd | 485265a66585a8ebe88d1ba3da957199159dbcbf | [
"MIT"
] | 1 | 2018-10-03T22:40:00.000Z | 2018-10-04T17:49:49.000Z | GPdoemd/models/model.py | scwolof/GPdoemd | 485265a66585a8ebe88d1ba3da957199159dbcbf | [
"MIT"
] | 5 | 2018-09-18T18:43:19.000Z | 2020-11-28T22:07:22.000Z | """
MIT License
Copyright (c) 2018 Simon Olofsson
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish... | 27.330612 | 78 | 0.70221 |
1a7e769a0060433d8753d9ee0e4c9ed7f81b944d | 5,678 | py | Python | utils.py | pperle/gaze-tracking | 6e4e2a5ca355680721798556fa671e8266de5705 | [
"MIT"
] | 13 | 2021-11-06T19:51:10.000Z | 2022-03-31T02:21:04.000Z | utils.py | adbmd/gaze-tracking | 6e4e2a5ca355680721798556fa671e8266de5705 | [
"MIT"
] | null | null | null | utils.py | adbmd/gaze-tracking | 6e4e2a5ca355680721798556fa671e8266de5705 | [
"MIT"
] | 2 | 2021-11-06T21:23:19.000Z | 2022-03-26T09:38:46.000Z | from enum import Enum
from typing import List
import numpy as np
import torch
import torch.nn.functional as F
import torchvision
from matplotlib import pyplot as plt
from pytorch_lightning.loggers import TensorBoardLogger
from PIL import Image
import io
class PitchYaw(Enum):
PITCH = 'pitch'
YAW = 'yaw'
def... | 33.011628 | 143 | 0.656041 |
1a7e958ddf79a52a944d7fec0477894a851df8c3 | 1,298 | py | Python | var/spack/repos/builtin/packages/r-glmnet/package.py | kehw/spack | 4f49b1a9301447a8cf880c99820cad65e5c2d7e3 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 2 | 2020-09-10T22:50:08.000Z | 2021-01-12T22:18:54.000Z | var/spack/repos/builtin/packages/r-glmnet/package.py | kehw/spack | 4f49b1a9301447a8cf880c99820cad65e5c2d7e3 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 11 | 2021-01-08T22:23:53.000Z | 2022-03-30T11:08:17.000Z | var/spack/repos/builtin/packages/r-glmnet/package.py | kehw/spack | 4f49b1a9301447a8cf880c99820cad65e5c2d7e3 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | # Copyright 2013-2021 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 RGlmnet(RPackage):
"""Extremely efficient procedures for fitting the entire lasso or
e... | 48.074074 | 96 | 0.755778 |
1a7e9e76bcdd511b1255273634ff8efbbcc5dcb4 | 3,073 | py | Python | quotescrap_basic/quotescrap/spiders/quotes_scrap.py | barnwalp/web_scrapping | 776d9d00d406976959caeb707850e0b871676552 | [
"MIT"
] | null | null | null | quotescrap_basic/quotescrap/spiders/quotes_scrap.py | barnwalp/web_scrapping | 776d9d00d406976959caeb707850e0b871676552 | [
"MIT"
] | null | null | null | quotescrap_basic/quotescrap/spiders/quotes_scrap.py | barnwalp/web_scrapping | 776d9d00d406976959caeb707850e0b871676552 | [
"MIT"
] | null | null | null | import scrapy
# all class inherits from scrapy.Spider class
class QuoteSpider(scrapy.Spider):
# it identifies the spider and must be unique within a project
name = 'quote'
# this url list will be used by the default implementation of
# start_requests() to create the initial requests for your spider
... | 44.536232 | 79 | 0.641393 |
1a7eb3519744d4810c2d9b9bae809a2b439d82b9 | 1,569 | py | Python | aroay_pyppeteer/settings.py | hwpchn/ScapyPyppeteer | 10dbbc1cf33c7d7d0ac25d6af42ea6bc819068b6 | [
"MIT"
] | 1 | 2021-04-28T15:37:26.000Z | 2021-04-28T15:37:26.000Z | aroay_pyppeteer/settings.py | hwpchn/ScapyPyppeteer | 10dbbc1cf33c7d7d0ac25d6af42ea6bc819068b6 | [
"MIT"
] | null | null | null | aroay_pyppeteer/settings.py | hwpchn/ScapyPyppeteer | 10dbbc1cf33c7d7d0ac25d6af42ea6bc819068b6 | [
"MIT"
] | null | null | null | import logging
# aroay_pyppeteer logging level
AROAY_PYPPETEER_LOGGING_LEVEL = logging.WARNING
# aroay_pyppeteer timeout
AROAY_PYPPETEER_DOWNLOAD_TIMEOUT = 30
# aroay_pyppeteer browser window
AROAY_PYPPETEER_WINDOW_WIDTH = 1400
AROAY_PYPPETEER_WINDOW_HEIGHT = 700
# aroay_pyppeteer browser default ua
AROAY_PYPPETEER... | 32.6875 | 160 | 0.821542 |
1a7ec2d9c8562e322e375e052cf5e7c9266b74ca | 2,117 | py | Python | main.py | tak-sakumoto/formatomato | 4713338135b2ac3960cc2f9a6f017199853cdc52 | [
"MIT"
] | null | null | null | main.py | tak-sakumoto/formatomato | 4713338135b2ac3960cc2f9a6f017199853cdc52 | [
"MIT"
] | null | null | null | main.py | tak-sakumoto/formatomato | 4713338135b2ac3960cc2f9a6f017199853cdc52 | [
"MIT"
] | null | null | null | import re
import yaml
from parse_args import parse_args
from get_dataset import get_dataset
from for_coco.make_image_df import make_image_df
from for_coco.make_df import make_df
from for_coco.make_class_df import make_class_df
from for_imagenet.make_df_imagenet import make_df_imagenet
from write_df_csv import write_df... | 34.145161 | 67 | 0.702409 |
1a7ecc07157be86900679aa9dc9be5539e07a3cc | 36,483 | py | Python | oscar/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/gb2312freq.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | 113 | 2015-01-04T18:10:42.000Z | 2022-03-25T20:14:01.000Z | oscar/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/gb2312freq.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | 24 | 2015-04-30T16:28:07.000Z | 2022-03-15T17:31:12.000Z | oscar/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/gb2312freq.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | 149 | 2015-04-13T04:51:09.000Z | 2021-07-06T14:16:20.000Z | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Ri... | 77.131078 | 93 | 0.745032 |
1a7edcadedc054ce2a65b0c676dfa93ab50dd093 | 64,392 | py | Python | bin/Schedule/Airflow.py | Middlecon/DBImport | 8f19776a5f6a6e5d6eebe5c312432b8058a2e579 | [
"Apache-2.0"
] | 10 | 2019-05-22T04:17:02.000Z | 2021-12-05T16:54:08.000Z | bin/Schedule/Airflow.py | Middlecon/DBImport | 8f19776a5f6a6e5d6eebe5c312432b8058a2e579 | [
"Apache-2.0"
] | 73 | 2019-05-22T04:19:24.000Z | 2022-01-18T05:09:26.000Z | bin/Schedule/Airflow.py | Middlecon/DBImport | 8f19776a5f6a6e5d6eebe5c312432b8058a2e579 | [
"Apache-2.0"
] | 5 | 2020-05-19T23:46:56.000Z | 2021-11-12T12:02:37.000Z | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 43.714868 | 274 | 0.700009 |
1a7ee56f3b6183aa95c8a9186db570da3912bcf0 | 5,589 | py | Python | monitoring/prober/rid/test_subscription_isa_interactions.py | rpai1/dss | 79d8110c336851b155a6e5417692ec68b70c0c07 | [
"Apache-2.0"
] | 1 | 2021-03-06T19:31:04.000Z | 2021-03-06T19:31:04.000Z | monitoring/prober/rid/test_subscription_isa_interactions.py | rpai1/dss | 79d8110c336851b155a6e5417692ec68b70c0c07 | [
"Apache-2.0"
] | null | null | null | monitoring/prober/rid/test_subscription_isa_interactions.py | rpai1/dss | 79d8110c336851b155a6e5417692ec68b70c0c07 | [
"Apache-2.0"
] | 1 | 2020-09-20T22:15:36.000Z | 2020-09-20T22:15:36.000Z | """Test subscriptions interact with ISAs:
- Create an ISA.
- Create a subscription, response should include the pre-existing ISA.
- Modify the ISA, response should include the subscription.
- Delete the ISA, response should include the subscription.
- Delete the subscription.
"""
import datetime
from monit... | 32.12069 | 107 | 0.628914 |
1a7ee8cb3f2bb3cb314d295a77fc0633692b9938 | 18,644 | py | Python | pytablereader/json/core.py | sthagen/thombashi-pytablereader | b59859da6fdcc94035933dd253e6e380b04a233b | [
"MIT"
] | 81 | 2017-03-18T02:57:29.000Z | 2022-03-26T16:54:59.000Z | pytablereader/json/core.py | sthagen/pytablereader | b59859da6fdcc94035933dd253e6e380b04a233b | [
"MIT"
] | 4 | 2017-08-09T14:58:48.000Z | 2020-04-17T12:59:29.000Z | pytablereader/json/core.py | sthagen/pytablereader | b59859da6fdcc94035933dd253e6e380b04a233b | [
"MIT"
] | 11 | 2017-05-02T16:23:59.000Z | 2021-12-10T15:05:39.000Z | """
.. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com>
"""
import abc
from collections import OrderedDict
from .._common import get_file_encoding, json
from .._constant import SourceType
from .._constant import TableNameTemplate as tnt
from .._logger import FileSourceLogger, TextSourceLogger
from .._vali... | 33.836661 | 98 | 0.343435 |
1a7ef41771d87171b1dcbcc2252bdb98f36baecf | 3,539 | py | Python | experiments/ashvin/icml2020/hand/pen/gaussian/bc_mixture_gaussian2.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/ashvin/icml2020/hand/pen/gaussian/bc_mixture_gaussian2.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/ashvin/icml2020/hand/pen/gaussian/bc_mixture_gaussian2.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | """
AWR + SAC from demo experiment
"""
from rlkit.demos.source.dict_to_mdp_stacked_path_loader import DictToMDPStackedPathLoader
from rlkit.launchers.experiments.awac.awac_rl import experiment
import rlkit.misc.hyperparameter as hyp
from rlkit.launchers.arglauncher import run_variants
from rlkit.torch.sac.policies i... | 29.991525 | 89 | 0.572761 |
1a7efec2dfb3a28ef029754b5dfe7393114e6c07 | 9,326 | py | Python | test/aqua/operators/test_state_construction.py | MetcalfeTom/qiskit-aqua | 1718e1612dba38a3f15309c860fe7875914fe8cc | [
"Apache-2.0"
] | 1 | 2019-10-12T16:20:25.000Z | 2019-10-12T16:20:25.000Z | test/aqua/operators/test_state_construction.py | georgesbarron/qiskit-aqua | b38ca9893c5f9509693a2de48680781bed300987 | [
"Apache-2.0"
] | null | null | null | test/aqua/operators/test_state_construction.py | georgesbarron/qiskit-aqua | b38ca9893c5f9509693a2de48680781bed300987 | [
"Apache-2.0"
] | 1 | 2022-01-25T07:09:10.000Z | 2022-01-25T07:09:10.000Z | # -*- coding: utf-8 -*-
# This code is part of Qiskit.
#
# (C) Copyright IBM 2018, 2020.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any... | 47.10101 | 100 | 0.582029 |
1a7f198db686eda8ce55072279f2cad8e1d1cb96 | 7,999 | py | Python | microutil/segmentation.py | Hekstra-Lab/microutil | ab3b7b51754bf90ef35d6eea1c7b35cece638f0e | [
"BSD-3-Clause"
] | 2 | 2021-07-06T05:31:51.000Z | 2021-10-05T13:29:59.000Z | microutil/segmentation.py | Hekstra-Lab/microutil | ab3b7b51754bf90ef35d6eea1c7b35cece638f0e | [
"BSD-3-Clause"
] | 16 | 2021-02-08T22:36:42.000Z | 2021-11-01T22:36:02.000Z | microutil/segmentation.py | Hekstra-Lab/microutil | ab3b7b51754bf90ef35d6eea1c7b35cece638f0e | [
"BSD-3-Clause"
] | null | null | null | __all__ = [
"apply_unet",
"threshold_predictions",
"individualize",
"watershed_single_frame_preseeded",
"peak_mask_to_napari_points",
"fast_otsu",
]
import warnings
import numpy as np
import scipy.ndimage as ndi
import xarray as xr
from skimage.exposure import equalize_adapthist
from skimage.... | 28.773381 | 91 | 0.614577 |
1a7f23742f4701c6fded5620846944a0925d4998 | 4,321 | py | Python | sunpy/net/dataretriever/tests/test_goes_ud.py | Naman9639/sunpy | 24c0cfbd9b03d7f9554bc86036fac2b78a5fcc56 | [
"BSD-2-Clause"
] | null | null | null | sunpy/net/dataretriever/tests/test_goes_ud.py | Naman9639/sunpy | 24c0cfbd9b03d7f9554bc86036fac2b78a5fcc56 | [
"BSD-2-Clause"
] | null | null | null | sunpy/net/dataretriever/tests/test_goes_ud.py | Naman9639/sunpy | 24c0cfbd9b03d7f9554bc86036fac2b78a5fcc56 | [
"BSD-2-Clause"
] | null | null | null | import datetime
import pytest
from hypothesis import given, example
from sunpy.time.timerange import TimeRange
from sunpy.net.vso.attrs import Time, Instrument
from sunpy.net.dataretriever.client import QueryResponse
import sunpy.net.dataretriever.sources.goes as goes
from sunpy.net.fido_factory import UnifiedRespons... | 32.984733 | 82 | 0.683407 |
1a7f2ab31576313d78c0bc2b890b087d80d715b2 | 744 | py | Python | supriya/ugens/Ball.py | deeuu/supriya | 14fcb5316eccb4dafbe498932ceff56e1abb9d27 | [
"MIT"
] | null | null | null | supriya/ugens/Ball.py | deeuu/supriya | 14fcb5316eccb4dafbe498932ceff56e1abb9d27 | [
"MIT"
] | null | null | null | supriya/ugens/Ball.py | deeuu/supriya | 14fcb5316eccb4dafbe498932ceff56e1abb9d27 | [
"MIT"
] | null | null | null | import collections
from supriya import CalculationRate
from supriya.synthdefs import UGen
class Ball(UGen):
"""
A bouncing ball physical model.
::
>>> source = supriya.ugens.In.ar(bus=0)
>>> ball = supriya.ugens.Ball.ar(
... damping=0,
... friction=0.01,
... | 21.882353 | 82 | 0.568548 |
1a7f307525bbc18aaa2597d8578c0e698e5bce88 | 1,142 | py | Python | greedy/406_reconstruct_queue.py | jayzane/leetcodePy | 27fbad4a4a94a60bed6cfa89cbef6ce17fa5e7d5 | [
"Apache-2.0"
] | null | null | null | greedy/406_reconstruct_queue.py | jayzane/leetcodePy | 27fbad4a4a94a60bed6cfa89cbef6ce17fa5e7d5 | [
"Apache-2.0"
] | null | null | null | greedy/406_reconstruct_queue.py | jayzane/leetcodePy | 27fbad4a4a94a60bed6cfa89cbef6ce17fa5e7d5 | [
"Apache-2.0"
] | null | null | null | from typing import *
class Solution:
"""
假设有打乱顺序的一群人站成一个队列。 每个人由一个整数对(h, k)表示,其中h是这个人的身高,k是排在这个人前面且身高大于或等于h的人数。 编写一个算法来重建这个队列。
注意:
总人数少于1100人。
示例
输入:
[[7,0], [4,4], [7,1], [5,0], [6,1], [5,2]]
输出:
[[5,0], [7,0], [5,2], [6,1], [4,4], [7,1]]
"""
def reconstructQueue(self, pe... | 24.297872 | 89 | 0.530648 |
1a7f3a47c9e196133d9c768c183c92d7e5038fc5 | 2,788 | py | Python | test/vanilla/low-level/AcceptanceTests/test_duration.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | 35 | 2018-04-03T12:15:53.000Z | 2022-03-11T14:03:34.000Z | test/vanilla/low-level/AcceptanceTests/test_duration.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | 652 | 2017-08-28T22:44:41.000Z | 2022-03-31T21:20:31.000Z | test/vanilla/low-level/AcceptanceTests/test_duration.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | 29 | 2017-08-28T20:57:01.000Z | 2022-03-11T14:03:38.000Z | # --------------------------------------------------------------------------
#
# Copyright (c) Microsoft Corporation. All rights reserved.
#
# The MIT License (MIT)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the ""Software""),... | 41.61194 | 163 | 0.746055 |
1a7f416e1d5374707352d29cda60dea891ea932b | 251 | py | Python | by-session/ta-921/j11/class1.py | amiraliakbari/sharif-mabani-python | 5d14a08d165267fe71c28389ddbafe29af7078c5 | [
"MIT"
] | 2 | 2015-04-29T20:59:35.000Z | 2018-09-26T13:33:43.000Z | by-session/ta-921/j11/class1.py | amiraliakbari/sharif-mabani-python | 5d14a08d165267fe71c28389ddbafe29af7078c5 | [
"MIT"
] | null | null | null | by-session/ta-921/j11/class1.py | amiraliakbari/sharif-mabani-python | 5d14a08d165267fe71c28389ddbafe29af7078c5 | [
"MIT"
] | null | null | null | class Circle:
def __init__(self):
self.r = 0
self.x = 0
self.y = 0
#x = 0
#a = []
#x = None
#x = 0
#x = []
c1 = Circle()
c2 = Circle()
c1.r = 1
c2.r = 3
print c1.r
print c2.r
print c1.x
| 8.964286 | 24 | 0.410359 |
1a7f50149d1cfe3df7ec1bef35846343055959b4 | 22,148 | py | Python | twilio/rest/taskrouter/v1/workspace/workflow/__init__.py | theDrinkMD/twibbage | c0aba60bd2df50f0a5688db4a01048ea1efd1a45 | [
"MIT"
] | 1 | 2021-02-24T04:59:03.000Z | 2021-02-24T04:59:03.000Z | twilio/rest/taskrouter/v1/workspace/workflow/__init__.py | theDrinkMD/twibbage | c0aba60bd2df50f0a5688db4a01048ea1efd1a45 | [
"MIT"
] | null | null | null | twilio/rest/taskrouter/v1/workspace/workflow/__init__.py | theDrinkMD/twibbage | c0aba60bd2df50f0a5688db4a01048ea1efd1a45 | [
"MIT"
] | 1 | 2018-12-09T00:53:21.000Z | 2018-12-09T00:53:21.000Z | # coding=utf-8
"""
This code was generated by
\ / _ _ _| _ _
| (_)\/(_)(_|\/| |(/_ v1.0.0
/ /
"""
from twilio.base import deserialize
from twilio.base import values
from twilio.base.instance_context import InstanceContext
from twilio.base.instance_resource import InstanceResource
from twilio.base.... | 34.073846 | 126 | 0.638342 |
1a7f71288f110dc300124e4d5b684df56c26c75a | 362 | py | Python | terrascript/data/local.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 507 | 2017-07-26T02:58:38.000Z | 2022-01-21T12:35:13.000Z | terrascript/data/local.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 135 | 2017-07-20T12:01:59.000Z | 2021-10-04T22:25:40.000Z | terrascript/data/local.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 81 | 2018-02-20T17:55:28.000Z | 2022-01-31T07:08:40.000Z | # terrascript/data/local.py
# Automatically generated by tools/makecode.py (24-Sep-2021 15:21:17 UTC)
#
# For imports without namespace, e.g.
#
# >>> import terrascript.data.local
#
# instead of
#
# >>> import terrascript.data.hashicorp.local
#
# This is only available for 'official' and 'partner' providers.
from ... | 24.133333 | 73 | 0.732044 |
1a7f9ffbe4f0947aa2e02102d7d27d7c482f991e | 9,035 | py | Python | speech_dia_@/src/pyannote_xxx/audio/labeling/tasks/speaker_change_detection.py | NgvTue/test2 | d475cb2fed16b46185adbe50b4179d5299c791cb | [
"MIT"
] | 1 | 2022-02-23T08:46:10.000Z | 2022-02-23T08:46:10.000Z | speech_dia_@/src/pyannote_xxx/audio/labeling/tasks/speaker_change_detection.py | NgvTue/test2 | d475cb2fed16b46185adbe50b4179d5299c791cb | [
"MIT"
] | null | null | null | speech_dia_@/src/pyannote_xxx/audio/labeling/tasks/speaker_change_detection.py | NgvTue/test2 | d475cb2fed16b46185adbe50b4179d5299c791cb | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# encoding: utf-8
# The MIT License (MIT)
# Copyright (c) 2018-2019 CNRS
# 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 limita... | 38.446809 | 96 | 0.63088 |
1a7fa07cfa05dc733d1c68c8f42322f6f99b2030 | 1,078 | py | Python | tron/Hub/Nub/RawActorNub.py | sdss/tron | 886c5c5fb6341ad85e4a9f5d6f5ecb6bbc0d8322 | [
"BSD-3-Clause"
] | null | null | null | tron/Hub/Nub/RawActorNub.py | sdss/tron | 886c5c5fb6341ad85e4a9f5d6f5ecb6bbc0d8322 | [
"BSD-3-Clause"
] | null | null | null | tron/Hub/Nub/RawActorNub.py | sdss/tron | 886c5c5fb6341ad85e4a9f5d6f5ecb6bbc0d8322 | [
"BSD-3-Clause"
] | null | null | null | __all__ = ['RawActorNub']
from tron import Misc
from .ActorNub import ActorNub
from .SocketActorNub import SocketActorNub
class RawActorNub(SocketActorNub, ActorNub):
def getCmdForReply(self, r):
""" Assign the current (and _only_) command ID to the reply,
and set flag appropriately """
... | 26.292683 | 84 | 0.543599 |
1a7faea8b9f330505c699dbc1d0da35f4a077eba | 36,031 | py | Python | s2cell/__init__.py | aaliddell/s2cell | aafd5d63a6f42ee0c16bfb128c12f9f67b3c9a40 | [
"Apache-2.0"
] | 7 | 2021-01-11T10:34:01.000Z | 2022-03-18T08:44:00.000Z | s2cell/__init__.py | aaliddell/s2cell | aafd5d63a6f42ee0c16bfb128c12f9f67b3c9a40 | [
"Apache-2.0"
] | 5 | 2021-03-22T19:24:18.000Z | 2022-03-09T20:39:12.000Z | s2cell/__init__.py | aaliddell/s2cell | aafd5d63a6f42ee0c16bfb128c12f9f67b3c9a40 | [
"Apache-2.0"
] | 1 | 2022-03-09T18:28:47.000Z | 2022-03-09T18:28:47.000Z | # Copyright 2020 Adam Liddell
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... | 37.927368 | 100 | 0.66218 |
1a7fd7942174a347dc8afb8e48947180d6ffffa4 | 7,872 | py | Python | bootstrap.py | michaeljmcd/spiralweb | d305b90d0e57489b46c5bd55058b91beed4bfea2 | [
"MIT"
] | 3 | 2020-08-09T01:24:57.000Z | 2021-02-28T10:32:51.000Z | bootstrap.py | michaeljmcd/spiralweb | d305b90d0e57489b46c5bd55058b91beed4bfea2 | [
"MIT"
] | null | null | null | bootstrap.py | michaeljmcd/spiralweb | d305b90d0e57489b46c5bd55058b91beed4bfea2 | [
"MIT"
] | null | null | null | import sys
import re
import ply.lex as lex
import ply.yacc as yacc
# Lexing definitions
tokens = ('DOC_DIRECTIVE',
'OPEN_PROPERTY_LIST',
'CLOSE_PROPERTY_LIST',
'EQUALS',
'COMMA',
'CHUNK_REFERENCE',
'CODE_DIRECTIVE',
'CODE_END_DIRECTIVE',
... | 24.754717 | 127 | 0.527058 |
1a7fe6ca71d7f3c82905a7a4644742a123a46cb0 | 1,268 | py | Python | app/auth/forms.py | dan-mutua/flaskwk3 | f7ee5a27d52005bedd757d6008102b9f82508521 | [
"MIT"
] | null | null | null | app/auth/forms.py | dan-mutua/flaskwk3 | f7ee5a27d52005bedd757d6008102b9f82508521 | [
"MIT"
] | null | null | null | app/auth/forms.py | dan-mutua/flaskwk3 | f7ee5a27d52005bedd757d6008102b9f82508521 | [
"MIT"
] | null | null | null | from flask_wtf import FlaskForm
from wtforms import StringField, PasswordField, BooleanField, SubmitField
from wtforms.validators import Required, Email, EqualTo
from ..models import User
from wtforms import ValidationError
class RegistrationForm(FlaskForm):
email = StringField('Your Email Address', validators=[Re... | 46.962963 | 126 | 0.735804 |
1a7ff147d3b9fd316bd185fc64d1fd469b1c5159 | 2,836 | py | Python | examples/shapes_and_collections/artist_reference.py | yuvallanger/matplotlib | e0020d318a9a9685594c6bff4631f74599321459 | [
"MIT",
"BSD-3-Clause"
] | 8 | 2017-04-11T08:55:30.000Z | 2022-03-25T04:31:26.000Z | examples/shapes_and_collections/artist_reference.py | epgauss/matplotlib | c9898ea9a30c67c579ab27cd61b68e2abae0fb0e | [
"MIT",
"BSD-3-Clause"
] | null | null | null | examples/shapes_and_collections/artist_reference.py | epgauss/matplotlib | c9898ea9a30c67c579ab27cd61b68e2abae0fb0e | [
"MIT",
"BSD-3-Clause"
] | 14 | 2015-10-05T04:15:46.000Z | 2020-06-11T18:06:02.000Z | """
Reference for matplotlib artists
This example displays several of matplotlib's graphics primitives (artists)
drawn using matplotlib API. A full list of artists and the documentation is
available at http://matplotlib.org/api/artist_api.html.
Copyright (c) 2010, Bartosz Telenczuk
BSD License
"""
import matplotlib.p... | 27.269231 | 77 | 0.673484 |
1a8000b604afef07f0f9ce851bf0c977d5a217cd | 259 | py | Python | accounting/accounting/doctype/accpayment_entry/accpayment_entry.py | JagdishKadam95/AccountingApp | 4988b191de503712f6bd9774dee7ef66f28c12cc | [
"MIT"
] | null | null | null | accounting/accounting/doctype/accpayment_entry/accpayment_entry.py | JagdishKadam95/AccountingApp | 4988b191de503712f6bd9774dee7ef66f28c12cc | [
"MIT"
] | null | null | null | accounting/accounting/doctype/accpayment_entry/accpayment_entry.py | JagdishKadam95/AccountingApp | 4988b191de503712f6bd9774dee7ef66f28c12cc | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2021, jack and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
# import frappe
from frappe.model.document import Document
class AccPayment_entry(Document):
pass
| 23.545455 | 49 | 0.776062 |
1a800dcaeea10b210f47ee47c485cf1a6457bf8e | 22,238 | py | Python | wienerschnitzelgemeinschaft/src/shai/fastai/03_train_sub_res50xt.py | guitarmind/HPA-competition-solutions | 547d53aaca148fdb5f4585526ad7364dfa47967d | [
"MIT"
] | null | null | null | wienerschnitzelgemeinschaft/src/shai/fastai/03_train_sub_res50xt.py | guitarmind/HPA-competition-solutions | 547d53aaca148fdb5f4585526ad7364dfa47967d | [
"MIT"
] | null | null | null | wienerschnitzelgemeinschaft/src/shai/fastai/03_train_sub_res50xt.py | guitarmind/HPA-competition-solutions | 547d53aaca148fdb5f4585526ad7364dfa47967d | [
"MIT"
] | null | null | null | from fastai.conv_learner import *
from fastai.dataset import *
import pandas as pd
import numpy as np
import os
from sklearn.model_selection import train_test_split
from sklearn.metrics import f1_score
import scipy.optimize as opt
import pickle as pkl
import warnings
warnings.filterwarnings("ignore")
#==============... | 38.407599 | 125 | 0.52851 |
1a8016884815d10509c576b25f82b63d5da5f5a5 | 19 | py | Python | btd6_memory_info/generated/UnityEngine/GUISkin/gui_skin.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | btd6_memory_info/generated/UnityEngine/GUISkin/gui_skin.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | btd6_memory_info/generated/UnityEngine/GUISkin/gui_skin.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | class GUISkin: pass | 19 | 19 | 0.842105 |
1a801b863ff01e7b06f0663bd89b08ecebcae9c3 | 393 | py | Python | darkhex/examples/prep_strategy_for_arena.py | BedirT/dark-hex-tools | c4b803253e57d3c87edddde6e82740c643378dde | [
"MIT"
] | null | null | null | darkhex/examples/prep_strategy_for_arena.py | BedirT/dark-hex-tools | c4b803253e57d3c87edddde6e82740c643378dde | [
"MIT"
] | 10 | 2022-01-16T05:55:09.000Z | 2022-03-09T20:21:21.000Z | darkhex/examples/prep_strategy_for_arena.py | BedirT/darkhex | c4b803253e57d3c87edddde6e82740c643378dde | [
"MIT"
] | null | null | null | import pyspiel
from darkhex.utils.util import load_file, get_open_spiel_state, save_file
def test():
data = load_file(
"darkhex/data/strategy_data/simplified_4x3_mccfr_p1/game_info.pkl")
game = pyspiel.load_game(
f'dark_hex_ir(num_cols={data["num_cols"]},num_rows={data["num_rows"]})')
save... | 35.727273 | 80 | 0.740458 |
1a80a733212d604e2c807319faefaaf9d367a30f | 3,276 | py | Python | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/gallery_image_version_py3.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | 1 | 2021-09-07T18:36:04.000Z | 2021-09-07T18:36:04.000Z | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/gallery_image_version_py3.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | 2 | 2019-10-02T23:37:38.000Z | 2020-10-02T01:17:31.000Z | azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/gallery_image_version_py3.py | xiafu-msft/azure-sdk-for-python | 4d9560cfd519ee60667f3cc2f5295a58c18625db | [
"MIT"
] | 1 | 2019-06-17T22:18:23.000Z | 2019-06-17T22:18:23.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 40.95 | 118 | 0.642247 |
1a80dac36f0819811a5f6ba6cd92c34c2ec8ada2 | 4,483 | py | Python | toontown/cogdominium/CogdoGameAudioManager.py | LittleNed/toontown-stride | 1252a8f9a8816c1810106006d09c8bdfe6ad1e57 | [
"Apache-2.0"
] | 3 | 2020-01-02T08:43:36.000Z | 2020-07-05T08:59:02.000Z | toontown/cogdominium/CogdoGameAudioManager.py | NoraTT/Historical-Commits-Project-Altis-Source | fe88e6d07edf418f7de6ad5b3d9ecb3d0d285179 | [
"Apache-2.0"
] | null | null | null | toontown/cogdominium/CogdoGameAudioManager.py | NoraTT/Historical-Commits-Project-Altis-Source | fe88e6d07edf418f7de6ad5b3d9ecb3d0d285179 | [
"Apache-2.0"
] | 4 | 2019-06-20T23:45:23.000Z | 2020-10-14T20:30:15.000Z | from pandac.PandaModules import AudioSound
from direct.interval.SoundInterval import SoundInterval
class CogdoGameSfx:
def __init__(self, audioSound, audioMgr, source = None):
self._audioSound = audioSound
self._audioMgr = audioMgr
self._source = source
def destroy(self):
self... | 35.579365 | 156 | 0.643765 |
1a8113ce378b34988036a38e0b3d9e5ef3d4e34a | 10,216 | py | Python | tests/providers/test_sqlalchemy_provider_e2e.py | gitter-badger/bzz | 68c7a5f073e5e991cf4c8305e0fb4bbb8f4ba236 | [
"MIT"
] | 5 | 2015-03-20T12:17:20.000Z | 2021-06-02T20:14:39.000Z | tests/providers/test_sqlalchemy_provider_e2e.py | gitter-badger/bzz | 68c7a5f073e5e991cf4c8305e0fb4bbb8f4ba236 | [
"MIT"
] | null | null | null | tests/providers/test_sqlalchemy_provider_e2e.py | gitter-badger/bzz | 68c7a5f073e5e991cf4c8305e0fb4bbb8f4ba236 | [
"MIT"
] | 1 | 2015-05-14T03:24:17.000Z | 2015-05-14T03:24:17.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
# This file is part of bzz.
# https://github.com/heynemann/bzz
# Licensed under the MIT license:
# http://www.opensource.org/licenses/MIT-license
# Copyright (c) 2014 Bernardo Heynemann heynemann@gmail.com
import types
import cow.server as server
import cow.plugins.sqlalche... | 37.284672 | 125 | 0.600529 |
1a81276c3d31d444cfa8f95716d07fd68a1a94f8 | 4,315 | py | Python | src/test/tinc/tincrepo/resource_management/runaway_query/runaway_query_vmem_memoryaccounting/test_runaway_query_vmem_memoryaccounting.py | rodel-talampas/gpdb | 9c955e350334abbd922102f289f782697eb52069 | [
"PostgreSQL",
"Apache-2.0"
] | 9 | 2018-04-20T03:31:01.000Z | 2020-05-13T14:10:53.000Z | src/test/tinc/tincrepo/resource_management/runaway_query/runaway_query_vmem_memoryaccounting/test_runaway_query_vmem_memoryaccounting.py | rodel-talampas/gpdb | 9c955e350334abbd922102f289f782697eb52069 | [
"PostgreSQL",
"Apache-2.0"
] | 36 | 2017-09-21T09:12:27.000Z | 2020-06-17T16:40:48.000Z | src/test/tinc/tincrepo/resource_management/runaway_query/runaway_query_vmem_memoryaccounting/test_runaway_query_vmem_memoryaccounting.py | rodel-talampas/gpdb | 9c955e350334abbd922102f289f782697eb52069 | [
"PostgreSQL",
"Apache-2.0"
] | 32 | 2017-08-31T12:50:52.000Z | 2022-03-01T07:34:53.000Z | from gppylib.commands.base import Command
from mpp.gpdb.tests.storage.lib.sql_isolation_testcase import \
SQLIsolationTestCase
from mpp.lib.PSQL import PSQL
from resource_management.runaway_query.runaway_udf import *
import tinctest
def _set_VLIM_SLIM(vlimMB, slimMB):
# Set up GUCs for VLIM (gp_vmem_protect_... | 40.707547 | 148 | 0.651448 |
1a8139bd77ff25bf0082ac8b8facc45ae19f246f | 6,978 | py | Python | phono_linguistic/train.py | tejasvaidhyadev/IA-for-AI | 8e6f21e9489e5e1651bfc8500708bf5fb10625ea | [
"MIT"
] | 4 | 2021-09-13T02:51:51.000Z | 2021-09-17T15:47:04.000Z | phono_linguistic/train.py | tejasvaidhyadev/IA-for-AI | 8e6f21e9489e5e1651bfc8500708bf5fb10625ea | [
"MIT"
] | null | null | null | phono_linguistic/train.py | tejasvaidhyadev/IA-for-AI | 8e6f21e9489e5e1651bfc8500708bf5fb10625ea | [
"MIT"
] | null | null | null |
# Load Packages and setup wandb
from params import params
import wandb
if params.wandb:
wandb.init(project="tejas", name=params.run)
wandb.config.update(params)
from bertloader import CustomDataset
import json, os, random
import torch
import torch.nn as nn
import numpy as np
from transformers import AutoMod... | 30.740088 | 114 | 0.648037 |
1a81a8874ed35c7df86015785be28f39caaccef1 | 583 | py | Python | examples/pup/hub_cityhub/light_animate.py | TheVinhLuong102/pybricks-api | 1259d5d33acb41b383445a4b1776b38084efb481 | [
"MIT"
] | 51 | 2020-04-02T10:03:45.000Z | 2022-03-27T23:49:39.000Z | examples/pup/hub_cityhub/light_animate.py | LEGO-Robotics/Pybricks-API | 1259d5d33acb41b383445a4b1776b38084efb481 | [
"MIT"
] | 77 | 2020-03-22T17:32:14.000Z | 2022-03-28T18:02:43.000Z | examples/pup/hub_cityhub/light_animate.py | LEGO-Robotics/Pybricks-API | 1259d5d33acb41b383445a4b1776b38084efb481 | [
"MIT"
] | 25 | 2020-03-18T23:35:17.000Z | 2022-01-01T12:52:01.000Z | from pybricks.hubs import CityHub
from pybricks.parameters import Color
from pybricks.tools import wait
from umath import sin, pi
# Initialize the hub.
hub = CityHub()
# Make an animation with multiple colors.
hub.light.animate([Color.RED, Color.GREEN, Color.NONE], interval=500)
wait(10000)
# Make the color RED gro... | 24.291667 | 72 | 0.723842 |
1a81aafee4be79d5929a1864e115d3a0643cacbb | 3,753 | py | Python | tests/test_blocktree.py | themoodymann/piChain | 4de9e8da3994901371713b68bc05295fe6676571 | [
"MIT"
] | 8 | 2018-02-22T08:52:26.000Z | 2022-02-01T01:28:29.000Z | tests/test_blocktree.py | themoodymann/piChain | 4de9e8da3994901371713b68bc05295fe6676571 | [
"MIT"
] | 3 | 2018-03-07T18:13:53.000Z | 2019-12-03T23:42:42.000Z | tests/test_blocktree.py | florianmorath/piChain | df498021cb7c2df26a7980fb85b795f4a0105faf | [
"MIT"
] | 7 | 2018-02-26T12:28:34.000Z | 2021-01-01T11:33:59.000Z | """Unit tests of the Blocktree class."""
import logging
import os
import shutil
from unittest import TestCase
from unittest.mock import MagicMock
from piChain.blocktree import Blocktree, GENESIS
from piChain.messages import Block, Transaction
logging.disable(logging.CRITICAL)
class TestBlocktree(TestCase):
d... | 30.266129 | 71 | 0.565947 |
1a81ae9d0c79a0f816eef308ac80df3b71502616 | 322 | py | Python | tensorx/__init__.py | TensorX/tensorx | 11d7727b055fbee29e122ffbfc7a39057aeeae40 | [
"Apache-2.0"
] | 5 | 2017-09-21T22:12:19.000Z | 2021-02-22T10:42:28.000Z | tensorx/__init__.py | TensorX/tensorx | 11d7727b055fbee29e122ffbfc7a39057aeeae40 | [
"Apache-2.0"
] | null | null | null | tensorx/__init__.py | TensorX/tensorx | 11d7727b055fbee29e122ffbfc7a39057aeeae40 | [
"Apache-2.0"
] | 2 | 2018-04-02T09:26:41.000Z | 2022-01-06T15:41:06.000Z | from .__version__ import __version__
from tensorx.layers import *
from tensorx.random import *
from tensorx.ops import *
from tensorx.math import *
from tensorx.metrics import *
from tensorx.train import *
from tensorx.init import *
from tensorx.loss import *
from tensorx.activation import *
from tensorx.logic import ... | 24.769231 | 36 | 0.795031 |
1a81cc486cf1701ff6d3fb5cea2ae737662c3479 | 4,954 | py | Python | rl_with_videos/environments/gym/mujoco/image_pusher_2d.py | simonr98/Reinforcement-Learning-with-Videos | e40cec6b8d817276375e940696b290fc4e1e8bc7 | [
"MIT"
] | 25 | 2020-12-02T23:13:29.000Z | 2022-02-25T07:57:30.000Z | rl_with_videos/environments/gym/mujoco/image_pusher_2d.py | simonr98/Reinforcement-Learning-with-Videos | e40cec6b8d817276375e940696b290fc4e1e8bc7 | [
"MIT"
] | 8 | 2020-12-12T14:11:58.000Z | 2021-12-10T20:06:04.000Z | rl_with_videos/environments/gym/mujoco/image_pusher_2d.py | simonr98/Reinforcement-Learning-with-Videos | e40cec6b8d817276375e940696b290fc4e1e8bc7 | [
"MIT"
] | 8 | 2020-12-25T19:43:15.000Z | 2021-10-13T02:53:58.000Z | import numpy as np
from rl_with_videos.environments.helpers import random_point_in_circle
from .pusher_2d import Pusher2dEnv
class ImagePusher2dEnv(Pusher2dEnv):
def __init__(self, image_shape, *args, **kwargs):
self._Serializable__initialize(locals())
self.image_shape = image_shape
Pushe... | 34.402778 | 78 | 0.613242 |
1a81fdbda962d40af37649fc6d5c910773d989a7 | 158 | py | Python | app/app/calc.py | AitorPo/recipe-app-api | abb9d1774735c78d5fac0ebc20e727ad1a4851c7 | [
"MIT"
] | null | null | null | app/app/calc.py | AitorPo/recipe-app-api | abb9d1774735c78d5fac0ebc20e727ad1a4851c7 | [
"MIT"
] | null | null | null | app/app/calc.py | AitorPo/recipe-app-api | abb9d1774735c78d5fac0ebc20e727ad1a4851c7 | [
"MIT"
] | null | null | null | def add(x, y):
"""Add two number together"""
return x + y
def subtract(x, y):
"""Subtract x from y and return value"""
return y - x
| 17.555556 | 45 | 0.537975 |
1a822680f4f074e1ca4eef773e1b64c50b31005c | 1,864 | py | Python | lona/shell/commands/lona_routes.py | ukleinek/lona | b4b52dc1e76c1b28b5989b9a93ddc969e997a841 | [
"MIT"
] | 230 | 2021-08-15T20:46:24.000Z | 2022-03-30T10:17:43.000Z | lona/shell/commands/lona_routes.py | ukleinek/lona | b4b52dc1e76c1b28b5989b9a93ddc969e997a841 | [
"MIT"
] | 176 | 2021-08-18T08:19:37.000Z | 2022-03-29T16:45:06.000Z | lona/shell/commands/lona_routes.py | ukleinek/lona | b4b52dc1e76c1b28b5989b9a93ddc969e997a841 | [
"MIT"
] | 13 | 2021-08-20T10:35:04.000Z | 2022-01-17T15:49:40.000Z | from rlpython.utils.attribute_table import write_attribute_table
from rlpython.utils.argument_parser import ReplArgumentParser
from rlpython.utils.table import write_table
class LonaRoutesCommand:
"""
List and test Lona routes
"""
NAME = 'lona_routes'
def __init__(self, repl):
self.repl ... | 25.534247 | 77 | 0.556867 |
1a82352c372ed98f202669a8003acf84d5584475 | 145 | py | Python | python/p35.py | forewing/lc | 314468a1a3bb7d38eccf1f34b0d1b7da04a34784 | [
"CC0-1.0"
] | null | null | null | python/p35.py | forewing/lc | 314468a1a3bb7d38eccf1f34b0d1b7da04a34784 | [
"CC0-1.0"
] | null | null | null | python/p35.py | forewing/lc | 314468a1a3bb7d38eccf1f34b0d1b7da04a34784 | [
"CC0-1.0"
] | null | null | null | import bisect
class Solution:
def searchInsert(self, nums: List[int], target: int) -> int:
return bisect.bisect_left(nums, target)
| 20.714286 | 64 | 0.689655 |
1a82531e5d34d6b035a3dcc1ec0516cd6ebc4325 | 722 | py | Python | Assignment2/DC.py | TimO96/NLP2 | 83f65a385457f68397c641f38b53df0110282578 | [
"MIT"
] | null | null | null | Assignment2/DC.py | TimO96/NLP2 | 83f65a385457f68397c641f38b53df0110282578 | [
"MIT"
] | null | null | null | Assignment2/DC.py | TimO96/NLP2 | 83f65a385457f68397c641f38b53df0110282578 | [
"MIT"
] | null | null | null | import torch.nn as nn
import numpy as np
class DC(nn.Module):
'''
Diagnostic Classifier for probing POS-tags from hidden representations
'''
def __init__(self, features, pos_tags, layers=[]):
super(DC, self).__init__()
self.neg_slope = 0.01
layers = [features] + layers + [pos_... | 27.769231 | 74 | 0.578947 |
1a82825d5c42f01166c30d5968ff81fed3714970 | 713 | py | Python | bin/coin.py | gobeltri/gocrypto-fees | d5578f2d8ffdb53390b283a2687c97ec33066b15 | [
"MIT"
] | 3 | 2018-03-28T16:59:47.000Z | 2018-03-29T12:39:54.000Z | bin/coin.py | gobeltri/gocrypto-fees | d5578f2d8ffdb53390b283a2687c97ec33066b15 | [
"MIT"
] | 2 | 2018-03-12T03:40:35.000Z | 2018-03-16T10:41:57.000Z | bin/coin.py | gobeltri/gocrypto-fees | d5578f2d8ffdb53390b283a2687c97ec33066b15 | [
"MIT"
] | null | null | null | import json
class Coin():
def __init__(self, ticker, rank, price_usd):
self.ticker = ticker
self.rank = rank
self.price_usd = price_usd
# Each coin will hava a list of exchanges
#self.exchanges = []
self.binance_fee = None
self.binance_fee_usd =... | 29.708333 | 62 | 0.576438 |
1a829bfaf21f65571a04810af1a965ab7bfc854f | 831 | py | Python | meetings/models.py | timptner/farafmb.de | 2b154278d8b44ea3adecafcb8554c1b0b0055e01 | [
"MIT"
] | 1 | 2017-04-06T09:12:45.000Z | 2017-04-06T09:12:45.000Z | meetings/models.py | timptner/farafmb.de | 2b154278d8b44ea3adecafcb8554c1b0b0055e01 | [
"MIT"
] | 2 | 2017-09-07T22:09:50.000Z | 2020-06-09T14:46:30.000Z | meetings/models.py | timptner/farafmb.de | 2b154278d8b44ea3adecafcb8554c1b0b0055e01 | [
"MIT"
] | null | null | null | from django.conf import settings
from django.db import models
class Meeting(models.Model):
date = models.DateField(unique=True)
recorder = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.SET_NULL, null=True)
agenda = models.TextField()
guests = models.TextField(blank=True)
def __str_... | 27.7 | 96 | 0.706378 |
1a82ad7507cfc98026615a4af22b7d209be3bc26 | 5,767 | py | Python | ioos_tools/taylor_diagram.py | mwengren/notebooks_demos | b784affed6a79684553e7a16c22fe837d0fdbdd0 | [
"MIT"
] | null | null | null | ioos_tools/taylor_diagram.py | mwengren/notebooks_demos | b784affed6a79684553e7a16c22fe837d0fdbdd0 | [
"MIT"
] | null | null | null | ioos_tools/taylor_diagram.py | mwengren/notebooks_demos | b784affed6a79684553e7a16c22fe837d0fdbdd0 | [
"MIT"
] | null | null | null | from __future__ import absolute_import, division, print_function
import numpy as np
import matplotlib.pyplot as plt
__all__ = ['TaylorDiagram']
class TaylorDiagram(object):
"""
Taylor diagram: plot model standard deviation and correlation
to reference (data) sample in a single-quadrant polar plot, with... | 35.164634 | 77 | 0.588347 |
1a82bc508434e62d3de2274508e1da39962b1e27 | 792 | py | Python | miscellanies/numpy/from_ctypes.py | zhangzhengde0225/SwinTrack | 526be17f8ef266cb924c6939bd8dda23e9b73249 | [
"MIT"
] | 143 | 2021-12-03T02:33:36.000Z | 2022-03-29T00:01:48.000Z | miscellanies/numpy/from_ctypes.py | zhangzhengde0225/SwinTrack | 526be17f8ef266cb924c6939bd8dda23e9b73249 | [
"MIT"
] | 33 | 2021-12-03T10:32:05.000Z | 2022-03-31T02:13:55.000Z | miscellanies/numpy/from_ctypes.py | zhangzhengde0225/SwinTrack | 526be17f8ef266cb924c6939bd8dda23e9b73249 | [
"MIT"
] | 24 | 2021-12-04T06:46:42.000Z | 2022-03-30T07:57:47.000Z | import ctypes
import numpy as np
import sys
def make_nd_array(c_pointer, shape, dtype, order='C', own_data=True):
arr_size = np.prod(shape[:]) * np.dtype(dtype).itemsize
if sys.version_info.major >= 3:
buf_from_mem = ctypes.pythonapi.PyMemoryView_FromMemory
buf_from_mem.restype = ctypes.py_obj... | 37.714286 | 77 | 0.694444 |
1a82c146a037b35dcf62e3b7a0f454bf2333a0bc | 6,159 | py | Python | escli/esconnection.py | zhongnansu/es-cli | e0656c21392e52a8b9cfafa69acfa0c13b743a9c | [
"Apache-2.0"
] | 6 | 2019-08-23T18:06:41.000Z | 2020-05-06T18:26:53.000Z | escli/esconnection.py | zhongnansu/es-cli | e0656c21392e52a8b9cfafa69acfa0c13b743a9c | [
"Apache-2.0"
] | null | null | null | escli/esconnection.py | zhongnansu/es-cli | e0656c21392e52a8b9cfafa69acfa0c13b743a9c | [
"Apache-2.0"
] | null | null | null | """
Copyright 2019, Amazon Web Services Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,... | 36.443787 | 107 | 0.640526 |
1a82ee557c210564ae43ad3312190869fd4c8ea7 | 6,679 | py | Python | code/caching_funcs/cache_text.py | shaanchandra/SAFER | 0f98a1d2080e120174f17370d9d0472901a1c4a1 | [
"MIT"
] | 12 | 2020-09-13T10:07:45.000Z | 2022-01-12T02:22:34.000Z | code/caching_funcs/cache_text.py | shaanchandra/SAFER | 0f98a1d2080e120174f17370d9d0472901a1c4a1 | [
"MIT"
] | 1 | 2020-10-28T18:10:03.000Z | 2020-10-28T18:10:03.000Z | code/caching_funcs/cache_text.py | shaanchandra/SAFER | 0f98a1d2080e120174f17370d9d0472901a1c4a1 | [
"MIT"
] | 4 | 2021-01-14T09:54:14.000Z | 2022-01-15T16:47:54.000Z | import sys, os, json
import warnings
warnings.filterwarnings("ignore")
import torch
import nltk
nltk.download('punkt')
sys.path.append("..")
from models.model import Document_Classifier
from models.transformer_model import *
from utils.utils import *
from utils.data_utils_gnn import *
from utils.data_utils_txt import... | 44.526667 | 212 | 0.560713 |
1a82fd41502bdeca5fa1c15e57d77f0577a78b07 | 3,800 | py | Python | tests/test_merging.py | mborgerson/claripy | 45b01c10caa0001b4e210e449ad5618880d1773b | [
"BSD-2-Clause"
] | null | null | null | tests/test_merging.py | mborgerson/claripy | 45b01c10caa0001b4e210e449ad5618880d1773b | [
"BSD-2-Clause"
] | null | null | null | tests/test_merging.py | mborgerson/claripy | 45b01c10caa0001b4e210e449ad5618880d1773b | [
"BSD-2-Clause"
] | null | null | null | # pylint: disable= [no-self-use,missing-class-docstring]
import unittest
import nose
import claripy
class TestMerging(unittest.TestCase):
def test_simple_merging_solver(self):
self.raw_simple_merging(claripy.Solver)
def test_simple_merging_solverhybrid(self):
self. raw_simple_merging(claripy.... | 31.666667 | 56 | 0.547105 |
1a83653ea5e67911f4c93b2a79abde10f2ce8db0 | 10,464 | py | Python | program_synthesis/karel/models/prepare_spec.py | kavigupta/program_synthesis | 0b04b1d3b63954ba3d404a8d96c4da18667a1b02 | [
"Apache-2.0"
] | 123 | 2018-06-09T00:49:39.000Z | 2022-03-09T05:41:20.000Z | program_synthesis/karel/models/prepare_spec.py | kavigupta/program_synthesis | 0b04b1d3b63954ba3d404a8d96c4da18667a1b02 | [
"Apache-2.0"
] | 9 | 2018-06-12T01:01:17.000Z | 2022-03-18T09:06:39.000Z | program_synthesis/karel/models/prepare_spec.py | kavigupta/program_synthesis | 0b04b1d3b63954ba3d404a8d96c4da18667a1b02 | [
"Apache-2.0"
] | 24 | 2018-06-09T00:42:46.000Z | 2021-09-29T08:23:32.000Z | import collections
import itertools
import operator
import numpy as np
import torch
from torch.autograd import Variable
from program_synthesis.common.tools.packed_sequence import PackedSequencePlus
def lengths(lsts):
return [len(lst) for lst in lsts]
def lists_to_numpy(lsts, stoi, default_value):
max_le... | 37.371429 | 117 | 0.657015 |
1a8376a87afba6943b8b57f3d71d0013937b3398 | 1,186 | py | Python | tests/turbulette_tests/setup/conftest.py | gitter-badger/turbulette | abc61b58033f4f53bbefe5a1e10bf6550d2ce86f | [
"BSD-3-Clause"
] | null | null | null | tests/turbulette_tests/setup/conftest.py | gitter-badger/turbulette | abc61b58033f4f53bbefe5a1e10bf6550d2ce86f | [
"BSD-3-Clause"
] | null | null | null | tests/turbulette_tests/setup/conftest.py | gitter-badger/turbulette | abc61b58033f4f53bbefe5a1e10bf6550d2ce86f | [
"BSD-3-Clause"
] | null | null | null | import pytest
from importlib import import_module, reload
from turbulette.apps import Registry
@pytest.fixture(scope="session")
def settings():
return "tests.settings"
@pytest.fixture(scope="session")
def settings_no_apps():
return "tests.settings_no_apps"
@pytest.fixture
def settings_no_apps_module(setti... | 25.234043 | 73 | 0.779933 |
1a838dd3a34cc039bb6ac04c4b4dd96ba0d1d111 | 623 | py | Python | ERation/customer/migrations/0015_customer_aadhar.py | mishelshaji/ERation | 0e755ae63ae2c9cc009e18b72425ac508670a1cf | [
"MIT"
] | null | null | null | ERation/customer/migrations/0015_customer_aadhar.py | mishelshaji/ERation | 0e755ae63ae2c9cc009e18b72425ac508670a1cf | [
"MIT"
] | null | null | null | ERation/customer/migrations/0015_customer_aadhar.py | mishelshaji/ERation | 0e755ae63ae2c9cc009e18b72425ac508670a1cf | [
"MIT"
] | null | null | null | # Generated by Django 3.0.4 on 2020-06-02 17:02
import django.core.validators
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('customer', '0014_auto_20200531_1540'),
]
operations = [
migrations.AddField(
model_name='customer'... | 29.666667 | 220 | 0.683788 |
1a83a8a1eed35665d86e72e0dfc875a7d76a8210 | 375 | py | Python | predico/sample/tour/first_customization.py | pauleveritt/predico | 2bbf88a7775d31907d2229a32a89490172acd988 | [
"Apache-2.0"
] | null | null | null | predico/sample/tour/first_customization.py | pauleveritt/predico | 2bbf88a7775d31907d2229a32a89490172acd988 | [
"Apache-2.0"
] | null | null | null | predico/sample/tour/first_customization.py | pauleveritt/predico | 2bbf88a7775d31907d2229a32a89490172acd988 | [
"Apache-2.0"
] | null | null | null | from dataclasses import dataclass
from predico import registry
from predico.sample import servicemanager, setup, Article
@registry.view(
resource=Article,
template_string='<h1>{v.name}</h1>'
)
@dataclass
class ArticleView:
name: str = 'Article View'
if __name__ == '__main__':
setup()
output = s... | 18.75 | 57 | 0.717333 |
1a83b959657c94023e0d590c12601103f96a2946 | 5,310 | py | Python | text_office/tests.py | pkaczynski/django-text_office | 07c52ad6f8955c11cf79e4a99e45d46c1b440345 | [
"MIT"
] | null | null | null | text_office/tests.py | pkaczynski/django-text_office | 07c52ad6f8955c11cf79e4a99e45d46c1b440345 | [
"MIT"
] | null | null | null | text_office/tests.py | pkaczynski/django-text_office | 07c52ad6f8955c11cf79e4a99e45d46c1b440345 | [
"MIT"
] | 1 | 2021-08-09T22:54:22.000Z | 2021-08-09T22:54:22.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import sendsms
from unittest.case import skip
from django.test import TestCase
from django.test.utils import override_settings
from text_office.models import SMS, STATUS, PRIORITY, SMSTemplate
class SMSManagerTest(TestCase):
def test_create(self)... | 27.230769 | 77 | 0.574011 |
1a83de02052f8bd7cc9a62690197ce76975c3582 | 2,871 | py | Python | conversion/ascii_to_bin.py | MarkMoretto/python-examples-main | 37b8c41d2f175029f4536ca970f037ff19b4e951 | [
"MIT"
] | 1 | 2020-07-21T23:24:25.000Z | 2020-07-21T23:24:25.000Z | conversion/ascii_to_bin.py | MarkMoretto/python-examples-main | 37b8c41d2f175029f4536ca970f037ff19b4e951 | [
"MIT"
] | 4 | 2021-06-29T00:38:57.000Z | 2022-01-15T00:22:15.000Z | conversion/ascii_to_bin.py | MarkMoretto/python-examples-main | 37b8c41d2f175029f4536ca970f037ff19b4e951 | [
"MIT"
] | null | null | null |
'''
Summary: ASCII to binary with zero-padded output
Date: 2021-05-02
Contributor:
mark moretto
Requirements:
Python 3.6+
From command line, all are equivalent:
>>> python ascii_to_bin.py
>>> python ascii_to_bin.py Hello, World!
>>> python ascii_to_bin.py "Hello, World!"
>>> python asci... | 27.342857 | 87 | 0.667712 |
1a83ea7eff2007fea9f76a1bb76635aa241f4e32 | 503 | py | Python | elasticsearch_faker/_const.py | thombashi/elasticsearch-faker | a6b33bd82750181abf1671fc7046ceea21ea287c | [
"MIT"
] | 1 | 2020-12-15T18:11:46.000Z | 2020-12-15T18:11:46.000Z | elasticsearch_faker/_const.py | thombashi/elasticsearch-faker | a6b33bd82750181abf1671fc7046ceea21ea287c | [
"MIT"
] | 1 | 2022-01-27T18:04:04.000Z | 2022-03-20T12:19:46.000Z | elasticsearch_faker/_const.py | thombashi/elasticsearch-faker | a6b33bd82750181abf1671fc7046ceea21ea287c | [
"MIT"
] | null | null | null | from enum import Enum, unique
from textwrap import dedent
MODULE_NAME = "elasticsearch-faker"
COMMAND_EPILOG = dedent(
"""\
Issue tracker: https://github.com/thombashi/{}/issues
"""
).format(MODULE_NAME)
@unique
class SchemaSource(Enum):
FILE = 0
STDIN = 1
@unique
class Context(Enum):
LOG_... | 15.242424 | 57 | 0.650099 |
1a840a25ef157f7daa3fd7cf73ddf5c8b844f215 | 3,635 | py | Python | intersight/models/sdcard_virtual_drive_ref.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | intersight/models/sdcard_virtual_drive_ref.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | intersight/models/sdcard_virtual_drive_ref.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Intersight REST API
This is Intersight REST API
OpenAPI spec version: 1.0.9-255
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re
class SdcardVirtualDriveRef(object):
"""
NOTE: This... | 24.233333 | 77 | 0.544704 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.