hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 972 | max_forks_repo_name stringlengths 6 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
b9bd319de1d6a9b3e6a94373538f9f96851a113c | 32 | py | Python | plant_watcher/__init__.py | ceroytres/plant_watcher | 025df1a8f7a6db3acdd5b30697e9fd749aa6bf0a | [
"MIT"
] | null | null | null | plant_watcher/__init__.py | ceroytres/plant_watcher | 025df1a8f7a6db3acdd5b30697e9fd749aa6bf0a | [
"MIT"
] | 3 | 2021-06-08T22:12:20.000Z | 2022-01-13T03:10:31.000Z | plant_watcher/__init__.py | ceroytres/plant_watcher | 025df1a8f7a6db3acdd5b30697e9fd749aa6bf0a | [
"MIT"
] | null | null | null | from plant_watcher import models | 32 | 32 | 0.90625 |
e31489f69877a421ea06d549389095c7152fb71e | 1,595 | py | Python | slack_bolt/util/utils.py | korymath/bolt-python | 67e0286d756ba92510315d044303f43b03380b52 | [
"MIT"
] | 1 | 2021-05-02T16:06:44.000Z | 2021-05-02T16:06:44.000Z | slack_bolt/util/utils.py | korymath/bolt-python | 67e0286d756ba92510315d044303f43b03380b52 | [
"MIT"
] | 1 | 2021-02-23T21:05:57.000Z | 2021-02-23T21:05:57.000Z | slack_bolt/util/utils.py | korymath/bolt-python | 67e0286d756ba92510315d044303f43b03380b52 | [
"MIT"
] | null | null | null | import copy
import sys
from typing import Optional, Union, Dict, Any, Sequence
from slack_sdk import WebClient
from slack_sdk.models import JsonObject
from slack_bolt.error import BoltError
from slack_bolt.version import __version__ as bolt_version
def create_web_client(token: Optional[str] = None) -> WebClient:
... | 37.97619 | 106 | 0.67837 |
4e405227d611d06992ff17e69135203744ed44db | 6,614 | py | Python | configs/textrecog/sar/sar_r31_parallel_decoder_academic.py | jeffreykuang/mmocr-1 | b17304edeb493b0a4d7224c23d23b952350d0db5 | [
"Apache-2.0"
] | 206 | 2021-07-30T09:04:08.000Z | 2022-03-22T00:57:44.000Z | configs/textrecog/sar/sar_r31_parallel_decoder_academic.py | jeffreykuang/mmocr-1 | b17304edeb493b0a4d7224c23d23b952350d0db5 | [
"Apache-2.0"
] | 39 | 2021-08-05T07:16:46.000Z | 2022-03-14T13:23:48.000Z | configs/textrecog/sar/sar_r31_parallel_decoder_academic.py | jeffreykuang/mmocr-1 | b17304edeb493b0a4d7224c23d23b952350d0db5 | [
"Apache-2.0"
] | 61 | 2021-07-30T07:51:41.000Z | 2022-03-30T14:40:02.000Z | _base_ = ['../../_base_/default_runtime.py']
label_convertor = dict(
type='AttnConvertor', dict_type='DICT90', with_unknown=True)
model = dict(
type='SARNet',
backbone=dict(type='ResNet31OCR'),
encoder=dict(
type='SAREncoder',
enc_bi_rnn=False,
enc_do_rnn=0.1,
enc_gru=F... | 30.063636 | 74 | 0.653614 |
0c9b5d42176f84bbe7038767bc0ffcf1000ec996 | 2,736 | py | Python | tests/conftest.py | kubawolanin/ha-tauron-outages | 91deb7821d260aeb8d6b3c741657b7a613818a33 | [
"MIT"
] | 1 | 2022-01-25T11:10:02.000Z | 2022-01-25T11:10:02.000Z | tests/conftest.py | kubawolanin/ha-tauron-outages | 91deb7821d260aeb8d6b3c741657b7a613818a33 | [
"MIT"
] | null | null | null | tests/conftest.py | kubawolanin/ha-tauron-outages | 91deb7821d260aeb8d6b3c741657b7a613818a33 | [
"MIT"
] | null | null | null | """Global fixtures for tauron_outages integration."""
# Fixtures allow you to replace functions with a Mock object. You can perform
# many options via the Mock to reflect a particular behavior from the original
# function that you want to see without going through the function's actual logic.
# Fixtures can either be p... | 42.75 | 131 | 0.781067 |
3f49e0d48c46deba67e623cff0278e414bd37ffb | 597 | py | Python | jumpgate/common/nyi.py | Neetuj/jumpgate | 509c1d43a5f4b91c7f3ad5c0cd34abf61bb0a3ee | [
"MIT"
] | null | null | null | jumpgate/common/nyi.py | Neetuj/jumpgate | 509c1d43a5f4b91c7f3ad5c0cd34abf61bb0a3ee | [
"MIT"
] | null | null | null | jumpgate/common/nyi.py | Neetuj/jumpgate | 509c1d43a5f4b91c7f3ad5c0cd34abf61bb0a3ee | [
"MIT"
] | null | null | null | import logging
from jumpgate.common.error_handling import not_implemented
logger = logging.getLogger(__name__)
class NYI(object):
def __init__(self, before=[], after=[]):
# simulate before and after hooks
self.before = before
self.after = after
def __call__(self, req, resp, **kwarg... | 27.136364 | 75 | 0.639866 |
17a90f43e95664b3d2af0c9a5c54d17b24bf3cfe | 2,604 | py | Python | pupil_src/shared_modules/pupil_detectors/Tests/SphereCircleTests/setup_test.py | paulmathai01/Pupil-Interfaced | 4ec40c90876af3bdf75b1def47d21e49a79252b8 | [
"MIT"
] | 1 | 2018-10-29T04:30:32.000Z | 2018-10-29T04:30:32.000Z | pupil_src/shared_modules/pupil_detectors/Tests/SphereCircleTests/setup_test.py | paulmathai01/Pupil-Interfaced | 4ec40c90876af3bdf75b1def47d21e49a79252b8 | [
"MIT"
] | null | null | null | pupil_src/shared_modules/pupil_detectors/Tests/SphereCircleTests/setup_test.py | paulmathai01/Pupil-Interfaced | 4ec40c90876af3bdf75b1def47d21e49a79252b8 | [
"MIT"
] | null | null | null | '''
(*)~---------------------------------------------------------------------------
Pupil - eye tracking platform
Copyright (C) 2012-2018 Pupil Labs
Distributed under the terms of the GNU
Lesser General Public License (LGPL v3.0).
See COPYING and COPYING.LESSER for license details.
------------------------------------... | 40.061538 | 149 | 0.679339 |
fdac6cc680471c14d04e7b5ec248d17865364a60 | 390 | py | Python | expt-mpii-ca2/train_act_pred.py | qxcv/structuredinference | 9eb6546db9ca2f9d02b8a8155c2d3fc4f0d27ecb | [
"MIT"
] | 6 | 2017-09-13T10:49:13.000Z | 2022-01-01T10:53:03.000Z | expt-mpii-ca2/train_act_pred.py | qxcv/structuredinference | 9eb6546db9ca2f9d02b8a8155c2d3fc4f0d27ecb | [
"MIT"
] | null | null | null | expt-mpii-ca2/train_act_pred.py | qxcv/structuredinference | 9eb6546db9ca2f9d02b8a8155c2d3fc4f0d27ecb | [
"MIT"
] | 2 | 2017-07-31T04:12:30.000Z | 2018-11-09T22:34:36.000Z | #!/usr/bin/env python3
"""Trains an action predictor on estimated MPII CA2 poses."""
import numpy as np
import addpaths # noqa
from load import loadDataset
from common_pp.act_class_model import train_act_class_model
if __name__ == '__main__':
dataset = loadDataset()
merge_map = {
'n/a': None
}
... | 22.941176 | 69 | 0.725641 |
7b59eaecff8a93566bd0026a5bcb46166a5bb0d2 | 15,247 | py | Python | xldlib/resources/chemical_defs/isotope_labeling.py | Alexhuszagh/XLDiscoverer | 60937b1f7f2e23af4219eb26519d6b83fb4232d6 | [
"Apache-2.0",
"MIT"
] | null | null | null | xldlib/resources/chemical_defs/isotope_labeling.py | Alexhuszagh/XLDiscoverer | 60937b1f7f2e23af4219eb26519d6b83fb4232d6 | [
"Apache-2.0",
"MIT"
] | null | null | null | xldlib/resources/chemical_defs/isotope_labeling.py | Alexhuszagh/XLDiscoverer | 60937b1f7f2e23af4219eb26519d6b83fb4232d6 | [
"Apache-2.0",
"MIT"
] | null | null | null | '''
Resources/Chemical_Defs/isotope_labeling
________________________________________
Chemical building-block definitions.
:copyright: (c) 2015 The Regents of the University of California.
:license: GNU GPL, see licenses/GNU GPLv3.txt for more details.
'''
# load modules
import itertools as it
im... | 28.027574 | 77 | 0.589099 |
24df00a544bdc5d1723de99026d8004a6c998637 | 1,648 | py | Python | setup.py | rva-data/connector-events | 104a1f71733ba1cfc742f6d9a50a4f6039c414db | [
"BSD-3-Clause"
] | 2 | 2015-03-23T14:58:32.000Z | 2017-12-21T01:37:58.000Z | setup.py | rva-data/connector-events | 104a1f71733ba1cfc742f6d9a50a4f6039c414db | [
"BSD-3-Clause"
] | null | null | null | setup.py | rva-data/connector-events | 104a1f71733ba1cfc742f6d9a50a4f6039c414db | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
import events
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
version = events.__version__
if sys.argv[-1] == 'publish':
os.system('python setup.py sdist upload')
print("You probably want to al... | 27.466667 | 93 | 0.604976 |
91982ce4457d1a007d1a7216a1b4ea286e6f77ae | 14,560 | py | Python | src/sage/groups/indexed_free_group.py | hsm207/sage | 020bd59ec28717bfab9af44d2231c53da1ff99f1 | [
"BSL-1.0"
] | 1,742 | 2015-01-04T07:06:13.000Z | 2022-03-30T11:32:52.000Z | src/sage/groups/indexed_free_group.py | Ivo-Maffei/sage | 467fbc70a08b552b3de33d9065204ee9cbfb02c7 | [
"BSL-1.0"
] | 66 | 2015-03-19T19:17:24.000Z | 2022-03-16T11:59:30.000Z | src/sage/groups/indexed_free_group.py | dimpase/sage | 468f23815ade42a2192b0a9cd378de8fdc594dcd | [
"BSL-1.0"
] | 495 | 2015-01-10T10:23:18.000Z | 2022-03-24T22:06:11.000Z | """
Indexed Free Groups
Free groups and free abelian groups implemented using an indexed set of
generators.
AUTHORS:
- Travis Scrimshaw (2013-10-16): Initial version
"""
##############################################################################
# Copyright (C) 2013 Travis Scrimshaw <tscrim at ucdavis.edu>... | 29.836066 | 97 | 0.463393 |
3fa6ce88fefaaa1759d99c9b220ff137ae3a281e | 981 | py | Python | setup.py | GlobalFishingWatch/track-based-models | e0c45e49a0088a8fcd3c688c0df0d6ec3da8bfa0 | [
"Apache-2.0"
] | 4 | 2019-07-03T14:14:11.000Z | 2022-02-22T22:38:17.000Z | setup.py | GlobalFishingWatch/track-based-models | e0c45e49a0088a8fcd3c688c0df0d6ec3da8bfa0 | [
"Apache-2.0"
] | null | null | null | setup.py | GlobalFishingWatch/track-based-models | e0c45e49a0088a8fcd3c688c0df0d6ec3da8bfa0 | [
"Apache-2.0"
] | 1 | 2019-09-21T15:13:40.000Z | 2019-09-21T15:13:40.000Z | # Copyright 2019 Global Fishing Watch.
#
# 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 i... | 26.513514 | 74 | 0.715596 |
a0410dd7d75db05575f60e694be25497c4936189 | 1,621 | py | Python | parent_accessor.py | daniwelter/python_owl_sandbox | 686ddcfa7c4264555d5ad43d183e4a3fd878e8b2 | [
"Apache-2.0"
] | null | null | null | parent_accessor.py | daniwelter/python_owl_sandbox | 686ddcfa7c4264555d5ad43d183e4a3fd878e8b2 | [
"Apache-2.0"
] | null | null | null | parent_accessor.py | daniwelter/python_owl_sandbox | 686ddcfa7c4264555d5ad43d183e4a3fd878e8b2 | [
"Apache-2.0"
] | null | null | null | from owlready2 import *
import csv
def loadOntology(path):
onto = get_ontology(path).load()
print("Loaded " + onto.base_iri)
return onto
def get_parents(ontology, cls):
# print(cls.name)
return cls.ancestors(include_self=False)
if __name__ == '__main__':
path_to_ontology = "file:///Use... | 26.57377 | 103 | 0.575571 |
279b64ebc5377291fd6306bd77f45b9c7c3fd6be | 21,075 | py | Python | src/sage/geometry/polyhedron/ppl_lattice_polygon.py | fchapoton/sage | 765c5cb3e24dd134708eca97e4c52e0221cd94ba | [
"BSL-1.0"
] | 4 | 2020-07-17T04:49:44.000Z | 2020-07-29T06:33:51.000Z | src/sage/geometry/polyhedron/ppl_lattice_polygon.py | Ivo-Maffei/sage | 467fbc70a08b552b3de33d9065204ee9cbfb02c7 | [
"BSL-1.0"
] | 1 | 2020-04-18T16:30:43.000Z | 2020-04-18T16:30:43.000Z | src/sage/geometry/polyhedron/ppl_lattice_polygon.py | dimpase/sage | 468f23815ade42a2192b0a9cd378de8fdc594dcd | [
"BSL-1.0"
] | 1 | 2020-07-23T10:40:14.000Z | 2020-07-23T10:40:14.000Z | """
Fast Lattice Polygons using PPL
See :mod:`ppl_lattice_polytope` for the implementation of
arbitrary-dimensional lattice polytopes. This module is about the
specialization to 2 dimensions. To be more precise, the
:class:`LatticePolygon_PPL_class` is used if the ambient space is of
dimension 2 or less. These all all... | 36.973684 | 109 | 0.589798 |
867c6a4895aae0e9cfe9f6114e2ae4a7e9ce7a36 | 739 | py | Python | configuration.py | mohamedSabry0/new_autoRCCar | e0ae2a1e8a294c7eae5406308e50872a6371f8c7 | [
"MIT"
] | 333 | 2016-07-27T07:03:07.000Z | 2022-02-08T17:36:40.000Z | configuration.py | llrraa/autonomous-rc-car | 048d983ed96769842704f8909f1b3eb48aa1d7c4 | [
"MIT"
] | 26 | 2016-08-20T09:28:48.000Z | 2020-11-11T07:53:26.000Z | configuration.py | llrraa/autonomous-rc-car | 048d983ed96769842704f8909f1b3eb48aa1d7c4 | [
"MIT"
] | 114 | 2016-08-02T07:10:51.000Z | 2021-09-14T09:51:39.000Z | """Configurations for the RC car"""
PICAMERA_RESOLUTION_WIDTH = 640
PICAMERA_RESOLUTION_HEIGHT = 480
PICAMERA_RESOLUTION = (PICAMERA_RESOLUTION_WIDTH, PICAMERA_RESOLUTION_HEIGHT)
PICAMERA_FRAMERATE = 60
PICAMERA_WARM_UP_TIME = 2
BACK_MOTOR_DATA_ONE = 17
BACK_MOTOR_DATA_TWO = 27
BACK_MOTOR_ENABLE_PIN = 22
FRONT_MOTOR_... | 24.633333 | 77 | 0.709066 |
968e8c483fa8fcd65994a45514158554d41ba275 | 2,120 | py | Python | xumm/resource/storage.py | xdvlabs/xumm-sdk-py | c92066a6e9738e402e0ae1627dd21fbc6b3bead1 | [
"MIT"
] | 4 | 2022-01-29T11:22:06.000Z | 2022-03-01T03:36:59.000Z | xumm/resource/storage.py | CASL-AE/xumm-py | dbe040f409ffc5f918086a12f190ef289e709d22 | [
"MIT"
] | 4 | 2022-01-14T22:49:02.000Z | 2022-01-18T17:32:21.000Z | xumm/resource/storage.py | CASL-AE/xumm-py | dbe040f409ffc5f918086a12f190ef289e709d22 | [
"MIT"
] | 2 | 2022-03-01T03:32:35.000Z | 2022-03-20T17:11:56.000Z | #!/usr/bin/env python
# coding: utf-8
from typing import List, Dict, Any # noqa: F401
from xumm import client
from xumm.resource import XummResource
from .types import (
StorageSetResponse,
StorageGetResponse,
StorageDeleteResponse,
)
class StorageResource(XummResource):
@classmethod
def post... | 26.5 | 87 | 0.628774 |
bc416019b08fc61d941b4d752aae55466be254d5 | 29,488 | py | Python | email2pdf2/email2pdf2.py | pyscioffice/email2pdf | 584833e86113c2957583403bb7c0d7f8ebea755b | [
"MIT"
] | 1 | 2022-03-10T20:36:16.000Z | 2022-03-10T20:36:16.000Z | email2pdf2/email2pdf2.py | pyscioffice/email2pdf | 584833e86113c2957583403bb7c0d7f8ebea755b | [
"MIT"
] | null | null | null | email2pdf2/email2pdf2.py | pyscioffice/email2pdf | 584833e86113c2957583403bb7c0d7f8ebea755b | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
from datetime import datetime
from email.header import decode_header
from itertools import chain
from subprocess import Popen, PIPE
from sys import platform as _platform
from urllib.error import URLError, HTTPError
from urllib.request import Request, urlopen
import argparse
import chardet
import... | 38.902375 | 131 | 0.637853 |
db125d8219fdc375d38b696c088689f4a0e1d74e | 1,053 | py | Python | SWIM-Executables/Windows/pyinstaller-2.0 for windows/buildtests/basic/test_absolute_ld_library_path.py | alexsigaras/SWIM | 1a35df8acb26bdcb307a1b8f60e9feba68ed1715 | [
"MIT"
] | 47 | 2020-03-08T08:43:28.000Z | 2022-03-18T18:51:55.000Z | SWIM-Executables/Windows/pyinstaller-2.0 for windows/buildtests/basic/test_absolute_ld_library_path.py | alexsigaras/SWIM | 1a35df8acb26bdcb307a1b8f60e9feba68ed1715 | [
"MIT"
] | null | null | null | SWIM-Executables/Windows/pyinstaller-2.0 for windows/buildtests/basic/test_absolute_ld_library_path.py | alexsigaras/SWIM | 1a35df8acb26bdcb307a1b8f60e9feba68ed1715 | [
"MIT"
] | 16 | 2020-03-08T08:43:30.000Z | 2022-01-10T22:05:57.000Z | # LD_LIBRARY_PATH set by bootloader should not contain ./
#
# This test assumes the LD_LIBRARY_PATH is not set before running the test.
# If you experience that this test fails, try to unset the variable and
# rerun the test.
#
# This is how it is done in bash:
#
# $ cd buildtests
# $ unset LD_LIBRARY_PATH
# $ ./run... | 28.459459 | 76 | 0.757835 |
5aee1c09ffaf60296d5d9c917103a8636e87b00f | 2,991 | py | Python | colour/models/rgb/datasets/srgb.py | BPearlstine/colour | 40f0281295496774d2a19eee017d50fd0c265bd8 | [
"Cube",
"BSD-3-Clause"
] | 1 | 2020-01-04T19:10:58.000Z | 2020-01-04T19:10:58.000Z | colour/models/rgb/datasets/srgb.py | BPearlstine/colour | 40f0281295496774d2a19eee017d50fd0c265bd8 | [
"Cube",
"BSD-3-Clause"
] | null | null | null | colour/models/rgb/datasets/srgb.py | BPearlstine/colour | 40f0281295496774d2a19eee017d50fd0c265bd8 | [
"Cube",
"BSD-3-Clause"
] | 1 | 2019-12-11T19:48:27.000Z | 2019-12-11T19:48:27.000Z | # -*- coding: utf-8 -*-
"""
sRGB Colourspace
================
Defines the *sRGB* colourspace:
- :attr:`colour.models.sRGB_COLOURSPACE`.
See Also
--------
`RGB Colourspaces Jupyter Notebook
<http://nbviewer.jupyter.org/github/colour-science/colour-notebooks/\
blob/master/notebooks/models/rgb.ipynb>`_
References
--... | 25.347458 | 78 | 0.720495 |
eb449ebdc150616a5d543a54f47b94e98f9c03e8 | 1,406 | py | Python | vaccine_card/core/views.py | Unanimad/lais_046_2020_etapa_2 | 630efc6b25a580be44b6cd50be6744a01221a2c4 | [
"Apache-2.0"
] | null | null | null | vaccine_card/core/views.py | Unanimad/lais_046_2020_etapa_2 | 630efc6b25a580be44b6cd50be6744a01221a2c4 | [
"Apache-2.0"
] | null | null | null | vaccine_card/core/views.py | Unanimad/lais_046_2020_etapa_2 | 630efc6b25a580be44b6cd50be6744a01221a2c4 | [
"Apache-2.0"
] | null | null | null | from django.contrib.auth import login as auth_login, logout as auth_logout, authenticate
from django.contrib.auth.decorators import login_required
from django.http.response import HttpResponseRedirect
from django.shortcuts import render, redirect
from django.contrib import messages
from django.urls import reverse
def... | 25.563636 | 88 | 0.660028 |
fd6781ed8ed259829896b6bb7289b2c413c6d096 | 37,824 | py | Python | statsmodels/genmod/tests/test_glm.py | amitmse/statsmodels | 54d6c2b6821b79d3c28c04f66bd981b1ae4f5f29 | [
"BSD-3-Clause"
] | 1 | 2015-07-26T19:34:17.000Z | 2015-07-26T19:34:17.000Z | statsmodels/genmod/tests/test_glm.py | gef756/statsmodels | c09c1b871ddb50378ff8c54405e2117c13e64a85 | [
"BSD-3-Clause"
] | null | null | null | statsmodels/genmod/tests/test_glm.py | gef756/statsmodels | c09c1b871ddb50378ff8c54405e2117c13e64a85 | [
"BSD-3-Clause"
] | 1 | 2021-11-22T22:08:58.000Z | 2021-11-22T22:08:58.000Z | """
Test functions for models.GLM
"""
from statsmodels.compat import range
import os
import numpy as np
from numpy.testing import (assert_almost_equal, assert_equal, assert_raises,
assert_allclose, assert_, assert_array_less, dec)
from scipy import stats
import statsmodels.api as sm
from st... | 36.72233 | 112 | 0.620585 |
69a52cfb1cb27f93c2faaf0b5a879350fdff6e99 | 474 | py | Python | mysite/mysite/urls.py | alvarocneto/django_packt_proj_1 | e0fa2c491ed4d4d6b6d71e9b75c36bff20889282 | [
"MIT"
] | null | null | null | mysite/mysite/urls.py | alvarocneto/django_packt_proj_1 | e0fa2c491ed4d4d6b6d71e9b75c36bff20889282 | [
"MIT"
] | null | null | null | mysite/mysite/urls.py | alvarocneto/django_packt_proj_1 | e0fa2c491ed4d4d6b6d71e9b75c36bff20889282 | [
"MIT"
] | null | null | null | from django.conf.urls import include, url
from django.contrib import admin
from django.contrib.sitemaps.views import sitemap
from blog.sitemaps import PostSitemap
sitemaps = {
'posts': PostSitemap,
}
urlpatterns = [
url(r'^admin/', include(admin.site.urls)),
url(r'', include('blog.urls', namespace='blog',... | 26.333333 | 70 | 0.675105 |
e1b7318238a142fdc6bb08e4dc5b0eceff34fac9 | 5,254 | py | Python | Model/inference.py | yinzhangyue/PDF_tool | ff1c689478e0d40370724ad88da78ef8bd0bf3d1 | [
"MIT"
] | 3 | 2021-12-07T06:19:12.000Z | 2022-03-30T13:45:34.000Z | Model/inference.py | yinzhangyue/PDF_tool | ff1c689478e0d40370724ad88da78ef8bd0bf3d1 | [
"MIT"
] | null | null | null | Model/inference.py | yinzhangyue/PDF_tool | ff1c689478e0d40370724ad88da78ef8bd0bf3d1 | [
"MIT"
] | 2 | 2022-02-27T16:15:05.000Z | 2022-03-19T07:35:38.000Z | import argparse
import os, glob
import cv2
from mmdet.apis import init_detector, show_result
# -- label names to be shown on the inferenced pictures
label_class = {1: 'HP', 2: 'ST', 3: 'UP'}
# -- confidence score threshold
score_thr = 0.5
def bb_intersection_over_union(boxA, boxB):
# determine the (x, y)-coord... | 37 | 186 | 0.575561 |
e138f1af84e170b85f358c31bf58ff9bb546980e | 4,061 | py | Python | tests/sentry/api/serializers/test_alert_rule.py | FelixSchwarz/sentry | 7c92c4fa2b6b9f214764f48c82594acae1549e52 | [
"BSD-3-Clause"
] | null | null | null | tests/sentry/api/serializers/test_alert_rule.py | FelixSchwarz/sentry | 7c92c4fa2b6b9f214764f48c82594acae1549e52 | [
"BSD-3-Clause"
] | null | null | null | tests/sentry/api/serializers/test_alert_rule.py | FelixSchwarz/sentry | 7c92c4fa2b6b9f214764f48c82594acae1549e52 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import absolute_import
import six
from sentry.api.serializers import serialize
from sentry.api.serializers.models.alert_rule import DetailedAlertRuleSerializer
from sentry.incidents.logic import create_alert_rule, create_alert_rule_trigger
from sentry.incidents.models import A... | 45.122222 | 100 | 0.701798 |
d72b5d2b8f60b6ed343d112468fc851cd95dba98 | 6,611 | py | Python | cnn_model.py | ChangyuYan/Left-Ventricle-Segmentation | a599a08297dc0da686eddbc0aeb677d28a812bc6 | [
"MIT"
] | 7 | 2019-01-27T08:36:31.000Z | 2020-07-06T00:39:57.000Z | cnn_model.py | ChangyuYan/Left-Ventricle-Segmentation | a599a08297dc0da686eddbc0aeb677d28a812bc6 | [
"MIT"
] | null | null | null | cnn_model.py | ChangyuYan/Left-Ventricle-Segmentation | a599a08297dc0da686eddbc0aeb677d28a812bc6 | [
"MIT"
] | 3 | 2018-11-25T13:39:50.000Z | 2020-05-07T06:55:01.000Z | import keras
from keras.preprocessing.image import ImageDataGenerator
from keras.models import Sequential
from keras.layers import Dense, Dropout, Activation, Flatten, Reshape
from keras.layers import Conv2D, MaxPooling2D, AveragePooling2D
from keras.preprocessing.image import ImageDataGenerator
from keras import regul... | 42.10828 | 140 | 0.652851 |
3740769e2371d00af955dd6d83f3a07e7667ef86 | 3,805 | py | Python | cookiecutter/cli.py | rsyring/cookiecutter | a14570c5c36400f441a377622ef8f6aa1ab35234 | [
"BSD-3-Clause"
] | null | null | null | cookiecutter/cli.py | rsyring/cookiecutter | a14570c5c36400f441a377622ef8f6aa1ab35234 | [
"BSD-3-Clause"
] | null | null | null | cookiecutter/cli.py | rsyring/cookiecutter | a14570c5c36400f441a377622ef8f6aa1ab35234 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
cookiecutter.cli
-----------------
Main `cookiecutter` CLI.
"""
import os
import sys
import logging
import json
import click
from cookiecutter import __version__
from cookiecutter.config import USER_CONFIG_PATH
from cookiecutter.main import cookiecutter
from cookie... | 29.045802 | 79 | 0.653876 |
ac4ab7550ee9ff85bab60df19105885548e61fda | 3,266 | py | Python | python/openmldb/test/sql_smoke_test.py | jasleon/OpenMLDB | 2f85d12cd8dadd3a1ec822e1f591632341f3b23f | [
"Apache-2.0"
] | null | null | null | python/openmldb/test/sql_smoke_test.py | jasleon/OpenMLDB | 2f85d12cd8dadd3a1ec822e1f591632341f3b23f | [
"Apache-2.0"
] | 10 | 2022-01-07T03:21:29.000Z | 2022-03-08T16:38:16.000Z | python/openmldb/test/sql_smoke_test.py | jasleon/OpenMLDB | 2f85d12cd8dadd3a1ec822e1f591632341f3b23f | [
"Apache-2.0"
] | 1 | 2022-01-25T07:03:06.000Z | 2022-01-25T07:03:06.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright 2021 4Paradigm
#
# 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 ... | 32.66 | 118 | 0.686773 |
7d79ef068a3eab7108de4c3085122d04f8c4957c | 2,408 | py | Python | virtual/bin/pilconvert.py | toelapiut/instagram | 3a04e65075cc4382058ac8adb6b383d8fc4b65ff | [
"MIT"
] | null | null | null | virtual/bin/pilconvert.py | toelapiut/instagram | 3a04e65075cc4382058ac8adb6b383d8fc4b65ff | [
"MIT"
] | null | null | null | virtual/bin/pilconvert.py | toelapiut/instagram | 3a04e65075cc4382058ac8adb6b383d8fc4b65ff | [
"MIT"
] | null | null | null | #!/home/toel/Documents/python/django/Instagram/virtual/bin/python3.6
#
# The Python Imaging Library.
# $Id$
#
# convert image files
#
# History:
# 0.1 96-04-20 fl Created
# 0.2 96-10-04 fl Use draft mode when converting images
# 0.3 96-12-30 fl Optimize output (PNG, JPEG)
# 0.4 97-01-18 fl Made ... | 24.08 | 77 | 0.557309 |
d839d4aaf5fd9f2bab05a1514d832462b9439479 | 353 | py | Python | main.py | HackSoftware/EuroPython-2021-Training | b5db498f9de49aeb0378b0d45881db561979b417 | [
"MIT"
] | 7 | 2021-07-26T10:16:03.000Z | 2022-02-26T16:58:21.000Z | main.py | HackSoftware/EuroPython-2021-Training | b5db498f9de49aeb0378b0d45881db561979b417 | [
"MIT"
] | null | null | null | main.py | HackSoftware/EuroPython-2021-Training | b5db498f9de49aeb0378b0d45881db561979b417 | [
"MIT"
] | 2 | 2021-07-26T08:36:58.000Z | 2021-08-03T09:39:07.000Z | from fastapi import Body, FastAPI, Request, Response
app = FastAPI()
@app.post("/echo")
async def echo(request: Request, response: Response, data=Body(...)):
raw_body = await request.body()
body = raw_body.decode("utf-8")
print(data)
return {
"data": data,
"raw_body": body,
... | 19.611111 | 69 | 0.611898 |
0ef4fb9cbc19d639be90c004fd73ea075022e097 | 4,883 | py | Python | 02-Disaster-Response-Pipeline/models/train_classifier.py | sundeeparandara/Udacity-Data-Scientist-Nanodegree-Projects | 62834ed95fa1927228248942ecad3f740a94f38f | [
"MIT"
] | null | null | null | 02-Disaster-Response-Pipeline/models/train_classifier.py | sundeeparandara/Udacity-Data-Scientist-Nanodegree-Projects | 62834ed95fa1927228248942ecad3f740a94f38f | [
"MIT"
] | null | null | null | 02-Disaster-Response-Pipeline/models/train_classifier.py | sundeeparandara/Udacity-Data-Scientist-Nanodegree-Projects | 62834ed95fa1927228248942ecad3f740a94f38f | [
"MIT"
] | null | null | null | # import libraries
import pandas as pd
from sqlalchemy.engine import create_engine
import re
from nltk.tokenize import word_tokenize
from nltk.stem.wordnet import WordNetLemmatizer
from sklearn.pipeline import Pipeline
from sklearn.metrics import confusion_matrix
from sklearn.model_selection import train_test_split
f... | 28.723529 | 149 | 0.667418 |
a9ad9baceaf519c70a9eb4d7a6942290b4f3cbcb | 1,090 | py | Python | migrations/versions/1648101c5ff7_add_type_and_tags_search_triggers.py | Violet26/cfapi | c5af1ea54538d20ea1458b4eaf038a7d73fd042d | [
"MIT"
] | 75 | 2015-01-06T14:35:37.000Z | 2021-11-21T16:11:51.000Z | migrations/versions/1648101c5ff7_add_type_and_tags_search_triggers.py | Violet26/cfapi | c5af1ea54538d20ea1458b4eaf038a7d73fd042d | [
"MIT"
] | 158 | 2015-01-05T22:42:23.000Z | 2021-01-29T20:24:55.000Z | migrations/versions/1648101c5ff7_add_type_and_tags_search_triggers.py | Violet26/cfapi | c5af1ea54538d20ea1458b4eaf038a7d73fd042d | [
"MIT"
] | 56 | 2015-01-14T01:37:20.000Z | 2021-04-30T17:47:11.000Z | """Updating the project search trigger to include type and tags
Revision ID: 1648101c5ff7
Revises: 5614ac52de37
Create Date: 2015-04-13 12:14:50.726839
"""
# revision identifiers, used by Alembic.
revision = '1648101c5ff7'
down_revision = '5614ac52de37'
from alembic import op
def upgrade():
droptrigger = "DROP... | 40.37037 | 253 | 0.790826 |
7d7c95fb56fe361061812d2ab303638ae377b7c4 | 283 | py | Python | tests/tmp.py | Pandinosaurus/d6tpipe | 4ec6c755504f5fe6d5b71e8621375315ce41ad6f | [
"MIT"
] | 184 | 2018-12-28T13:31:52.000Z | 2022-01-27T19:10:24.000Z | tests/tmp.py | Pandinosaurus/d6tpipe | 4ec6c755504f5fe6d5b71e8621375315ce41ad6f | [
"MIT"
] | 2 | 2019-04-18T02:59:45.000Z | 2022-01-20T04:15:58.000Z | tests/tmp.py | Pandinosaurus/d6tpipe | 4ec6c755504f5fe6d5b71e8621375315ce41ad6f | [
"MIT"
] | 8 | 2019-04-15T01:41:45.000Z | 2020-06-03T17:49:35.000Z | import d6tpipe
api = d6tpipe.APIClient(profile='utest-local')
api = d6tpipe.APIClient(profile='utest-d6tdev')
api = d6tpipe.APIClient(profile='utest-dev', filecfg='~/d6tpipe/cfg-utest-dev.json')
api2 = d6tpipe.APIClient(profile='utest-dev2', filecfg='~/d6tpipe/cfg-utest-dev.json')
| 40.428571 | 86 | 0.756184 |
3739edf8dbc9155cbe41248e13465e9bb013f189 | 4,989 | py | Python | sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_04_01/operations/_resource_navigation_links_operations.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/v2019_04_01/operations/_resource_navigation_links_operations.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/v2019_04_01/operations/_resource_navigation_links_operations.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 ... | 46.626168 | 223 | 0.689717 |
8e3f6a7ecce04caa27d9b4f7c110935b7b79da4b | 1,013 | py | Python | paymentech/resources/inquiry.py | natinwave/paymentech | 01694844c6600e396aab3b4afe692d3220073319 | [
"Unlicense"
] | 1 | 2021-03-09T00:55:46.000Z | 2021-03-09T00:55:46.000Z | paymentech/resources/inquiry.py | natinwave/paymentech | 01694844c6600e396aab3b4afe692d3220073319 | [
"Unlicense"
] | null | null | null | paymentech/resources/inquiry.py | natinwave/paymentech | 01694844c6600e396aab3b4afe692d3220073319 | [
"Unlicense"
] | 1 | 2020-09-15T21:34:23.000Z | 2020-09-15T21:34:23.000Z | from typing import Optional
from pydantic import Field
from paymentech.resources.base import PaymentechResource
class Inquiry(PaymentechResource):
username: Optional[str] = Field(alias="OrbitalConnectionUsername")
password: Optional[str] = Field(alias="OrbitalConnectionPassword")
bin: Optional[str] = Fi... | 36.178571 | 90 | 0.71767 |
9f61cbfff156b083d20f2f04175a1218d1c99446 | 1,292 | py | Python | indico/modules/events/papers/models/review_questions.py | jgrigera/indico | b5538f2755bc38a02313d079bac831ee3dfb44ab | [
"MIT"
] | 1 | 2018-11-12T21:29:26.000Z | 2018-11-12T21:29:26.000Z | indico/modules/events/papers/models/review_questions.py | jgrigera/indico | b5538f2755bc38a02313d079bac831ee3dfb44ab | [
"MIT"
] | 9 | 2020-09-08T09:25:57.000Z | 2022-01-13T02:59:05.000Z | indico/modules/events/papers/models/review_questions.py | jgrigera/indico | b5538f2755bc38a02313d079bac831ee3dfb44ab | [
"MIT"
] | 3 | 2020-07-20T09:09:44.000Z | 2020-10-19T00:29:49.000Z | # This file is part of Indico.
# Copyright (C) 2002 - 2020 CERN
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the MIT License; see the
# LICENSE file for more details.
from __future__ import unicode_literals
from indico.core.db.sqlalchemy import PyIntEnum, db
from indico.c... | 30.761905 | 88 | 0.739938 |
6ef5e8d23c55cfffdab9eb97efa9849866b4b002 | 20,618 | py | Python | aiida/manage/configuration/config.py | louisponet/aiida-core | 3214236df66a3792ee57fe38a06c0c3bb65861ab | [
"MIT",
"BSD-3-Clause"
] | null | null | null | aiida/manage/configuration/config.py | louisponet/aiida-core | 3214236df66a3792ee57fe38a06c0c3bb65861ab | [
"MIT",
"BSD-3-Clause"
] | 1 | 2021-07-14T07:59:44.000Z | 2021-08-01T10:31:09.000Z | aiida/manage/configuration/config.py | louisponet/aiida-core | 3214236df66a3792ee57fe38a06c0c3bb65861ab | [
"MIT",
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
# ... | 38.110906 | 120 | 0.649093 |
f99fd3a3121e8fc24b764d2b9f3b7e8982129e7f | 1,167 | py | Python | test/test_url_ssrf_request_batch.py | Cloudmersive/Cloudmersive.APIClient.Python.Validate | 894a3f578c3860db41b3eed179dcc52e02f565a0 | [
"Apache-2.0"
] | 3 | 2018-06-23T21:37:21.000Z | 2020-04-20T23:07:36.000Z | test/test_url_ssrf_request_batch.py | Cloudmersive/Cloudmersive.APIClient.Python.Validate | 894a3f578c3860db41b3eed179dcc52e02f565a0 | [
"Apache-2.0"
] | 1 | 2019-02-04T17:03:35.000Z | 2019-03-02T20:16:52.000Z | test/test_url_ssrf_request_batch.py | Cloudmersive/Cloudmersive.APIClient.Python.Validate | 894a3f578c3860db41b3eed179dcc52e02f565a0 | [
"Apache-2.0"
] | 2 | 2019-03-21T15:54:15.000Z | 2020-05-27T17:30:43.000Z | # coding: utf-8
"""
validateapi
The validation APIs help you validate data. Check if an E-mail address is real. Check if a domain is real. Check up on an IP address, and even where it is located. All this and much more is available in the validation API. # noqa: E501
OpenAPI spec version: v1
Ge... | 28.463415 | 240 | 0.742074 |
9027660ab229a44171dcee7521dbdc9794126502 | 19,582 | py | Python | tests/core/pyspec/eth2spec/test/sanity/test_blocks.py | Leibniz137/eth2.0-specs | e11267952f834d7242d99d305cdcc969f35dbf6d | [
"CC0-1.0"
] | 1 | 2021-04-06T23:29:39.000Z | 2021-04-06T23:29:39.000Z | tests/core/pyspec/eth2spec/test/sanity/test_blocks.py | Leibniz137/eth2.0-specs | e11267952f834d7242d99d305cdcc969f35dbf6d | [
"CC0-1.0"
] | null | null | null | tests/core/pyspec/eth2spec/test/sanity/test_blocks.py | Leibniz137/eth2.0-specs | e11267952f834d7242d99d305cdcc969f35dbf6d | [
"CC0-1.0"
] | 1 | 2021-12-25T16:41:24.000Z | 2021-12-25T16:41:24.000Z | from copy import deepcopy
from eth2spec.utils import bls
from eth2spec.test.helpers.state import get_balance, state_transition_and_sign_block, next_slot
from eth2spec.test.helpers.block import build_empty_block_for_next_slot, build_empty_block, sign_block, \
transition_unsigned_block
from eth2spec.test.helpers.ke... | 35.156194 | 118 | 0.751558 |
6c66b179c692da086901bced51951b21c173c003 | 5,021 | py | Python | test/functional/rpc_bind.py | valuero-org/valuero | c0a8d40d377c39792e5a79d4a67f00bc592aef87 | [
"MIT"
] | null | null | null | test/functional/rpc_bind.py | valuero-org/valuero | c0a8d40d377c39792e5a79d4a67f00bc592aef87 | [
"MIT"
] | null | null | null | test/functional/rpc_bind.py | valuero-org/valuero | c0a8d40d377c39792e5a79d4a67f00bc592aef87 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2018-2019 The Bitcoin Core developers
# Copyright (c) 2017-2019 The Raven Core developers
# Copyright (c) 2018-2019 The Rito Core developers
# Copyright (c) 2019 The Valuero developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.... | 45.234234 | 162 | 0.627365 |
49bb9ac2a8f495ea82dab86ba62e94e4491b4f96 | 9,301 | py | Python | modules/models.py | hunglc007/retinaface-tf2 | cac14d8e6412d4a06f3c3519be1449feaecd6aff | [
"MIT"
] | 258 | 2020-02-17T12:29:55.000Z | 2022-03-26T14:29:24.000Z | modules/models.py | PranavParameshwaran/retinaface-tf2 | 0604c07ebd089ab6fd4cf3a6a7ee7697ef85b2e4 | [
"MIT"
] | 38 | 2020-04-06T06:49:11.000Z | 2022-02-09T23:37:54.000Z | modules/models.py | PranavParameshwaran/retinaface-tf2 | 0604c07ebd089ab6fd4cf3a6a7ee7697ef85b2e4 | [
"MIT"
] | 93 | 2020-03-03T15:07:11.000Z | 2022-02-11T02:49:16.000Z | import tensorflow as tf
from tensorflow.keras import Model
from tensorflow.keras.applications import MobileNetV2, ResNet50
from tensorflow.keras.layers import Input, Conv2D, ReLU, LeakyReLU
from modules.anchor import decode_tf, prior_box_tf
def _regularizer(weights_decay):
"""l2 regularizer"""
return tf.keras... | 36.47451 | 79 | 0.600258 |
68d4c3824e56893dbaf8160e9888f0787ecbded0 | 1,483 | py | Python | libica/openapi/libgds/test/test_update_file_request.py | umccr-illumina/libica | 916d27eea499f29bee590268b84208effb0cc576 | [
"MIT"
] | null | null | null | libica/openapi/libgds/test/test_update_file_request.py | umccr-illumina/libica | 916d27eea499f29bee590268b84208effb0cc576 | [
"MIT"
] | 4 | 2021-11-15T10:47:51.000Z | 2022-02-22T04:43:20.000Z | libica/openapi/libgds/test/test_update_file_request.py | umccr-illumina/libica | 916d27eea499f29bee590268b84208effb0cc576 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
Genomic Data Store Service
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
The version of the OpenAPI document: v1
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
im... | 27.981132 | 124 | 0.687795 |
2a146917770e1128f1ca21fda775f8bf4ca82c31 | 1,874 | py | Python | locations/spiders/noted/medexpress.py | bealbrown/allhours | f750ee7644246a97bd16879f14115d7845f76b89 | [
"MIT"
] | null | null | null | locations/spiders/noted/medexpress.py | bealbrown/allhours | f750ee7644246a97bd16879f14115d7845f76b89 | [
"MIT"
] | null | null | null | locations/spiders/noted/medexpress.py | bealbrown/allhours | f750ee7644246a97bd16879f14115d7845f76b89 | [
"MIT"
] | null | null | null | import json
import re
import scrapy
from locations.hourstudy import inputoutput
class MedExpressSpider(scrapy.Spider):
name = "medexpress"
allowed_domains = ["medexpress.com"]
start_urls = (
"https://www.medexpress.com/bin/optum3/medexserviceCallToYEXT2",
)
def parse(self, response):
... | 45.707317 | 123 | 0.416222 |
30a67a9fd03f513efe03a3d59af4042c3829ecf4 | 567 | py | Python | shop/migrations/0012_auto_20200826_1307.py | RitvikDayal/The-Stone-Shop | fed85d5ebb993fb1ce235f5e8a8ebc06a76fb956 | [
"MIT"
] | 2 | 2020-08-27T21:02:54.000Z | 2020-08-27T21:03:44.000Z | shop/migrations/0012_auto_20200826_1307.py | RitvikDayal/The-Stone-Shop | fed85d5ebb993fb1ce235f5e8a8ebc06a76fb956 | [
"MIT"
] | null | null | null | shop/migrations/0012_auto_20200826_1307.py | RitvikDayal/The-Stone-Shop | fed85d5ebb993fb1ce235f5e8a8ebc06a76fb956 | [
"MIT"
] | null | null | null | # Generated by Django 3.1 on 2020-08-26 07:37
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('shop', '0011_auto_20200823_1200'),
]
operations = [
migrations.RenameField(
model_name='customer',
old_name='user',
... | 21 | 45 | 0.537919 |
d59f903dfa9562ea33c965cd000a25cc8257452c | 3,992 | py | Python | setup.py | backwardn/brozzler | 03594413f917ab145ba278076ff0ef82e5225d92 | [
"Apache-2.0"
] | null | null | null | setup.py | backwardn/brozzler | 03594413f917ab145ba278076ff0ef82e5225d92 | [
"Apache-2.0"
] | null | null | null | setup.py | backwardn/brozzler | 03594413f917ab145ba278076ff0ef82e5225d92 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
'''
setup.py - brozzler setup script
Copyright (C) 2014-2020 Internet Archive
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
... | 38.384615 | 78 | 0.571894 |
1161a18ceec244d957e797d8417554ac3f38a8b2 | 13,382 | py | Python | .history/pages/postgres_20220311114219.py | rypaik/Streamlit_Ref | 5ce11cecbe8307238463c126b88b3beed66c99fa | [
"MIT"
] | null | null | null | .history/pages/postgres_20220311114219.py | rypaik/Streamlit_Ref | 5ce11cecbe8307238463c126b88b3beed66c99fa | [
"MIT"
] | null | null | null | .history/pages/postgres_20220311114219.py | rypaik/Streamlit_Ref | 5ce11cecbe8307238463c126b88b3beed66c99fa | [
"MIT"
] | null | null | null | import streamlit as st
from pathlib import Path
import base64
from modules.toc import *
# Initial page config
page_title ='Postgres Cheatsheet for Python'
layout="wide"
# st.set_page_config(
# page_title='Postgres Cheatsheet for Python',
# layout="wide",
# # initial_sidebar_state="expanded",
#... | 38.34384 | 233 | 0.433642 |
f2080f68b3b3bfc2f820e560df90f7d21488df42 | 711 | py | Python | Python/Ex088.py | EspagueteTV/Meus-Estudos-CursoEmVideo | 1bf3cc367bc754625a3fd59114ab63470e8d934b | [
"MIT"
] | null | null | null | Python/Ex088.py | EspagueteTV/Meus-Estudos-CursoEmVideo | 1bf3cc367bc754625a3fd59114ab63470e8d934b | [
"MIT"
] | null | null | null | Python/Ex088.py | EspagueteTV/Meus-Estudos-CursoEmVideo | 1bf3cc367bc754625a3fd59114ab63470e8d934b | [
"MIT"
] | null | null | null | from random import randint
from time import sleep
valores = list()
sorteados = list()
print('\033[32m''-=' * 20)
print('\t Jogo na Mega Sena ')
print('-=' * 20, '\033[m')
cont = int(input('Quantos jogos você quer sortear? '))
print(f'-=-=-=-= SORTEANDO {cont} JOGOS -=-=-=-=')
for i in range(0, cont): #Co... | 27.346154 | 85 | 0.572433 |
0ac2c6ae796d68e60a17fef38d1bd4a8378bf4a8 | 34,858 | py | Python | volatility/volatility/plugins/overlays/windows/win2003_sp0_x86_syscalls.py | williamclot/MemoryVisualizer | 2ff9f30f07519d6578bc36c12f8d08acc9cb4383 | [
"MIT"
] | 2 | 2018-07-16T13:30:40.000Z | 2018-07-17T12:02:05.000Z | volatility/volatility/plugins/overlays/windows/win2003_sp0_x86_syscalls.py | williamclot/MemoryVisualizer | 2ff9f30f07519d6578bc36c12f8d08acc9cb4383 | [
"MIT"
] | null | null | null | volatility/volatility/plugins/overlays/windows/win2003_sp0_x86_syscalls.py | williamclot/MemoryVisualizer | 2ff9f30f07519d6578bc36c12f8d08acc9cb4383 | [
"MIT"
] | null | null | null | # Volatility
# Copyright (c) 2008-2013 Volatility Foundation
#
# This file is part of Volatility.
#
# Volatility is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your o... | 35.174571 | 70 | 0.6902 |
9269fbab5657050aecc76abb13b4d420eb9ad814 | 2,398 | py | Python | data preprocessing and fine tune/get_bounding_box_chair.py | shuyiii/A-Hybrid-of-Fast-rcnn-and-Bayesian-Model-for-Object-Detection | 20834a658b416507c7a78d5d0f09b15f9370a802 | [
"Apache-2.0"
] | null | null | null | data preprocessing and fine tune/get_bounding_box_chair.py | shuyiii/A-Hybrid-of-Fast-rcnn-and-Bayesian-Model-for-Object-Detection | 20834a658b416507c7a78d5d0f09b15f9370a802 | [
"Apache-2.0"
] | null | null | null | data preprocessing and fine tune/get_bounding_box_chair.py | shuyiii/A-Hybrid-of-Fast-rcnn-and-Bayesian-Model-for-Object-Detection | 20834a658b416507c7a78d5d0f09b15f9370a802 | [
"Apache-2.0"
] | null | null | null | import tensorflow as tf
import numpy as np
import glob
import os
from PIL import Image
from PIL import ImageFile
ImageFile.LOAD_TRUNCATED_IMAGES = True
class ChairTableDetector(object):
def __init__(self):
PATH_TO_MODEL = '/fs/project/PAS1263/src/models/research/object_detection/chairtable/model_chair1/fine... | 38.063492 | 149 | 0.698499 |
bb199daa733625d342adf5be175296a13a85d0a3 | 46,447 | py | Python | astropy/io/fits/hdu/image.py | mehrdad-shokri/astropy | abd73b51277694338c8eca7639da956dcd06f207 | [
"BSD-3-Clause"
] | 4 | 2021-03-25T15:49:56.000Z | 2021-12-15T09:10:04.000Z | astropy/io/fits/hdu/image.py | mehrdad-shokri/astropy | abd73b51277694338c8eca7639da956dcd06f207 | [
"BSD-3-Clause"
] | null | null | null | astropy/io/fits/hdu/image.py | mehrdad-shokri/astropy | abd73b51277694338c8eca7639da956dcd06f207 | [
"BSD-3-Clause"
] | 3 | 2021-03-28T16:13:00.000Z | 2021-07-16T10:27:25.000Z | # Licensed under a 3-clause BSD style license - see PYFITS.rst
import sys
import mmap
import warnings
import numpy as np
from .base import DELAYED, _ValidHDU, ExtensionHDU, BITPIX2DTYPE, DTYPE2BITPIX
from astropy.io.fits.header import Header
from astropy.io.fits.util import _is_pseudo_unsigned, _unsigned_zero, _is_i... | 38.227984 | 89 | 0.572394 |
4e40ce6b093ae76b0dc077e961efc7a52cdb6d3f | 3,024 | py | Python | train_lm.py | phecda-xu/TensorflowASR | 138fb5ee507a4675a53ff4c50c06a5af0d7bcb12 | [
"Apache-2.0"
] | null | null | null | train_lm.py | phecda-xu/TensorflowASR | 138fb5ee507a4675a53ff4c50c06a5af0d7bcb12 | [
"Apache-2.0"
] | null | null | null | train_lm.py | phecda-xu/TensorflowASR | 138fb5ee507a4675a53ff4c50c06a5af0d7bcb12 | [
"Apache-2.0"
] | 1 | 2020-12-29T01:26:14.000Z | 2020-12-29T01:26:14.000Z | from utils.user_config import UserConfig
from LMmodel.trm_lm import LM
from trainer import lm_runners
from dataloaders.lm_dataloader import LM_DataLoader
import tensorflow as tf
import logging
logging.basicConfig(level=logging.DEBUG, format='%(asctime)s - %(name)s - %(levelname)s - %(message)s')
class LM_Train... | 48 | 121 | 0.580026 |
6c4d77557002c22856dbd1e7cc1d9751fb7f8ee4 | 597 | py | Python | demo/karate/views.py | Miftaudeen/django-swingtime | a2ef774eecf65c5440b39aead79c97aca8ef6a07 | [
"MIT"
] | null | null | null | demo/karate/views.py | Miftaudeen/django-swingtime | a2ef774eecf65c5440b39aead79c97aca8ef6a07 | [
"MIT"
] | null | null | null | demo/karate/views.py | Miftaudeen/django-swingtime | a2ef774eecf65c5440b39aead79c97aca8ef6a07 | [
"MIT"
] | null | null | null | from datetime import datetime, timedelta
from django.shortcuts import get_object_or_404, render_to_response
from swingtime import models as swingtime
def event_type(request, abbr):
event_type = get_object_or_404(swingtime.EventType, abbr=abbr)
now = datetime.now()
occurrences = swingtime.Occurrence.objec... | 31.421053 | 66 | 0.745394 |
d22494021dc71693bac0ef23c512019d5cc24f45 | 1,535 | py | Python | narwhallet/core/kex/KEXc.py | Snider/narwhallet | 0d528763c735f1e68b8264e302854d41e7cf1956 | [
"MIT"
] | 3 | 2021-12-29T11:25:13.000Z | 2022-01-16T13:57:17.000Z | narwhallet/core/kex/KEXc.py | Snider/narwhallet | 0d528763c735f1e68b8264e302854d41e7cf1956 | [
"MIT"
] | null | null | null | narwhallet/core/kex/KEXc.py | Snider/narwhallet | 0d528763c735f1e68b8264e302854d41e7cf1956 | [
"MIT"
] | 1 | 2022-01-16T13:57:20.000Z | 2022-01-16T13:57:20.000Z | import json
import time
from typing import List
from narwhallet.core.kex.peer import _peer
from narwhallet.core.kex.api import _api
from narwhallet.core.kex.cmd_base import _cmd
class KEXclient():
def __init__(self):
self.api: _api = _api()
self.peers: List[_peer] = []
self.active_peer: in... | 28.425926 | 77 | 0.553746 |
1023e2cb0cf41677c74e2198cfbb74547492757e | 2,235 | py | Python | github2/bin/search_repos.py | ask/python-github2 | 4287019520643e2fcd46c9c5b3aac439cdc35b88 | [
"BSD-3-Clause"
] | 26 | 2015-01-21T20:23:36.000Z | 2022-02-18T05:36:35.000Z | github2/bin/search_repos.py | ask/python-github2 | 4287019520643e2fcd46c9c5b3aac439cdc35b88 | [
"BSD-3-Clause"
] | 5 | 2019-05-26T21:26:49.000Z | 2022-01-14T02:29:38.000Z | github2/bin/search_repos.py | ask/python-github2 | 4287019520643e2fcd46c9c5b3aac439cdc35b88 | [
"BSD-3-Clause"
] | 13 | 2015-03-06T20:30:55.000Z | 2021-07-19T10:17:56.000Z | #! /usr/bin/env python
# coding: utf-8
"""github_search_repos - search for repositories on GitHub"""
# Copyright (C) 2011-2012 James Rowe <jnrowe@gmail.com>
#
# This file is part of python-github2, and is made available under the 3-clause
# BSD license. See LICENSE for the full details.
import logging
import sys
fr... | 26.294118 | 79 | 0.624609 |
3e93a04bc62c917252584b1d8f802d4be01bcbea | 2,277 | py | Python | tensorflow_federated/python/core/impl/compiler/compiler_pipeline.py | RosieLiu/federated | 04d460feb39df0b9bccce4214c631b3f39957846 | [
"Apache-2.0"
] | null | null | null | tensorflow_federated/python/core/impl/compiler/compiler_pipeline.py | RosieLiu/federated | 04d460feb39df0b9bccce4214c631b3f39957846 | [
"Apache-2.0"
] | null | null | null | tensorflow_federated/python/core/impl/compiler/compiler_pipeline.py | RosieLiu/federated | 04d460feb39df0b9bccce4214c631b3f39957846 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018, The TensorFlow Federated 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 o... | 43.788462 | 79 | 0.762846 |
261aa0d4234f9cb1128c503e3aec256061398975 | 434 | py | Python | django/core/management/commands/sqlflush.py | rawwell/django | 6b3264671ead4604f26cbd2b71e8d6a02945bf0c | [
"BSD-3-Clause"
] | 1 | 2016-05-08T12:24:22.000Z | 2016-05-08T12:24:22.000Z | django/core/management/commands/sqlflush.py | rawwell/django | 6b3264671ead4604f26cbd2b71e8d6a02945bf0c | [
"BSD-3-Clause"
] | null | null | null | django/core/management/commands/sqlflush.py | rawwell/django | 6b3264671ead4604f26cbd2b71e8d6a02945bf0c | [
"BSD-3-Clause"
] | 1 | 2015-11-19T14:45:16.000Z | 2015-11-19T14:45:16.000Z | from django.core.management.base import NoArgsCommand
class Command(NoArgsCommand):
help = "Returns a list of the SQL statements required to return all tables in the database to the state they were in just after they were installed."
output_transaction = True
def handle_noargs(self, **options):
f... | 39.454545 | 153 | 0.748848 |
bac685dfbeed0670b9d91247ea153c0acc2c2ac0 | 11,640 | py | Python | salt/modules/mac_portspkg.py | BnGx/salt | 0a560791488d1585bd00b4cfd91a26bb0ac9b459 | [
"Apache-2.0"
] | 1 | 2021-09-06T00:14:04.000Z | 2021-09-06T00:14:04.000Z | salt/modules/mac_portspkg.py | BnGx/salt | 0a560791488d1585bd00b4cfd91a26bb0ac9b459 | [
"Apache-2.0"
] | 2 | 2021-04-30T21:17:57.000Z | 2021-12-13T20:40:23.000Z | salt/modules/mac_portspkg.py | Kamatera/salt | ac960a3308617657d9d039dae9108e0045ab3929 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Support for MacPorts under macOS.
This module has some caveats.
1. Updating the database of available ports is quite resource-intensive.
However, `refresh=True` is the default for all operations that need an
up-to-date copy of available ports. Consider `refresh=False` when you are
sure no... | 25.695364 | 102 | 0.633333 |
6c09e276485d144532ac2ba0817ca35c1d4d277c | 633 | py | Python | setup.py | daveshap/maragi_core | fd538be882e72f5f134a57c8596dd921c91ce72b | [
"MIT"
] | 2 | 2021-04-11T21:21:28.000Z | 2021-06-29T16:44:46.000Z | setup.py | daveshap/maragi_core | fd538be882e72f5f134a57c8596dd921c91ce72b | [
"MIT"
] | 14 | 2020-01-15T14:09:11.000Z | 2020-01-29T18:45:46.000Z | setup.py | daveshap/maragi_core | fd538be882e72f5f134a57c8596dd921c91ce72b | [
"MIT"
] | null | null | null | from setuptools import setup
with open("README.md", "r") as fh:
long_description = fh.read()
"""
cheat sheet reminder for myself because I'm dumb
python setup.py sdist bdist_wheel
python -m twine upload dist/*
"""
setup(name='maragi',
version='0.2.4',
description='Microservices Architecture for Ro... | 24.346154 | 96 | 0.690363 |
72ebc3c23f986cc5b9891e5679ff339ec90ebf01 | 238 | py | Python | python/ray/rllib/RL/envs/target_tracking/metadata.py | christopher-hsu/ray | abe84b596253411607a91b3a44c135f5e9ac6ac7 | [
"Apache-2.0"
] | 1 | 2019-07-08T15:29:25.000Z | 2019-07-08T15:29:25.000Z | python/ray/rllib/RL/envs/target_tracking/metadata.py | christopher-hsu/ray | abe84b596253411607a91b3a44c135f5e9ac6ac7 | [
"Apache-2.0"
] | null | null | null | python/ray/rllib/RL/envs/target_tracking/metadata.py | christopher-hsu/ray | abe84b596253411607a91b3a44c135f5e9ac6ac7 | [
"Apache-2.0"
] | null | null | null | METADATA={
'sensor_r': 10.0,
'fov' : 120,
'sensor_r_sd': 0.2, # sensor range noise
'sensor_b_sd': 0.01, # sensor bearing noise
}
TARGET_INIT_COV = 30.0
INIT_DISTANCE = 8.0
MARGIN = 1.0
MARGIN2WALL = 0.5 | 23.8 | 51 | 0.588235 |
91c4072901ea0b628897c3c56b712e1487bc70ec | 4,345 | py | Python | reading_files_from_OPENDAP.py | sagarlimbu0/OCO2-OCO3 | b7d18f08ee6d01e6fd8fe7201cbd77d7625f8025 | [
"MIT"
] | null | null | null | reading_files_from_OPENDAP.py | sagarlimbu0/OCO2-OCO3 | b7d18f08ee6d01e6fd8fe7201cbd77d7625f8025 | [
"MIT"
] | null | null | null | reading_files_from_OPENDAP.py | sagarlimbu0/OCO2-OCO3 | b7d18f08ee6d01e6fd8fe7201cbd77d7625f8025 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# # Extracting files directly from OPENDAC website
#
# ### libraries : netCDF4, pydap.client (READ netCDF files)
# ### Library: 'BeautifulSoup' to read the contents of the webpage
# * Reading the contents from the desired web page (here, OCO2)
# * We pass the parameters: Instrume... | 20.115741 | 137 | 0.694131 |
d21c47e2e18e9cc0427eb636d76ea702827b5a6b | 3,180 | py | Python | graph_traversal.py | spitz-dan-l/param-space | 818a901e4cb50295481900deb070cab48579f0e5 | [
"MIT"
] | null | null | null | graph_traversal.py | spitz-dan-l/param-space | 818a901e4cb50295481900deb070cab48579f0e5 | [
"MIT"
] | null | null | null | graph_traversal.py | spitz-dan-l/param-space | 818a901e4cb50295481900deb070cab48579f0e5 | [
"MIT"
] | null | null | null | from param_space import ParamSpace, points_map, unit_map, contract_point, point_region, update_point, MappedFunction
class V: #Vertex
def __init__(self, id):
self.id = id
def __repr__(self):
return 'V({})'.format(self.id)
class E: #Edge (directed)
def __init__(self, v1, v2):
self.... | 35.333333 | 116 | 0.665094 |
f92155914e4db371658c3b0197ac5d0bca64e72e | 34,065 | py | Python | test/functional/rpc_fundrawtransaction.py | bbergaoui/bastoji-coin | 1752e38216f32c6b1559bc246ec885097dae88c4 | [
"MIT"
] | null | null | null | test/functional/rpc_fundrawtransaction.py | bbergaoui/bastoji-coin | 1752e38216f32c6b1559bc246ec885097dae88c4 | [
"MIT"
] | null | null | null | test/functional/rpc_fundrawtransaction.py | bbergaoui/bastoji-coin | 1752e38216f32c6b1559bc246ec885097dae88c4 | [
"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.
"""Test the fundrawtransaction RPC."""
from decimal import Decimal
from test_framework.test_framework imp... | 45.179045 | 223 | 0.574255 |
bd5da954a9d61064df486f2e054876a60de904c0 | 4,072 | py | Python | travis_pypi_setup.py | RJTK/dwglasso | b7f1715d626227976a940b6f0030f29fd719512e | [
"MIT"
] | 1 | 2022-01-02T20:44:43.000Z | 2022-01-02T20:44:43.000Z | travis_pypi_setup.py | RJTK/dwglasso | b7f1715d626227976a940b6f0030f29fd719512e | [
"MIT"
] | null | null | null | travis_pypi_setup.py | RJTK/dwglasso | b7f1715d626227976a940b6f0030f29fd719512e | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Update encrypted deploy password in Travis config file."""
from __future__ import print_function
import base64
import json
import os
from getpass import getpass
import yaml
from cryptography.hazmat.primitives.serialization import load_pem_public_key
from cryptography.h... | 31.8125 | 79 | 0.700393 |
42d240490c03bd7de46056f0b186ce08a0408324 | 12,207 | py | Python | Scripts/04_RunGUI.py | TrevorHD/CBCrypto | b037ef7a2aad2c625c33804ac27136743bd4e7b4 | [
"MIT"
] | 2 | 2021-06-08T20:54:26.000Z | 2021-08-11T05:53:22.000Z | Scripts/04_RunGUI.py | TrevorHD/CBCrypto | b037ef7a2aad2c625c33804ac27136743bd4e7b4 | [
"MIT"
] | 11 | 2021-06-11T16:25:58.000Z | 2021-08-17T17:26:50.000Z | Scripts/04_RunGUI.py | TrevorHD/CBCrypto | b037ef7a2aad2c625c33804ac27136743bd4e7b4 | [
"MIT"
] | null | null | null | ##### Run login screen ------------------------------------------------------------------------------------
# Create TkInter window
w1 = Tk()
# Set application ID so icon shows up on Windows taskbar
ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID(u'process.cbcrypto')
# Set window theme
w1.tk.call("lapp... | 40.554817 | 107 | 0.626116 |
4fb9bb6ac1a0d066ca67f492d7cd666a52c5e658 | 1,168 | py | Python | tensorflow/python/estimator/inputs/inputs.py | EricRemmerswaal/tensorflow | 141ff27877579c81a213fa113bd1b474c1749aca | [
"Apache-2.0"
] | 190,993 | 2015-11-09T13:17:30.000Z | 2022-03-31T23:05:27.000Z | tensorflow/python/estimator/inputs/inputs.py | EricRemmerswaal/tensorflow | 141ff27877579c81a213fa113bd1b474c1749aca | [
"Apache-2.0"
] | 48,461 | 2015-11-09T14:21:11.000Z | 2022-03-31T23:17:33.000Z | tensorflow/python/estimator/inputs/inputs.py | EricRemmerswaal/tensorflow | 141ff27877579c81a213fa113bd1b474c1749aca | [
"Apache-2.0"
] | 104,981 | 2015-11-09T13:40:17.000Z | 2022-03-31T19:51:54.000Z | # Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 40.275862 | 86 | 0.726884 |
9cf12f18592797146f9c12687e5f46f84fca028e | 1,672 | py | Python | app/recipe/serializers.py | capicuaagustin/recipe-app-api | 6e20594f5f306a9b7859c031919234f686028141 | [
"MIT"
] | null | null | null | app/recipe/serializers.py | capicuaagustin/recipe-app-api | 6e20594f5f306a9b7859c031919234f686028141 | [
"MIT"
] | null | null | null | app/recipe/serializers.py | capicuaagustin/recipe-app-api | 6e20594f5f306a9b7859c031919234f686028141 | [
"MIT"
] | null | null | null | from rest_framework import serializers
from core.models import Tag, Ingredient, Recipe
class TagSerializer(serializers.ModelSerializer):
"""Serializer for tag objects"""
class Meta:
model = Tag
fields = ('id', 'name')
read_only_fields = ('id',)
class IngredientSerializer(serializer... | 26.125 | 65 | 0.645933 |
4f596062b065f72f889e44a59f39db981955cde0 | 2,875 | py | Python | arcade_universe/gradient_textures.py | caglar/Arcade-Universe | 2b8e4aa44756bcfc16218ab2f0732c33ca85a006 | [
"BSD-3-Clause"
] | 24 | 2015-03-24T04:24:02.000Z | 2020-10-27T02:42:15.000Z | arcade_universe/gradient_textures.py | caglar/Arcade-Universe | 2b8e4aa44756bcfc16218ab2f0732c33ca85a006 | [
"BSD-3-Clause"
] | null | null | null | arcade_universe/gradient_textures.py | caglar/Arcade-Universe | 2b8e4aa44756bcfc16218ab2f0732c33ca85a006 | [
"BSD-3-Clause"
] | 9 | 2015-03-24T04:24:10.000Z | 2020-05-04T12:30:37.000Z | import random
import colorsys
import numpy as np
from itertools import izip_longest
def get_radial_img_data(width, height):
return get_data(width, height, gradient(RADIAL(0.5, 0.5), NO_NOISE,
[(1.0, (0xDD, 0xDD, 0xDD), (0x10, 0x12, 0x13)),]))
def get_gradient_img_data(width, height):
return get_data(... | 32.303371 | 86 | 0.595478 |
19709f1b95d13dae545f574c860b28d5bcf495b2 | 2,472 | py | Python | freggersbot/media/background.py | Jan000/Python-Freggers-Bot | abbfc5a96b22afcd94af6bf057ba72b77693a6e2 | [
"MIT"
] | null | null | null | freggersbot/media/background.py | Jan000/Python-Freggers-Bot | abbfc5a96b22afcd94af6bf057ba72b77693a6e2 | [
"MIT"
] | null | null | null | freggersbot/media/background.py | Jan000/Python-Freggers-Bot | abbfc5a96b22afcd94af6bf057ba72b77693a6e2 | [
"MIT"
] | null | null | null | from .decoder import Decoder, BitMapData
class LevelBackground:
def __init__(self, area_name, room_name, brightness, level_size):
self.area_name = area_name
self.room_name = room_name
self.brightness = brightness
self.level_size = level_size
self.identifier = area_name + '.... | 36.895522 | 167 | 0.624191 |
c0c320cdf743f4cda3957ab10bcb09bc7c5dd640 | 2,931 | py | Python | lambda/translations.py | salendron/alexa-skill-little-light | f5067bd82c47aaa755d67f201bb27114ce985162 | [
"MIT"
] | null | null | null | lambda/translations.py | salendron/alexa-skill-little-light | f5067bd82c47aaa755d67f201bb27114ce985162 | [
"MIT"
] | null | null | null | lambda/translations.py | salendron/alexa-skill-little-light | f5067bd82c47aaa755d67f201bb27114ce985162 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function
messages = {
"de":{
"milestone-phrase":"#caption# ist diese Woche \"#name#\". #description#",
"briefing-phrase":"Hier ist dein Destiny Info Briefing: ",
"nightfall-phrase":"Der Nightfall Strike diese Woche ... | 41.871429 | 114 | 0.59536 |
c0b9db0433bea9ec0cb35628922621c7cdc188cc | 84 | py | Python | src/conference_scheduler/heuristics/__init__.py | ChahalMandeep/ConferenceScheduler | e5a0eff8796ba5711b5c3b591ff4b9a2e0f61a04 | [
"MIT"
] | 46 | 2017-04-30T17:37:38.000Z | 2022-03-29T12:52:38.000Z | src/conference_scheduler/heuristics/__init__.py | ChahalMandeep/ConferenceScheduler | e5a0eff8796ba5711b5c3b591ff4b9a2e0f61a04 | [
"MIT"
] | 95 | 2017-05-01T16:30:04.000Z | 2018-11-07T10:48:50.000Z | src/conference_scheduler/heuristics/__init__.py | ChahalMandeep/ConferenceScheduler | e5a0eff8796ba5711b5c3b591ff4b9a2e0f61a04 | [
"MIT"
] | 11 | 2017-05-01T16:17:46.000Z | 2022-03-29T12:52:41.000Z | from .utils import *
from .hill_climber import *
from .simulated_annealing import *
| 21 | 34 | 0.785714 |
1c5f398e75d4c545df68eb85c2bb02c3d6739081 | 16,700 | py | Python | tests/flow/test_function_calls.py | AviAvni/RedisGraph | 622ecf71fa3d342deb2f3c7ab16b388652bd71d0 | [
"Ruby",
"ISC",
"BSD-3-Clause",
"MIT"
] | null | null | null | tests/flow/test_function_calls.py | AviAvni/RedisGraph | 622ecf71fa3d342deb2f3c7ab16b388652bd71d0 | [
"Ruby",
"ISC",
"BSD-3-Clause",
"MIT"
] | null | null | null | tests/flow/test_function_calls.py | AviAvni/RedisGraph | 622ecf71fa3d342deb2f3c7ab16b388652bd71d0 | [
"Ruby",
"ISC",
"BSD-3-Clause",
"MIT"
] | null | null | null | import redis
import os
import sys
import json
from RLTest import Env
from base import FlowTestsBase
from redisgraph import Graph, Node, Edge
graph = None
redis_con = None
people = ["Roi", "Alon", "Ailon", "Boaz"]
class testFunctionCallsFlow(FlowTestsBase):
def __init__(self):
self.env = Env(decodeRespons... | 42.602041 | 449 | 0.601976 |
ca330d244486d58772420c4e15628b5e18600f4a | 13,232 | py | Python | MoinMoin/script/old/migration/12_to_13_mig05.py | RealTimeWeb/wikisite | 66a22c68c172f0ebb3c88a9885ccd33e2d59c3c5 | [
"Apache-2.0"
] | null | null | null | MoinMoin/script/old/migration/12_to_13_mig05.py | RealTimeWeb/wikisite | 66a22c68c172f0ebb3c88a9885ccd33e2d59c3c5 | [
"Apache-2.0"
] | 3 | 2020-06-26T21:21:32.000Z | 2020-06-26T21:21:36.000Z | wiki/MoinMoin/script/old/migration/12_to_13_mig05.py | simtk/src | 52086415ef60527e6556698c6e216e4217961d53 | [
"BSD-2-Clause",
"MIT"
] | 2 | 2017-01-25T20:06:44.000Z | 2021-03-25T18:39:55.000Z | #!/usr/bin/env python
"""
migration from moin 1.3 < patch-221 to moin 1.3 >= patch-221
We need to make versioning completely different. Problem:
* old versioning used UNIX timestamps (32bits), but had collisions due
to seconds resolution (on the FS, they were avoided by using floats
... | 39.855422 | 112 | 0.573458 |
15f81d320548766e771a90fdb1f8487093b6ecd3 | 848 | py | Python | medium/python3/c0339_739_daily-temperatures/00_leetcode_0339.py | drunkwater/leetcode | 8cc4a07763e71efbaedb523015f0c1eff2927f60 | [
"Ruby"
] | null | null | null | medium/python3/c0339_739_daily-temperatures/00_leetcode_0339.py | drunkwater/leetcode | 8cc4a07763e71efbaedb523015f0c1eff2927f60 | [
"Ruby"
] | null | null | null | medium/python3/c0339_739_daily-temperatures/00_leetcode_0339.py | drunkwater/leetcode | 8cc4a07763e71efbaedb523015f0c1eff2927f60 | [
"Ruby"
] | 3 | 2018-02-09T02:46:48.000Z | 2021-02-20T08:32:03.000Z | # DRUNKWATER TEMPLATE(add description and prototypes)
# Question Title and Description on leetcode.com
# Function Declaration and Function Prototypes on leetcode.com
#739. Daily Temperatures
#Given a list of daily temperatures, produce a list that, for each day in the input, tells you how many days you would have to wa... | 49.882353 | 228 | 0.708726 |
30673a8d9da9438c0b690df8836bf1c9efea981a | 31,597 | py | Python | pyethapp/jsonrpc.py | AFDudley/rn_service | 4f7b55e5cd4ac2001725b40ad46ab0a1e32f9ea0 | [
"BSD-3-Clause"
] | null | null | null | pyethapp/jsonrpc.py | AFDudley/rn_service | 4f7b55e5cd4ac2001725b40ad46ab0a1e32f9ea0 | [
"BSD-3-Clause"
] | null | null | null | pyethapp/jsonrpc.py | AFDudley/rn_service | 4f7b55e5cd4ac2001725b40ad46ab0a1e32f9ea0 | [
"BSD-3-Clause"
] | null | null | null | from copy import deepcopy
from decorator import decorator
from collections import Iterable
import inspect
import ethereum.blocks
from ethereum.utils import (is_numeric, is_string, int_to_big_endian, encode_hex, decode_hex, sha3,
zpad)
import ethereum.slogging as slogging
from ethereum.transa... | 32.54068 | 99 | 0.630693 |
f99c2eee6fce69a84a54109c9051863ccb377553 | 2,523 | py | Python | app/QSingleApplication.py | herry2016/lib2 | bd9f81865aa1d2b58bbda3bbdc3ad0f32bab527e | [
"BSD-3-Clause"
] | null | null | null | app/QSingleApplication.py | herry2016/lib2 | bd9f81865aa1d2b58bbda3bbdc3ad0f32bab527e | [
"BSD-3-Clause"
] | null | null | null | app/QSingleApplication.py | herry2016/lib2 | bd9f81865aa1d2b58bbda3bbdc3ad0f32bab527e | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
## Copyright (c) 2017, The Sumokoin Project (www.sumokoin.org)
'''
QSingleApplication is a wrapper class for creating single interface
of appliaction
'''
from __future__ import print_function
import sys, os
from PySide.QtGui import QApplication
from PySide.QtCore import QIO... | 36.565217 | 97 | 0.636147 |
b9e852c73fa389c7e959f94270366b0ac5404531 | 78,460 | py | Python | pysnark/poseidon_constants.py | gxavier38/pysnark | 8a2a571bef430783adf8fe28cb8bb0b0bf8a7c94 | [
"Cube"
] | 94 | 2019-05-21T09:36:58.000Z | 2022-03-25T12:27:54.000Z | pysnark/poseidon_constants.py | gxavier38/pysnark | 8a2a571bef430783adf8fe28cb8bb0b0bf8a7c94 | [
"Cube"
] | 32 | 2019-11-12T09:59:46.000Z | 2021-12-04T17:53:14.000Z | pysnark/poseidon_constants.py | gxavier38/pysnark | 8a2a571bef430783adf8fe28cb8bb0b0bf8a7c94 | [
"Cube"
] | 13 | 2020-01-02T11:01:17.000Z | 2021-10-02T11:07:11.000Z | # Poseidon constants from reference implementation
# TODO: Handle more backends
# TODO: Generate constants rather than using hardcoded values
poseidon_constants = {
"zkinterface": {
"R_F": 8,
"R_P": 60,
"t": 5,
"a": 5,
"round_constants": [[0x0eb544fee2815dda7f53e29ccac98ed7d889bb4ebd47c3864f3c2bd8... | 243.664596 | 366 | 0.929799 |
b11c9b6c556e90ce3db50bd5de8e22c506ec6b1a | 17,343 | py | Python | PaddleCV/PaddleGAN/trainer/SPADE.py | XiaoguangHu01/models | a95d49323ed504e5a9164586f171f408954fd43a | [
"Apache-2.0"
] | 4 | 2020-01-04T13:15:02.000Z | 2021-07-21T07:50:02.000Z | PaddleCV/PaddleGAN/trainer/SPADE.py | XiaoguangHu01/models | a95d49323ed504e5a9164586f171f408954fd43a | [
"Apache-2.0"
] | null | null | null | PaddleCV/PaddleGAN/trainer/SPADE.py | XiaoguangHu01/models | a95d49323ed504e5a9164586f171f408954fd43a | [
"Apache-2.0"
] | 1 | 2021-05-27T08:00:16.000Z | 2021-05-27T08:00:16.000Z | #copyright (c) 2019 PaddlePaddle Authors. All Rights Reserve.
#
#Licensed under the Apache License, Version 2.0 (the "License");
#you may not use this file except in compliance with the License.
#You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
#Unless required by applicable l... | 40.807059 | 84 | 0.511446 |
e488615684de90f8228e6caa426d0bc2cfa1f37c | 61,559 | py | Python | tests/test_process.py | kvalev/coveragepy | a09b1714c26cde1542044f44295600679d4368fc | [
"Apache-2.0"
] | null | null | null | tests/test_process.py | kvalev/coveragepy | a09b1714c26cde1542044f44295600679d4368fc | [
"Apache-2.0"
] | null | null | null | tests/test_process.py | kvalev/coveragepy | a09b1714c26cde1542044f44295600679d4368fc | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0
# For details: https://github.com/nedbat/coveragepy/blob/master/NOTICE.txt
"""Tests for process behavior of coverage.py."""
import glob
import os
import os.path
import re
import stat
import sys
import sysconfig
import text... | 37.240774 | 98 | 0.590945 |
27e976fe38281ad9e9e0ca451d2b29532d98cf5b | 13,574 | py | Python | federated/dp_ftrl/run_stackoverflow.py | luke-who/TFF | fe9f44a504bc51b603a3ab9a181148da0aa9612f | [
"MIT"
] | 2 | 2021-10-19T13:55:11.000Z | 2021-11-11T11:26:05.000Z | federated/dp_ftrl/run_stackoverflow.py | luke-who/TFF | fe9f44a504bc51b603a3ab9a181148da0aa9612f | [
"MIT"
] | null | null | null | federated/dp_ftrl/run_stackoverflow.py | luke-who/TFF | fe9f44a504bc51b603a3ab9a181148da0aa9612f | [
"MIT"
] | null | null | null | # Copyright 2021, Google LLC.
#
# 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... | 39.231214 | 93 | 0.734934 |
bcf65460c8cdc714ccbc5545f139d1f9423df20e | 24,758 | py | Python | lib/kb_ModelIndexer/kb_ModelIndexerServer.py | scanon/kb_ModelIndexer | cbc20777521c54b6ae5ce926909dd9b53e410f90 | [
"MIT"
] | null | null | null | lib/kb_ModelIndexer/kb_ModelIndexerServer.py | scanon/kb_ModelIndexer | cbc20777521c54b6ae5ce926909dd9b53e410f90 | [
"MIT"
] | 1 | 2019-03-11T22:51:39.000Z | 2019-03-11T22:51:39.000Z | lib/kb_ModelIndexer/kb_ModelIndexerServer.py | kbaseapps/kb_ModelIndexer | cbc20777521c54b6ae5ce926909dd9b53e410f90 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import datetime
import json
import os
import random as _random
import sys
import traceback
from getopt import getopt, GetoptError
from multiprocessing import Process
from os import environ
from wsgiref.simple_server import make_server
import requests as _requests
from json... | 37.856269 | 151 | 0.548469 |
b2dbd6c001790cf19b87f0f8a9f7f0eefb31c571 | 536 | py | Python | dotbot/dotbot/context.py | wonkalous/dotfiles | 67fa339887e8f1c7cd588eec1e93e175ff8e8ed0 | [
"MIT"
] | 14 | 2019-06-09T18:02:05.000Z | 2022-03-06T21:27:22.000Z | dotbot/dotbot/context.py | wonkalous/dotfiles | 67fa339887e8f1c7cd588eec1e93e175ff8e8ed0 | [
"MIT"
] | 12 | 2020-07-26T20:12:12.000Z | 2022-01-30T13:21:04.000Z | dotbot/dotbot/context.py | wonkalous/dotfiles | 67fa339887e8f1c7cd588eec1e93e175ff8e8ed0 | [
"MIT"
] | 5 | 2019-08-20T14:32:07.000Z | 2021-08-19T07:45:49.000Z | import copy
class Context(object):
'''
Contextual data and information for plugins.
'''
def __init__(self, base_directory):
self._base_directory = base_directory
self._defaults = {}
pass
def set_base_directory(self, base_directory):
self._base_directory = base_dire... | 22.333333 | 49 | 0.666045 |
1dff7a29b1549a0d11bed333450f517d17bed94c | 859 | py | Python | var/spack/repos/builtin/packages/molcas/package.py | whitfin/spack | aabd2be31a511d0e00c1017f7311a421659319d9 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 3 | 2019-06-27T13:26:50.000Z | 2019-07-01T16:24:54.000Z | var/spack/repos/builtin/packages/molcas/package.py | openbiox/spack | bb6ec7fb40c14b37e094a860e3625af53f633174 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 75 | 2016-07-27T11:43:00.000Z | 2020-12-08T15:56:53.000Z | var/spack/repos/builtin/packages/molcas/package.py | openbiox/spack | bb6ec7fb40c14b37e094a860e3625af53f633174 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 8 | 2015-10-16T13:51:49.000Z | 2021-10-18T13:58:03.000Z | # Copyright 2013-2019 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 *
import os
class Molcas(CMakePackage):
"""Molcas is an ab initio quantum chemistry software packa... | 28.633333 | 73 | 0.708964 |
e70d16a439e8fd4186c5c0258013e24a0957095b | 873 | py | Python | changedetectionio/tests/test_ignore_regex_text.py | MadameMinty/changedetection.io | a202d4ba1c369f0c3ed892ae6f0395d972d8ecd8 | [
"Apache-2.0"
] | 3,933 | 2021-01-28T12:22:23.000Z | 2022-03-31T23:22:24.000Z | changedetectionio/tests/test_ignore_regex_text.py | MadameMinty/changedetection.io | a202d4ba1c369f0c3ed892ae6f0395d972d8ecd8 | [
"Apache-2.0"
] | 315 | 2021-02-01T18:24:47.000Z | 2022-03-31T08:59:18.000Z | changedetectionio/tests/test_ignore_regex_text.py | MadameMinty/changedetection.io | a202d4ba1c369f0c3ed892ae6f0395d972d8ecd8 | [
"Apache-2.0"
] | 258 | 2021-02-01T17:58:00.000Z | 2022-03-31T18:53:12.000Z | #!/usr/bin/python3
import time
from flask import url_for
from . util import live_server_setup
def test_setup(live_server):
live_server_setup(live_server)
# Unit test of the stripper
# Always we are dealing in utf-8
def test_strip_regex_text_func():
from changedetectionio import fetch_site_status
test_co... | 27.28125 | 76 | 0.733104 |
a3dc8460961fdb69be7cbfc807204132faa782c1 | 14,405 | py | Python | skl2onnx/common/data_types.py | xiaowuhu/sklearn-onnx | e85674a67a0a043e19c2ffe181e5d31eca8ce40b | [
"Apache-2.0"
] | 323 | 2018-12-18T20:23:19.000Z | 2022-03-25T09:47:31.000Z | skl2onnx/common/data_types.py | xiaowuhu/sklearn-onnx | e85674a67a0a043e19c2ffe181e5d31eca8ce40b | [
"Apache-2.0"
] | 408 | 2019-01-02T12:16:10.000Z | 2022-03-21T14:01:28.000Z | skl2onnx/common/data_types.py | xiaowuhu/sklearn-onnx | e85674a67a0a043e19c2ffe181e5d31eca8ce40b | [
"Apache-2.0"
] | 70 | 2018-12-20T19:36:07.000Z | 2022-03-14T06:41:36.000Z | # SPDX-License-Identifier: Apache-2.0
import numpy as np
from onnxconverter_common.data_types import ( # noqa
DataType, Int64Type, FloatType, # noqa
StringType, TensorType, # noqa
Int64TensorType, Int32TensorType, BooleanTensorType, # noqa
FloatTensorType, StringTensorType, DoubleTensorType, # noq... | 35.655941 | 92 | 0.673308 |
ea8cdbf6bc0a5ebd8b495617604470de0e6d0351 | 1,062 | py | Python | app/s3_util.py | redhat-na-ssa/mlops-prototype | 8d4bbf1cac04cea3ae8f2868537933916e843618 | [
"MIT"
] | null | null | null | app/s3_util.py | redhat-na-ssa/mlops-prototype | 8d4bbf1cac04cea3ae8f2868537933916e843618 | [
"MIT"
] | null | null | null | app/s3_util.py | redhat-na-ssa/mlops-prototype | 8d4bbf1cac04cea3ae8f2868537933916e843618 | [
"MIT"
] | null | null | null | import boto3
import os
def downloadDirectoryFromS3(bucketName: str, remoteDirectoryName: str) -> None:
"""
Download a directory from S3 storage by iterating through
the bucket objects associated with a remote folder. The
remote directory structure is preserved.
Required environment variables that n... | 37.928571 | 85 | 0.702448 |
0ec99726351758a121746f3e07367c2f02eb7ab3 | 16,083 | py | Python | spaghetti/util.py | rahul799/spaghetti | d4930d62c9073791b9f08dac6f4ee698808050e2 | [
"BSD-3-Clause"
] | null | null | null | spaghetti/util.py | rahul799/spaghetti | d4930d62c9073791b9f08dac6f4ee698808050e2 | [
"BSD-3-Clause"
] | null | null | null | spaghetti/util.py | rahul799/spaghetti | d4930d62c9073791b9f08dac6f4ee698808050e2 | [
"BSD-3-Clause"
] | null | null | null | from warnings import warn
from libpysal import cg
from libpysal.common import requires
from rtree import Rtree
try:
import geopandas as gpd
from shapely.geometry import Point, LineString
except ImportError:
err_msg = (
"geopandas/shapely not available. " + "Some functionality will be disabled."
... | 26.539604 | 85 | 0.596033 |
0e5fd81e1bfae958865e61b94705869848cb7fbd | 3,787 | py | Python | montecarlo/ivconfig_many_z_many_t.py | microsoft/AdversarialGMM | 7a5cd51353c8a81e16c01220b71f77e4e1102add | [
"MIT"
] | 23 | 2020-12-01T22:55:40.000Z | 2022-01-26T04:11:14.000Z | montecarlo/ivconfig_many_z_many_t.py | microsoft/AdversarialGMM | 7a5cd51353c8a81e16c01220b71f77e4e1102add | [
"MIT"
] | null | null | null | montecarlo/ivconfig_many_z_many_t.py | microsoft/AdversarialGMM | 7a5cd51353c8a81e16c01220b71f77e4e1102add | [
"MIT"
] | 10 | 2020-12-05T17:12:49.000Z | 2022-01-10T23:42:37.000Z | # Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
import ivfunctions
from mcpy import metrics
from mcpy import plotting
from mliv.dgps import fn_dict
from raw_plots import raw_metric, plot_raw
CONFIG = {
"target_dir": "many_z_many_t",
"reload_results": False,
"... | 43.034091 | 122 | 0.525482 |
7d3170b019700d0f38ce2f51b75b286b96104c1a | 7,925 | py | Python | 04_animation_tutorials/04_10_flexibility.py | rubio/pygame-tutorials | 9e6269f8a4ac7650921bab53daca056e44607a64 | [
"Apache-2.0"
] | null | null | null | 04_animation_tutorials/04_10_flexibility.py | rubio/pygame-tutorials | 9e6269f8a4ac7650921bab53daca056e44607a64 | [
"Apache-2.0"
] | null | null | null | 04_animation_tutorials/04_10_flexibility.py | rubio/pygame-tutorials | 9e6269f8a4ac7650921bab53daca056e44607a64 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
#
#
#
#
#
# documentation string of this module
"""
Animation tutorials.
"""
# some informational variables
__author__ = "$Author: DR0ID $"
__version__ = "$Revision: 184 $"
__date__ = "$Date: 2007-08-24 19:22:06 +0200 (Fr, 24 Aug 2007) $"
__license__ = 'GPL2, see: gpl-2.0.txt'
__copyr... | 31.955645 | 107 | 0.564795 |
819041ce7693924715194a9a8f0576de578ae3af | 487 | py | Python | httptools/parser/errors.py | 1st1/httptools | 5f4abd3a816b5297e9ce19c06d01fc864980a20c | [
"MIT"
] | 1 | 2020-02-20T15:20:51.000Z | 2020-02-20T15:20:51.000Z | httptools/parser/errors.py | 1st1/httptools | 5f4abd3a816b5297e9ce19c06d01fc864980a20c | [
"MIT"
] | null | null | null | httptools/parser/errors.py | 1st1/httptools | 5f4abd3a816b5297e9ce19c06d01fc864980a20c | [
"MIT"
] | null | null | null | __all__ = ('HttpParserError',
'HttpParserCallbackError',
'HttpParserInvalidStatusError',
'HttpParserInvalidMethodError',
'HttpParserInvalidURLError')
class HttpParserError(Exception):
pass
class HttpParserCallbackError(HttpParserError):
pass
class HttpParserInva... | 18.730769 | 52 | 0.737166 |
556e4f44a66ba426fd1b442181a3cf89ad265e0f | 169 | py | Python | src/util/meta/varname.py | ireina7/gzsl-seg | 9aad220274b4a58b59f5da430f873b5dfc21e458 | [
"MIT"
] | 1 | 2022-03-15T04:46:00.000Z | 2022-03-15T04:46:00.000Z | src/util/meta/varname.py | ireina7/gzsl-seg | 9aad220274b4a58b59f5da430f873b5dfc21e458 | [
"MIT"
] | null | null | null | src/util/meta/varname.py | ireina7/gzsl-seg | 9aad220274b4a58b59f5da430f873b5dfc21e458 | [
"MIT"
] | null | null | null | from util.syntax import *
def varname(var, dir):
dir = locals()
print(dir)
return [ key
for key, val in dir.items() if id(val) == id(var)
]
end(varname)
| 14.083333 | 53 | 0.609467 |
fe511cc7890f7304a40284903da211af61bd25e4 | 1,930 | py | Python | find_same_person.py | yeyupiaoling/FaceDataset | d218cf1ad1d38efee365882aa9cdd824a04d931f | [
"Apache-2.0"
] | 73 | 2019-03-28T05:15:14.000Z | 2022-03-18T10:05:08.000Z | find_same_person.py | yeyupiaoling/FaceDataset | d218cf1ad1d38efee365882aa9cdd824a04d931f | [
"Apache-2.0"
] | 1 | 2019-06-04T05:29:34.000Z | 2022-01-23T08:34:29.000Z | find_same_person.py | yeyupiaoling/FaceDataset | d218cf1ad1d38efee365882aa9cdd824a04d931f | [
"Apache-2.0"
] | 21 | 2019-04-12T03:31:56.000Z | 2022-03-14T15:06:43.000Z | import os
import shutil
import face_recognition
import numpy
# 寻找同一个人的作为0.jpg,作为主的参考图片
def find_same_person(person_image_path):
# 获取该人中的所有图片
image_paths = os.listdir(person_image_path)
known_face_encodings = []
for image_path in image_paths:
img_path = os.path.join(person_image_path, image_pa... | 35.090909 | 106 | 0.620207 |
50bec382200bd62ba4d9e93464ef09d9b1a09ac0 | 406 | py | Python | mlrun/frameworks/keras/callbacks/__init__.py | Hedingber/mlrun | e2269718fcc7caa7e1aa379ac28495830b45f9da | [
"Apache-2.0"
] | null | null | null | mlrun/frameworks/keras/callbacks/__init__.py | Hedingber/mlrun | e2269718fcc7caa7e1aa379ac28495830b45f9da | [
"Apache-2.0"
] | 1 | 2020-12-31T14:36:29.000Z | 2020-12-31T14:36:29.000Z | mlrun/frameworks/keras/callbacks/__init__.py | Hedingber/mlrun | e2269718fcc7caa7e1aa379ac28495830b45f9da | [
"Apache-2.0"
] | null | null | null | # flake8: noqa - this is until we take care of the F401 violations with respect to __all__ & sphinx
from mlrun.frameworks.keras.callbacks.logging_callback import (
LoggingCallback,
TrackableType,
)
from mlrun.frameworks.keras.callbacks.mlrun_logging_callback import MLRunLoggingCallback
from mlrun.frameworks.ke... | 40.6 | 100 | 0.820197 |
e12f4df2093ff7fb016730323b5f700dde4e2e61 | 1,446 | py | Python | python_code/vnev/Lib/site-packages/jdcloud_sdk/services/rds/apis/DescribeInstanceAttributesRequest.py | Ureimu/weather-robot | 7634195af388538a566ccea9f8a8534c5fb0f4b6 | [
"MIT"
] | 14 | 2018-04-19T09:53:56.000Z | 2022-01-27T06:05:48.000Z | python_code/vnev/Lib/site-packages/jdcloud_sdk/services/rds/apis/DescribeInstanceAttributesRequest.py | Ureimu/weather-robot | 7634195af388538a566ccea9f8a8534c5fb0f4b6 | [
"MIT"
] | 15 | 2018-09-11T05:39:54.000Z | 2021-07-02T12:38:02.000Z | python_code/vnev/Lib/site-packages/jdcloud_sdk/services/rds/apis/DescribeInstanceAttributesRequest.py | Ureimu/weather-robot | 7634195af388538a566ccea9f8a8534c5fb0f4b6 | [
"MIT"
] | 33 | 2018-04-20T05:29:16.000Z | 2022-02-17T09:10:05.000Z | # coding=utf8
# Copyright 2018 JDCLOUD.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/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... | 32.863636 | 85 | 0.726141 |
3e19fed823d8a3b9c8e7178491487bd05013ccb0 | 3,313 | py | Python | django/contrib/humanize/templatetags/humanize.py | laurilarjo/halvinbensa-appengine | 82602835914e70b6c71993d4b570e1df32a0e71e | [
"BSD-3-Clause"
] | 19 | 2015-05-01T19:59:03.000Z | 2021-12-09T08:03:16.000Z | django/contrib/humanize/templatetags/humanize.py | alex/django-old | 6f964c8f03e5d25c9e36898a001c8463f82fbb81 | [
"BSD-3-Clause"
] | 1 | 2021-06-30T10:10:56.000Z | 2021-06-30T10:10:56.000Z | django/contrib/humanize/templatetags/humanize.py | alex/django-old | 6f964c8f03e5d25c9e36898a001c8463f82fbb81 | [
"BSD-3-Clause"
] | 30 | 2015-03-25T19:40:07.000Z | 2021-05-28T22:59:26.000Z | from django.utils.translation import ungettext, ugettext as _
from django.utils.encoding import force_unicode
from django import template
from django.template import defaultfilters
from datetime import date
import re
register = template.Library()
def ordinal(value):
"""
Converts an integer to its ordinal as a... | 33.13 | 119 | 0.632056 |
e469b222f23d5b08269411f0cc48b03c857ad390 | 979 | py | Python | api.py | reesecake/social-ketchup | 4c639f7bccdfa319c0876c34f4b4a0002bc4d22d | [
"MIT"
] | null | null | null | api.py | reesecake/social-ketchup | 4c639f7bccdfa319c0876c34f4b4a0002bc4d22d | [
"MIT"
] | null | null | null | api.py | reesecake/social-ketchup | 4c639f7bccdfa319c0876c34f4b4a0002bc4d22d | [
"MIT"
] | null | null | null | from flask import Flask
from flask_bootstrap import Bootstrap
from flask_login import LoginManager
from flask_mongoengine import MongoEngine
from config import Config
app = Flask(__name__)
app.config.from_object(Config)
login = LoginManager(app)
dbmongo = MongoEngine(app)
bootstrap = Bootstrap(app)
from flask_socke... | 24.475 | 62 | 0.804903 |
5b596df6ec9e6691a4096551d5fb266ff1146059 | 9,110 | py | Python | src/unittest/python/scaffolding_tests.py | beastmaster2190/pybuilder | ae27250cce7038babb72db615792d62bf0611a32 | [
"Apache-2.0"
] | null | null | null | src/unittest/python/scaffolding_tests.py | beastmaster2190/pybuilder | ae27250cce7038babb72db615792d62bf0611a32 | [
"Apache-2.0"
] | null | null | null | src/unittest/python/scaffolding_tests.py | beastmaster2190/pybuilder | ae27250cce7038babb72db615792d62bf0611a32 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
#
# This file is part of PyBuilder
#
# Copyright 2011-2015 PyBuilder Team
#
# 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/l... | 37.183673 | 108 | 0.684852 |
a6a8cb97d69754e960c4e3b5134081398f31d718 | 229,455 | py | Python | gs_quant/test/timeseries/test_measures.py | shlff/gs-quant | 4ab106f1e0c325aeacc4dfd2ba0918ce0a8b9aeb | [
"Apache-2.0"
] | 1 | 2022-01-02T06:22:34.000Z | 2022-01-02T06:22:34.000Z | gs_quant/test/timeseries/test_measures.py | shlff/gs-quant | 4ab106f1e0c325aeacc4dfd2ba0918ce0a8b9aeb | [
"Apache-2.0"
] | null | null | null | gs_quant/test/timeseries/test_measures.py | shlff/gs-quant | 4ab106f1e0c325aeacc4dfd2ba0918ce0a8b9aeb | [
"Apache-2.0"
] | null | null | null | """
Copyright 2019 Goldman Sachs.
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,
software di... | 44.832943 | 120 | 0.621887 |
1e9283c7fb92b8e617dbd813af33af06e3c9b8e9 | 1,783 | py | Python | asv_bench/benchmarks/indexing_engines.py | harahu/pandas | 92fd46c8bf719746b4c720bf7599d4080b319c8d | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 1 | 2019-05-11T14:01:42.000Z | 2019-05-11T14:01:42.000Z | asv_bench/benchmarks/indexing_engines.py | yiluolion/pandas | 1c26375c0743a2cbdcfe14a62ad10806001cbee8 | [
"BSD-3-Clause"
] | null | null | null | asv_bench/benchmarks/indexing_engines.py | yiluolion/pandas | 1c26375c0743a2cbdcfe14a62ad10806001cbee8 | [
"BSD-3-Clause"
] | null | null | null | import numpy as np
from pandas._libs.index import (Int64Engine, UInt64Engine, Float64Engine,
ObjectEngine)
class NumericEngineIndexing(object):
params = [[Int64Engine, UInt64Engine, Float64Engine],
[np.int64, np.uint64, np.float64],
['monotonic_incr', ... | 33.641509 | 77 | 0.574313 |
116dfc7fde1b00099c543fabb3921ef65062271d | 224 | py | Python | week06/lecture/examples/src6/2/scores1.py | uldash/CS50x | c3ee0f42ad514b57a13c3ffbb96238b3ca3730e1 | [
"MIT"
] | null | null | null | week06/lecture/examples/src6/2/scores1.py | uldash/CS50x | c3ee0f42ad514b57a13c3ffbb96238b3ca3730e1 | [
"MIT"
] | null | null | null | week06/lecture/examples/src6/2/scores1.py | uldash/CS50x | c3ee0f42ad514b57a13c3ffbb96238b3ca3730e1 | [
"MIT"
] | null | null | null | # Averages three numbers using an array and a loop
from cs50 import get_int
# Get scores
scores = []
for i in range(3):
scores.append(get_int("Score: "))
# Print average
print(f"Average: {sum(scores) / len(scores)}")
| 18.666667 | 50 | 0.691964 |
2af792185c84e5e8002b5d39ad6ae09a07100a55 | 4,532 | py | Python | harness/determined/cli/notebook.py | coreystatendet/determined | abe5f3d0f64f7b05422507731d800621cf0ace8e | [
"Apache-2.0"
] | null | null | null | harness/determined/cli/notebook.py | coreystatendet/determined | abe5f3d0f64f7b05422507731d800621cf0ace8e | [
"Apache-2.0"
] | null | null | null | harness/determined/cli/notebook.py | coreystatendet/determined | abe5f3d0f64f7b05422507731d800621cf0ace8e | [
"Apache-2.0"
] | null | null | null | from argparse import ONE_OR_MORE, FileType, Namespace
from pathlib import Path
from typing import Any, List
from termcolor import colored
from determined.cli import command, render, task
from determined.cli.session import setup_session
from determined.common import api
from determined.common.api import authentication... | 39.068966 | 98 | 0.598632 |
fdb8a840a987eb1afadf75806ceb8c2084e56240 | 432 | py | Python | app/products/migrations/0004_auto_20200217_1118.py | phessabi/eshop | 6a5352753a0c27f9c3f0eda6eec696f49ef4a8eb | [
"Apache-2.0"
] | 1 | 2020-02-04T21:18:31.000Z | 2020-02-04T21:18:31.000Z | app/products/migrations/0004_auto_20200217_1118.py | phessabi/eshop | 6a5352753a0c27f9c3f0eda6eec696f49ef4a8eb | [
"Apache-2.0"
] | 12 | 2020-01-01T11:46:33.000Z | 2022-03-12T00:10:01.000Z | app/products/migrations/0004_auto_20200217_1118.py | phessabi/eshop | 6a5352753a0c27f9c3f0eda6eec696f49ef4a8eb | [
"Apache-2.0"
] | 1 | 2020-02-18T11:12:48.000Z | 2020-02-18T11:12:48.000Z | # Generated by Django 2.2.8 on 2020-02-17 11:18
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('products', '0003_auto_20200202_1625'),
]
operations = [
migrations.AlterField(
model_name='product',
name='image',
... | 22.736842 | 95 | 0.611111 |
475ef318a1f7bacb4433f5bd740c7c011a391f19 | 1,910 | py | Python | fireeyehx_consts.py | mayurah/fireeyehx | 0c72f9cb9307cccf69328ad7d324f27468187bc4 | [
"Apache-2.0"
] | null | null | null | fireeyehx_consts.py | mayurah/fireeyehx | 0c72f9cb9307cccf69328ad7d324f27468187bc4 | [
"Apache-2.0"
] | null | null | null | fireeyehx_consts.py | mayurah/fireeyehx | 0c72f9cb9307cccf69328ad7d324f27468187bc4 | [
"Apache-2.0"
] | 1 | 2022-01-07T07:45:41.000Z | 2022-01-07T07:45:41.000Z | # File: fireeyehx_consts.py
#
# Copyright (c) 2018-2021 Splunk 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 a... | 57.878788 | 178 | 0.795812 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.