hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
e61b0fd36cdaa8eee16647e4a0451cc1b0be25b9 | 1,965 | py | Python | libra/account_resource.py | devos50/libra-client | 7d1558848ff45ca8f42d756ef11e04846154e3cf | [
"MIT"
] | null | null | null | libra/account_resource.py | devos50/libra-client | 7d1558848ff45ca8f42d756ef11e04846154e3cf | [
"MIT"
] | null | null | null | libra/account_resource.py | devos50/libra-client | 7d1558848ff45ca8f42d756ef11e04846154e3cf | [
"MIT"
] | null | null | null | from canoser import *
from libra.event import EventHandle
from libra.hasher import gen_hasher
from libra.account_config import AccountConfig
from io import StringIO
class AccountStateBlob:
def __init__(self, blob):
self.blob = blob
@classmethod
def from_proto(cls, proto):
retur... | 30.703125 | 73 | 0.62341 |
9d6a7430d99c54e6b279c54d0024ba9466e43d00 | 199 | py | Python | xmonitor/contrib/plugins/artifacts_sample/__init__.py | froyobin/xmonitor | 092dcaa01f834353ffd8dd3c40edf9e97543bfe8 | [
"Apache-2.0"
] | null | null | null | xmonitor/contrib/plugins/artifacts_sample/__init__.py | froyobin/xmonitor | 092dcaa01f834353ffd8dd3c40edf9e97543bfe8 | [
"Apache-2.0"
] | null | null | null | xmonitor/contrib/plugins/artifacts_sample/__init__.py | froyobin/xmonitor | 092dcaa01f834353ffd8dd3c40edf9e97543bfe8 | [
"Apache-2.0"
] | null | null | null | from xmonitor.contrib.plugins.artifacts_sample.v1 import artifact as art1
from xmonitor.contrib.plugins.artifacts_sample.v2 import artifact as art2
MY_ARTIFACT = [art1.MyArtifact, art2.MyArtifact]
| 33.166667 | 73 | 0.839196 |
4e68707fdab645cd5efa3633c98b4aa3e81635ad | 521 | py | Python | riak/datatypes/errors.py | albeus/riak-python-client | 51bf875f1f5e394d45540a3850a8453db0951c40 | [
"Apache-2.0"
] | null | null | null | riak/datatypes/errors.py | albeus/riak-python-client | 51bf875f1f5e394d45540a3850a8453db0951c40 | [
"Apache-2.0"
] | null | null | null | riak/datatypes/errors.py | albeus/riak-python-client | 51bf875f1f5e394d45540a3850a8453db0951c40 | [
"Apache-2.0"
] | null | null | null | from riak import RiakError
class ContextRequired(RiakError):
"""
This exception is raised when removals of map fields and set
entries are attempted and the datatype hasn't been initialized
with a context.
"""
_default_message = ("A context is required for remove operations, "
... | 30.647059 | 71 | 0.629559 |
c8b2a633a028f5d13755b20e94aacd05dfa6371d | 2,953 | py | Python | messageApp_api/migrations/0004_auto_20210213_1829.py | yoniv/messageApp | 495762fb6eee328df68f97260494d08c5041d926 | [
"MIT"
] | null | null | null | messageApp_api/migrations/0004_auto_20210213_1829.py | yoniv/messageApp | 495762fb6eee328df68f97260494d08c5041d926 | [
"MIT"
] | null | null | null | messageApp_api/migrations/0004_auto_20210213_1829.py | yoniv/messageApp | 495762fb6eee328df68f97260494d08c5041d926 | [
"MIT"
] | null | null | null | # Generated by Django 3.0 on 2021-02-13 16:29
import django.contrib.auth.models
import django.contrib.auth.validators
from django.db import migrations, models
import django.utils.timezone
class Migration(migrations.Migration):
dependencies = [
('auth', '0011_update_proxy_permissions'),
('message... | 62.829787 | 329 | 0.657298 |
67a4dc5dd5440ed57b743f18f84e2d218d7c1ec4 | 5,216 | py | Python | site/flask/lib/python2.7/site-packages/speaklater.py | theholyhades1/tartanHacks2015 | a801b473f21cfbd136e2a5a74423e8c72d14f900 | [
"MIT"
] | 32 | 2015-01-19T12:13:26.000Z | 2021-11-11T00:11:22.000Z | site/flask/lib/python2.7/site-packages/speaklater.py | theholyhades1/tartanHacks2015 | a801b473f21cfbd136e2a5a74423e8c72d14f900 | [
"MIT"
] | 10 | 2020-06-05T19:42:26.000Z | 2022-03-11T23:38:35.000Z | site/flask/lib/python2.7/site-packages/speaklater.py | theholyhades1/tartanHacks2015 | a801b473f21cfbd136e2a5a74423e8c72d14f900 | [
"MIT"
] | 9 | 2015-07-18T01:03:56.000Z | 2019-05-24T09:36:40.000Z | # -*- coding: utf-8 -*-
r"""
speaklater
~~~~~~~~~~
A module that provides lazy strings for translations. Basically you
get an object that appears to be a string but changes the value every
time the value is evaluated based on a callable you provide.
For example you can have a global `lazy_get... | 25.950249 | 78 | 0.637078 |
99e5e7be96e296671513894d23e22cf62f8d65bb | 6,391 | py | Python | Assignment_1/Q3/input_data.py | hasagar97/DeepLearning | 2b0e6ce2ef5e6216c8af63d1c14d98fe39286a0e | [
"MIT"
] | null | null | null | Assignment_1/Q3/input_data.py | hasagar97/DeepLearning | 2b0e6ce2ef5e6216c8af63d1c14d98fe39286a0e | [
"MIT"
] | null | null | null | Assignment_1/Q3/input_data.py | hasagar97/DeepLearning | 2b0e6ce2ef5e6216c8af63d1c14d98fe39286a0e | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""Functions for downloading and reading MNIST data."""
import gzip
import os
from six.moves.urllib.request import urlretrieve
import numpy
SOURCE_URL = 'http://yann.lecun.com/exdb/mnist/'
def maybe_download(filename, work_directory):
"""Download the data from Yann's website, unl... | 38.969512 | 79 | 0.627288 |
10e3f32de395844ee8a9b7cabdb9ff79f4728d8f | 12,106 | py | Python | pandas/core/ops/array_ops.py | garyteofanus/pandas | cc51219fad8add8f442b847ccdabd3f9e9077cb6 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 1 | 2020-03-23T08:51:08.000Z | 2020-03-23T08:51:08.000Z | pandas/core/ops/array_ops.py | garyteofanus/pandas | cc51219fad8add8f442b847ccdabd3f9e9077cb6 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | pandas/core/ops/array_ops.py | garyteofanus/pandas | cc51219fad8add8f442b847ccdabd3f9e9077cb6 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | """
Functions for arithmetic and comparison operations on NumPy arrays and
ExtensionArrays.
"""
from functools import partial
import operator
from typing import Any, Optional
import numpy as np
from pandas._libs import Timedelta, Timestamp, lib, ops as libops
from pandas._typing import ArrayLike
from pandas.core.dty... | 31.201031 | 88 | 0.617215 |
cfb74aeec821c618c3fabb938014614a922e01f6 | 8,118 | py | Python | archive/solutions/lab1solutions.py | samuelcheang0419/python-labs | 6f32c141412a1af4d8a39b25a56cc211d0a9040f | [
"BSD-2-Clause-FreeBSD"
] | 48 | 2016-06-09T20:39:56.000Z | 2022-01-30T12:49:20.000Z | archive/solutions/lab1solutions.py | samuelcheang0419/python-labs | 6f32c141412a1af4d8a39b25a56cc211d0a9040f | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | archive/solutions/lab1solutions.py | samuelcheang0419/python-labs | 6f32c141412a1af4d8a39b25a56cc211d0a9040f | [
"BSD-2-Clause-FreeBSD"
] | 117 | 2015-10-15T21:08:39.000Z | 2021-11-12T10:09:18.000Z | #!/usr/bin/env python3 -tt
"""
File: lab1solutions.py
----------------------
Reference solutions to Lab 1 for CS41: Hap.py Code.
"""
import math
DICTIONARY_PATH = '/usr/share/dict/words' # Feel free to change this to your dictionary
def say_hello():
"""Prints "Hello, world!" """
print("Hello, World!")
def pri... | 34.991379 | 97 | 0.667406 |
f7c497459a025a7b8cb01e6ed0c8e029607b88ab | 8,273 | py | Python | p2_continuous-control/ddpg/ddpg_agent.py | happykbs/udacity-drl-bongsang | 4a5f9c0698543cf80e83020d333cb8589a179243 | [
"MIT"
] | 1 | 2019-02-11T15:53:20.000Z | 2019-02-11T15:53:20.000Z | p2_continuous-control/ddpg/ddpg_agent.py | happykbs/udacity-drl-bongsang | 4a5f9c0698543cf80e83020d333cb8589a179243 | [
"MIT"
] | null | null | null | p2_continuous-control/ddpg/ddpg_agent.py | happykbs/udacity-drl-bongsang | 4a5f9c0698543cf80e83020d333cb8589a179243 | [
"MIT"
] | null | null | null | import numpy as np
import random
import copy
from collections import namedtuple, deque
from .model import Actor, Critic
import torch
import torch.nn.functional as F
import torch.optim as optim
BUFFER_SIZE = 100000 #int(1e5) # replay buffer size
BATCH_SIZE = 256 #128 # minibatch size
GAMMA = 0.9 #0.99 ... | 41.782828 | 127 | 0.623474 |
ad50caed37544fa2d090221f51aa5069254d28e3 | 3,198 | py | Python | psdaq/psdaq/cas/collection_widget.py | JBlaschke/lcls2 | 30523ef069e823535475d68fa283c6387bcf817b | [
"BSD-3-Clause-LBNL"
] | 16 | 2017-11-09T17:10:56.000Z | 2022-03-09T23:03:10.000Z | psdaq/psdaq/cas/collection_widget.py | JBlaschke/lcls2 | 30523ef069e823535475d68fa283c6387bcf817b | [
"BSD-3-Clause-LBNL"
] | 6 | 2017-12-12T19:30:05.000Z | 2020-07-09T00:28:33.000Z | psdaq/psdaq/cas/collection_widget.py | JBlaschke/lcls2 | 30523ef069e823535475d68fa283c6387bcf817b | [
"BSD-3-Clause-LBNL"
] | 25 | 2017-09-18T20:02:43.000Z | 2022-03-27T22:27:42.000Z | import sys
import zmq
from datetime import datetime, timezone
from PyQt5 import QtCore, QtGui, QtWidgets
PORT_BASE = 29980
POSIX_TIME_AT_EPICS_EPOCH = 631152000
def timestampStr():
current = datetime.now(timezone.utc)
nsec = 1000 * current.microsecond
sec = int(current.timestamp()) - POSIX_TIME_AT_EPICS_E... | 31.048544 | 74 | 0.583802 |
7fb5134dc4e47a05b2513bcb086572e21ba8c386 | 5,043 | py | Python | ffta/line.py | lindat18/ffta | f510a2068b7626e2984e54afc1a577450e560e97 | [
"MIT"
] | null | null | null | ffta/line.py | lindat18/ffta | f510a2068b7626e2984e54afc1a577450e560e97 | [
"MIT"
] | null | null | null | ffta/line.py | lindat18/ffta | f510a2068b7626e2984e54afc1a577450e560e97 | [
"MIT"
] | null | null | null | """line.py: Contains line class."""
# pylint: disable=E1101,R0902,C0103
__author__ = "Durmus U. Karatay"
__copyright__ = "Copyright 2014, Ginger Lab"
__maintainer__ = "Durmus U. Karatay"
__email__ = "ukaratay@uw.edu"
__status__ = "Development"
import numpy as np
from ffta import pixel
class Line:
"""
Signal ... | 33.177632 | 87 | 0.624033 |
dcbf588284bc57a78498a74eb3617bec1a59dc93 | 1,907 | py | Python | helpers/clean.py | abyoussef/ALTEGRAD_Challenge | eb1a47d7e558143d18ed6f9ac82e94df70a941d2 | [
"MIT"
] | null | null | null | helpers/clean.py | abyoussef/ALTEGRAD_Challenge | eb1a47d7e558143d18ed6f9ac82e94df70a941d2 | [
"MIT"
] | null | null | null | helpers/clean.py | abyoussef/ALTEGRAD_Challenge | eb1a47d7e558143d18ed6f9ac82e94df70a941d2 | [
"MIT"
] | null | null | null | import re
import string
import nltk
from nltk import PerceptronTagger
from nltk.corpus import stopwords
def clean_text_simple(text, tagger, keep, stpwds, stemmer, remove_stopwords=True, pos_filtering=True, stemming=True):
# convert to lower case
text = text.lower()
# remove punctuation (preserving intra-wo... | 34.053571 | 117 | 0.64237 |
f267150ccb6939073502dafc07ec82935c0a4d43 | 5,587 | py | Python | rnnfft.py | srowen/rnn-fft | 6be95ec714fb4b6a6dbd3b445a050678a9929c10 | [
"Apache-2.0"
] | null | null | null | rnnfft.py | srowen/rnn-fft | 6be95ec714fb4b6a6dbd3b445a050678a9929c10 | [
"Apache-2.0"
] | null | null | null | rnnfft.py | srowen/rnn-fft | 6be95ec714fb4b6a6dbd3b445a050678a9929c10 | [
"Apache-2.0"
] | 1 | 2020-04-13T10:13:14.000Z | 2020-04-13T10:13:14.000Z | #!/usr/bin/env python3
'''
!pip3 install -U tensorflow-gpu keras numpy scipy
'''
import os
import numpy as np
import tensorflow as tf
import matplotlib.pyplot as plt
from scipy.io import wavfile
from scipy.linalg.blas import daxpy
from keras import backend as K
from keras.callbacks import EarlyStopping
from keras.lay... | 35.585987 | 132 | 0.758547 |
96acf19de44f42f201e08ba80d03a8b48c5d8962 | 31,245 | py | Python | tests/test_gcloud/testbench/gcs_object.py | lgeiger/io | 90be860451a705e2fbe8cfdec3c30030112b5c69 | [
"Apache-2.0"
] | 558 | 2018-11-09T22:45:27.000Z | 2022-03-24T04:59:36.000Z | tests/test_gcloud/testbench/gcs_object.py | lgeiger/io | 90be860451a705e2fbe8cfdec3c30030112b5c69 | [
"Apache-2.0"
] | 1,122 | 2018-12-09T03:30:40.000Z | 2022-03-31T16:22:15.000Z | tests/test_gcloud/testbench/gcs_object.py | lgeiger/io | 90be860451a705e2fbe8cfdec3c30030112b5c69 | [
"Apache-2.0"
] | 319 | 2018-12-09T00:18:47.000Z | 2022-03-30T21:49:46.000Z | # Copyright 2018 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 40.525292 | 88 | 0.621027 |
e9692ed4ff0261b736c565932abfc571b07cbd91 | 1,123 | py | Python | setup.py | Naklecha/knip | 7c416b8bf0eed88ddf29143311e24b8bfe616bde | [
"MIT"
] | 10 | 2019-04-22T19:03:33.000Z | 2022-01-14T07:06:14.000Z | setup.py | Naklecha/knip | 7c416b8bf0eed88ddf29143311e24b8bfe616bde | [
"MIT"
] | 3 | 2020-03-24T17:06:41.000Z | 2021-02-02T22:06:09.000Z | setup.py | Naklecha/knip | 7c416b8bf0eed88ddf29143311e24b8bfe616bde | [
"MIT"
] | null | null | null | from setuptools import setup
with open("README.md","r") as fh:
long_description = fh.read()
setup(
name="knip",
version="0.0.3",
description="Lets make coding hassle free!",
py_modules=["knip"],
package_dir={"":"src"},
classifiers=["Programming Language :: Python :: 3",
... | 36.225806 | 95 | 0.551202 |
a5c735d65394a4c278e34a3199473a2bcc42db04 | 9,571 | py | Python | MAX31855/max2csv.py | elliotta/hephaestus | 67efe7490e1ef5572537627c3278d0cf9256960d | [
"MIT"
] | null | null | null | MAX31855/max2csv.py | elliotta/hephaestus | 67efe7490e1ef5572537627c3278d0cf9256960d | [
"MIT"
] | null | null | null | MAX31855/max2csv.py | elliotta/hephaestus | 67efe7490e1ef5572537627c3278d0cf9256960d | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""Read data from an Adafruit MAX31855.
After a testing reading out at 10Hz, it was determined that the temperatures
returned by this board are stable enough that the current data point is
sufficient, and averaging multiple data points is unnecessary.
This code requires https://github.com/ada... | 46.014423 | 166 | 0.611326 |
ea7933d0ca3765c928eb80efed0b87d828132cfe | 5,254 | py | Python | bfgn/architectures/residual_unet.py | dmarvs/bfg-nets | 0c8e7f469b6a50c7b167ead98cb545d238dee214 | [
"MIT"
] | 8 | 2019-08-01T17:52:58.000Z | 2021-05-15T22:19:41.000Z | bfgn/architectures/residual_unet.py | pgbrodrick/rsCNN | 0c8e7f469b6a50c7b167ead98cb545d238dee214 | [
"MIT"
] | 38 | 2019-06-22T19:45:02.000Z | 2019-07-20T19:39:09.000Z | bfgn/architectures/residual_unet.py | pgbrodrick/rsCNN | 0c8e7f469b6a50c7b167ead98cb545d238dee214 | [
"MIT"
] | 1 | 2020-01-13T20:28:28.000Z | 2020-01-13T20:28:28.000Z | from typing import Tuple
import keras
from keras.layers import BatchNormalization, Concatenate, Conv2D, MaxPooling2D, UpSampling2D
from bfgn.architectures import config_sections
class ArchitectureConfigSection(
config_sections.AutoencoderMixin,
config_sections.BlockMixin,
config_sections.GrowthMixin,
... | 44.525424 | 124 | 0.719262 |
40032282478794bc7453291b36254ab842976d17 | 4,353 | py | Python | account/views.py | SergePogorelov/bookmarks | 2ee19469f6a91aea0b57b36e2dde2c4650f72a8e | [
"BSD-3-Clause"
] | null | null | null | account/views.py | SergePogorelov/bookmarks | 2ee19469f6a91aea0b57b36e2dde2c4650f72a8e | [
"BSD-3-Clause"
] | 2 | 2020-10-07T12:08:32.000Z | 2021-06-10T23:28:57.000Z | account/views.py | SergePogorelov/bookmarks | 2ee19469f6a91aea0b57b36e2dde2c4650f72a8e | [
"BSD-3-Clause"
] | null | null | null | from django.http import HttpResponse, JsonResponse
from django.shortcuts import render, get_object_or_404
from django.contrib.auth import authenticate, login
from django.contrib.auth.models import User
from django.contrib.auth.decorators import login_required
from django.contrib import messages
from django.views.decora... | 35.390244 | 88 | 0.662302 |
5ab2d15fca351f993720a53d237514111455efb1 | 17,658 | py | Python | Omni_Receiver_4_Directions_2D_CNN_No_Mapping_Outdoor.py | debashriroy/DeePOE | ae6d6dcb1bb1410ea8e078277e54aa6f363484a4 | [
"MIT"
] | null | null | null | Omni_Receiver_4_Directions_2D_CNN_No_Mapping_Outdoor.py | debashriroy/DeePOE | ae6d6dcb1bb1410ea8e078277e54aa6f363484a4 | [
"MIT"
] | null | null | null | Omni_Receiver_4_Directions_2D_CNN_No_Mapping_Outdoor.py | debashriroy/DeePOE | ae6d6dcb1bb1410ea8e078277e54aa6f363484a4 | [
"MIT"
] | null | null | null |
##############################################################
# Radio Fingerprinting in RFML Environment #
# Neural Network for Direction Finding Data 2020 #
# Author: Debashri Roy #
#############################################################
#######... | 41.942993 | 335 | 0.702854 |
fba0137778a489a79340f3d93f389b1c946a9834 | 25,932 | py | Python | generate/generate_miri.py | rendinam/pysiaf | b891e97037b250bfccb3f94b1ca156ffdf836594 | [
"BSD-3-Clause"
] | null | null | null | generate/generate_miri.py | rendinam/pysiaf | b891e97037b250bfccb3f94b1ca156ffdf836594 | [
"BSD-3-Clause"
] | null | null | null | generate/generate_miri.py | rendinam/pysiaf | b891e97037b250bfccb3f94b1ca156ffdf836594 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
"""Generate MIRI SIAF and flight-like SIAF reference files.
Authors
-------
Johannes Sahlmann
References
----------
This script was partially adapted from Colin Cox' miriifu.py.
For a detailed description of the MIRI SIAF, the underlying reference files, and the
transformations,... | 36.472574 | 188 | 0.620006 |
583eb5cc625a3c1ee146ecec88ec983f9c074816 | 5,029 | py | Python | gammapy/image/tests/test_profile.py | watsonjj/gammapy | 8d2498c8f63f73d1fbe4ba81ab02d9e72552df67 | [
"BSD-3-Clause"
] | null | null | null | gammapy/image/tests/test_profile.py | watsonjj/gammapy | 8d2498c8f63f73d1fbe4ba81ab02d9e72552df67 | [
"BSD-3-Clause"
] | null | null | null | gammapy/image/tests/test_profile.py | watsonjj/gammapy | 8d2498c8f63f73d1fbe4ba81ab02d9e72552df67 | [
"BSD-3-Clause"
] | null | null | null | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import pytest
import numpy as np
from numpy.testing import assert_allclose
from astropy.table import Table
from astropy import units as u
from astropy.coordinates import Angle, SkyCoord
from ...utils.testing import assert_quantity_allclose
from ...utils.te... | 38.098485 | 78 | 0.678664 |
f57524c187398072f4289e3a2754ca8af21b0657 | 26,246 | py | Python | dataloader.py | hardik0/CTracker | a09d579c3621383280111f4771c0340fdcd72020 | [
"Apache-2.0"
] | null | null | null | dataloader.py | hardik0/CTracker | a09d579c3621383280111f4771c0340fdcd72020 | [
"Apache-2.0"
] | null | null | null | dataloader.py | hardik0/CTracker | a09d579c3621383280111f4771c0340fdcd72020 | [
"Apache-2.0"
] | null | null | null | from __future__ import print_function, division
import sys
import os
import torch
import numpy as np
import random
import cv2
import csv
from six import raise_from
from torch.utils.data import Dataset, DataLoader
from torchvision import transforms, utils
from torch.utils.data.sampler import Sampler
import skimage.io
i... | 37.494286 | 267 | 0.578031 |
dcfa1f104275238d4f223acb55c16023cd01b96d | 3,100 | py | Python | edward2_autoreparam/models_test.py | kinoute/google-research | 4a59cab927579ea9722e43252c695de5da4eb5e2 | [
"Apache-2.0"
] | 11 | 2020-01-29T07:25:04.000Z | 2022-03-05T16:01:21.000Z | edward2_autoreparam/models_test.py | zhangyuezjx/google-research | 4a59cab927579ea9722e43252c695de5da4eb5e2 | [
"Apache-2.0"
] | 13 | 2020-01-28T22:19:53.000Z | 2022-02-10T00:39:26.000Z | edward2_autoreparam/models_test.py | zhangyuezjx/google-research | 4a59cab927579ea9722e43252c695de5da4eb5e2 | [
"Apache-2.0"
] | 2 | 2019-12-07T19:01:03.000Z | 2020-03-19T16:53:04.000Z | # coding=utf-8
# Copyright 2019 The Google Research 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 applicab... | 36.046512 | 80 | 0.721935 |
0b02477973b984231866fa9147ad9bec4c2a9325 | 3,112 | py | Python | contrib/zmq/zmq_sub.py | minblock/generalcoin | b3b51979823f77e54eb548df39e1b8037e480f50 | [
"MIT"
] | null | null | null | contrib/zmq/zmq_sub.py | minblock/generalcoin | b3b51979823f77e54eb548df39e1b8037e480f50 | [
"MIT"
] | null | null | null | contrib/zmq/zmq_sub.py | minblock/generalcoin | b3b51979823f77e54eb548df39e1b8037e480f50 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2014-2018 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""
ZMQ example using python3's asyncio
Generalcoind should be started with the command line arg... | 36.186047 | 107 | 0.645244 |
c7c3373fb583f09ad9b98bbad30cc9806da172a5 | 1,295 | py | Python | sdk/core/azure-core/tests/async_tests/test_rest_headers_async.py | navali-msft/azure-sdk-for-python | 716a7d1f4a115a74243fd399fa2e6d08c81a9aeb | [
"MIT"
] | null | null | null | sdk/core/azure-core/tests/async_tests/test_rest_headers_async.py | navali-msft/azure-sdk-for-python | 716a7d1f4a115a74243fd399fa2e6d08c81a9aeb | [
"MIT"
] | null | null | null | sdk/core/azure-core/tests/async_tests/test_rest_headers_async.py | navali-msft/azure-sdk-for-python | 716a7d1f4a115a74243fd399fa2e6d08c81a9aeb | [
"MIT"
] | null | null | null | # 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.
# ---------------------------------------------------------------------... | 35 | 75 | 0.580695 |
ef89793fd73dc996f442913f60e0920545d83d5b | 3,231 | py | Python | tensorflow/python/keras/applications/__init__.py | abhaikollara/tensorflow | 4f96df3659696990cb34d0ad07dc67843c4225a9 | [
"Apache-2.0"
] | 1 | 2019-11-27T16:08:48.000Z | 2019-11-27T16:08:48.000Z | tensorflow/python/keras/applications/__init__.py | abhaikollara/tensorflow | 4f96df3659696990cb34d0ad07dc67843c4225a9 | [
"Apache-2.0"
] | null | null | null | tensorflow/python/keras/applications/__init__.py | abhaikollara/tensorflow | 4f96df3659696990cb34d0ad07dc67843c4225a9 | [
"Apache-2.0"
] | 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 applica... | 44.260274 | 86 | 0.798514 |
9fc1fa2954c3927d04dfb85add55596ac5f227c3 | 805 | py | Python | Concurrency/codeSample/Part10_The_Multiprocessing_Module/countdownp2.py | Chyi341152/pyConPaper | 851190d59f8dc85b4f2a0b47c6505edd0367a6fe | [
"MIT"
] | 1 | 2018-05-30T02:36:46.000Z | 2018-05-30T02:36:46.000Z | Concurrency/codeSample/Part10_The_Multiprocessing_Module/countdownp2.py | Chyi341152/pyConPaper | 851190d59f8dc85b4f2a0b47c6505edd0367a6fe | [
"MIT"
] | null | null | null | Concurrency/codeSample/Part10_The_Multiprocessing_Module/countdownp2.py | Chyi341152/pyConPaper | 851190d59f8dc85b4f2a0b47c6505edd0367a6fe | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding:utf-8 -*-
# countdownp2.py
# A simple performance test of CPU-bound processes. Compare to the thread example module
import time
import multiprocessing
# Functions as threads
def countdown(count):
while count > 0:
count -= 1
return
start = time.time()
countdown(1... | 22.361111 | 95 | 0.667081 |
11bc35b36ece1902b2e369be22d69f47c7f8ed44 | 11,609 | py | Python | src/parity_game.py | olijzenga/bdd-parity-game-solver | 22195bfb303986c872fce7ee710d0fe6284ab9a3 | [
"Apache-2.0"
] | 1 | 2021-06-21T07:22:48.000Z | 2021-06-21T07:22:48.000Z | src/parity_game.py | olijzenga/bdd-parity-game-solver | 22195bfb303986c872fce7ee710d0fe6284ab9a3 | [
"Apache-2.0"
] | null | null | null | src/parity_game.py | olijzenga/bdd-parity-game-solver | 22195bfb303986c872fce7ee710d0fe6284ab9a3 | [
"Apache-2.0"
] | null | null | null | from dd.cudd import BDD
from bdd_provider import make_bdd
from graphviz import Source
# Parity class which is a slightly altered version of the one used by Sanchez et al:
# Sanchez, L., Wesselink, J.W., & Willemse, T.A.C. (2018). BDD-based parity game solving: a comparison of
# Zielonka's recursive algorithm, priority... | 41.460714 | 174 | 0.565596 |
140d67fedf06fbae600d7d7a8aa0ee9177633960 | 58,529 | py | Python | SLpackage/private/thirdparty/pythonpkgs/numpy/numpy_1.13.1/lib/python2.7/site-packages/numpy/f2py/rules.py | fanglab/6mASCOPE | 3f1fdcb7693ff152f17623ce549526ec272698b1 | [
"BSD-3-Clause"
] | 5 | 2022-02-20T07:10:02.000Z | 2022-03-18T17:47:53.000Z | SLpackage/private/thirdparty/pythonpkgs/numpy/numpy_1.13.1/lib/python2.7/site-packages/numpy/f2py/rules.py | fanglab/6mASCOPE | 3f1fdcb7693ff152f17623ce549526ec272698b1 | [
"BSD-3-Clause"
] | null | null | null | SLpackage/private/thirdparty/pythonpkgs/numpy/numpy_1.13.1/lib/python2.7/site-packages/numpy/f2py/rules.py | fanglab/6mASCOPE | 3f1fdcb7693ff152f17623ce549526ec272698b1 | [
"BSD-3-Clause"
] | null | null | null | #! python
"""
Rules for building C/API module with f2py2e.
Here is a skeleton of a new wrapper function (13Dec2001):
wrapper_function(args)
declarations
get_python_arguments, say, `a' and `b'
get_a_from_python
if (successful) {
get_b_from_python
if (successful) {
callfortran
if (succes... | 39.653794 | 212 | 0.548651 |
24c0b02d167fa64a185141bede0ecdd803cc193d | 4,371 | py | Python | contrib/seeds/generate-seeds.py | Qbase-Foundation/Testnet | fefcbd91eb2f0ac35c4c3c5b41243f2afccf194e | [
"MIT"
] | 6 | 2018-12-16T00:48:48.000Z | 2021-10-16T19:17:30.000Z | contrib/seeds/generate-seeds.py | Qbase-Foundation/Testnet | fefcbd91eb2f0ac35c4c3c5b41243f2afccf194e | [
"MIT"
] | null | null | null | contrib/seeds/generate-seeds.py | Qbase-Foundation/Testnet | fefcbd91eb2f0ac35c4c3c5b41243f2afccf194e | [
"MIT"
] | 2 | 2018-10-15T05:40:05.000Z | 2021-05-20T18:14:57.000Z | #!/usr/bin/python
# Copyright (c) 2014 Wladimir J. van der Laan
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
'''
Script to generate list of seed nodes for chainparams.cpp.
This script expects two text files in the directory tha... | 31.446043 | 98 | 0.581789 |
6602a91e2cb8c54312ef65b181b6033b114bf71d | 834 | py | Python | pymongoshell/mping.py | jdrumgoole/mongodbutils | 9e74ce94e56f5b1a0eaa558c282b6c6659ebf1da | [
"Apache-2.0"
] | 2 | 2019-01-17T21:32:08.000Z | 2019-01-17T22:14:41.000Z | pymongoshell/mping.py | jdrumgoole/mongodbutils | 9e74ce94e56f5b1a0eaa558c282b6c6659ebf1da | [
"Apache-2.0"
] | 5 | 2021-04-20T20:55:02.000Z | 2021-04-20T20:55:04.000Z | pymongoshell/mping.py | jdrumgoole/mongodbutils | 9e74ce94e56f5b1a0eaa558c282b6c6659ebf1da | [
"Apache-2.0"
] | 1 | 2017-04-29T19:32:24.000Z | 2017-04-29T19:32:24.000Z | """
Author : joe@joedrumgoole.com
MPing : Ping a MongoDB server with an is_master command.
"""
import pymongo
from pymongo.errors import ConnectionFailure
from datetime import datetime
import pprint
import sys
if __name__ == "__main__":
arg = None
if len(sys.argv) > 1:
arg = sys.argv[1]
clien... | 22.540541 | 66 | 0.640288 |
ade9b236d36171955404991fe28d9a3288402866 | 3,318 | py | Python | sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2015_05_01/_configuration.py | moovy2/azure-sdk-for-python | 6b0495dc9917d47a7264f26cbd3221d43461a537 | [
"MIT"
] | 2,728 | 2015-01-09T10:19:32.000Z | 2022-03-31T14:50:33.000Z | sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2015_05_01/_configuration.py | v-xuto/azure-sdk-for-python | 9c6296d22094c5ede410bc83749e8df8694ccacc | [
"MIT"
] | 17,773 | 2015-01-05T15:57:17.000Z | 2022-03-31T23:50:25.000Z | sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2015_05_01/_configuration.py | v-xuto/azure-sdk-for-python | 9c6296d22094c5ede410bc83749e8df8694ccacc | [
"MIT"
] | 1,916 | 2015-01-19T05:05:41.000Z | 2022-03-31T19:36:44.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 may ... | 46.083333 | 129 | 0.690175 |
98b0fe78010d93a4b7a5af536237d2516e55b877 | 5,591 | py | Python | aoc/event2021/day24/solve.py | rjbatista/AoC | 5c6ca4bcb376c24ec730eb12fd7044f5326ee473 | [
"MIT"
] | null | null | null | aoc/event2021/day24/solve.py | rjbatista/AoC | 5c6ca4bcb376c24ec730eb12fd7044f5326ee473 | [
"MIT"
] | null | null | null | aoc/event2021/day24/solve.py | rjbatista/AoC | 5c6ca4bcb376c24ec730eb12fd7044f5326ee473 | [
"MIT"
] | null | null | null | import re
########
# PART 1
class ALU:
_registers : list[int]
def __init__(self) -> None:
self._input = []
self._registers = [0] * 4
self.loaded_code = None
self._pattern = re.compile(r"^(inp|add|mul|div|mod|eql) ([w-z])(?: (?:(-?\d+)|([w-z])))?$")
def reset_registers(se... | 27.406863 | 126 | 0.53443 |
0802c0eabb3e4e31fb532043496bfff4184d5fa8 | 1,205 | py | Python | api/index.py | bramaudi/gold-price | a67328a917ed3eadeda5b968c2ad47566f6ba305 | [
"MIT"
] | null | null | null | api/index.py | bramaudi/gold-price | a67328a917ed3eadeda5b968c2ad47566f6ba305 | [
"MIT"
] | null | null | null | api/index.py | bramaudi/gold-price | a67328a917ed3eadeda5b968c2ad47566f6ba305 | [
"MIT"
] | null | null | null | import requests, json
from http.server import BaseHTTPRequestHandler
from cowpy import cow
from bs4 import BeautifulSoup
from sanic import Sanic
from sanic.response import json
http = requests.get('https://harga-emas.org/')
soup = BeautifulSoup(http.content, 'html.parser')
def sort_type(kurs):
return {
"oz": ku... | 23.173077 | 56 | 0.66639 |
52a2aa0210df9b0e3442289e4febb8c415560b5a | 6,870 | py | Python | Maverick/Cache.py | Lumin0ux/Maverick | 4ca5c0d212f473f1687ae62bb520b48fcb817740 | [
"MIT"
] | null | null | null | Maverick/Cache.py | Lumin0ux/Maverick | 4ca5c0d212f473f1687ae62bb520b48fcb817740 | [
"MIT"
] | null | null | null | Maverick/Cache.py | Lumin0ux/Maverick | 4ca5c0d212f473f1687ae62bb520b48fcb817740 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Handle cache
"""
import os
import json
import shutil
from PIL import Image
from PIL import ImageFile
import urllib
from .Config import g_conf
from .Router import Router
from urllib.parse import urlparse
import urllib.request as request
from .Utils import unify_joinpath, print... | 35.230769 | 87 | 0.534643 |
7c2a282222a6a50bcc7ab6311634942e0f0dc963 | 1,328 | py | Python | setup.py | galamit86/nimbletl | 7bee9894b45143f315b1a98d70d62c356fb6d70f | [
"MIT"
] | 3 | 2020-05-13T18:19:40.000Z | 2020-07-02T18:53:52.000Z | setup.py | galamit86/nimbletl | 7bee9894b45143f315b1a98d70d62c356fb6d70f | [
"MIT"
] | 7 | 2020-05-16T09:55:14.000Z | 2020-08-25T10:54:59.000Z | setup.py | dkapitan/nimbletl | 7bee9894b45143f315b1a98d70d62c356fb6d70f | [
"MIT"
] | 1 | 2020-11-09T10:54:22.000Z | 2020-11-09T10:54:22.000Z | #!/usr/bin/env python
"""The setup script."""
from setuptools import setup, find_packages
with open("README.rst") as readme_file:
readme = readme_file.read()
with open("HISTORY.rst") as history_file:
history = history_file.read()
requirements = ["prefect>=0.11.0"]
setup_requirements = [
"pytest-runner... | 26.039216 | 64 | 0.652861 |
39d2dccbd32910ec74fc30e55e404aaccca51df2 | 1,044 | py | Python | isi_sdk_8_1_1/test/test_node_drives_purposelist_node_purpose.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 24 | 2018-06-22T14:13:23.000Z | 2022-03-23T01:21:26.000Z | isi_sdk_8_1_1/test/test_node_drives_purposelist_node_purpose.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 46 | 2018-04-30T13:28:22.000Z | 2022-03-21T21:11:07.000Z | isi_sdk_8_1_1/test/test_node_drives_purposelist_node_purpose.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 29 | 2018-06-19T00:14:04.000Z | 2022-02-08T17:51:19.000Z | # coding: utf-8
"""
Isilon SDK
Isilon SDK - Language bindings for the OneFS API # noqa: E501
OpenAPI spec version: 6
Contact: sdk@isilon.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import unittest
import isi_sdk_8_1_1
from i... | 25.463415 | 124 | 0.745211 |
5b4f764194628fb28c637cc1d12d42f57938c162 | 299 | py | Python | app/api/errors/repository.py | karriva/myna_test | 1def78a0c11b91a5d28c216333eec6ffe39e6fbb | [
"MIT"
] | null | null | null | app/api/errors/repository.py | karriva/myna_test | 1def78a0c11b91a5d28c216333eec6ffe39e6fbb | [
"MIT"
] | 1 | 2022-01-17T08:18:39.000Z | 2022-01-17T08:18:39.000Z | app/api/errors/repository.py | karriva/myna_test | 1def78a0c11b91a5d28c216333eec6ffe39e6fbb | [
"MIT"
] | null | null | null | from .common import SchemaEnhancedHTTPException
class RepositoryHTTPException(SchemaEnhancedHTTPException):
"""
Raises when repository raised error.
"""
default_status_code = 400
default_error_kind = 'repository'
default_error_code = 1200
message = 'Repository error.'
| 24.916667 | 59 | 0.745819 |
fd1610416cc70916e4af17427d53a1319dec6442 | 1,531 | py | Python | test/functional/uacomment.py | arcana-coin/arcana-core | b5d6d71968d1f19c42dc3f351aff17800da5af36 | [
"MIT"
] | null | null | null | test/functional/uacomment.py | arcana-coin/arcana-core | b5d6d71968d1f19c42dc3f351aff17800da5af36 | [
"MIT"
] | null | null | null | test/functional/uacomment.py | arcana-coin/arcana-core | b5d6d71968d1f19c42dc3f351aff17800da5af36 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2017 The Bytcoyn Core Developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the -uacomment option."""
from test_framework.test_framework import BitcoinTestFramework
from test_fra... | 42.527778 | 136 | 0.683867 |
a60967a746ba9aad03766a088b790b26dc4b1921 | 4,611 | py | Python | gymnasiums/tests/tests_gymnasium_create_view.py | hbuyse/dj-gymnasiums | 39f590dc703eec01c753ea54d7f4afd06f81a582 | [
"MIT"
] | null | null | null | gymnasiums/tests/tests_gymnasium_create_view.py | hbuyse/dj-gymnasiums | 39f590dc703eec01c753ea54d7f4afd06f81a582 | [
"MIT"
] | null | null | null | gymnasiums/tests/tests_gymnasium_create_view.py | hbuyse/dj-gymnasiums | 39f590dc703eec01c753ea54d7f4afd06f81a582 | [
"MIT"
] | null | null | null | #! /usr/bin/env python
# coding=utf-8
"""Tests the views."""
# Django
from django.contrib.auth import get_user_model
from django.test import TestCase
from django.urls import reverse
# Current django project
from gymnasiums.models import Gymnasium
class TestGymnasiumCreateViewAsAnonymous(TestCase):
"""Tests."""... | 29.369427 | 106 | 0.551074 |
e79c278ba8194bc0d1cb08d8038a358dca650ea4 | 8,340 | py | Python | angrmanagement/ui/widgets/qfeature_map.py | Kyle-Kyle/angr-management | 6ea65f19d813be510a38f06510b2b2148a6b5000 | [
"BSD-2-Clause"
] | 2 | 2022-01-23T21:43:54.000Z | 2022-02-02T08:20:20.000Z | angrmanagement/ui/widgets/qfeature_map.py | Kyle-Kyle/angr-management | 6ea65f19d813be510a38f06510b2b2148a6b5000 | [
"BSD-2-Clause"
] | 1 | 2021-12-04T01:11:46.000Z | 2021-12-04T01:11:46.000Z | angrmanagement/ui/widgets/qfeature_map.py | Kyle-Kyle/angr-management | 6ea65f19d813be510a38f06510b2b2148a6b5000 | [
"BSD-2-Clause"
] | 1 | 2021-05-17T05:46:19.000Z | 2021-05-17T05:46:19.000Z |
from sortedcontainers import SortedDict
from PySide2.QtWidgets import QWidget, QHBoxLayout, QGraphicsScene, QSizePolicy, QGraphicsSceneMouseEvent
from PySide2.QtGui import QPaintEvent, QPainter, QBrush, QPen, QPolygonF
from PySide2.QtCore import Qt, QRectF, QSize, QPointF
import cle
from angr.block import Block
from... | 31.353383 | 119 | 0.614269 |
b88f79af369a2590db24e82d3ac36b2d0e6a75fb | 378 | py | Python | examples/simple_requests.py | Coffee-Meets-Bagel/python-leanplum | 41a7a295488ac23dd44da65d511ce8313326b26f | [
"MIT"
] | 3 | 2018-07-17T17:05:05.000Z | 2019-12-16T20:11:52.000Z | examples/simple_requests.py | Coffee-Meets-Bagel/python-leanplum | 41a7a295488ac23dd44da65d511ce8313326b26f | [
"MIT"
] | 1 | 2021-08-23T16:02:57.000Z | 2021-10-04T15:40:41.000Z | examples/simple_requests.py | Coffee-Meets-Bagel/python-leanplum | 41a7a295488ac23dd44da65d511ce8313326b26f | [
"MIT"
] | null | null | null | from leanplum.client import Client
APP_ID = "your-app-id"
CLIENT_KEY = "your-client-key"
client = Client(APP_ID, CLIENT_KEY)
client.users.track(133700, event="Joined Faction", params={"Faction Name": "Rebels"})
client.users.advance(133700, state="Member", params={"Membership": "Rebel Scum"})
client.users.set_user_at... | 34.363636 | 85 | 0.751323 |
faa67371860dcd471fac2a2528918c7e01792d0f | 2,192 | py | Python | fund/fund_annouce.py | cogitate3/stock | bba986cbbb17de9f424c3b5417a17d1bb1204403 | [
"BSD-3-Clause"
] | 3,401 | 2016-05-20T02:49:18.000Z | 2022-03-31T07:02:05.000Z | fund/fund_annouce.py | sulongniao/stock | bba986cbbb17de9f424c3b5417a17d1bb1204403 | [
"BSD-3-Clause"
] | 23 | 2017-06-09T14:18:57.000Z | 2022-01-07T10:38:57.000Z | fund/fund_annouce.py | sulongniao/stock | bba986cbbb17de9f424c3b5417a17d1bb1204403 | [
"BSD-3-Clause"
] | 947 | 2016-08-23T14:51:46.000Z | 2022-03-31T07:02:10.000Z | # -*- coding: utf-8 -*-
# @Time : 2021/3/19 0:04
# @File : fund_annouce.py
# @Author : Rocky C@www.30daydo.com
# 基金公告数据
# http://fund.szse.cn/api/disc/info/find/tannInfo?random=0.5044519418668192&type=2&pageSize=30&pageNum=3
import datetime
import math
import sys
sys.path.append('..')
from common.BaseService import B... | 31.768116 | 142 | 0.604015 |
2619bbbbf7135369dc0cd5b0d887051197e14377 | 13,988 | py | Python | data/KVR/read_data_for_tree.py | ElliottYan/KB-Chat | ed39d0c95756008668a8a3901a9ed0db827c32d1 | [
"MIT"
] | 1 | 2019-03-10T15:29:18.000Z | 2019-03-10T15:29:18.000Z | data/KVR/read_data_for_tree.py | ElliottYan/KB-Chat | ed39d0c95756008668a8a3901a9ed0db827c32d1 | [
"MIT"
] | null | null | null | data/KVR/read_data_for_tree.py | ElliottYan/KB-Chat | ed39d0c95756008668a8a3901a9ed0db827c32d1 | [
"MIT"
] | null | null | null | import json
from nltk import wordpunct_tokenize as tokenizer
import argparse
import pickle
import os
import pdb
from utils.structure import Node
def entity_replace(temp, bot, user, names={}):
# change poi, location, event first
global_rp = {
"pf changs": "p_.f_._changs",
"p f changs": "p_.f_._... | 43.576324 | 120 | 0.44145 |
e0345f1d617ab5278b7e3a63063d9400f9a8d94f | 9,496 | py | Python | sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_12_01/operations/_peer_express_route_circuit_connections_operations.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 2,728 | 2015-01-09T10:19:32.000Z | 2022-03-31T14:50:33.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_12_01/operations/_peer_express_route_circuit_connections_operations.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 17,773 | 2015-01-05T15:57:17.000Z | 2022-03-31T23:50:25.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_12_01/operations/_peer_express_route_circuit_connections_operations.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 1,916 | 2015-01-19T05:05:41.000Z | 2022-03-31T19:36:44.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 may ... | 48.697436 | 231 | 0.66944 |
39c7f8ad0294fa4c72edb9952280d7b5b39f2c99 | 1,476 | py | Python | tests/beem/test_notify.py | MWFIAE/beem | 8447150a15b6908dc89e075cbe79a6be1dabd95b | [
"MIT"
] | null | null | null | tests/beem/test_notify.py | MWFIAE/beem | 8447150a15b6908dc89e075cbe79a6be1dabd95b | [
"MIT"
] | null | null | null | tests/beem/test_notify.py | MWFIAE/beem | 8447150a15b6908dc89e075cbe79a6be1dabd95b | [
"MIT"
] | null | null | null | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from builtins import range
from builtins import super
import mock
import string
import unittest
import random
import itertools
from pprint import pprint
from beem import S... | 26.357143 | 119 | 0.697832 |
26eebe9b495a22ab9c0c449e611b2e161804a290 | 1,153 | py | Python | generateEntities.py | greablezzq/CRL_Environment | 9be54be37f253fe7a08b956a12bc6319f95e8de4 | [
"MIT"
] | null | null | null | generateEntities.py | greablezzq/CRL_Environment | 9be54be37f253fe7a08b956a12bc6319f95e8de4 | [
"MIT"
] | null | null | null | generateEntities.py | greablezzq/CRL_Environment | 9be54be37f253fe7a08b956a12bc6319f95e8de4 | [
"MIT"
] | null | null | null | from typing import Dict
import random
from past.utils import old_div
def generateEntity(x,y,z,type):
return '<DrawEntity x="{0[0]}" y="{0[1]}" z="{0[2]}" type="{0[3]}" />'.format([x,y,z,type])
def generateEntities(xRange,y,zRange, typesDictionary:Dict):
entitiesString = []
space = [[i,j] for i in xRange f... | 41.178571 | 96 | 0.66869 |
bdcd4089529c8b0d6c301507c16846281f3eecf8 | 6,840 | py | Python | lib/rucio/daemons/judge/cleaner.py | brianv0/rucio | 127a36fd53e5b4d9eb14ab02fe6c36443d78bfd0 | [
"Apache-2.0"
] | null | null | null | lib/rucio/daemons/judge/cleaner.py | brianv0/rucio | 127a36fd53e5b4d9eb14ab02fe6c36443d78bfd0 | [
"Apache-2.0"
] | null | null | null | lib/rucio/daemons/judge/cleaner.py | brianv0/rucio | 127a36fd53e5b4d9eb14ab02fe6c36443d78bfd0 | [
"Apache-2.0"
] | null | null | null | # Copyright European Organization for Nuclear Research (CERN)
#
# 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
#
# Authors:
# - Martin Barisits, <mar... | 42.484472 | 178 | 0.605848 |
77c338d5cbfcb434722852755bfc109d2698c229 | 332 | py | Python | Code/grace/__init__.py | AndreasMadsen/grace | bf472d30a2fac76145d3f68e819c92da4a1970ba | [
"MIT"
] | 1 | 2016-05-17T22:52:19.000Z | 2016-05-17T22:52:19.000Z | Code/grace/__init__.py | AndreasMadsen/grace | bf472d30a2fac76145d3f68e819c92da4a1970ba | [
"MIT"
] | null | null | null | Code/grace/__init__.py | AndreasMadsen/grace | bf472d30a2fac76145d3f68e819c92da4a1970ba | [
"MIT"
] | null | null | null |
# Configureation file for the module allows `import grace`. Grace will then
# contain the dataset as (grace.grids, grace.dates, grace.positions)
# Automaticly build datafiles if they don't exists
import build
build.autobuild()
# Load datafiles
from load import grids, dates, positions
__all__ = ["grids", "dates", "p... | 23.714286 | 75 | 0.756024 |
7a96fedc89b32c7081a6b45fd82fb13380f736b4 | 74,125 | py | Python | tensorflow/python/training/tracking/util_test.py | joshz123/tensorflow | 7841ca029060ab78e221e757d4b1ee6e3e0ffaa4 | [
"Apache-2.0"
] | 8 | 2020-07-29T18:50:45.000Z | 2021-07-25T07:06:43.000Z | tensorflow/python/training/tracking/util_test.py | joshz123/tensorflow | 7841ca029060ab78e221e757d4b1ee6e3e0ffaa4 | [
"Apache-2.0"
] | 203 | 2019-06-14T23:53:10.000Z | 2022-02-10T02:27:23.000Z | tensorflow/python/training/tracking/util_test.py | joshz123/tensorflow | 7841ca029060ab78e221e757d4b1ee6e3e0ffaa4 | [
"Apache-2.0"
] | 11 | 2020-05-31T13:14:56.000Z | 2021-12-14T04:39:25.000Z | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 43.322618 | 80 | 0.709046 |
84032250d1dc0d8b43527391368b2ca3ad6df970 | 6,987 | py | Python | lark/parsers/lalr_parser.py | plannigan/lark | 5662083377866ac07b40b7598ce85d9861ccf68c | [
"MIT"
] | 2,653 | 2018-04-24T07:29:58.000Z | 2022-03-31T03:17:56.000Z | lark/parsers/lalr_parser.py | plannigan/lark | 5662083377866ac07b40b7598ce85d9861ccf68c | [
"MIT"
] | 900 | 2018-04-24T00:08:42.000Z | 2022-03-31T20:30:55.000Z | lark/parsers/lalr_parser.py | plannigan/lark | 5662083377866ac07b40b7598ce85d9861ccf68c | [
"MIT"
] | 356 | 2018-04-25T22:46:05.000Z | 2022-03-31T08:39:37.000Z | """This module implements a LALR(1) Parser
"""
# Author: Erez Shinan (2017)
# Email : erezshin@gmail.com
from copy import deepcopy, copy
from ..exceptions import UnexpectedInput, UnexpectedToken
from ..lexer import Token
from ..utils import Serialize
from .lalr_analysis import LALR_Analyzer, Shift, Reduce, IntParseTab... | 34.761194 | 106 | 0.584657 |
7c989d394e31ee02ee8126830cce17880ecb2194 | 10,275 | py | Python | librosa/core/pitch.py | SleezusJ/librosa | 0ac24ab2894f925cfa3155789304850543e58949 | [
"ISC"
] | null | null | null | librosa/core/pitch.py | SleezusJ/librosa | 0ac24ab2894f925cfa3155789304850543e58949 | [
"ISC"
] | null | null | null | librosa/core/pitch.py | SleezusJ/librosa | 0ac24ab2894f925cfa3155789304850543e58949 | [
"ISC"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Pitch-tracking and tuning estimation"""
import warnings
import numpy as np
from .spectrum import _spectrogram
from . import time_frequency
from .._cache import cache
from .. import util
__all__ = ["estimate_tuning", "pitch_tuning", "piptrack"]
def estimate_tuning(
... | 28.701117 | 87 | 0.615961 |
06299ca6092ae34fa30eae51cacfad16287d3278 | 113 | py | Python | events/admin.py | anurag0singh/Jagrati | d4487e08368da38cf53a77dc1303ea8841c71ba9 | [
"MIT"
] | null | null | null | events/admin.py | anurag0singh/Jagrati | d4487e08368da38cf53a77dc1303ea8841c71ba9 | [
"MIT"
] | null | null | null | events/admin.py | anurag0singh/Jagrati | d4487e08368da38cf53a77dc1303ea8841c71ba9 | [
"MIT"
] | null | null | null | from django.contrib import admin
# Register your models here.
from .models import *
admin.site.register(events) | 18.833333 | 32 | 0.787611 |
a23957a7c721819d3df0d1e6ee1e1afcbc307248 | 169 | py | Python | mollie_oscar/urls.py | fourdigits/django-oscar-mollie | 1d182bf1bcfc6378511b4315c5b2dcb8f42e94a8 | [
"BSD-2-Clause"
] | null | null | null | mollie_oscar/urls.py | fourdigits/django-oscar-mollie | 1d182bf1bcfc6378511b4315c5b2dcb8f42e94a8 | [
"BSD-2-Clause"
] | null | null | null | mollie_oscar/urls.py | fourdigits/django-oscar-mollie | 1d182bf1bcfc6378511b4315c5b2dcb8f42e94a8 | [
"BSD-2-Clause"
] | null | null | null | from django.conf.urls import url
from . import views
app_name = "mollie_oscar"
urlpatterns = [
url(r'^webhook/', views.WebhookView.as_view(), name='webhook'),
]
| 15.363636 | 67 | 0.698225 |
aa578285ef931b74bced5aa21e5561a330755710 | 69 | py | Python | modules/python-codes/modules/variables/04-complex.py | drigols/Studies | 9c293156935b491ded24be6b511daac67fd43538 | [
"MIT"
] | 1 | 2020-09-06T22:17:19.000Z | 2020-09-06T22:17:19.000Z | modules/python-codes/modules/variables/04-complex.py | drigols/Studies | 9c293156935b491ded24be6b511daac67fd43538 | [
"MIT"
] | null | null | null | modules/python-codes/modules/variables/04-complex.py | drigols/Studies | 9c293156935b491ded24be6b511daac67fd43538 | [
"MIT"
] | null | null | null | # Complex
cmplex = 2 + 3j
print(cmplex)
print(type(cmplex))
print()
| 9.857143 | 19 | 0.681159 |
cbb026923ec0dff98d77eba22b728fd35917ca25 | 15,437 | py | Python | sockeye/decoder.py | annacurrey/sockeye | 429f8478b29d7d28d5bb22dcebd080531f7e6f4e | [
"Apache-2.0"
] | 1 | 2020-08-12T18:02:59.000Z | 2020-08-12T18:02:59.000Z | sockeye/decoder.py | barbaradarques/sockeye | 92a020a25cbe75935c700ce2f29b286b31a87189 | [
"Apache-2.0"
] | null | null | null | sockeye/decoder.py | barbaradarques/sockeye | 92a020a25cbe75935c700ce2f29b286b31a87189 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017--2019 Amazon.com, Inc. or its affiliates. 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. A copy of the License
# is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" fi... | 46.496988 | 132 | 0.624862 |
96e2f15f08759487beb7568cc5c2f9717e4d7201 | 141,747 | py | Python | datalad/support/gitrepo.py | emdupre/datalad | 9dce81cb4d3c004150571bb7d9fbddcd8338eba2 | [
"MIT"
] | null | null | null | datalad/support/gitrepo.py | emdupre/datalad | 9dce81cb4d3c004150571bb7d9fbddcd8338eba2 | [
"MIT"
] | null | null | null | datalad/support/gitrepo.py | emdupre/datalad | 9dce81cb4d3c004150571bb7d9fbddcd8338eba2 | [
"MIT"
] | null | null | null | # emacs: -*- mode: python; py-indent-offset: 4; tab-width: 4; indent-tabs-mode: nil -*-
# ex: set sts=4 ts=4 sw=4 noet:
# ## ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ##
#
# See COPYING file distributed along with the datalad package for the
# copyright and license terms.
#
# ## ### ##... | 38.341087 | 103 | 0.556357 |
8882a9417ba4e01fb2269a4a038d16c1476e6e82 | 2,166 | py | Python | src/main.py | shubhamgoel27/satellite-image-downloader | 05c21b45f19c43ad9c9f20d589dc4f01178b3ce0 | [
"Apache-2.0"
] | 2 | 2021-02-14T10:27:59.000Z | 2021-10-29T18:51:34.000Z | src/main.py | shubhamgoel27/satellite-image-downloader | 05c21b45f19c43ad9c9f20d589dc4f01178b3ce0 | [
"Apache-2.0"
] | 3 | 2021-06-08T21:41:01.000Z | 2022-01-13T02:48:30.000Z | src/main.py | shubhamgoel27/satellite-image-downloader | 05c21b45f19c43ad9c9f20d589dc4f01178b3ce0 | [
"Apache-2.0"
] | 2 | 2020-06-05T14:54:48.000Z | 2021-12-22T16:35:56.000Z | import os
os.environ['TF_CPP_MIN_LOG_LEVEL']='3'
import argparse
from SatMaps.Maps import Maps
from utils.utils import setup_logger
from distutils.dir_util import mkpath
def parse_args():
"""Evaluation options for SatMaps download tool"""
parser = argparse.ArgumentParser(description='Satellite Map Generator')
... | 52.829268 | 139 | 0.695291 |
a48ac74e887a13f618641f24a44110811697daf6 | 1,874 | py | Python | examples/example_mcmc_fit_script.py | jtschindler/sculptor | 67b7ebfb05ee8ec9d00399c6d80c238d2104eebc | [
"BSD-3-Clause"
] | 7 | 2021-01-25T16:45:57.000Z | 2022-03-31T11:53:23.000Z | examples/example_mcmc_fit_script.py | jtschindler/sculptor | 67b7ebfb05ee8ec9d00399c6d80c238d2104eebc | [
"BSD-3-Clause"
] | 1 | 2022-03-31T15:41:33.000Z | 2022-03-31T15:41:33.000Z | examples/example_mcmc_fit_script.py | jtschindler/sculptor | 67b7ebfb05ee8ec9d00399c6d80c238d2104eebc | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
import corner
import matplotlib.pyplot as plt
from astropy.cosmology import FlatLambdaCDM
from lmfit import Model, Parameters, fit_report
from sculptor import specfit as scfit
def example_fit_mcmc():
"""Fitting the Sculptor example spectrum CIV line using MCMC
:return:
"""
# ... | 30.225806 | 74 | 0.653682 |
6d61594a470e6b89d12e49d206d5225e8ebb07e0 | 6,702 | py | Python | closed/Alibaba/code/resnet/tfcpp/quantize/converter.py | EldritchJS/inference_results_v0.5 | 5552490e184d9fc342d871fcc410ac423ea49053 | [
"Apache-2.0"
] | null | null | null | closed/Alibaba/code/resnet/tfcpp/quantize/converter.py | EldritchJS/inference_results_v0.5 | 5552490e184d9fc342d871fcc410ac423ea49053 | [
"Apache-2.0"
] | null | null | null | closed/Alibaba/code/resnet/tfcpp/quantize/converter.py | EldritchJS/inference_results_v0.5 | 5552490e184d9fc342d871fcc410ac423ea49053 | [
"Apache-2.0"
] | 1 | 2019-12-05T18:53:17.000Z | 2019-12-05T18:53:17.000Z | # Copyright 2019 The MLPerf 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 ... | 36.032258 | 211 | 0.643987 |
5837ed185ccacaffd048c92b68766206b4d3165a | 32,965 | py | Python | now_lms/__init__.py | bmosoluciones/now-lms | 102c00f32ac63f80e428906a8f492e5ff6d4769e | [
"Apache-2.0"
] | null | null | null | now_lms/__init__.py | bmosoluciones/now-lms | 102c00f32ac63f80e428906a8f492e5ff6d4769e | [
"Apache-2.0"
] | 9 | 2021-10-30T15:32:00.000Z | 2022-03-27T23:26:28.000Z | now_lms/__init__.py | bmosoluciones/now-lms | 102c00f32ac63f80e428906a8f492e5ff6d4769e | [
"Apache-2.0"
] | 1 | 2021-10-17T22:33:03.000Z | 2021-10-17T22:33:03.000Z | # Copyright 2021 BMO Soluciones, S.A.
#
# 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... | 36.791295 | 127 | 0.666859 |
e1cb7acab81d706eb3e3c33a350c94b56c0ff899 | 8,879 | py | Python | scipy/constants/constants.py | seberg/scipy | d8081cdd40ed8cbebd5905c0ad6c323c57d5da6e | [
"BSD-3-Clause"
] | 2 | 2015-10-30T10:04:46.000Z | 2017-03-11T00:58:21.000Z | scipy/constants/constants.py | seberg/scipy | d8081cdd40ed8cbebd5905c0ad6c323c57d5da6e | [
"BSD-3-Clause"
] | null | null | null | scipy/constants/constants.py | seberg/scipy | d8081cdd40ed8cbebd5905c0ad6c323c57d5da6e | [
"BSD-3-Clause"
] | null | null | null | """
Collection of physical constants and conversion factors.
Most constants are in SI units, so you can do
print '10 mile per minute is', 10*mile/minute, 'm/s or', 10*mile/(minute*knot), 'knots'
The list is not meant to be comprehensive, but just a convenient list for everyday use.
"""
"""
BasSw 2006
physical consta... | 22.253133 | 91 | 0.628562 |
984973de3680969d21de7daf893405ea2914817e | 1,971 | py | Python | Python3/745.py | rakhi2001/ecom7 | 73790d44605fbd51e8f7e804b9808e364fcfc680 | [
"MIT"
] | 854 | 2018-11-09T08:06:16.000Z | 2022-03-31T06:05:53.000Z | Python3/745.py | rakhi2001/ecom7 | 73790d44605fbd51e8f7e804b9808e364fcfc680 | [
"MIT"
] | 29 | 2019-06-02T05:02:25.000Z | 2021-11-15T04:09:37.000Z | Python3/745.py | rakhi2001/ecom7 | 73790d44605fbd51e8f7e804b9808e364fcfc680 | [
"MIT"
] | 347 | 2018-12-23T01:57:37.000Z | 2022-03-12T14:51:21.000Z | __________________________________________________________________________________________________
sample 716 ms submission
class WordFilter:
def __init__(self, words):
from collections import defaultdict
self.prefixes = defaultdict(set)
self.suffixes = defaultdict(set)
self.weights ... | 36.5 | 98 | 0.591578 |
2b4c9f9014c2ed80a8f51f2e884d312bec02ba67 | 10,737 | py | Python | contrib/devtools/update-translations.py | SparkBaseHub/SparkToken | d5c560c8750fee02e6551e6b8254b6b3ebe3c6c2 | [
"MIT"
] | 2 | 2018-11-01T20:51:47.000Z | 2018-11-03T03:32:11.000Z | contrib/devtools/update-translations.py | SparkBaseHub/SparkToken | d5c560c8750fee02e6551e6b8254b6b3ebe3c6c2 | [
"MIT"
] | null | null | null | contrib/devtools/update-translations.py | SparkBaseHub/SparkToken | d5c560c8750fee02e6551e6b8254b6b3ebe3c6c2 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2014 Wladimir J. van der Laan
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
'''
Run this script from the root of the repository to update all translations from
transifex.
It will do the foll... | 39.474265 | 154 | 0.632486 |
07d41e6dc8abb01474724b30ca742e51c0f85d15 | 1,073 | py | Python | Assignment 01 - Python Basics/problem3.py | lmottasin/Simulation_Lab | e3b365f7bb7f6ac4b542f2c6bd721e4a77c056ea | [
"MIT"
] | 2 | 2021-07-13T04:44:47.000Z | 2022-01-17T20:21:11.000Z | Assignment 01 - Python Basics/problem3.py | lmottasin/Simulation_Lab | e3b365f7bb7f6ac4b542f2c6bd721e4a77c056ea | [
"MIT"
] | null | null | null | Assignment 01 - Python Basics/problem3.py | lmottasin/Simulation_Lab | e3b365f7bb7f6ac4b542f2c6bd721e4a77c056ea | [
"MIT"
] | 3 | 2021-06-30T11:16:27.000Z | 2022-03-11T18:32:46.000Z | #!/usr/bin/env python
# coding: utf-8
# In[70]:
import pandas as pd
import matplotlib.pyplot as plt
#Load the CSV into a DataFrame
data = pd.read_csv("SalesData.csv")
# scatter plot
#plt.subplot(2, 1, 1)
#fig size
plt.figure(figsize=(8,5))
#title
plt.title("Scatter Plot")
#plotting the points
plt.scatter(dat... | 15.779412 | 49 | 0.675676 |
7612ec494254e959c8965f7fb21f5da8915934f6 | 41,334 | py | Python | readthedocs/rtd_tests/tests/test_sync_versions.py | chirathr/readthedocs.org | 4f1a5dc07fd9d55d4284fdb22deae735932b2ec9 | [
"MIT"
] | 1 | 2021-11-20T11:38:26.000Z | 2021-11-20T11:38:26.000Z | readthedocs/rtd_tests/tests/test_sync_versions.py | chirathr/readthedocs.org | 4f1a5dc07fd9d55d4284fdb22deae735932b2ec9 | [
"MIT"
] | 4 | 2021-02-08T21:06:18.000Z | 2021-06-10T23:24:55.000Z | readthedocs/rtd_tests/tests/test_sync_versions.py | chirathr/readthedocs.org | 4f1a5dc07fd9d55d4284fdb22deae735932b2ec9 | [
"MIT"
] | 1 | 2018-10-12T22:15:39.000Z | 2018-10-12T22:15:39.000Z | # -*- coding: utf-8 -*-
from __future__ import (
absolute_import, division, print_function, unicode_literals)
import json
from django.test import TestCase
from django.core.urlresolvers import reverse
import pytest
from readthedocs.builds.constants import BRANCH, STABLE, TAG
from readthedocs.builds.models import... | 32.21668 | 89 | 0.508105 |
4f6dbc83b16890ce3d7c9e0b420c13bcd536e4de | 3,625 | py | Python | PaperExperiments/XHExp207/parameters.py | stefan-c-kremer/TE_World2 | 8e1fae218af8a1eabae776deecac62192c22e0ca | [
"MIT"
] | null | null | null | PaperExperiments/XHExp207/parameters.py | stefan-c-kremer/TE_World2 | 8e1fae218af8a1eabae776deecac62192c22e0ca | [
"MIT"
] | null | null | null | PaperExperiments/XHExp207/parameters.py | stefan-c-kremer/TE_World2 | 8e1fae218af8a1eabae776deecac62192c22e0ca | [
"MIT"
] | null | null | null |
# parameters.py
"""
Exp 207 - {'Initial_genes': '5000', 'Host_mutation_rate': '0.30', 'TE_progeny': '0.00, 0, 0.55, 1, 0.30, 2, 0.15, 3', 'TE_Insertion_Distribution': 'Flat()', 'Carrying_capacity': '300', 'TE_excision_rate': '0.5', 'Junk_BP': '1.4', 'Gene_Insertion_Distribution': 'Flat()', 'mutation_effect': '0.01', '... | 37.760417 | 324 | 0.647448 |
33297b55761feecf298920a8ed3463af51b869b3 | 1,151 | py | Python | incasem/gunpowder/merge_masks.py | kirchhausenlab/incasem | ee9e007c5c04571e547e2fb5af5e800bd2d2b435 | [
"BSD-3-Clause"
] | null | null | null | incasem/gunpowder/merge_masks.py | kirchhausenlab/incasem | ee9e007c5c04571e547e2fb5af5e800bd2d2b435 | [
"BSD-3-Clause"
] | null | null | null | incasem/gunpowder/merge_masks.py | kirchhausenlab/incasem | ee9e007c5c04571e547e2fb5af5e800bd2d2b435 | [
"BSD-3-Clause"
] | null | null | null | from typing import List
import numpy as np
import gunpowder as gp
class MergeMasks(gp.BatchFilter):
def __init__(
self,
arrays: List[gp.ArrayKey],
output_array: gp.ArrayKey):
"""Merge multiple binary masks with a logical and
Args:
arrays: list of bi... | 25.021739 | 68 | 0.594266 |
1508cad526d8e3a05a55f990970c3eabfb0a77ab | 1,398 | py | Python | tests/utils/test_run_async.py | Alirezaja1384/tortoise-orm | e7ecbc81d43860a3b0b6d5d9da27497ed6234049 | [
"Apache-2.0"
] | 33 | 2018-04-07T09:50:22.000Z | 2018-08-24T10:25:29.000Z | tests/utils/test_run_async.py | Alirezaja1384/tortoise-orm | e7ecbc81d43860a3b0b6d5d9da27497ed6234049 | [
"Apache-2.0"
] | 41 | 2018-03-29T17:09:18.000Z | 2018-08-24T16:37:38.000Z | tests/utils/test_run_async.py | Alirezaja1384/tortoise-orm | e7ecbc81d43860a3b0b6d5d9da27497ed6234049 | [
"Apache-2.0"
] | 4 | 2018-06-27T08:45:11.000Z | 2018-07-30T18:16:55.000Z | import os
from unittest import skipIf
from tortoise import Tortoise, connections, run_async
from tortoise.contrib.test import TestCase
@skipIf(os.name == "nt", "stuck with Windows")
class TestRunAsync(TestCase):
async def asyncSetUp(self) -> None:
pass
async def asyncTearDown(self) -> None:
... | 31.772727 | 79 | 0.655222 |
334e737bdb1ff24dce4e4f458bcfa03610bafb83 | 6,349 | py | Python | moto/glacier/responses.py | symroe/moto | 4e106995af6f2820273528fca8a4e9ee288690a5 | [
"Apache-2.0"
] | null | null | null | moto/glacier/responses.py | symroe/moto | 4e106995af6f2820273528fca8a4e9ee288690a5 | [
"Apache-2.0"
] | 1 | 2022-03-07T07:39:03.000Z | 2022-03-07T07:39:03.000Z | moto/glacier/responses.py | symroe/moto | 4e106995af6f2820273528fca8a4e9ee288690a5 | [
"Apache-2.0"
] | null | null | null | import json
from moto.core.responses import BaseResponse
from .models import glacier_backends
from .utils import vault_from_glacier_url
class GlacierResponse(BaseResponse):
@property
def glacier_backend(self):
return glacier_backends[self.region]
def all_vault_response(self, request, full_url, h... | 38.713415 | 83 | 0.630966 |
b785813a9aab9e2dc337b5b53e89a871a4ff34ad | 2,547 | py | Python | examples/dfp/v201411/suggested_ad_unit_service/approve_all_suggested_ad_units.py | cmm08/googleads-python-lib | 97743df32eff92cf00cb8beaddcda42dfa0a37f4 | [
"Apache-2.0"
] | 1 | 2018-09-06T18:50:58.000Z | 2018-09-06T18:50:58.000Z | examples/dfp/v201411/suggested_ad_unit_service/approve_all_suggested_ad_units.py | cmm08/googleads-python-lib | 97743df32eff92cf00cb8beaddcda42dfa0a37f4 | [
"Apache-2.0"
] | null | null | null | examples/dfp/v201411/suggested_ad_unit_service/approve_all_suggested_ad_units.py | cmm08/googleads-python-lib | 97743df32eff92cf00cb8beaddcda42dfa0a37f4 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
#
# Copyright 2014 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required b... | 32.240506 | 80 | 0.698076 |
eab3c48fe3187d1064f781a68228840d686d1dca | 1,322 | py | Python | open_bus_siri_requester/health_daemon.py | hasadna/open-bus-siri-requester | 4c1fa315eec54a5340b9334de0ebff28a3ddea3e | [
"MIT"
] | null | null | null | open_bus_siri_requester/health_daemon.py | hasadna/open-bus-siri-requester | 4c1fa315eec54a5340b9334de0ebff28a3ddea3e | [
"MIT"
] | 1 | 2022-02-08T15:08:46.000Z | 2022-02-09T13:24:33.000Z | open_bus_siri_requester/health_daemon.py | hasadna/open-bus-siri-requester | 4c1fa315eec54a5340b9334de0ebff28a3ddea3e | [
"MIT"
] | null | null | null | from http.server import ThreadingHTTPServer
from http.server import BaseHTTPRequestHandler
from . import config
from . import storage
class HealthDaemonHTTPRequestHandler(BaseHTTPRequestHandler):
def _send_ok(self, msg='OK'):
self.send_response(200)
self.send_header("Content-type", "application/... | 33.897436 | 124 | 0.717852 |
b7136b7d2c69e94485568e4bbba78e187cb3294b | 5,265 | py | Python | hill2.py | Ziggareto/national_cipher_challenge | afac5a4b3c31ec78e6c8ef211ba9dd664a4070f7 | [
"MIT"
] | null | null | null | hill2.py | Ziggareto/national_cipher_challenge | afac5a4b3c31ec78e6c8ef211ba9dd664a4070f7 | [
"MIT"
] | null | null | null | hill2.py | Ziggareto/national_cipher_challenge | afac5a4b3c31ec78e6c8ef211ba9dd664a4070f7 | [
"MIT"
] | null | null | null | #hill2
import basics
import genetic_algorithm as ga
import math
import numpy as np
import random
""" Hill Cipher - uses a matrix as a key, and splits text into small chunks
[1, 2, 3] ['a'][1] [14] ['n']
[4, 5, 6] ['b'][2] = [32] mod(26) = ['f']
[7, 8, 9] ['c'][3] [5... | 32.103659 | 110 | 0.576068 |
65b6f3454d483db1b9e007039aafb9d0b3b155b2 | 1,550 | py | Python | src/utils/UtilsDecorators.py | Gabvaztor/tensorflowCode | e206ea4544552b87c2d43274cea3182f6b385a87 | [
"Apache-2.0"
] | 4 | 2019-12-14T08:06:18.000Z | 2020-09-12T10:09:31.000Z | src/utils/UtilsDecorators.py | Gabvaztor/tensorflowCode | e206ea4544552b87c2d43274cea3182f6b385a87 | [
"Apache-2.0"
] | null | null | null | src/utils/UtilsDecorators.py | Gabvaztor/tensorflowCode | e206ea4544552b87c2d43274cea3182f6b385a87 | [
"Apache-2.0"
] | 2 | 2020-09-12T10:10:07.000Z | 2021-09-15T11:58:37.000Z | """
To manage Errors
"""
import logging
def logger():
"""
Creates a logging object and returns it
"""
logger = logging.getLogger("example_logger")
logger.setLevel(logging.INFO)
# create the logging file handler
fh = logging.FileHandler(r"/path/to/test.log")
fmt = '%(asctime)s - %(nam... | 26.271186 | 83 | 0.582581 |
fb275daf0b33717026cc90c37243e29d2aa198c3 | 633 | py | Python | generators/skip_first.py | CodyKochmann/generators | a637bf9cb5e48251aa800753ba0aa79b3ca18dcf | [
"MIT"
] | 6 | 2017-12-21T04:32:35.000Z | 2022-02-15T07:06:45.000Z | generators/skip_first.py | CodyKochmann/generators | a637bf9cb5e48251aa800753ba0aa79b3ca18dcf | [
"MIT"
] | 21 | 2017-09-08T13:02:18.000Z | 2020-03-28T19:10:01.000Z | generators/skip_first.py | CodyKochmann/generators | a637bf9cb5e48251aa800753ba0aa79b3ca18dcf | [
"MIT"
] | 2 | 2018-09-30T16:16:10.000Z | 2019-05-06T02:16:11.000Z | # -*- coding: utf-8 -*-
# @Author: Cody Kochmann
# @Date: 2018-02-17 10:42:15
# @Last Modified by: Cody Kochmann
# @Last Modified time: 2018-02-17 12:02:24
from .skip import skip
def skip_first(pipe, items=1):
''' this is an alias for skip to parallel the dedicated skip_last function
to provide a litt... | 27.521739 | 80 | 0.64139 |
39cedbe14b7715f4709ca8efcfac99d1ef86d3c3 | 11,772 | py | Python | sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_03_01/aio/_network_management_client_async.py | LianwMS/azure-sdk-for-python | 612d7bca9de86ee1bd1fa59291d7bf897ba9213f | [
"MIT"
] | 2 | 2019-05-17T21:24:53.000Z | 2020-02-12T11:13:42.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_03_01/aio/_network_management_client_async.py | LianwMS/azure-sdk-for-python | 612d7bca9de86ee1bd1fa59291d7bf897ba9213f | [
"MIT"
] | 15 | 2019-07-12T18:18:04.000Z | 2019-07-25T20:55:51.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_03_01/aio/_network_management_client_async.py | LianwMS/azure-sdk-for-python | 612d7bca9de86ee1bd1fa59291d7bf897ba9213f | [
"MIT"
] | 2 | 2020-05-21T22:51:22.000Z | 2020-05-26T20:53:01.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 may ... | 65.4 | 180 | 0.797316 |
1e36a1fe1b7b56dc2324075659ea2b63af794882 | 35,061 | py | Python | py_trees/blackboard.py | fjulian/py_trees | 63fffdfb581f390546c375f13d064b10fdace786 | [
"BSD-3-Clause"
] | null | null | null | py_trees/blackboard.py | fjulian/py_trees | 63fffdfb581f390546c375f13d064b10fdace786 | [
"BSD-3-Clause"
] | null | null | null | py_trees/blackboard.py | fjulian/py_trees | 63fffdfb581f390546c375f13d064b10fdace786 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# License: BSD
# https://raw.githubusercontent.com/splintered-reality/py_trees/devel/LICENSE
#
##############################################################################
# Documentation
##############################################################################
... | 38.109783 | 168 | 0.609823 |
7436fba3286534bf59a40571433f71e1782e5e42 | 951 | py | Python | AnalyticsVidhya/AmExpert2021/bhaTrain1.py | BharathC15/bharathML | ab0460eace3bc83a6b9a7ba7c40e9721baead09a | [
"MIT"
] | null | null | null | AnalyticsVidhya/AmExpert2021/bhaTrain1.py | BharathC15/bharathML | ab0460eace3bc83a6b9a7ba7c40e9721baead09a | [
"MIT"
] | null | null | null | AnalyticsVidhya/AmExpert2021/bhaTrain1.py | BharathC15/bharathML | ab0460eace3bc83a6b9a7ba7c40e9721baead09a | [
"MIT"
] | null | null | null | # on XGBoosting [Not working]
import numpy as np
import pandas as pd
from sklearn import metrics
from sklearn.model_selection import train_test_split
import xgboost as xgb
if __name__=='__main__':
print('Starting the Program')
df = pd.read_csv('trainData.csv')
print(df.head())
print(df.info())
# ... | 28.818182 | 86 | 0.722397 |
2c95dd2bd5bc65d7dfea362155f92d527594014b | 10,377 | py | Python | pointnet2_ops_lib/pointnet2_ops/pointnet2_utils.py | liruiw/Pointnet2_PyTorch | e803915c929b3b69bafe4c07e1f2c322e7a20aae | [
"Unlicense"
] | null | null | null | pointnet2_ops_lib/pointnet2_ops/pointnet2_utils.py | liruiw/Pointnet2_PyTorch | e803915c929b3b69bafe4c07e1f2c322e7a20aae | [
"Unlicense"
] | null | null | null | pointnet2_ops_lib/pointnet2_ops/pointnet2_utils.py | liruiw/Pointnet2_PyTorch | e803915c929b3b69bafe4c07e1f2c322e7a20aae | [
"Unlicense"
] | 1 | 2021-01-07T03:15:04.000Z | 2021-01-07T03:15:04.000Z | import torch
import torch.nn as nn
import warnings
from torch.autograd import Function
try:
import pointnet2_ops._ext as _ext
except ImportError:
from torch.utils.cpp_extension import load
import glob
import os.path as osp
import os
warnings.warn("Unable to load pointnet2_ops cpp extension. ... | 27.307895 | 103 | 0.571552 |
a589d8c2054f0126a76102c6f5735a4762a2c530 | 661 | py | Python | commitizen/factory.py | blaggacao/commitizen | a108872bafebd601358b282d0385760b5fca036d | [
"MIT"
] | null | null | null | commitizen/factory.py | blaggacao/commitizen | a108872bafebd601358b282d0385760b5fca036d | [
"MIT"
] | null | null | null | commitizen/factory.py | blaggacao/commitizen | a108872bafebd601358b282d0385760b5fca036d | [
"MIT"
] | null | null | null | from commitizen import BaseCommitizen, out
from commitizen.config import BaseConfig
from commitizen.cz import registry
from commitizen.error_codes import NO_COMMITIZEN_FOUND
def commiter_factory(config: BaseConfig) -> BaseCommitizen:
"""Return the correct commitizen existing in the registry."""
name: str = co... | 31.47619 | 65 | 0.6823 |
7431b7d2acf46186b050a80bf16be78881218d54 | 2,229 | py | Python | sigstore/_internal/set.py | trailofbits/sigstore-python | 1772dba7b416b4537f4d71605ab0ac2cf8491899 | [
"Apache-2.0"
] | 5 | 2022-03-15T18:38:45.000Z | 2022-03-24T20:59:29.000Z | sigstore/_internal/set.py | trailofbits/sigstore-python | 1772dba7b416b4537f4d71605ab0ac2cf8491899 | [
"Apache-2.0"
] | 9 | 2022-03-22T01:55:06.000Z | 2022-03-27T09:21:59.000Z | sigstore/_internal/set.py | trailofbits/sigstore-python | 1772dba7b416b4537f4d71605ab0ac2cf8491899 | [
"Apache-2.0"
] | 1 | 2022-03-21T21:36:17.000Z | 2022-03-21T21:36:17.000Z | # Copyright 2022 The Sigstore 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... | 32.779412 | 92 | 0.750112 |
376bd4205672e05c29d60f03c82229cf96c4eeda | 46,038 | py | Python | ivy/functional/ivy/general.py | VedPatwardhan/ivy | 7b2105fa8cf38879444a1029bfaa7f0b2f27717a | [
"Apache-2.0"
] | null | null | null | ivy/functional/ivy/general.py | VedPatwardhan/ivy | 7b2105fa8cf38879444a1029bfaa7f0b2f27717a | [
"Apache-2.0"
] | null | null | null | ivy/functional/ivy/general.py | VedPatwardhan/ivy | 7b2105fa8cf38879444a1029bfaa7f0b2f27717a | [
"Apache-2.0"
] | null | null | null | """Collection of general Ivy functions."""
# global
import gc
import math
import einops
import inspect
import numpy as np
from numbers import Number
from typing import Callable, Any, Union, List, Tuple, Dict, Iterable, Optional
# local
import ivy
from ivy.functional.ivy.device import dev
from ivy.backend_handler impo... | 24.449283 | 88 | 0.576828 |
9017787151f97b256be69ed090bb5eae68f16749 | 6,320 | py | Python | nova/tests/test_hooks.py | vmthunder/nova | baf05caab705c5778348d9f275dc541747b7c2de | [
"Apache-2.0"
] | 7 | 2015-09-22T11:27:16.000Z | 2015-11-02T12:33:46.000Z | nova/tests/test_hooks.py | vmthunder/nova | baf05caab705c5778348d9f275dc541747b7c2de | [
"Apache-2.0"
] | 9 | 2015-05-20T11:20:17.000Z | 2017-07-27T08:21:33.000Z | nova/tests/test_hooks.py | vmthunder/nova | baf05caab705c5778348d9f275dc541747b7c2de | [
"Apache-2.0"
] | 13 | 2015-05-05T09:34:04.000Z | 2017-11-08T02:03:46.000Z | # Copyright (c) 2012 OpenStack Foundation
# 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 ... | 30.679612 | 78 | 0.65269 |
c81b12b22bcb7e655d8f57ac6b96803b6dfd3b23 | 948 | py | Python | lib/tree.py | Lucas2012/ProbablisticNeuralProgramedNetwork | 56e33dae1ec01580bca267011adf6c45c1fd505d | [
"Apache-2.0"
] | 3 | 2020-07-12T02:15:27.000Z | 2021-07-18T06:00:49.000Z | lib/tree.py | Lucas2012/ProbablisticNeuralProgramedNetwork | 56e33dae1ec01580bca267011adf6c45c1fd505d | [
"Apache-2.0"
] | 1 | 2021-07-18T06:00:10.000Z | 2021-07-24T11:51:17.000Z | lib/tree.py | Lucas2012/ProbablisticNeuralProgramedNetwork | 56e33dae1ec01580bca267011adf6c45c1fd505d | [
"Apache-2.0"
] | null | null | null | # tree object from stanfordnlp/treelstm
class Tree(object):
def __init__(self):
self.parent = None
self.num_children = 0
self.children = list()
def add_child(self, child):
child.parent = self
self.num_children += 1
self.children.append(child)
def size(self):... | 27.882353 | 54 | 0.543249 |
0e4dfe809517ffd0df1d6dbc145fa6e8b583edf1 | 1,008 | py | Python | graph_a2_vs_alpha.py | Thefalas/disksMD | 1f3a0a1814baf1fd8905da2e88d2244de90d14ec | [
"MIT"
] | null | null | null | graph_a2_vs_alpha.py | Thefalas/disksMD | 1f3a0a1814baf1fd8905da2e88d2244de90d14ec | [
"MIT"
] | null | null | null | graph_a2_vs_alpha.py | Thefalas/disksMD | 1f3a0a1814baf1fd8905da2e88d2244de90d14ec | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Mon May 28 19:25:21 2018
@author: malopez
"""
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
data_folder = "C:/Users/malopez/Desktop/disksMD/data"
output_image = './plot.png'
alphas = [0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.75, 0.8, 0.85, 0.9, 0.95]
size_X_in... | 24.585366 | 86 | 0.65377 |
fc13bed2a48225602a9bbbe7473d967a524dfa98 | 1,178 | py | Python | deepgmap/post_train_tools/PCA.py | koonimaru/DeepGMAP | 7daac354229fc25fba81649b741921345dc5db05 | [
"Apache-2.0"
] | 11 | 2018-06-27T11:45:47.000Z | 2021-07-01T15:32:56.000Z | deepgmap/post_train_tools/PCA.py | koonimaru/DeepGMAP | 7daac354229fc25fba81649b741921345dc5db05 | [
"Apache-2.0"
] | 3 | 2020-01-28T21:45:15.000Z | 2020-04-20T02:40:48.000Z | deepgmap/post_train_tools/PCA.py | koonimaru/DeepGMAP | 7daac354229fc25fba81649b741921345dc5db05 | [
"Apache-2.0"
] | 1 | 2018-10-19T19:43:27.000Z | 2018-10-19T19:43:27.000Z | # Authors: Kyle Kastner
# License: BSD 3 clause
import numpy as np
import matplotlib.pyplot as plt
from sklearn.datasets import load_iris
from sklearn.decomposition import PCA, IncrementalPCA
iris = load_iris()
X = iris.data
y = iris.target
#print X.shape
n_components = 2
ipca = IncrementalPCA(n_components=n_compo... | 28.047619 | 75 | 0.662988 |
1f06cc574f69e68730da19fc4a384ccf417369e3 | 42 | py | Python | instapush/version.py | adamwen829/instapush-py | 6b7c186af9671aea94085f18a95946844df63349 | [
"MIT"
] | 21 | 2015-01-12T04:46:01.000Z | 2017-12-19T02:56:20.000Z | instapush/version.py | adamwen829/instapush-py | 6b7c186af9671aea94085f18a95946844df63349 | [
"MIT"
] | 4 | 2015-01-13T11:46:14.000Z | 2021-04-21T01:10:23.000Z | instapush/version.py | adamwen829/instapush-py | 6b7c186af9671aea94085f18a95946844df63349 | [
"MIT"
] | 9 | 2015-03-26T14:50:51.000Z | 2020-02-18T21:36:51.000Z | # -*- coding: utf-8 -*-
VERSION = '0.1.2'
| 14 | 23 | 0.47619 |
f59d40f75338d27845a11075a124001fc7a0346b | 734 | py | Python | src/common/methods/root_separation/segment_tabulation.py | GirZ0n/Methods-of-Computation | 65e0c5c965d80a8f7c3875621460324d208b1934 | [
"Unlicense"
] | 2 | 2021-09-14T07:10:34.000Z | 2021-09-28T21:41:34.000Z | src/common/methods/root_separation/segment_tabulation.py | GirZ0n/Methods-of-Computation | 65e0c5c965d80a8f7c3875621460324d208b1934 | [
"Unlicense"
] | 3 | 2021-09-27T19:21:32.000Z | 2021-09-28T18:46:37.000Z | src/common/methods/root_separation/segment_tabulation.py | GirZ0n/Methods-of-Computation | 65e0c5c965d80a8f7c3875621460324d208b1934 | [
"Unlicense"
] | null | null | null | from typing import Callable, List
from src.common.model.line_segment import LineSegment
from src.common.model.root_separator import RootSeparator
class Tabulator(RootSeparator):
number_of_parts: int
def __init__(self, number_of_parts: int):
self.number_of_parts = number_of_parts
def separate(se... | 29.36 | 87 | 0.69346 |
faeeb68996e7ae910b138fbb2fad26e9d16f2d65 | 4,565 | py | Python | CNN - RNN/Embedding.py | sajR/SAD | 9d4cee51e6f5a85cc8ffe724fe6078ef4a35c782 | [
"MIT"
] | null | null | null | CNN - RNN/Embedding.py | sajR/SAD | 9d4cee51e6f5a85cc8ffe724fe6078ef4a35c782 | [
"MIT"
] | null | null | null | CNN - RNN/Embedding.py | sajR/SAD | 9d4cee51e6f5a85cc8ffe724fe6078ef4a35c782 | [
"MIT"
] | null | null | null | # The code below obtains embeddings/features from existing CNN models.
# Due to a high number of images the pre-processing (getting features from the existing models) can take time and power.
# Thus, the pre-processing is done beforehand whereby features are stored as CSV. Avoids generating features each time a model ... | 53.081395 | 214 | 0.704053 |
ee390e1221183e53ece2275c1e18f40c94651ebf | 500 | py | Python | output/models/nist_data/list_pkg/normalized_string/schema_instance/nistschema_sv_iv_list_normalized_string_length_4_xsd/nistschema_sv_iv_list_normalized_string_length_4.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | 1 | 2021-08-14T17:59:21.000Z | 2021-08-14T17:59:21.000Z | output/models/nist_data/list_pkg/normalized_string/schema_instance/nistschema_sv_iv_list_normalized_string_length_4_xsd/nistschema_sv_iv_list_normalized_string_length_4.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | 4 | 2020-02-12T21:30:44.000Z | 2020-04-15T20:06:46.000Z | output/models/nist_data/list_pkg/normalized_string/schema_instance/nistschema_sv_iv_list_normalized_string_length_4_xsd/nistschema_sv_iv_list_normalized_string_length_4.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | null | null | null | from dataclasses import dataclass, field
from typing import List
__NAMESPACE__ = "NISTSchema-SV-IV-list-normalizedString-length-4-NS"
@dataclass
class NistschemaSvIvListNormalizedStringLength4:
class Meta:
name = "NISTSchema-SV-IV-list-normalizedString-length-4"
namespace = "NISTSchema-SV-IV-list... | 25 | 72 | 0.666 |
29220a4026fef3d918c471e137e490605a18dd2e | 2,294 | py | Python | publish_firmware.py | bpapesh/testTravis | 12ef3d79c279ca5065e2f2aedca2222099917d45 | [
"Apache-2.0"
] | null | null | null | publish_firmware.py | bpapesh/testTravis | 12ef3d79c279ca5065e2f2aedca2222099917d45 | [
"Apache-2.0"
] | null | null | null | publish_firmware.py | bpapesh/testTravis | 12ef3d79c279ca5065e2f2aedca2222099917d45 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2014-present PlatformIO <contact@platformio.org>
#
# 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 ... | 33.246377 | 80 | 0.637751 |
2e5355211f6cdb22e4aebc41ea4cb69cdb442deb | 79,416 | py | Python | DtsShape_Blender.py | pchan126/Blender_DTS_30 | 730dabe3d620b088811b86e34583e92ed30dd184 | [
"MIT"
] | null | null | null | DtsShape_Blender.py | pchan126/Blender_DTS_30 | 730dabe3d620b088811b86e34583e92ed30dd184 | [
"MIT"
] | null | null | null | DtsShape_Blender.py | pchan126/Blender_DTS_30 | 730dabe3d620b088811b86e34583e92ed30dd184 | [
"MIT"
] | null | null | null | '''
Dts.Shape_Blender.py
Copyright (c) 2005 - 2006 James Urquhart(j_urquhart@btinternet.com)
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the ... | 45.328767 | 143 | 0.574431 |
9510f7e2ff5506dbdfe8e62a51d7e9b2d05c4878 | 7,012 | py | Python | algorithms/POMDP/3-DRQN-Store-State-HeavenHellSimple/train.py | zhihanyang2022/drqn | ac2482e3b42094e6242c042583dbbd9c98e4750b | [
"MIT"
] | 5 | 2021-03-28T14:12:40.000Z | 2021-11-19T20:46:10.000Z | algorithms/POMDP/3-DRQN-Store-State-HeavenHellSimple/train.py | zhihanyang2022/drqn | ac2482e3b42094e6242c042583dbbd9c98e4750b | [
"MIT"
] | null | null | null | algorithms/POMDP/3-DRQN-Store-State-HeavenHellSimple/train.py | zhihanyang2022/drqn | ac2482e3b42094e6242c042583dbbd9c98e4750b | [
"MIT"
] | null | null | null | import os
import sys
import random
import numpy as np
import torch
import torch.optim as optim
import torch.nn.functional as F
from model import DRQN
from memory import Memory
# from tensorboardX import SummaryWriter
import argparse
import wandb
from heaven_hell_simple import HeavenHellSimple
# ====================... | 29.462185 | 129 | 0.645893 |
fddc481bae7c46b47a263326b7e3cdac41e70998 | 710 | py | Python | env/Lib/site-packages/plotly/validators/scattermapbox/marker/colorbar/tickformatstop/_dtickrange.py | andresgreen-byte/Laboratorio-1--Inversion-de-Capital | 8a4707301d19c3826c31026c4077930bcd6a8182 | [
"MIT"
] | 11,750 | 2015-10-12T07:03:39.000Z | 2022-03-31T20:43:15.000Z | env/Lib/site-packages/plotly/validators/scattermapbox/marker/colorbar/tickformatstop/_dtickrange.py | andresgreen-byte/Laboratorio-1--Inversion-de-Capital | 8a4707301d19c3826c31026c4077930bcd6a8182 | [
"MIT"
] | 2,951 | 2015-10-12T00:41:25.000Z | 2022-03-31T22:19:26.000Z | env/Lib/site-packages/plotly/validators/scattermapbox/marker/colorbar/tickformatstop/_dtickrange.py | andresgreen-byte/Laboratorio-1--Inversion-de-Capital | 8a4707301d19c3826c31026c4077930bcd6a8182 | [
"MIT"
] | 2,623 | 2015-10-15T14:40:27.000Z | 2022-03-28T16:05:50.000Z | import _plotly_utils.basevalidators
class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator):
def __init__(
self,
plotly_name="dtickrange",
parent_name="scattermapbox.marker.colorbar.tickformatstop",
**kwargs
):
super(DtickrangeValidator, self).__init_... | 29.583333 | 75 | 0.529577 |
5fa5642b9baa29634c4d96e766d13516614b24d8 | 8,161 | py | Python | tools/utils_3d.py | sunnyln/birdnet2 | d1a2b703475345d887c325c135013ed9f72d3a57 | [
"Apache-2.0"
] | null | null | null | tools/utils_3d.py | sunnyln/birdnet2 | d1a2b703475345d887c325c135013ed9f72d3a57 | [
"Apache-2.0"
] | null | null | null | tools/utils_3d.py | sunnyln/birdnet2 | d1a2b703475345d887c325c135013ed9f72d3a57 | [
"Apache-2.0"
] | null | null | null | import numpy as np
import cv2
import csv
import pdb
import math
from tools.utils_calib import Calibration
# color_dict = {'Car':[0.2, 0.2, 0.9],
# 'Van':[0.4, 0.2, 0.4],
# 'Truck':[0.6, 0.2, 0.6],
# 'Pedestrian':[0.9, 0.2, 0.2],
# 'Person_sitting':[0.6, 0.2, 0.4],
# ... | 42.952632 | 149 | 0.513908 |
f03a52935db0e45d557a3a1b737f409064966208 | 1,085 | py | Python | cogs/info/prefix.py | FevenKitsune/Fox-Utilities | 95bc63897a35977989378cf54d5aa8356b238ec8 | [
"MIT"
] | 3 | 2020-07-19T15:11:21.000Z | 2021-07-01T13:40:48.000Z | cogs/info/prefix.py | FevenKitsune/Fox-Utilities | 95bc63897a35977989378cf54d5aa8356b238ec8 | [
"MIT"
] | 23 | 2019-05-03T15:42:14.000Z | 2021-05-16T03:19:59.000Z | cogs/info/prefix.py | FevenKitsune/Fox-Utilities | 95bc63897a35977989378cf54d5aa8356b238ec8 | [
"MIT"
] | 1 | 2020-07-23T19:46:56.000Z | 2020-07-23T19:46:56.000Z | from discord import Embed
from discord.ext.commands import Cog, command
from config.globals import message_color
from utils.generators import generate_footer
class Prefix(Cog):
category = "info"
def __init__(self, client):
self.client = client
@command(
name="prefix",
brief="Inf... | 31 | 116 | 0.652535 |
e670da0bc9798434e0da10a75c20e777a2367847 | 3,567 | py | Python | pyarray/pyarray.py | AlanCristhian/pyarray | 632407c71cdcb884347f43848fdb1b9deb40bdea | [
"MIT"
] | null | null | null | pyarray/pyarray.py | AlanCristhian/pyarray | 632407c71cdcb884347f43848fdb1b9deb40bdea | [
"MIT"
] | null | null | null | pyarray/pyarray.py | AlanCristhian/pyarray | 632407c71cdcb884347f43848fdb1b9deb40bdea | [
"MIT"
] | null | null | null | from array import array
__all__ = ["Int8", "UInt8", "Int16", "UInt16", "Int32", "UInt32", "Int64",
"UInt64", "Float32", "Float64", ]
_TEMPLATE = """
class {name}Meta(type):
def __call__(cls, *initializer):
if len(initializer) == 1:
if isinstance(initializer[0], (list, tuple)):
... | 33.336449 | 74 | 0.599383 |
9117ca6e2b0d75549d2a60d5508ffa79a7b724d2 | 329 | py | Python | invenio_formatter/context_processors/__init__.py | torchingloom/invenio-formatter | e9b8b35ef53734c0500b5528ae3e9eb8ab0f2ccf | [
"MIT"
] | 1 | 2015-08-19T12:49:20.000Z | 2015-08-19T12:49:20.000Z | invenio_formatter/context_processors/__init__.py | torchingloom/invenio-formatter | e9b8b35ef53734c0500b5528ae3e9eb8ab0f2ccf | [
"MIT"
] | 39 | 2015-08-12T11:25:27.000Z | 2021-04-30T14:45:13.000Z | invenio_formatter/context_processors/__init__.py | torchingloom/invenio-formatter | e9b8b35ef53734c0500b5528ae3e9eb8ab0f2ccf | [
"MIT"
] | 32 | 2015-08-12T07:44:07.000Z | 2021-11-25T09:13:10.000Z | # -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2016-2018 CERN.
#
# Invenio is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
"""Context processors for Invenio."""
from __future__ import absolute_import, print_... | 27.416667 | 72 | 0.732523 |
cf7551891fac09044c2a380e85116a24a445f9b0 | 445 | py | Python | fossil/auth/models.py | Remember-Fossil/Fossil-Server | 45b9002a8431fa9377ee3eba23ab01aeb564559a | [
"MIT"
] | null | null | null | fossil/auth/models.py | Remember-Fossil/Fossil-Server | 45b9002a8431fa9377ee3eba23ab01aeb564559a | [
"MIT"
] | null | null | null | fossil/auth/models.py | Remember-Fossil/Fossil-Server | 45b9002a8431fa9377ee3eba23ab01aeb564559a | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from google.appengine.ext import db
class User(db.Model):
facebook_id = db.StringProperty()
name = db.StringProperty()
profile_image = db.StringProperty()
created_at = db.DateTimeProperty(auto_now_add=True)
class FacebookSession(db.Model):
user = db.ReferenceProperty(User... | 26.176471 | 55 | 0.716854 |
ac4a1ebab001735fdd08a4a7600654fd465fe6bd | 737 | py | Python | setup.py | Cracky5457/ebrains-drive | d5c08d44c423c38e91e246859ab34e2eeca109b1 | [
"Apache-2.0"
] | null | null | null | setup.py | Cracky5457/ebrains-drive | d5c08d44c423c38e91e246859ab34e2eeca109b1 | [
"Apache-2.0"
] | null | null | null | setup.py | Cracky5457/ebrains-drive | d5c08d44c423c38e91e246859ab34e2eeca109b1 | [
"Apache-2.0"
] | null | null | null | from setuptools import setup, find_packages
from version_query import predict_version_str
__version__ = predict_version_str()
setup(name='ebrains-drive',
version=__version__,
license='Apache-2.0 License',
description='Python client interface for EBrains Collaboratory Seafile storage',
author=... | 33.5 | 86 | 0.641791 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.