hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 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 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | 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 3 239 | max_forks_repo_name stringlengths 5 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
796b84329750b453bec60c2960210c93441c86f1 | 2,014 | py | Python | Model/vocabulary.py | ARiSE-Lab/Patch-as-translation | e2e45a5f9659f2ad03316b9f5cf93adde6a278d4 | [
"MIT"
] | 4 | 2020-08-26T17:03:35.000Z | 2021-01-19T15:31:04.000Z | Model/vocabulary.py | ARiSE-Lab/Patch-as-translation | e2e45a5f9659f2ad03316b9f5cf93adde6a278d4 | [
"MIT"
] | null | null | null | Model/vocabulary.py | ARiSE-Lab/Patch-as-translation | e2e45a5f9659f2ad03316b9f5cf93adde6a278d4 | [
"MIT"
] | 2 | 2021-03-10T20:17:06.000Z | 2021-04-21T04:13:02.000Z |
RESERVED_TOKENS = ["<s>", "</s>", "<pad>"]
class VocabularyBuilder():
def __init__(self, token_generator=None, vocab_path=None):
self.load_vocab(vocab_path)
self.vocab_dim = len(self.w2i)
self.vocab_key = lambda w: self.w2i[w] if w in self.w2i else self.w2i["<unk>"] # Convenience function
self.bpe_cach... | 33.016393 | 108 | 0.647964 |
796b844a0cd33936e9fc814782e1c077766c116f | 1,212 | py | Python | tools/vibrations/anifrq-tc.py | bieniekmateusz/forcebalance | 593791866e622ab4eae23ce29a0bed27499a118d | [
"BSD-3-Clause"
] | 98 | 2015-03-31T06:42:14.000Z | 2022-03-13T12:07:37.000Z | tools/vibrations/anifrq-tc.py | bieniekmateusz/forcebalance | 593791866e622ab4eae23ce29a0bed27499a118d | [
"BSD-3-Clause"
] | 121 | 2015-07-13T15:57:02.000Z | 2022-03-24T20:07:10.000Z | tools/vibrations/anifrq-tc.py | bieniekmateusz/forcebalance | 593791866e622ab4eae23ce29a0bed27499a118d | [
"BSD-3-Clause"
] | 66 | 2015-04-06T03:05:04.000Z | 2022-02-26T05:11:59.000Z | #!/usr/bin/env python
from __future__ import division
from __future__ import print_function
from builtins import range
import os, sys, re
import numpy as np
from forcebalance.molecule import Molecule
from forcebalance.readfrq import read_frq_tc
# TeraChem frequency output file.
tcout = sys.argv[1]
# Starting coordin... | 28.186047 | 165 | 0.710396 |
796b8469d13c97b42671355c79ff617199ab4163 | 6,709 | py | Python | MxShop/extra_apps/xadmin/models.py | youshuad/django-vue-shop | dbede2301b10cb95ef30d0bbbbd594b240071fc1 | [
"MIT"
] | null | null | null | MxShop/extra_apps/xadmin/models.py | youshuad/django-vue-shop | dbede2301b10cb95ef30d0bbbbd594b240071fc1 | [
"MIT"
] | null | null | null | MxShop/extra_apps/xadmin/models.py | youshuad/django-vue-shop | dbede2301b10cb95ef30d0bbbbd594b240071fc1 | [
"MIT"
] | null | null | null | import json
import django
from django.db import models
from django.utils import timezone
from django.conf import settings
from django.contrib.contenttypes.models import ContentType
from django.utils.translation import ugettext_lazy as _, ugettext
# from django.core.urlresolvers import NoReverseMatch, reverse
from djang... | 34.942708 | 118 | 0.654345 |
796b85cf1b50612a50835019093d010f66bc0aa7 | 5,422 | py | Python | care/facility/api/serializers/patient_sample.py | anroopak/care | 250589f0aa783997bb81f3d2fc30bd19573b434f | [
"MIT"
] | null | null | null | care/facility/api/serializers/patient_sample.py | anroopak/care | 250589f0aa783997bb81f3d2fc30bd19573b434f | [
"MIT"
] | null | null | null | care/facility/api/serializers/patient_sample.py | anroopak/care | 250589f0aa783997bb81f3d2fc30bd19573b434f | [
"MIT"
] | null | null | null | from django.utils import timezone
from rest_framework import serializers
from rest_framework.exceptions import ValidationError
from care.facility.api.serializers import TIMESTAMP_FIELDS
from care.facility.api.serializers.facility import FacilityBasicInfoSerializer
from care.facility.models import PatientConsultation, ... | 49.743119 | 119 | 0.746588 |
796b85f1dea88a80d772e4e649a7aca0b2307014 | 26,560 | py | Python | NodeGraphQt/widgets/viewer.py | compix/NodeGraphQt | 511c02aef02a7e16a9f40aa368c2f560bd3bbdff | [
"MIT"
] | null | null | null | NodeGraphQt/widgets/viewer.py | compix/NodeGraphQt | 511c02aef02a7e16a9f40aa368c2f560bd3bbdff | [
"MIT"
] | null | null | null | NodeGraphQt/widgets/viewer.py | compix/NodeGraphQt | 511c02aef02a7e16a9f40aa368c2f560bd3bbdff | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
import os
import math
from NodeGraphQt import QtGui, QtCore, QtWidgets
from NodeGraphQt.constants import (IN_PORT, OUT_PORT,
PIPE_LAYOUT_CURVED,
SCENE_AREA)
from NodeGraphQt.qgraphics.node_abstract import Ab... | 35.460614 | 85 | 0.594955 |
796b875fa50cd5923c429165a6223d94632e7318 | 3,039 | py | Python | attendees/occasions/migrations/0012_event_history.py | xjlin0/attendees32 | 25913c75ea8d916dcb065a23f2fa68bea558f77c | [
"MIT"
] | null | null | null | attendees/occasions/migrations/0012_event_history.py | xjlin0/attendees32 | 25913c75ea8d916dcb065a23f2fa68bea558f77c | [
"MIT"
] | 5 | 2022-01-21T03:26:40.000Z | 2022-02-04T17:32:16.000Z | attendees/occasions/migrations/0012_event_history.py | xjlin0/attendees32 | 25913c75ea8d916dcb065a23f2fa68bea558f77c | [
"MIT"
] | null | null | null | # Generated by Django 3.2.11 on 2022-04-09 00:26
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
from attendees.persons.models import Utility
class Migration(migrations.Migration):
dependencies = [
('pghistory', '0003_auto_20201023_1636'),
... | 64.659574 | 273 | 0.667654 |
796b87ad085801285e8a9b7c196ad6bcd2500ca8 | 337 | py | Python | src/main/resources/resource/SerialRelay/SerialRelay.py | holgerfriedrich/myrobotlab | c6d6c9e564cb8e68844918fd713b8921171667d9 | [
"Apache-2.0"
] | 179 | 2015-01-13T17:39:13.000Z | 2022-03-29T03:52:15.000Z | src/main/resources/resource/SerialRelay/SerialRelay.py | holgerfriedrich/myrobotlab | c6d6c9e564cb8e68844918fd713b8921171667d9 | [
"Apache-2.0"
] | 499 | 2015-01-11T15:26:23.000Z | 2022-03-04T14:10:34.000Z | src/main/resources/resource/SerialRelay/SerialRelay.py | holgerfriedrich/myrobotlab | c6d6c9e564cb8e68844918fd713b8921171667d9 | [
"Apache-2.0"
] | 151 | 2015-01-03T18:55:54.000Z | 2022-03-04T07:04:23.000Z | #########################################
# SerialRelay.py
# description: Relaying Serial data to a different serial port on mega Arduino
# categories: general
# more info @: http://myrobotlab.org/service/SerialRelay
#########################################
# start the service
serialrelay = Runtime.start('serialrelay... | 33.7 | 78 | 0.58457 |
796b882826ad2b4bb0a66a250edc8d75736b3fa7 | 1,568 | py | Python | src/app/schemas.py | sergio-rudenko/journalize_service | fcc91711e34ceb04062a9c6c180cae2e971b9bff | [
"MIT"
] | 1 | 2022-03-04T08:53:25.000Z | 2022-03-04T08:53:25.000Z | src/app/schemas.py | sergio-rudenko/journalize_service | fcc91711e34ceb04062a9c6c180cae2e971b9bff | [
"MIT"
] | null | null | null | src/app/schemas.py | sergio-rudenko/journalize_service | fcc91711e34ceb04062a9c6c180cae2e971b9bff | [
"MIT"
] | 1 | 2021-07-20T16:30:26.000Z | 2021-07-20T16:30:26.000Z | from typing import List
from datetime import datetime
from pydantic import BaseModel, constr
# base -----------------------------------------------------------------------
class JournalBase(BaseModel):
key: constr(strip_whitespace=True)
value: constr(strip_whitespace=True)
class Config:
orm_mode ... | 19.848101 | 78 | 0.575255 |
796b893f9a823bc4809d4368edca1d243e61ea38 | 1,182 | py | Python | google/ads/googleads/v7/googleads-py/google/ads/googleads/v7/errors/types/string_length_error.py | googleapis/googleapis-gen | d84824c78563d59b0e58d5664bfaa430e9ad7e7a | [
"Apache-2.0"
] | 7 | 2021-02-21T10:39:41.000Z | 2021-12-07T07:31:28.000Z | google/ads/googleads/v7/googleads-py/google/ads/googleads/v7/errors/types/string_length_error.py | googleapis/googleapis-gen | d84824c78563d59b0e58d5664bfaa430e9ad7e7a | [
"Apache-2.0"
] | 6 | 2021-02-02T23:46:11.000Z | 2021-11-15T01:46:02.000Z | google/ads/googleads/v7/googleads-py/google/ads/googleads/v7/errors/types/string_length_error.py | googleapis/googleapis-gen | d84824c78563d59b0e58d5664bfaa430e9ad7e7a | [
"Apache-2.0"
] | 4 | 2021-01-28T23:25:45.000Z | 2021-08-30T01:55:16.000Z | # -*- coding: utf-8 -*-
# Copyright 2020 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... | 28.829268 | 74 | 0.699662 |
796b8a0147204bbd1b377a3abf3906d864aadf23 | 133 | py | Python | app/models/__init__.py | baloo1379/wti-proj | db1b0124c9476250f54132059f0b612fc7992dcd | [
"MIT"
] | null | null | null | app/models/__init__.py | baloo1379/wti-proj | db1b0124c9476250f54132059f0b612fc7992dcd | [
"MIT"
] | null | null | null | app/models/__init__.py | baloo1379/wti-proj | db1b0124c9476250f54132059f0b612fc7992dcd | [
"MIT"
] | null | null | null | from flask_sqlalchemy import SQLAlchemy
db = SQLAlchemy()
def init_app(app):
db.init_app(app)
db.app = app
return app
| 13.3 | 39 | 0.691729 |
796b8b88e3c3802d3231297064ba92cfbdb7ff7d | 12,163 | py | Python | src/python/test/test_replace_ugrid_metadata.py | niwa/lfric_reader | 0512c9beca29fe0bbbae55cd0e891df3542bfcd8 | [
"BSL-1.0"
] | 4 | 2020-07-06T10:51:01.000Z | 2022-03-25T04:22:21.000Z | src/python/test/test_replace_ugrid_metadata.py | niwa/lfric_reader | 0512c9beca29fe0bbbae55cd0e891df3542bfcd8 | [
"BSL-1.0"
] | 6 | 2021-11-08T05:20:43.000Z | 2022-03-25T04:16:04.000Z | src/python/test/test_replace_ugrid_metadata.py | niwa/lfric_reader | 0512c9beca29fe0bbbae55cd0e891df3542bfcd8 | [
"BSL-1.0"
] | 2 | 2020-06-05T04:38:05.000Z | 2022-03-17T17:06:54.000Z | """
Unit tests for script replace_ugrid_metadata
"""
import os
import sys
import unittest
import netCDF4 as nc
# Make parent directory available for import
sys.path.append(os.path.dirname(os.path.dirname(os.path.realpath(__file__))))
import replace_ugrid_metadata as rum
class ReplaceUGRIDMetadataUnitTest(unittest.Te... | 39.109325 | 100 | 0.629121 |
796b8b973ad38fc03e868efa07f2f4e5873ffd1b | 2,808 | py | Python | backend/django/campsignup/campsignup/urls.py | Ring-deutscher-PfadfinderInnenverbande/campsignup | 1e182322d31dc41083fa06138d709eddc4f448be | [
"MIT"
] | null | null | null | backend/django/campsignup/campsignup/urls.py | Ring-deutscher-PfadfinderInnenverbande/campsignup | 1e182322d31dc41083fa06138d709eddc4f448be | [
"MIT"
] | null | null | null | backend/django/campsignup/campsignup/urls.py | Ring-deutscher-PfadfinderInnenverbande/campsignup | 1e182322d31dc41083fa06138d709eddc4f448be | [
"MIT"
] | null | null | null | """campsignup URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.0/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-ba... | 39 | 122 | 0.730057 |
796b8bf7e4acf67072074e99088f1f3ad7ff6a8f | 2,163 | py | Python | tests/test_overrides.py | alexmusa/adt | fbb3bf6e55dabd6bf4b069fa3fdec4e5fd9227ac | [
"MIT"
] | 153 | 2019-07-10T22:36:19.000Z | 2022-03-05T21:29:42.000Z | tests/test_overrides.py | adsharma/adt | 9c0943aa09f5fbd52d7773e354dc7c72f16a2291 | [
"MIT"
] | 29 | 2019-07-10T18:02:10.000Z | 2021-10-11T10:33:05.000Z | tests/test_overrides.py | adsharma/adt | 9c0943aa09f5fbd52d7773e354dc7c72f16a2291 | [
"MIT"
] | 17 | 2019-09-04T04:03:18.000Z | 2021-09-26T15:41:33.000Z | import unittest
from adt import Case, adt
from tests import helpers
from typing import Callable, Optional, TypeVar
_T = TypeVar('_T')
def optionality(x: _T) -> Optional[_T]:
return x
@adt
class OverriddenAccessors:
INTVALUE: Case[int]
STRVALUE: Case[str]
@property
def intvalue(self) -> Option... | 29.22973 | 63 | 0.618123 |
796b8ce33eb5e8873a521c51edc1fcdb1d1ce2c9 | 1,643 | py | Python | notebooks/05-__-Editing_1.py | TechLabs-Aachen-e-V/WiSe20_Team_10_Main | 1bf1fe4cf5065144a5f6f196004cf5ec16585c83 | [
"MIT"
] | null | null | null | notebooks/05-__-Editing_1.py | TechLabs-Aachen-e-V/WiSe20_Team_10_Main | 1bf1fe4cf5065144a5f6f196004cf5ec16585c83 | [
"MIT"
] | 1 | 2022-01-04T05:58:44.000Z | 2022-01-04T05:58:44.000Z | notebooks/05-__-Editing_1.py | TechLabs-Aachen-e-V/WiSe20_Team_10_Main | 1bf1fe4cf5065144a5f6f196004cf5ec16585c83 | [
"MIT"
] | null | null | null | # ---
# jupyter:
# jupytext:
# formats: ipynb,py:light
# text_representation:
# extension: .py
# format_name: light
# format_version: '1.5'
# jupytext_version: 1.11.1
# kernelspec:
# display_name: Python 3
# language: python
# name: python3
# ---
import numpy as np
impor... | 18.054945 | 59 | 0.586123 |
796b8d14e82cf6defe560a4073ace50f503484f1 | 440 | py | Python | turnip/tests/__init__.py | shazow/turnip | a2c525e1146c92bdbf3d9a3acfd13a7d33af7463 | [
"MIT"
] | 1 | 2016-01-04T04:02:43.000Z | 2016-01-04T04:02:43.000Z | turnip/tests/__init__.py | shazow/turnip | a2c525e1146c92bdbf3d9a3acfd13a7d33af7463 | [
"MIT"
] | null | null | null | turnip/tests/__init__.py | shazow/turnip | a2c525e1146c92bdbf3d9a3acfd13a7d33af7463 | [
"MIT"
] | null | null | null | from unittest import TestCase
__all__ = ['TestModel', 'model', 'Session']
from turnip import model
Session = model.Session
from sqlalchemy import create_engine
engine = create_engine("sqlite:///:memory:")
model.init_model(engine)
class TestModel(TestCase):
def setUp(self):
model.metadata.create_all(bi... | 20.952381 | 52 | 0.720455 |
796b8d525617dca698697c3c5a2e2984451713f7 | 10,485 | py | Python | conanfile.py | atharwa-24/orbit | 3726214743d3dd9877b2fe2d21686e7c58d5b924 | [
"BSD-2-Clause"
] | null | null | null | conanfile.py | atharwa-24/orbit | 3726214743d3dd9877b2fe2d21686e7c58d5b924 | [
"BSD-2-Clause"
] | null | null | null | conanfile.py | atharwa-24/orbit | 3726214743d3dd9877b2fe2d21686e7c58d5b924 | [
"BSD-2-Clause"
] | null | null | null | # Copyright (c) 2020 The Orbit Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from conans import ConanFile, CMake, tools
from conans.errors import ConanInvalidConfiguration
import os
import shutil
from io import StringIO
class Orbit... | 47.659091 | 150 | 0.600954 |
796b8d972299ef729e9a7ac122e32bd2f8954fbf | 18,066 | py | Python | selfdrive/car/hyundai/interface.py | robbo600/openpilot | 02717fbb823a0af98bff50f552d0ba54496ab42f | [
"MIT"
] | 65 | 2019-07-27T11:27:02.000Z | 2022-02-03T09:10:38.000Z | selfdrive/car/hyundai/interface.py | robbo600/openpilot | 02717fbb823a0af98bff50f552d0ba54496ab42f | [
"MIT"
] | 41 | 2018-08-01T17:36:08.000Z | 2020-12-16T02:42:57.000Z | selfdrive/car/hyundai/interface.py | robbo600/openpilot | 02717fbb823a0af98bff50f552d0ba54496ab42f | [
"MIT"
] | 229 | 2019-07-27T20:31:02.000Z | 2021-09-21T11:02:49.000Z | #!/usr/bin/env python3
from cereal import car
from selfdrive.config import Conversions as CV
from selfdrive.car.hyundai.values import CAR, Buttons
from selfdrive.car import STD_CARGO_KG, scale_rot_inertia, scale_tire_stiffness, gen_empty_fingerprint
from selfdrive.car.interfaces import CarInterfaceBase
from selfdrive.c... | 46.323077 | 230 | 0.670763 |
796b8de181e53a8554eda0cb3078e7219318be24 | 50,718 | py | Python | app/phd/cdgp/phd_processor.py | iwob/evoplotter | 816f1b19bf6656c1ac35bc9dbe8c090a6325f5a1 | [
"MIT"
] | 1 | 2020-06-03T07:44:06.000Z | 2020-06-03T07:44:06.000Z | app/phd/cdgp/phd_processor.py | iwob/evoplotter | 816f1b19bf6656c1ac35bc9dbe8c090a6325f5a1 | [
"MIT"
] | null | null | null | app/phd/cdgp/phd_processor.py | iwob/evoplotter | 816f1b19bf6656c1ac35bc9dbe8c090a6325f5a1 | [
"MIT"
] | null | null | null | import os
from app.phd.cdgp.phd_utils import *
from evoplotter import utils
from evoplotter import plotter
from evoplotter import printer
from evoplotter import templates
from evoplotter.templates import *
def simplify_benchmark_name(name):
"""Shortens or modifies the path of the benchmark in order to make the t... | 50.465672 | 159 | 0.599886 |
796b8e071c0d7a24d13278198118eedb58635d72 | 2,491 | py | Python | auxiliary/list-long-del-cds.py | broxeph/ameryn | e1289c280ca865ec84625b712adc52c536b4b174 | [
"MIT"
] | null | null | null | auxiliary/list-long-del-cds.py | broxeph/ameryn | e1289c280ca865ec84625b712adc52c536b4b174 | [
"MIT"
] | null | null | null | auxiliary/list-long-del-cds.py | broxeph/ameryn | e1289c280ca865ec84625b712adc52c536b4b174 | [
"MIT"
] | null | null | null | """
Lists 78+ min recordings to enable side A track counting.
(c) Ameryn Media, 2015. All rights reserved.
"""
import wave, os, pydub
import multiprocessing
import csv
from split import read_markers
# Input file parameters (name & location)
input_filename_series = False
input_whole_folder = True
input_filename = '4-t... | 36.632353 | 101 | 0.651546 |
796b8e90359583dee60762ccedad4ff8cae80d99 | 9,341 | py | Python | rst/conf.py | italia/pagopa-doc-formatoXML | fd7489436a804109fef01ed42b53b67afedf4612 | [
"CC0-1.0"
] | null | null | null | rst/conf.py | italia/pagopa-doc-formatoXML | fd7489436a804109fef01ed42b53b67afedf4612 | [
"CC0-1.0"
] | 8 | 2017-12-02T11:15:14.000Z | 2018-03-06T17:11:39.000Z | rst/conf.py | italia/pagopa-doc-formatoXML | fd7489436a804109fef01ed42b53b67afedf4612 | [
"CC0-1.0"
] | 5 | 2017-12-01T15:58:49.000Z | 2018-06-06T09:48:47.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys, os
docs_italia_theme = __import__("docs-italia-theme")
from recommonmark.transform import AutoStructify
from recommonmark.parser import CommonMarkParser
# -- PROJECT Variables ----------------------------------------------------
settings_project_name = 'PagoP... | 33.124113 | 100 | 0.704207 |
796b8fd423b3f8ca1be2bf0dae768377a73640ef | 2,662 | py | Python | pizzaria/pizzaria/settings.py | LoppA/django-pizza | e580413dc5bdd10b397ace17f3f6e4d09fa8be0f | [
"CC0-1.0"
] | null | null | null | pizzaria/pizzaria/settings.py | LoppA/django-pizza | e580413dc5bdd10b397ace17f3f6e4d09fa8be0f | [
"CC0-1.0"
] | null | null | null | pizzaria/pizzaria/settings.py | LoppA/django-pizza | e580413dc5bdd10b397ace17f3f6e4d09fa8be0f | [
"CC0-1.0"
] | null | null | null | """
Django settings for pizzaria project.
Generated by 'django-admin startproject' using Django 1.8.4.
For more information on this file, see
https://docs.djangoproject.com/en/1.8/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.8/ref/settings/
"""
# Build pat... | 25.596154 | 71 | 0.710744 |
796b905b423f267de31466cbd98872914f2fd693 | 125 | py | Python | test/upca.py | leo-b/elaphe | 3cd075c8d7e2f587096715d4e7bc6ad8bd6df021 | [
"BSD-2-Clause"
] | 10 | 2017-05-18T01:33:31.000Z | 2020-04-09T02:27:27.000Z | test/upca.py | leo-b/elaphe | 3cd075c8d7e2f587096715d4e7bc6ad8bd6df021 | [
"BSD-2-Clause"
] | 14 | 2017-05-03T16:34:48.000Z | 2022-02-25T19:07:43.000Z | test/upca.py | leo-b/elaphe | 3cd075c8d7e2f587096715d4e7bc6ad8bd6df021 | [
"BSD-2-Clause"
] | 5 | 2017-07-12T19:38:24.000Z | 2021-12-16T08:47:57.000Z | symbology = 'upca'
cases = [
('001.png', '788581014974'),
('002.png', '788581014974', dict(includetext=True)),
]
| 20.833333 | 56 | 0.584 |
796b90c1c4ab666692c39074f3e3817ab6c8247f | 5,677 | py | Python | src/adapter/c3aidatalake.py | joy13975/covidprof_submission | b3c7bb0ebf6fa1557edb8d1ca5d3d41377508e7d | [
"MIT"
] | null | null | null | src/adapter/c3aidatalake.py | joy13975/covidprof_submission | b3c7bb0ebf6fa1557edb8d1ca5d3d41377508e7d | [
"MIT"
] | null | null | null | src/adapter/c3aidatalake.py | joy13975/covidprof_submission | b3c7bb0ebf6fa1557edb8d1ca5d3d41377508e7d | [
"MIT"
] | null | null | null | import requests
import pandas as pd
def read_data_json(typename, api, body):
"""
read_data_json directly accesses the C3.ai COVID-19 Data Lake APIs using the requests library,
and returns the response as a JSON, raising an error if the call fails for any reason.
------
typename: The type you want... | 41.137681 | 162 | 0.650696 |
796b92660519ed280d4d932a89c6391e5de75186 | 14,348 | py | Python | com/vmware/nsx/realization_state_barrier_client.py | adammillerio/vsphere-automation-sdk-python | c07e1be98615201139b26c28db3aa584c4254b66 | [
"MIT"
] | null | null | null | com/vmware/nsx/realization_state_barrier_client.py | adammillerio/vsphere-automation-sdk-python | c07e1be98615201139b26c28db3aa584c4254b66 | [
"MIT"
] | null | null | null | com/vmware/nsx/realization_state_barrier_client.py | adammillerio/vsphere-automation-sdk-python | c07e1be98615201139b26c28db3aa584c4254b66 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#---------------------------------------------------------------------------
# Copyright 2020 VMware, Inc. All rights reserved.
# AUTO GENERATED FILE -- DO NOT MODIFY!
#
# vAPI stub file for package com.vmware.nsx.realization_state_barrier.
#----------------------------------------------------... | 41.709302 | 131 | 0.629983 |
796b92841575ced859f5013a43a66b6691f3fb5e | 311 | py | Python | template.py | victor-paltz/kick-start | 2baea6e32cffb96aa04d987fa2a1a0c2560eb8d6 | [
"MIT"
] | 1 | 2020-05-23T23:25:22.000Z | 2020-05-23T23:25:22.000Z | template.py | victor-paltz/kick-start | 2baea6e32cffb96aa04d987fa2a1a0c2560eb8d6 | [
"MIT"
] | null | null | null | template.py | victor-paltz/kick-start | 2baea6e32cffb96aa04d987fa2a1a0c2560eb8d6 | [
"MIT"
] | null | null | null |
import sys
def readstr(): return sys.stdin.readline().strip()
def readint(): return int(readstr())
def readints(): return [int(x) for x in readstr().split()]
def readinttab(n): return [readints() for _ in range(n)]
T = readint()
for test in range(1, T+1):
print("Case #{}: {}".format(test, 0))
| 14.136364 | 58 | 0.630225 |
796b92ed9f9eabd3a3e38a972258723619fb4354 | 6,424 | py | Python | script/spider.py | RoyalFlushever/crawler-master | aa6a552f6416be9e5f55805875bb24c49542b9ea | [
"MIT"
] | null | null | null | script/spider.py | RoyalFlushever/crawler-master | aa6a552f6416be9e5f55805875bb24c49542b9ea | [
"MIT"
] | 2 | 2021-06-01T21:44:19.000Z | 2022-03-29T21:53:52.000Z | script/spider.py | RoyalFlushever/crawler-master | aa6a552f6416be9e5f55805875bb24c49542b9ea | [
"MIT"
] | 1 | 2017-10-25T02:55:13.000Z | 2017-10-25T02:55:13.000Z | #!/bin/env python
import argparse
import datetime
import requests
import os
from utils import ip_address, config_file
from packtpub import Packtpub
from upload import Upload, SERVICE_GOOGLE_DRIVE, SERVICE_ONEDRIVE, SERVICE_DROPBOX, SERVICE_SCP
from database import Database, DB_FIREBASE
from logs import *
from notify i... | 39.170732 | 149 | 0.620953 |
796b92f2c4bf7b770cb8afd1fff2beaea1fca30c | 319 | py | Python | codes/convergence_elasticity_advection/grad1D.py | adRenaud/research | 2f0062a1800d7a17577bbfc2393b084253d567f4 | [
"MIT"
] | 1 | 2021-06-18T14:52:03.000Z | 2021-06-18T14:52:03.000Z | codes/comparison/fem/grad1D.py | adRenaud/research | 2f0062a1800d7a17577bbfc2393b084253d567f4 | [
"MIT"
] | 1 | 2019-01-07T13:11:11.000Z | 2019-01-07T13:11:11.000Z | codes/convergence_elasticity_advection/grad1D.py | adRenaud/research | 2f0062a1800d7a17577bbfc2393b084253d567f4 | [
"MIT"
] | null | null | null | #!/usr/bin/python
import numpy as np
def Grad1D(x,u):
h = x[1:len(x)]-x[:(len(x)-1)]
wg = 2.0
grad_u_g = (u[1:len(u)]-u[:(len(u)-1)])/h
#grad_u_x = np.concatenate((np.array([grad_u_g[0]]),(wg*grad_u_g[1:len(u)-1]+wg*grad_u_g[:(len(u)-2)])/(2.0*wg),np.array([grad_u_g[-1]])),axis=0)
return grad_u_g
| 31.9 | 149 | 0.573668 |
796b955a0e8b9ebfc34671abb3e366f01233b31f | 12,271 | py | Python | pytext/models/model.py | liaimi/pytext-1 | ac40f3956bb2ef0d05f07e2d6bf18bc808df82e4 | [
"BSD-3-Clause"
] | 1 | 2019-01-20T11:59:16.000Z | 2019-01-20T11:59:16.000Z | pytext/models/model.py | silky/pytext | 40113ed01fb07714776fdc9e1f187f88c1f9f443 | [
"BSD-3-Clause"
] | null | null | null | pytext/models/model.py | silky/pytext | 40113ed01fb07714776fdc9e1f187f88c1f9f443 | [
"BSD-3-Clause"
] | 1 | 2021-03-03T13:50:16.000Z | 2021-03-03T13:50:16.000Z | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
import os
from typing import Dict, List
import torch
import torch.nn as nn
from pytext.common.constants import Stage
from pytext.config import ConfigBase
from pytext.config.component import Component, ComponentType
from pyte... | 42.460208 | 87 | 0.682748 |
796b964b24ea4b7205b61429d7f3daa321586eb8 | 521 | py | Python | Gifmaker.py | ArcBase/Gif-Maker | 483094dc78b6aa5f58bf3a0e216c827d5170485d | [
"MIT"
] | null | null | null | Gifmaker.py | ArcBase/Gif-Maker | 483094dc78b6aa5f58bf3a0e216c827d5170485d | [
"MIT"
] | null | null | null | Gifmaker.py | ArcBase/Gif-Maker | 483094dc78b6aa5f58bf3a0e216c827d5170485d | [
"MIT"
] | null | null | null | import imageio
import os
file = os.path.abspath("Boxing.mp4")
def gifMaker(inputPath , targetFormat):
outputPath = os.path.splitext(inputPath)[0] + targetFormat
print (f'converting {inputPath} \n to {outputPath}')
reader = imageio.get_reader(inputPath)
fps = reader.get_meta_data()['fps']
writer... | 26.05 | 62 | 0.673704 |
796b970f5d253915a6832b9257bb053ac3b2087e | 806 | py | Python | towel/mt/middleware.py | timgates42/towel | d00fb74e3bc8724a45704378c3cd40444bb36259 | [
"BSD-3-Clause"
] | null | null | null | towel/mt/middleware.py | timgates42/towel | d00fb74e3bc8724a45704378c3cd40444bb36259 | [
"BSD-3-Clause"
] | null | null | null | towel/mt/middleware.py | timgates42/towel | d00fb74e3bc8724a45704378c3cd40444bb36259 | [
"BSD-3-Clause"
] | null | null | null | """
Middleware for a lazy ``request.access`` attribute
==================================================
"""
from __future__ import absolute_import, unicode_literals
from django.db.models import ObjectDoesNotExist
from django.utils.deprecation import MiddlewareMixin
from django.utils.functional import SimpleLazyObje... | 27.793103 | 75 | 0.69727 |
796b97821820d7d753db2663e07b80de432db970 | 2,828 | py | Python | gaphor/SysML/blocks/connectors.py | tuxcell/gaphor | 22eb13479f589a0105ad25a11aed968e9ad932dc | [
"Apache-2.0"
] | null | null | null | gaphor/SysML/blocks/connectors.py | tuxcell/gaphor | 22eb13479f589a0105ad25a11aed968e9ad932dc | [
"Apache-2.0"
] | null | null | null | gaphor/SysML/blocks/connectors.py | tuxcell/gaphor | 22eb13479f589a0105ad25a11aed968e9ad932dc | [
"Apache-2.0"
] | null | null | null | from typing import Union
from gaphas.connector import Handle, Port
from gaphor import UML
from gaphor.diagram.connectors import Connector, UnaryRelationshipConnect
from gaphor.SysML import sysml
from gaphor.SysML.blocks.block import BlockItem
from gaphor.SysML.blocks.property import PropertyItem
from gaphor.SysML.blo... | 34.072289 | 79 | 0.696605 |
796b98eadc903390ae487bb5563aabb72d08a357 | 3,587 | py | Python | provisioning/jobcrawler/jobcrawler/middlewares.py | synx-ai/scraper | 8a47e84e1da2ac6b05a9614ae60c6702c97571ca | [
"MIT"
] | null | null | null | provisioning/jobcrawler/jobcrawler/middlewares.py | synx-ai/scraper | 8a47e84e1da2ac6b05a9614ae60c6702c97571ca | [
"MIT"
] | null | null | null | provisioning/jobcrawler/jobcrawler/middlewares.py | synx-ai/scraper | 8a47e84e1da2ac6b05a9614ae60c6702c97571ca | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Define here the models for your spider middleware
#
# See documentation in:
# https://docs.scrapy.org/en/latest/topics/spider-middleware.html
from scrapy import signals
class JobcrawlerSpiderMiddleware:
# Not all methods need to be defined. If a method is not defined,
# scrapy acts... | 34.490385 | 78 | 0.666295 |
796b993602fbd9b4121f9575a2a15b71311718b0 | 4,624 | py | Python | nova/conductor/manager.py | bopopescu/arista-ovs-nova | 235239c97bc3bd948f1e4a50b69986e741c53e19 | [
"Apache-2.0"
] | null | null | null | nova/conductor/manager.py | bopopescu/arista-ovs-nova | 235239c97bc3bd948f1e4a50b69986e741c53e19 | [
"Apache-2.0"
] | null | null | null | nova/conductor/manager.py | bopopescu/arista-ovs-nova | 235239c97bc3bd948f1e4a50b69986e741c53e19 | [
"Apache-2.0"
] | null | null | null | # Copyright 2012 IBM Corp.
#
# 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 agree... | 43.622642 | 78 | 0.637976 |
796b9973862a93c683b3f613a44a59d166019f43 | 4,835 | py | Python | lte/gateway/python/magma/pipelined/encoding.py | saurabhsoni88/magma | 4236c9d8edb7bd203707ff7e861b1f7c12fb84c7 | [
"BSD-3-Clause"
] | 1 | 2020-10-20T18:59:38.000Z | 2020-10-20T18:59:38.000Z | lte/gateway/python/magma/pipelined/encoding.py | saurabhsoni88/magma | 4236c9d8edb7bd203707ff7e861b1f7c12fb84c7 | [
"BSD-3-Clause"
] | 151 | 2020-09-03T20:44:13.000Z | 2022-03-31T20:28:52.000Z | lte/gateway/python/magma/pipelined/encoding.py | kkahrs/magma | 73e666627dc28e0c492feab7321bb7d6dd433b09 | [
"BSD-3-Clause"
] | 1 | 2021-07-07T14:26:13.000Z | 2021-07-07T14:26:13.000Z | """
Copyright 2020 The Magma Authors.
This source code is licensed under the BSD-style license found in the
LICENSE file in the root directory of this source tree.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES O... | 32.891156 | 77 | 0.641158 |
796b9bddb5357a3b09c8305255ca31c033737af2 | 1,096 | py | Python | backend/users/views.py | crowdbotics-apps/demo-app-31894 | 52240d808abc42160aab842c9b71cf5a8d5dc0fd | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/users/views.py | crowdbotics-apps/demo-app-31894 | 52240d808abc42160aab842c9b71cf5a8d5dc0fd | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/users/views.py | crowdbotics-apps/demo-app-31894 | 52240d808abc42160aab842c9b71cf5a8d5dc0fd | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | from .models import User
from django.contrib.auth import get_user_model
from django.contrib.auth.mixins import LoginRequiredMixin
from django.urls import reverse
from django.views.generic import (
ListView,
UpdateView,
DetailView,
CreateView,
RedirectView,
)
User = get_user_model()
class UserDeta... | 21.92 | 87 | 0.740876 |
796b9c7f42118cb18ecf7ba8ebf600f748dc3a1b | 1,823 | py | Python | ethereum2etl/domain/beacon_block.py | blockchain-etl/ethereum2-etl | d8f5c5bfa7d9645608b0526bcf1b632d2651a262 | [
"MIT"
] | 30 | 2020-10-06T14:50:50.000Z | 2022-03-23T16:09:46.000Z | ethereum2etl/domain/beacon_block.py | blockchain-etl/ethereum2-etl | d8f5c5bfa7d9645608b0526bcf1b632d2651a262 | [
"MIT"
] | 6 | 2020-10-13T12:41:34.000Z | 2021-03-06T10:40:41.000Z | ethereum2etl/domain/beacon_block.py | blockchain-etl/ethereum2-etl | d8f5c5bfa7d9645608b0526bcf1b632d2651a262 | [
"MIT"
] | 5 | 2020-10-07T18:34:10.000Z | 2021-11-20T04:59:21.000Z | # MIT License
#
# Copyright (c) 2020 Evgeny Medvedev, evge.medvedev@gmail.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 rights
# ... | 35.745098 | 80 | 0.70927 |
796b9d8493400062b880eaf9579d4a2285f227fc | 698 | py | Python | scripts/python/generateDailyDecp.py | cds-bercyhub/decp-rama | d5f3d7a29f6bf0d925ba9ae426b5dd375da7d9dd | [
"MIT"
] | 1 | 2021-11-26T15:05:45.000Z | 2021-11-26T15:05:45.000Z | scripts/python/generateDailyDecp.py | cds-bercyhub/decp-rama | d5f3d7a29f6bf0d925ba9ae426b5dd375da7d9dd | [
"MIT"
] | 46 | 2020-05-20T15:17:57.000Z | 2022-03-28T20:49:58.000Z | scripts/python/generateDailyDecp.py | cds-bercyhub/decp-rama | d5f3d7a29f6bf0d925ba9ae426b5dd375da7d9dd | [
"MIT"
] | 6 | 2020-11-23T16:47:13.000Z | 2022-03-18T13:09:56.000Z | import json
import sys
import time
# Nouveau fichier decp.json (du jour)
newFile = sys.argv[1]
print('nouveau decp.json:', newFile)
debut = time.time()
listIdFile = open('todayMarches', encoding='utf8')
content = listIdFile.read().splitlines()
f = open(newFile, encoding='utf8')
marches = json.load(f)
outF = open("te... | 25.851852 | 79 | 0.710602 |
796b9eba3d8b6666757a920bcbdf5f2634b908a4 | 1,518 | py | Python | acheron/model.py | superphy/acheron | cd9838f000085409e306a5f66b04276a1e4eb5f5 | [
"Apache-2.0"
] | 1 | 2022-01-07T17:23:14.000Z | 2022-01-07T17:23:14.000Z | acheron/model.py | superphy/acheron | cd9838f000085409e306a5f66b04276a1e4eb5f5 | [
"Apache-2.0"
] | null | null | null | acheron/model.py | superphy/acheron | cd9838f000085409e306a5f66b04276a1e4eb5f5 | [
"Apache-2.0"
] | 1 | 2021-06-18T17:36:08.000Z | 2021-06-18T17:36:08.000Z | import os
MAX_RAM = '1000G'
def build_model(arguments):
model_args = ''
for arg in vars(arguments):
attr = getattr(arguments,arg)
model_args += " {}={}".format(arg, attr)
if arg == 'hyperparam':
# hyperparameter optimizations require additional RAM
# subject to c... | 35.302326 | 105 | 0.581686 |
796b9f27d29f5c145236db90456cfe24cf9ffb9d | 104 | py | Python | pycnc/Machine.py | BbiKkuMi/heekscnc | 7a5dbea079f176c5dbc1e7f83313ff43f8fe5084 | [
"BSD-3-Clause"
] | 107 | 2015-01-13T20:42:11.000Z | 2022-02-12T22:20:50.000Z | pycnc/Machine.py | BbiKkuMi/heekscnc | 7a5dbea079f176c5dbc1e7f83313ff43f8fe5084 | [
"BSD-3-Clause"
] | 31 | 2015-10-03T07:30:54.000Z | 2021-02-09T22:06:28.000Z | pycnc/Machine.py | BbiKkuMi/heekscnc | 7a5dbea079f176c5dbc1e7f83313ff43f8fe5084 | [
"BSD-3-Clause"
] | 55 | 2015-02-17T00:41:47.000Z | 2022-02-14T11:26:46.000Z |
class Machine:
def __init__(self):
self.file_name = ""
self.description = ""
| 13 | 29 | 0.528846 |
796b9f366cb1666abe88f07462d60b045e396a35 | 1,243 | py | Python | x2paddle/op_mapper/static/onnx2paddle/onnx_custom_layer/pad_all_dim4_one_input.py | aiyasin/X2Paddle | b37959f2ecdc09fdec7a38c01272126a7f3800e4 | [
"Apache-2.0"
] | null | null | null | x2paddle/op_mapper/static/onnx2paddle/onnx_custom_layer/pad_all_dim4_one_input.py | aiyasin/X2Paddle | b37959f2ecdc09fdec7a38c01272126a7f3800e4 | [
"Apache-2.0"
] | null | null | null | x2paddle/op_mapper/static/onnx2paddle/onnx_custom_layer/pad_all_dim4_one_input.py | aiyasin/X2Paddle | b37959f2ecdc09fdec7a38c01272126a7f3800e4 | [
"Apache-2.0"
] | 1 | 2021-02-22T09:05:44.000Z | 2021-02-22T09:05:44.000Z | # Copyright (c) 2020 PaddlePaddle 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 applic... | 41.433333 | 74 | 0.568785 |
796ba06a521bee880b1d9dc8da209befb2a2e445 | 924 | py | Python | transformers/node-normalizer/python-flask-server/openapi_server/models/__init__.py | mapleknight/molecular-data-provider | 111418ed7efab3c393c22116854fd322ff367fb9 | [
"MIT"
] | 5 | 2020-08-28T09:30:16.000Z | 2021-12-29T16:00:26.000Z | transformers/node-normalizer/python-flask-server/openapi_server/models/__init__.py | mapleknight/molecular-data-provider | 111418ed7efab3c393c22116854fd322ff367fb9 | [
"MIT"
] | 19 | 2021-04-26T22:19:16.000Z | 2022-03-09T21:09:55.000Z | transformers/node-normalizer/python-flask-server/openapi_server/models/__init__.py | mapleknight/molecular-data-provider | 111418ed7efab3c393c22116854fd322ff367fb9 | [
"MIT"
] | 8 | 2020-07-09T18:50:57.000Z | 2022-01-20T16:01:33.000Z | # coding: utf-8
# flake8: noqa
from __future__ import absolute_import
# import models into model package
from openapi_server.models.attribute import Attribute
from openapi_server.models.connection import Connection
from openapi_server.models.element import Element
from openapi_server.models.error_msg import ErrorMsg
f... | 46.2 | 87 | 0.884199 |
796ba21caa27794e5aa00d27c4ef78144eb91ea6 | 422 | py | Python | tests/test_shape_tag/test_create.py | newmediaresearch/vidispine-adapter | 95d5b1956c3767ff9ff0626048f52628d5322cab | [
"MIT"
] | null | null | null | tests/test_shape_tag/test_create.py | newmediaresearch/vidispine-adapter | 95d5b1956c3767ff9ff0626048f52628d5322cab | [
"MIT"
] | 1 | 2021-03-16T11:02:59.000Z | 2021-03-16T11:02:59.000Z | tests/test_shape_tag/test_create.py | newmediaresearch/vidispine-adapter | 95d5b1956c3767ff9ff0626048f52628d5322cab | [
"MIT"
] | null | null | null | import pytest
from vidispine.errors import InvalidInput
def test_create(vidispine, cassette, shape_tag_metadata):
shape_tag_name = 'test'
vidispine.shape_tag.create(shape_tag_name, shape_tag_metadata)
assert cassette.all_played
def test_create_invalid_input(vidispine):
with pytest.raises(InvalidIn... | 23.444444 | 66 | 0.763033 |
796ba32b4086fd48e8a64b02342f39dc717809c1 | 942 | py | Python | src/sentry/api/endpoints/auth_index.py | erhuabushuo/sentry | 8b3bad10155aaacfdff80910e5972e64304e880c | [
"BSD-3-Clause"
] | null | null | null | src/sentry/api/endpoints/auth_index.py | erhuabushuo/sentry | 8b3bad10155aaacfdff80910e5972e64304e880c | [
"BSD-3-Clause"
] | null | null | null | src/sentry/api/endpoints/auth_index.py | erhuabushuo/sentry | 8b3bad10155aaacfdff80910e5972e64304e880c | [
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import
from django.contrib.auth import login, logout
from rest_framework.response import Response
from sentry.api.authentication import QuietBasicAuthentication
from sentry.api.base import Endpoint
class AuthIndexEndpoint(Endpoint):
authentication_classes = [QuietBasicAuthenticat... | 32.482759 | 73 | 0.734607 |
796ba34d4f9197f1c3367e21d31b81cba26359b5 | 1,505 | py | Python | Task/Cut-a-rectangle/Python/cut-a-rectangle-1.py | LaudateCorpus1/RosettaCodeData | 9ad63ea473a958506c041077f1d810c0c7c8c18d | [
"Info-ZIP"
] | 1 | 2018-11-09T22:08:38.000Z | 2018-11-09T22:08:38.000Z | Task/Cut-a-rectangle/Python/cut-a-rectangle-1.py | seanwallawalla-forks/RosettaCodeData | 9ad63ea473a958506c041077f1d810c0c7c8c18d | [
"Info-ZIP"
] | null | null | null | Task/Cut-a-rectangle/Python/cut-a-rectangle-1.py | seanwallawalla-forks/RosettaCodeData | 9ad63ea473a958506c041077f1d810c0c7c8c18d | [
"Info-ZIP"
] | 1 | 2018-11-09T22:08:40.000Z | 2018-11-09T22:08:40.000Z | def cut_it(h, w):
dirs = ((1, 0), (-1, 0), (0, -1), (0, 1))
if h & 1: h, w = w, h
if h & 1: return 0
if w == 1: return 1
count = 0
next = [w + 1, -w - 1, -1, 1]
blen = (h + 1) * (w + 1) - 1
grid = [False] * (blen + 1)
def walk(y, x, count):
if not y or y == h or not x or x ... | 27.87037 | 63 | 0.4 |
796ba3fb142394c4d93a29ba57548dca59d8d02b | 132 | py | Python | configs/deeplabv3/deeplabv3_r101-d8_512x512_80k_ade20k.py | weiyx16/mmsegmentation | 6d35d76195f173fbc6b119a7d7815e67d78024c6 | [
"Apache-2.0"
] | 903 | 2021-06-13T04:45:03.000Z | 2022-03-31T13:21:50.000Z | configs/deeplabv3/deeplabv3_r101-d8_512x512_80k_ade20k.py | weiyx16/mmsegmentation | 6d35d76195f173fbc6b119a7d7815e67d78024c6 | [
"Apache-2.0"
] | 72 | 2021-06-13T13:01:49.000Z | 2022-03-30T09:19:34.000Z | configs/deeplabv3/deeplabv3_r101-d8_512x512_80k_ade20k.py | weiyx16/mmsegmentation | 6d35d76195f173fbc6b119a7d7815e67d78024c6 | [
"Apache-2.0"
] | 159 | 2021-04-13T01:23:15.000Z | 2022-03-31T18:56:09.000Z | _base_ = './deeplabv3_r50-d8_512x512_80k_ade20k.py'
model = dict(pretrained='open-mmlab://resnet101_v1c', backbone=dict(depth=101))
| 44 | 79 | 0.780303 |
796ba65c3fcf67e5116d84d4337e008d3cc22ce1 | 3,948 | py | Python | code/venv/lib/python3.8/site-packages/datadog_api_client/v1/model/monitor_search_result.py | Valisback/hiring-engineers | 7196915dd5a429ae27c21fa43d527f0332e662ed | [
"Apache-2.0"
] | null | null | null | code/venv/lib/python3.8/site-packages/datadog_api_client/v1/model/monitor_search_result.py | Valisback/hiring-engineers | 7196915dd5a429ae27c21fa43d527f0332e662ed | [
"Apache-2.0"
] | null | null | null | code/venv/lib/python3.8/site-packages/datadog_api_client/v1/model/monitor_search_result.py | Valisback/hiring-engineers | 7196915dd5a429ae27c21fa43d527f0332e662ed | [
"Apache-2.0"
] | null | null | null | # Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
# This product includes software developed at Datadog (https://www.datadoghq.com/).
# Copyright 2019-Present Datadog, Inc.
from datadog_api_client.v1.model_utils import (
ModelNormal,
cached_property,
... | 34.631579 | 316 | 0.613728 |
796ba6bfcaedd3a894f3ab2fbfc9ec74f0cddc44 | 5,495 | py | Python | tuiuiu/contrib/api/filters.py | caputomarcos/tuiuiu.io | d8fb57cf95487e7fe1454b2130ef18acc916da46 | [
"BSD-3-Clause"
] | 3 | 2019-08-08T09:09:35.000Z | 2020-12-15T18:04:17.000Z | tuiuiu/contrib/api/filters.py | caputomarcos/tuiuiu.io | d8fb57cf95487e7fe1454b2130ef18acc916da46 | [
"BSD-3-Clause"
] | null | null | null | tuiuiu/contrib/api/filters.py | caputomarcos/tuiuiu.io | d8fb57cf95487e7fe1454b2130ef18acc916da46 | [
"BSD-3-Clause"
] | 1 | 2017-09-09T20:10:40.000Z | 2017-09-09T20:10:40.000Z | from __future__ import absolute_import, unicode_literals
from django.conf import settings
from rest_framework.filters import BaseFilterBackend
from taggit.managers import _TaggableManager
from tuiuiu.tuiuiucore.models import Page
from tuiuiu.tuiuiusearch.backends import get_search_backend
from .utils import BadReque... | 36.390728 | 103 | 0.607461 |
796ba7a8726079c997f532c5a50e7a91d4bb372f | 841 | py | Python | john/views.py | johnmwangi/Port_Folio | 2d993ff01a6346885d3d6128ae84fc4d7c314d6d | [
"MIT"
] | null | null | null | john/views.py | johnmwangi/Port_Folio | 2d993ff01a6346885d3d6128ae84fc4d7c314d6d | [
"MIT"
] | 3 | 2021-03-19T01:22:57.000Z | 2022-01-13T01:19:37.000Z | john/views.py | johnmwangi/Port_Folio | 2d993ff01a6346885d3d6128ae84fc4d7c314d6d | [
"MIT"
] | null | null | null | from django.shortcuts import render
from .models import User, Project
from django.http import HttpResponse, Http404, HttpResponseRedirect
from django.conf import settings
# import simplejson as json
from django.http import JsonResponse
# Create your views here.
def home(request):
title = "john's Profile"
pro... | 25.484848 | 122 | 0.682521 |
796ba8603ca6436321ca1b76a5f16e6b5521459a | 2,473 | py | Python | jax3d/projects/nesf/utils/random.py | google-research/jax3d | f08ae174c80cd6c597f8fe5417168c82857eb236 | [
"Apache-2.0"
] | 33 | 2021-12-15T12:59:28.000Z | 2022-03-30T05:29:09.000Z | jax3d/projects/nesf/utils/random.py | google-research/jax3d | f08ae174c80cd6c597f8fe5417168c82857eb236 | [
"Apache-2.0"
] | 5 | 2021-12-15T15:15:03.000Z | 2021-12-15T17:25:27.000Z | jax3d/projects/nesf/utils/random.py | google-research/jax3d | f08ae174c80cd6c597f8fe5417168c82857eb236 | [
"Apache-2.0"
] | 1 | 2022-01-29T18:30:02.000Z | 2022-01-29T18:30:02.000Z | # Copyright 2022 The jax3d 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 wr... | 29.094118 | 95 | 0.684998 |
796ba87ce8376dad72ab712a7f9e34509bad2ba5 | 7,941 | py | Python | docs/conf.py | hyzhak/kaggle-birdsong-recognition | b3c70efc22fee2485c2c3bb79d898199eee98389 | [
"FTL"
] | 1 | 2020-06-19T02:22:44.000Z | 2020-06-19T02:22:44.000Z | docs/conf.py | hyzhak/kaggle-birdsong-recognition | b3c70efc22fee2485c2c3bb79d898199eee98389 | [
"FTL"
] | null | null | null | docs/conf.py | hyzhak/kaggle-birdsong-recognition | b3c70efc22fee2485c2c3bb79d898199eee98389 | [
"FTL"
] | null | null | null | # -*- coding: utf-8 -*-
#
# kaggle-birdsong-recognition documentation build configuration file, created by
# sphinx-quickstart.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configu... | 32.412245 | 90 | 0.71112 |
796ba9e2fb60c623e8d16288f7f1f8a2ecdb576d | 3,198 | py | Python | source/parser.py | n-duncan/GOLD-Digger | f16b348ac16fcbd74643b19d3006aa9f380a51a2 | [
"MIT"
] | 1 | 2018-03-27T03:40:58.000Z | 2018-03-27T03:40:58.000Z | source/parser.py | nduncan1014/GOLD-Digger | f16b348ac16fcbd74643b19d3006aa9f380a51a2 | [
"MIT"
] | null | null | null | source/parser.py | nduncan1014/GOLD-Digger | f16b348ac16fcbd74643b19d3006aa9f380a51a2 | [
"MIT"
] | 1 | 2020-06-16T08:53:45.000Z | 2020-06-16T08:53:45.000Z | from bs4 import BeautifulSoup
import os
import csv
import time
import datetime
#returns list of files in the directory
def getAllFiles(dir):
files = []
listing = os.listdir(dir)
for fileName in listing:
files.append(fileName)
return files
#format and get output folder name
def getOutputFolder(folder, files):
#... | 28.553571 | 126 | 0.707942 |
796baa41e4fdc901127d3a22a1272dcec5c2b07e | 11,464 | py | Python | projects/GAN_Panoptic_FPN/train_net_cityscapes_with_aug.py | garmenz/detectron2_local | cf293e033dc5cf548042fc6416227a5c84cc77fc | [
"Apache-2.0"
] | null | null | null | projects/GAN_Panoptic_FPN/train_net_cityscapes_with_aug.py | garmenz/detectron2_local | cf293e033dc5cf548042fc6416227a5c84cc77fc | [
"Apache-2.0"
] | null | null | null | projects/GAN_Panoptic_FPN/train_net_cityscapes_with_aug.py | garmenz/detectron2_local | cf293e033dc5cf548042fc6416227a5c84cc77fc | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# Copyright (c) Facebook, Inc. and its affiliates.
"""
A main training script.
This scripts reads a given config file and runs the training or evaluation.
It is an entry point that is made to train standard models in detectron2.
In order to let one script support training of many models,
this sc... | 47.568465 | 558 | 0.723744 |
796baa4870134dc4606f9a4eafe0b571a87ac8c9 | 877 | py | Python | simpleavatar/migrations/0001_initial.py | kohout/django-simple-avatar | 07ce2d107b63051dddf648c6e358759cbb19caa0 | [
"BSD-3-Clause"
] | null | null | null | simpleavatar/migrations/0001_initial.py | kohout/django-simple-avatar | 07ce2d107b63051dddf648c6e358759cbb19caa0 | [
"BSD-3-Clause"
] | null | null | null | simpleavatar/migrations/0001_initial.py | kohout/django-simple-avatar | 07ce2d107b63051dddf648c6e358759cbb19caa0 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.conf import settings
import simpleavatar.models
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = ... | 33.730769 | 130 | 0.659065 |
796baa747e4ac40035021b6dd136f824bd960ec0 | 3,167 | py | Python | simple_permutator.py | Archheretic/wordlist-utils | c3a4740516ab02487207dd73ab4a9cc6381922be | [
"MIT"
] | null | null | null | simple_permutator.py | Archheretic/wordlist-utils | c3a4740516ab02487207dd73ab4a9cc6381922be | [
"MIT"
] | null | null | null | simple_permutator.py | Archheretic/wordlist-utils | c3a4740516ab02487207dd73ab4a9cc6381922be | [
"MIT"
] | null | null | null | def permute(xs, low=0):
if low + 1 >= len(xs):
yield xs
else:
for p in permute(xs, low + 1):
yield p
for i in range(low + 1, len(xs)):
xs[low], xs[i] = xs[i], xs[low]
for p in permute(xs, low + 1):
yield p
... | 26.838983 | 56 | 0.470793 |
796baabb8ed71dba1c107e63d34c2bf34b871357 | 9,307 | py | Python | cryptology/cryptology.py | pyantonio-coder/crypto | c963fab635e2e0a58409fc6e21ec221c8b14ddf5 | [
"BSD-3-Clause"
] | null | null | null | cryptology/cryptology.py | pyantonio-coder/crypto | c963fab635e2e0a58409fc6e21ec221c8b14ddf5 | [
"BSD-3-Clause"
] | 5 | 2021-12-08T10:59:49.000Z | 2021-12-08T14:09:00.000Z | cryptology/cryptology.py | pyantonio-coder/crypto | c963fab635e2e0a58409fc6e21ec221c8b14ddf5 | [
"BSD-3-Clause"
] | null | null | null | from cryptology.tools import (type_str_error,
type_alphabet_error,
type_int_error,
type_duplicate_letter_error,
get_pos_alphabet,
get_atbashed_pos_alphabet,
get_alphabet_from_pos,
get_at... | 30.514754 | 106 | 0.677447 |
796baaef2a222d579aeb9433dd7d628b42080acc | 805 | py | Python | tools/leetcode.034.Search for a Range/leetcode.034.Search for a Range.submission5.py | tedye/leetcode | 975d7e3b8cb9b6be9e80e07febf4bcf6414acd46 | [
"MIT"
] | 4 | 2015-10-10T00:30:55.000Z | 2020-07-27T19:45:54.000Z | tools/leetcode.034.Search for a Range/leetcode.034.Search for a Range.submission5.py | tedye/leetcode | 975d7e3b8cb9b6be9e80e07febf4bcf6414acd46 | [
"MIT"
] | null | null | null | tools/leetcode.034.Search for a Range/leetcode.034.Search for a Range.submission5.py | tedye/leetcode | 975d7e3b8cb9b6be9e80e07febf4bcf6414acd46 | [
"MIT"
] | null | null | null | class Solution:
# @param {integer[]} nums
# @param {integer} target
# @return {integer[]}
def searchRange(self, nums, target):
if not nums: return []
res = []
start = 0
end = l = len(nums)
found = None
while start < end:
mid = (start+end) // 2
... | 805 | 805 | 0.421118 |
796bac24ca9a32ad40479cabdcfe68910b1a4e1e | 11,131 | py | Python | lifelong_rl/trainers/q_learning/sac.py | snu-mllab/EDAC | c21d8aa354d13dbe884fd2fb809fe9a85c65e6c9 | [
"MIT"
] | 23 | 2021-10-20T02:11:15.000Z | 2022-02-28T04:58:11.000Z | lifelong_rl/trainers/q_learning/sac.py | snu-mllab/EDAC | c21d8aa354d13dbe884fd2fb809fe9a85c65e6c9 | [
"MIT"
] | null | null | null | lifelong_rl/trainers/q_learning/sac.py | snu-mllab/EDAC | c21d8aa354d13dbe884fd2fb809fe9a85c65e6c9 | [
"MIT"
] | 1 | 2022-01-19T04:51:28.000Z | 2022-01-19T04:51:28.000Z | import numpy as np
import torch
import torch.optim as optim
from torch import nn as nn
from collections import OrderedDict
import lifelong_rl.torch.pytorch_util as ptu
from lifelong_rl.torch.distributions import TanhNormal
from lifelong_rl.util.eval_util import create_stats_ordered_dict
from lifelong_rl.core.rl_algor... | 36.735974 | 121 | 0.589884 |
796bac44e2ff71ab9869a3fd3f864e316da14269 | 14,573 | py | Python | test_optimality.py | perellonieto/background_check | a5b6549a62be276c7199e87e78a94a64af688ab9 | [
"MIT"
] | 4 | 2017-01-14T12:59:58.000Z | 2021-06-21T10:55:17.000Z | test_optimality.py | REFRAME/background_check | 7da967bad4a6d8cbc924b5301041f3c99ba39595 | [
"MIT"
] | null | null | null | test_optimality.py | REFRAME/background_check | 7da967bad4a6d8cbc924b5301041f3c99ba39595 | [
"MIT"
] | null | null | null | from __future__ import division
import sys
import numpy as np
import matplotlib.pyplot as plt
from sklearn import svm
from sklearn.metrics import roc_curve
from sklearn.metrics import auc
from cwc.models.density_estimators import MyMultivariateNormal
from cwc.visualization.cost_lines import plot_lower_envelope
import ... | 36.98731 | 111 | 0.553352 |
796bad04d8989fdce330ad3a8293c6730558d8de | 5,854 | py | Python | ci-scripts/infra-setup/roles/rrcockpit/files/telegraf/vexxhost.py | fuzzball81/ci-config | b3a8ff6be780bfae0ae9e3e0511dfa61010695eb | [
"Apache-2.0"
] | 8 | 2016-10-06T13:24:04.000Z | 2021-11-04T20:51:23.000Z | ci-scripts/infra-setup/roles/rrcockpit/files/telegraf/vexxhost.py | fuzzball81/ci-config | b3a8ff6be780bfae0ae9e3e0511dfa61010695eb | [
"Apache-2.0"
] | 8 | 2020-02-26T20:11:29.000Z | 2021-09-23T23:23:47.000Z | ci-scripts/infra-setup/roles/rrcockpit/files/telegraf/vexxhost.py | fuzzball81/ci-config | b3a8ff6be780bfae0ae9e3e0511dfa61010695eb | [
"Apache-2.0"
] | 9 | 2016-04-08T14:38:06.000Z | 2021-11-01T18:43:30.000Z | #!/usr/bin/env python
import argparse
import datetime
import json
import os
import re
import subprocess
import time
# This file is running on toolbox periodically
FILE_PATH = 'influxdb_stats_vexx'
SECRETS = "/etc/vexxhostrc"
re_ex = re.compile(r"^export ([^\s=]+)=(\S+)")
def _run_cmd(cmd):
env = os.environ.copy... | 30.331606 | 79 | 0.5685 |
796badd2337c04e99ea93e7bae8bd868808e3871 | 7,299 | py | Python | test/integration/ggrc/converters/test_import_reviewable.py | sfarbotka/ggrc-core | ef7aae6bc09ad2f53a2414f643572e07d689784a | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | test/integration/ggrc/converters/test_import_reviewable.py | sfarbotka/ggrc-core | ef7aae6bc09ad2f53a2414f643572e07d689784a | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | test/integration/ggrc/converters/test_import_reviewable.py | sfarbotka/ggrc-core | ef7aae6bc09ad2f53a2414f643572e07d689784a | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # Copyright (C) 2019 Google Inc.
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
"""Tests import reviewable."""
from collections import OrderedDict
from ggrc.models import all_models
from integration.ggrc import TestCase
from integration.ggrc import generator
from integration.ggrc.models... | 31.059574 | 78 | 0.66146 |
796bae658f5e3d658ee0135734b303c71bd6eeda | 96 | py | Python | recipe_blog/apps.py | Dorcas-Amoo/ms4-project-arikefoods | 924025d2651d5440a85a9e2e5d3dfa6494714408 | [
"PostgreSQL"
] | null | null | null | recipe_blog/apps.py | Dorcas-Amoo/ms4-project-arikefoods | 924025d2651d5440a85a9e2e5d3dfa6494714408 | [
"PostgreSQL"
] | 3 | 2021-04-08T20:07:11.000Z | 2021-06-10T20:16:22.000Z | recipe_blog/apps.py | Dorcas-Amoo/ms4-project-arikefoods | 924025d2651d5440a85a9e2e5d3dfa6494714408 | [
"PostgreSQL"
] | 1 | 2020-11-09T03:31:38.000Z | 2020-11-09T03:31:38.000Z | from django.apps import AppConfig
class RecipeBlogConfig(AppConfig):
name = 'recipe_blog'
| 16 | 34 | 0.770833 |
796bae85a2937ccd995edf6f0b472139802b9724 | 6,941 | py | Python | ckanext/archiver/model.py | borism/ckanext-archiver | bfb970dd169f6a6045329c12f23769b65141d9d8 | [
"MIT"
] | null | null | null | ckanext/archiver/model.py | borism/ckanext-archiver | bfb970dd169f6a6045329c12f23769b65141d9d8 | [
"MIT"
] | null | null | null | ckanext/archiver/model.py | borism/ckanext-archiver | bfb970dd169f6a6045329c12f23769b65141d9d8 | [
"MIT"
] | null | null | null | import uuid
from datetime import datetime
from sqlalchemy import Column, MetaData
from sqlalchemy import types
from sqlalchemy.ext.declarative import declarative_base
import ckan.model as model
import ckan.plugins as p
from ckan.lib import dictization
log = __import__('logging').getLogger(__name__)
Base = declarat... | 32.895735 | 99 | 0.635787 |
796bae89b28aadd1a662a1e8235ecb3e76e983dc | 7,112 | py | Python | docx/parts/document.py | ajendrex/python-docx | 8e7b4b417efade3faf512df85e8b80e6b9bd8d74 | [
"MIT"
] | null | null | null | docx/parts/document.py | ajendrex/python-docx | 8e7b4b417efade3faf512df85e8b80e6b9bd8d74 | [
"MIT"
] | null | null | null | docx/parts/document.py | ajendrex/python-docx | 8e7b4b417efade3faf512df85e8b80e6b9bd8d74 | [
"MIT"
] | 3 | 2019-02-18T08:56:50.000Z | 2022-03-07T12:16:34.000Z | # encoding: utf-8
"""|DocumentPart| and closely related objects"""
from __future__ import absolute_import, division, print_function, unicode_literals
from itertools import chain
from docx.bookmark import Bookmarks
from docx.document import Document
from docx.opc.constants import RELATIONSHIP_TYPE as RT
from docx.ox... | 35.034483 | 87 | 0.651997 |
796baea036fe35adf28f35b293c898becc14ac11 | 233 | py | Python | extensions/RichardHe.you-complete-me-1.0.36/ycmd/ycmd/tests/clang/testdata/test-include/.ycm_extra_conf.py | Sunshengjin/RoboWare-Studio | aa2c309bd5e79f92ba7bf456ff86ad0573975c49 | [
"BSD-3-Clause"
] | 239 | 2018-04-20T06:58:32.000Z | 2022-03-22T18:06:08.000Z | extensions/RichardHe.you-complete-me-1.0.36/ycmd/ycmd/tests/clang/testdata/test-include/.ycm_extra_conf.py | Sunshengjin/RoboWare-Studio | aa2c309bd5e79f92ba7bf456ff86ad0573975c49 | [
"BSD-3-Clause"
] | 10 | 2018-12-09T13:49:06.000Z | 2021-07-03T00:38:53.000Z | extensions/RichardHe.you-complete-me-1.0.36/ycmd/ycmd/tests/clang/testdata/test-include/.ycm_extra_conf.py | Sunshengjin/RoboWare-Studio | aa2c309bd5e79f92ba7bf456ff86ad0573975c49 | [
"BSD-3-Clause"
] | 99 | 2018-07-20T09:16:13.000Z | 2022-03-20T11:58:56.000Z | import os.path
def FlagsForFile( filename, **kwargs ):
d = os.path.dirname( filename )
return {
'flags': [ '-iquote', os.path.join( d, 'quote' ),
'-I', os.path.join( d, 'system' ) ],
'do_cache': True
}
| 21.181818 | 53 | 0.540773 |
796baeb0fa17f589f5765c81e0fd80b43ce5f677 | 6,356 | py | Python | chia/harvester/harvester.py | loueradun/silicoin-blockchain | a199dd86ffb84f214ccd6192ad42d150badc05e1 | [
"Apache-2.0"
] | null | null | null | chia/harvester/harvester.py | loueradun/silicoin-blockchain | a199dd86ffb84f214ccd6192ad42d150badc05e1 | [
"Apache-2.0"
] | 4 | 2021-11-16T08:18:39.000Z | 2022-03-29T08:12:41.000Z | chia/harvester/harvester.py | Devh4ox4d/silishitcoin | 4372d06aa4a54220f2bde29c8081410503679a82 | [
"Apache-2.0"
] | null | null | null | import asyncio
import concurrent
import logging
from concurrent.futures.thread import ThreadPoolExecutor
from pathlib import Path
from typing import Callable, Dict, List, Optional, Tuple
from chia.consensus.coinbase import create_puzzlehash_for_pk
import chia.server.ws_connection as ws # lgtm [py/import-and-import-fr... | 41.815789 | 136 | 0.666929 |
796bb04d49b9648d3e8acaf286017bbcfc0416b2 | 1,446 | py | Python | trinity/plugins/registry.py | shreyasnbhat/py-evm | cd31d83185e102a7cb2f11e2f67923b069ee9cef | [
"MIT"
] | 1 | 2018-12-09T11:56:53.000Z | 2018-12-09T11:56:53.000Z | trinity/plugins/registry.py | shreyasnbhat/py-evm | cd31d83185e102a7cb2f11e2f67923b069ee9cef | [
"MIT"
] | null | null | null | trinity/plugins/registry.py | shreyasnbhat/py-evm | cd31d83185e102a7cb2f11e2f67923b069ee9cef | [
"MIT"
] | 2 | 2018-12-09T15:58:11.000Z | 2020-09-29T07:10:21.000Z | import pkg_resources
from typing import (
Tuple,
)
from trinity.extensibility import (
BasePlugin,
)
from trinity.plugins.builtin.attach.plugin import (
AttachPlugin
)
from trinity.plugins.builtin.ethstats.plugin import (
EthstatsPlugin,
)
from trinity.plugins.builtin.fix_unclean_shutdown.plugin import... | 24.508475 | 98 | 0.738589 |
796bb109bbd7ee78a051c47b006471c8aca6c239 | 73,036 | py | Python | virt/ansible-latest/lib/python2.7/site-packages/ansible/modules/network/cloudengine/ce_bgp_neighbor.py | lakhlaifi/RedHat-Ansible | 27c5077cced9d416081fcd5d69ea44bca0317fa4 | [
"Apache-2.0"
] | null | null | null | virt/ansible-latest/lib/python2.7/site-packages/ansible/modules/network/cloudengine/ce_bgp_neighbor.py | lakhlaifi/RedHat-Ansible | 27c5077cced9d416081fcd5d69ea44bca0317fa4 | [
"Apache-2.0"
] | null | null | null | virt/ansible-latest/lib/python2.7/site-packages/ansible/modules/network/cloudengine/ce_bgp_neighbor.py | lakhlaifi/RedHat-Ansible | 27c5077cced9d416081fcd5d69ea44bca0317fa4 | [
"Apache-2.0"
] | 1 | 2020-02-13T14:24:57.000Z | 2020-02-13T14:24:57.000Z | #!/usr/bin/python
#
# This file is part of Ansible
#
# Ansible 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 3 of the License, or
# (at your option) any later version.
#
# Ansible is distribut... | 35.854688 | 117 | 0.551098 |
796bb16a0ccdd65dfe52e089833802351e1aa143 | 6,435 | py | Python | integration/test/test_frequency_map.py | avilcheslopez/geopm | 35ad0af3f17f42baa009c97ed45eca24333daf33 | [
"MIT",
"BSD-3-Clause"
] | null | null | null | integration/test/test_frequency_map.py | avilcheslopez/geopm | 35ad0af3f17f42baa009c97ed45eca24333daf33 | [
"MIT",
"BSD-3-Clause"
] | null | null | null | integration/test/test_frequency_map.py | avilcheslopez/geopm | 35ad0af3f17f42baa009c97ed45eca24333daf33 | [
"MIT",
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
#
# Copyright (c) 2015 - 2022, Intel Corporation
# SPDX-License-Identifier: BSD-3-Clause
#
import sys
import unittest
import os
import pandas
import socket
import geopmpy.agent
import geopmpy.io
import geopmpy.hash
from integration.test import util
from integration.test import geopm_test_lau... | 41.785714 | 123 | 0.613986 |
796bb2b9ec39504d790eea2e399f88a07989202a | 50,688 | py | Python | optuna/storages/_rdb/storage.py | TakuyaInoue-github/optuna | d1a3800bcd68bd1a551019ef4babfcfc3b59efb9 | [
"MIT"
] | 1 | 2022-02-04T01:11:09.000Z | 2022-02-04T01:11:09.000Z | optuna/storages/_rdb/storage.py | TakuyaInoue-github/optuna | d1a3800bcd68bd1a551019ef4babfcfc3b59efb9 | [
"MIT"
] | null | null | null | optuna/storages/_rdb/storage.py | TakuyaInoue-github/optuna | d1a3800bcd68bd1a551019ef4babfcfc3b59efb9 | [
"MIT"
] | null | null | null | from collections import defaultdict
from contextlib import contextmanager
import copy
from datetime import datetime
import json
import logging
import os
from typing import Any
from typing import Callable
from typing import Dict
from typing import Generator
from typing import List
from typing import Optional
from typing... | 40.133017 | 99 | 0.623994 |
796bb324792ea65832699ea50b6645a3f6b3c731 | 17,826 | py | Python | wrappers/scripts/ton.py | button-tech/ton-grams-testnet | e4d83fef72e24f8ba977bc0dfab9d4f57c1f27ec | [
"MIT"
] | null | null | null | wrappers/scripts/ton.py | button-tech/ton-grams-testnet | e4d83fef72e24f8ba977bc0dfab9d4f57c1f27ec | [
"MIT"
] | null | null | null | wrappers/scripts/ton.py | button-tech/ton-grams-testnet | e4d83fef72e24f8ba977bc0dfab9d4f57c1f27ec | [
"MIT"
] | null | null | null | import subprocess
import os
import json
import time
workdir = os.environ["WORKDIR"]
def generate_addr(catalog_id, network="-1"):
try:
chain = ""
if network == "-1":
chain = "masterchain"
elif network == "0":
chain = "basechain"
data = {}
if os.pa... | 34.346821 | 218 | 0.562381 |
796bb61f003013b91c5540097460368ff6662506 | 5,541 | py | Python | pyabc/petab/amici.py | chrhck/pyABC | 731cfdec26bef3898bf6e244daa5c8f83f3fe19d | [
"BSD-3-Clause"
] | null | null | null | pyabc/petab/amici.py | chrhck/pyABC | 731cfdec26bef3898bf6e244daa5c8f83f3fe19d | [
"BSD-3-Clause"
] | null | null | null | pyabc/petab/amici.py | chrhck/pyABC | 731cfdec26bef3898bf6e244daa5c8f83f3fe19d | [
"BSD-3-Clause"
] | null | null | null | import logging
from collections.abc import Sequence, Mapping
from typing import Callable, Union
import copy
import pyabc
from .base import PetabImporter
logger = logging.getLogger(__name__)
try:
import petab
except ImportError:
logger.error("Install petab (see https://github.com/icb-dcm/petab) to use "
... | 32.403509 | 79 | 0.612525 |
796bb656167189b90debb7a829bc7ef53d011271 | 1,956 | py | Python | eth_keys/validation.py | barisa76/eth-keys | 9e3f642767bca9495133ff5116526997e3f9a169 | [
"MIT"
] | 2 | 2020-05-16T08:38:34.000Z | 2020-10-01T01:32:57.000Z | eth_keys/validation.py | barisa76/eth-keys | 9e3f642767bca9495133ff5116526997e3f9a169 | [
"MIT"
] | 3 | 2018-07-30T13:45:49.000Z | 2018-08-10T12:05:39.000Z | eth_keys/validation.py | ConnorMac/eth-keys | de2d3e731af2690d9d60ededf31dfc4c941c1bd6 | [
"MIT"
] | null | null | null | from typing import Any
from cytoolz import (
curry,
)
from eth_utils import (
is_bytes,
is_integer,
)
from eth_keys.constants import (
SECPK1_N,
)
from eth_keys.exceptions import (
ValidationError,
)
def validate_integer(value: Any) -> None:
if not is_integer(value) or isinstance(value, boo... | 25.402597 | 94 | 0.66002 |
796bb6d156a51418a3acfe09d26aabc462ae0dd8 | 6,951 | py | Python | public/management/commands/benchmark.py | Andrew-Chen-Wang/postgres-django-icontains-performance | f6de2198fb8c13846e3166f7ba3f3ec67f9d9410 | [
"Apache-2.0"
] | null | null | null | public/management/commands/benchmark.py | Andrew-Chen-Wang/postgres-django-icontains-performance | f6de2198fb8c13846e3166f7ba3f3ec67f9d9410 | [
"Apache-2.0"
] | 4 | 2021-03-30T14:09:07.000Z | 2021-06-10T19:53:19.000Z | public/management/commands/benchmark.py | Andrew-Chen-Wang/postgres-django-icontains-performance | f6de2198fb8c13846e3166f7ba3f3ec67f9d9410 | [
"Apache-2.0"
] | null | null | null | import os
import operator
import timeit
from django.conf import settings
from django.core.management.base import BaseCommand
from django.core.management import call_command
from django.db import connection
from public.models import Item, ItemWithoutIndex
def load_words() -> set:
"""370099 words in the set"""
... | 38.192308 | 112 | 0.607251 |
796bb71c6554e6fc20dc6bb8fc18f53ea464a727 | 3,470 | py | Python | tests/functional/api/test_versions.py | kevinjalbert/h | 0f260bf59847f27eff720eeb3c3b2468571412b2 | [
"BSD-2-Clause"
] | 1 | 2020-06-19T01:49:39.000Z | 2020-06-19T01:49:39.000Z | tests/functional/api/test_versions.py | kevinjalbert/h | 0f260bf59847f27eff720eeb3c3b2468571412b2 | [
"BSD-2-Clause"
] | 5 | 2019-10-31T14:23:18.000Z | 2019-11-15T19:24:27.000Z | tests/functional/api/test_versions.py | liquidinvestigations/hypothesis-h | 2eebc0b20823fc5bc42a8e8c33551a6d448ad6ba | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Test the versioning of our API using Accept headers
"""
class TestIndexEndpointVersions:
def test_index_sets_version_response_header(self, app):
"""
A custom response header should be present confirming the version of
the API used.
"""
res = app.... | 30.707965 | 88 | 0.601153 |
796bb71f035eb93e6bb908c71b6c754bab09b425 | 826 | py | Python | app/core/tests/test_commands.py | senkathir/recipe-app-api | 7c3bbfec25ec52f9e2028e412f7165e3b86e1f94 | [
"MIT"
] | 4 | 2022-03-07T08:09:35.000Z | 2022-03-07T12:18:49.000Z | app/core/tests/test_commands.py | senkathir/recipe-app-api | 7c3bbfec25ec52f9e2028e412f7165e3b86e1f94 | [
"MIT"
] | 12 | 2020-01-06T21:33:22.000Z | 2022-03-11T23:38:59.000Z | app/core/tests/test_commands.py | senkathir/recipe-app-api | 7c3bbfec25ec52f9e2028e412f7165e3b86e1f94 | [
"MIT"
] | 2 | 2019-10-24T07:31:22.000Z | 2019-10-25T08:39:36.000Z | from unittest.mock import patch
from django.core.management import call_command
from django.db.utils import OperationalError
from django.test import TestCase
class CommandsTestCase(TestCase):
def test_wait_for_db_ready(self):
"""Test waiting for db when db is available"""
with patch('django.db.... | 31.769231 | 74 | 0.677966 |
796bb79852fc120fa64e9bfdb95194070241e009 | 418 | py | Python | get_reuters_constituents.py | Pwpmp/pretty-eikon | 0bb3a0a2037deacd0d30e2bd507c8664b745ea1d | [
"MIT"
] | 1 | 2020-03-28T17:11:23.000Z | 2020-03-28T17:11:23.000Z | get_reuters_constituents.py | Pwpmp/pretty-eikon | 0bb3a0a2037deacd0d30e2bd507c8664b745ea1d | [
"MIT"
] | null | null | null | get_reuters_constituents.py | Pwpmp/pretty-eikon | 0bb3a0a2037deacd0d30e2bd507c8664b745ea1d | [
"MIT"
] | null | null | null | import os
_PATH_CLEAN = '../../ra_data/reuters/clean'
comps = os.listdir(_PATH_CLEAN)
def get_name(filename):
filename = filename.split('_')
if filename[1].isdigit():
return filename[0]
else:
return ".".join(filename[:2])
comps = set([get_name(x) for x in comps])
with open('reuters_constit... | 26.125 | 48 | 0.62201 |
796bb7e7217fd7f09c556c7bc06c9a3c616fb989 | 514 | py | Python | plotly/validators/layout/mapbox/layer/fill/__init__.py | piyush1301/plotly.py | 50cd5c4cd4732042422751c7760acbab8dd8a50d | [
"MIT"
] | 6 | 2019-05-03T02:12:04.000Z | 2020-03-01T06:33:21.000Z | plotly/validators/layout/mapbox/layer/fill/__init__.py | piyush1301/plotly.py | 50cd5c4cd4732042422751c7760acbab8dd8a50d | [
"MIT"
] | null | null | null | plotly/validators/layout/mapbox/layer/fill/__init__.py | piyush1301/plotly.py | 50cd5c4cd4732042422751c7760acbab8dd8a50d | [
"MIT"
] | 5 | 2019-05-18T16:50:11.000Z | 2021-07-06T21:14:36.000Z |
import _plotly_utils.basevalidators
class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator):
def __init__(
self,
plotly_name='outlinecolor',
parent_name='layout.mapbox.layer.fill',
**kwargs
):
super(OutlinecolorValidator, self).__init__(
... | 24.47619 | 73 | 0.616732 |
796bb857e3c29c11e38ac4ca7eb26e0bad63219a | 28,420 | py | Python | fcsparser/api.py | bpteague/fcsparser | 228e8a936da2ca0b4dc22f8ac3e1ae074a106118 | [
"MIT"
] | 51 | 2015-10-03T00:26:26.000Z | 2021-12-29T13:48:06.000Z | fcsparser/api.py | bpteague/fcsparser | 228e8a936da2ca0b4dc22f8ac3e1ae074a106118 | [
"MIT"
] | 27 | 2016-02-24T07:29:30.000Z | 2022-01-13T14:03:24.000Z | fcsparser/api.py | bpteague/fcsparser | 228e8a936da2ca0b4dc22f8ac3e1ae074a106118 | [
"MIT"
] | 35 | 2016-02-24T03:26:10.000Z | 2022-02-08T01:12:24.000Z | #!/usr/bin/env python
"""
Parser for FCS 2.0, 3.0, 3.1 files. Python 2/3 compatible.
`
Distributed under the MIT License.
Useful documentation for dtypes in numpy
http://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.byteswap.html?highlight=byteswap#numpy.ndarray.byteswap # noqa
http://docs.scipy.org/doc/... | 41.610542 | 129 | 0.604574 |
796bb908ceb3e9d863d6126ff5705406afdebf04 | 605 | py | Python | PageBotNano-006-Image/__init__.py | juandelperal/PageBotNano | 7f0d82755d6eb6962f206e5dd0d08c40c0947bde | [
"MIT"
] | null | null | null | PageBotNano-006-Image/__init__.py | juandelperal/PageBotNano | 7f0d82755d6eb6962f206e5dd0d08c40c0947bde | [
"MIT"
] | null | null | null | PageBotNano-006-Image/__init__.py | juandelperal/PageBotNano | 7f0d82755d6eb6962f206e5dd0d08c40c0947bde | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: UTF-8 -*-
# -----------------------------------------------------------------------------
#
# P A G E B O T N A N O
#
# Copyright (c) 2020+ Buro Petr van Blokland + Claudia Mens
# www.pagebot.io
# Licensed under MIT conditions
#
# Supporting DrawBot, www.drawbot.com
# ---... | 31.842105 | 79 | 0.499174 |
796bb91f341c869b50c28c692f6e69bab1912daa | 15,502 | py | Python | tests/test_tutorial/test_sql_databases_peewee/test_sql_databases_peewee.py | cdeil/fastapi | 7a445402d4960d6173d76dac43393ad6c5040521 | [
"MIT"
] | 2 | 2020-01-21T10:57:59.000Z | 2021-11-09T11:27:18.000Z | tests/test_tutorial/test_sql_databases_peewee/test_sql_databases_peewee.py | cdeil/fastapi | 7a445402d4960d6173d76dac43393ad6c5040521 | [
"MIT"
] | null | null | null | tests/test_tutorial/test_sql_databases_peewee/test_sql_databases_peewee.py | cdeil/fastapi | 7a445402d4960d6173d76dac43393ad6c5040521 | [
"MIT"
] | null | null | null | import time
from pathlib import Path
from unittest.mock import MagicMock
import pytest
from starlette.testclient import TestClient
from ...utils import skip_py36
openapi_schema = {
"openapi": "3.0.2",
"info": {"title": "Fast API", "version": "0.1.0"},
"paths": {
"/users/": {
"get": {
... | 35.967517 | 88 | 0.352729 |
796bbad15550fd640db470ec0c26cf16dfb013d0 | 3,975 | py | Python | simulations/sim-axelrod-single.py | mmadsen/axelrod-ct | 90ea4319dd571546888c4d2a50255514e7d7fb94 | [
"Apache-2.0"
] | 5 | 2015-05-03T08:49:11.000Z | 2022-03-23T11:44:00.000Z | simulations/sim-axelrod-single.py | mmadsen/axelrod-ct | 90ea4319dd571546888c4d2a50255514e7d7fb94 | [
"Apache-2.0"
] | null | null | null | simulations/sim-axelrod-single.py | mmadsen/axelrod-ct | 90ea4319dd571546888c4d2a50255514e7d7fb94 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# Copyright (c) 2013. Mark E. Madsen <mark@madsenlab.org>
#
# This work is licensed under the terms of the Apache Software License, Version 2.0. See the file LICENSE for details.
"""
Description here
"""
import logging as log
import ming
import argparse
import madsenlab.axelrod.utils as util... | 34.267241 | 195 | 0.708931 |
796bbbf0cd8bd6d82cfacd0a3efa2c050f640e5a | 1,874 | py | Python | sdks/python/apache_beam/examples/snippets/transforms/aggregation/mean_test.py | eyal0/beam | 9c6922976cc2a5c6a2ef836c1986ff769cda99a5 | [
"Apache-2.0"
] | 35 | 2016-09-22T22:53:14.000Z | 2020-02-13T15:12:21.000Z | sdks/python/apache_beam/examples/snippets/transforms/aggregation/mean_test.py | eyal0/beam | 9c6922976cc2a5c6a2ef836c1986ff769cda99a5 | [
"Apache-2.0"
] | 80 | 2020-01-16T09:55:09.000Z | 2020-10-03T13:43:07.000Z | sdks/python/apache_beam/examples/snippets/transforms/aggregation/mean_test.py | eyal0/beam | 9c6922976cc2a5c6a2ef836c1986ff769cda99a5 | [
"Apache-2.0"
] | 88 | 2016-11-27T02:16:11.000Z | 2020-02-28T05:10:26.000Z | # coding=utf-8
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License");... | 29.746032 | 75 | 0.776414 |
796bbbfd48015df39f9dd8c1ae32d574fa96d6a5 | 1,106 | py | Python | pieces_classes/Bishop.py | NadeemAhmadd/chessbot | b142ae1dbc4ea856694fce8054515918db7d6275 | [
"MIT"
] | null | null | null | pieces_classes/Bishop.py | NadeemAhmadd/chessbot | b142ae1dbc4ea856694fce8054515918db7d6275 | [
"MIT"
] | null | null | null | pieces_classes/Bishop.py | NadeemAhmadd/chessbot | b142ae1dbc4ea856694fce8054515918db7d6275 | [
"MIT"
] | null | null | null |
class B:
def __init__(self,position=0,colour="white",capture=False):
"""
-------------------------------------------------------
Initializes a bishop class
Use: node = bb(value)
-------------------------------------------------------
Parameters:
colour... | 24.043478 | 63 | 0.438517 |
796bbcc79376c6260061866dd5f3ecdca3d33ebd | 7,713 | py | Python | supervisor/homeassistant/__init__.py | ludeeus/supervisor | 7206213cd8ebe640ccb279c8f31b88693de1eb87 | [
"Apache-2.0"
] | null | null | null | supervisor/homeassistant/__init__.py | ludeeus/supervisor | 7206213cd8ebe640ccb279c8f31b88693de1eb87 | [
"Apache-2.0"
] | null | null | null | supervisor/homeassistant/__init__.py | ludeeus/supervisor | 7206213cd8ebe640ccb279c8f31b88693de1eb87 | [
"Apache-2.0"
] | null | null | null | """Home Assistant control object."""
import asyncio
from ipaddress import IPv4Address
import logging
from pathlib import Path
import shutil
from typing import Optional
from uuid import UUID
from ..const import (
ATTR_ACCESS_TOKEN,
ATTR_AUDIO_INPUT,
ATTR_AUDIO_OUTPUT,
ATTR_BOOT,
ATTR_IMAGE,
ATTR... | 31.226721 | 84 | 0.649293 |
796bbcd0be772bc52ed8f270ed523f6e2a8c8717 | 4,672 | py | Python | bin/load_db.py | DarkEnergyScienceCollaboration/Pserv | 0286b71abc3912b51f7c07bea271fcbdd28510a1 | [
"BSD-3-Clause"
] | 1 | 2018-04-26T05:04:44.000Z | 2018-04-26T05:04:44.000Z | bin/load_db.py | DarkEnergyScienceCollaboration/Pserv | 0286b71abc3912b51f7c07bea271fcbdd28510a1 | [
"BSD-3-Clause"
] | 6 | 2016-12-14T23:19:07.000Z | 2017-07-07T21:06:45.000Z | bin/load_db.py | LSSTDESC/pserv | 0286b71abc3912b51f7c07bea271fcbdd28510a1 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
"""
Script to create and load CcdVisit, Object, and ForcedSource tables.
"""
from __future__ import absolute_import, print_function, division
import os
import sys
from warnings import filterwarnings
from collections import OrderedDict
import lsst.log as lsst_log
import desc.pserv
import desc.pserv... | 44.075472 | 80 | 0.557363 |
796bbcecf6d9601d1fe39de7ae06560d095478f4 | 6,246 | py | Python | kubernetes/client/models/v1_pod_affinity_term.py | palnabarun/Python | 6b01c95e1673c0787d3d688b361bfd995d62dd98 | [
"Apache-2.0"
] | null | null | null | kubernetes/client/models/v1_pod_affinity_term.py | palnabarun/Python | 6b01c95e1673c0787d3d688b361bfd995d62dd98 | [
"Apache-2.0"
] | 7 | 2020-11-07T10:35:21.000Z | 2022-02-07T03:06:25.000Z | kubernetes/client/models/v1_pod_affinity_term.py | palnabarun/python | 6b01c95e1673c0787d3d688b361bfd995d62dd98 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Kubernetes
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
The version of the OpenAPI document: release-1.18
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import si... | 35.089888 | 366 | 0.638168 |
796bbe1fee30302ece92d22fca768cee8903299e | 45,741 | py | Python | service_crategen/botocore/tests/integration/test_s3.py | asyade/rusoto-seedup | 30b56caa6060d7bb4d8cc294789eda87624807ac | [
"MIT"
] | 1 | 2019-09-08T17:16:26.000Z | 2019-09-08T17:16:26.000Z | service_crategen/botocore/tests/integration/test_s3.py | asyade/rusoto-seedup | 30b56caa6060d7bb4d8cc294789eda87624807ac | [
"MIT"
] | null | null | null | service_crategen/botocore/tests/integration/test_s3.py | asyade/rusoto-seedup | 30b56caa6060d7bb4d8cc294789eda87624807ac | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2012-2015 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 ... | 39.774783 | 79 | 0.616012 |
796bbfadb2478fb5b1724f9265fb9925797fc91f | 8,001 | py | Python | docs/conf.py | scopatz/leyline | 588a1abf3b0b4dd4c01681d8d7ae515c3c81b5af | [
"BSD-3-Clause"
] | null | null | null | docs/conf.py | scopatz/leyline | 588a1abf3b0b4dd4c01681d8d7ae515c3c81b5af | [
"BSD-3-Clause"
] | null | null | null | docs/conf.py | scopatz/leyline | 588a1abf3b0b4dd4c01681d8d7ae515c3c81b5af | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values that are commented out
# serve to show the default.
import os
impor... | 30.192453 | 80 | 0.707037 |
796bc1242f9dafe972c0e487a330a990b70fe7f6 | 6,010 | py | Python | wordle.py | tipa16384/wordle | 33d9b6f55b71713237224b6dca4433a304e5d540 | [
"CC0-1.0"
] | null | null | null | wordle.py | tipa16384/wordle | 33d9b6f55b71713237224b6dca4433a304e5d540 | [
"CC0-1.0"
] | null | null | null | wordle.py | tipa16384/wordle | 33d9b6f55b71713237224b6dca4433a304e5d540 | [
"CC0-1.0"
] | null | null | null | #!/usr/bin/python
import os
import sys
dict_file = '/usr/share/dict/words'
wordle_file = 'wordle.txt'
def create_wordle_file():
"""
wordle_file is a test file that contains the words from dict_file
that are all lower case and exactly five letters long
"""
if not os.path.exists(wordle_file):
... | 29.317073 | 105 | 0.619967 |
796bc143e9936a5bca7ce3a4794174bf7a46ea72 | 10,058 | py | Python | core/polyaxon/polypod/compiler/resolver/base.py | polyaxon/polyaxon | a835f2872a63f6cf5c27d2dd1125ad7c18eb849a | [
"Apache-2.0"
] | 3,200 | 2017-05-09T11:35:31.000Z | 2022-03-28T05:43:22.000Z | core/polyaxon/polypod/compiler/resolver/base.py | polyaxon/polyaxon | a835f2872a63f6cf5c27d2dd1125ad7c18eb849a | [
"Apache-2.0"
] | 1,324 | 2017-06-29T07:21:27.000Z | 2022-03-27T12:41:10.000Z | core/polyaxon/polypod/compiler/resolver/base.py | polyaxon/polyaxon | a835f2872a63f6cf5c27d2dd1125ad7c18eb849a | [
"Apache-2.0"
] | 341 | 2017-01-10T23:06:53.000Z | 2022-03-10T08:15:18.000Z | #!/usr/bin/python
#
# Copyright 2018-2021 Polyaxon, 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 ... | 33.86532 | 88 | 0.647843 |
796bc18743da27559d9ba4af2e49efc48c418e5d | 90 | py | Python | backend/util/request/models/datespan/__init__.py | willrp/willorders-ws | de0757d8888dab41095c93500a6a88c813755530 | [
"MIT"
] | 4 | 2020-02-19T09:27:23.000Z | 2021-11-26T00:42:06.000Z | backend/util/request/order/models/datespan/__init__.py | willrp/willbuyer | 069836a91c777ede6f62a16daa9f26e555d66bcb | [
"MIT"
] | null | null | null | backend/util/request/order/models/datespan/__init__.py | willrp/willbuyer | 069836a91c777ede6f62a16daa9f26e555d66bcb | [
"MIT"
] | null | null | null | from .datespan_request import DatespanRequest
from .datespan_schema import DatespanSchema
| 30 | 45 | 0.888889 |
796bc1a5f6c023a15985fcec434a117860d26452 | 205 | py | Python | healthApp/createOrders/urls.py | kneeraazon01/DjangoWithMongo | 5a3a9213cf8fce6c86282c39f51dd45f6dc97519 | [
"Apache-2.0"
] | null | null | null | healthApp/createOrders/urls.py | kneeraazon01/DjangoWithMongo | 5a3a9213cf8fce6c86282c39f51dd45f6dc97519 | [
"Apache-2.0"
] | null | null | null | healthApp/createOrders/urls.py | kneeraazon01/DjangoWithMongo | 5a3a9213cf8fce6c86282c39f51dd45f6dc97519 | [
"Apache-2.0"
] | null | null | null | from django.urls import path
from .views import ordersCreateView
urlpatterns = [
path("", ordersCreateView.as_view(), name="orders"),
# path("orders/", orderListView.as_view(), name="orderss"),
]
| 25.625 | 63 | 0.702439 |
796bc2006e89b8a5bd2595d43ce3ba65a0862e25 | 78 | py | Python | start.py | xiaoxiaokun22/scrapy-qsbk | 345f0e31e0619f9a9785ae42abc272d66d541e4c | [
"MIT"
] | null | null | null | start.py | xiaoxiaokun22/scrapy-qsbk | 345f0e31e0619f9a9785ae42abc272d66d541e4c | [
"MIT"
] | null | null | null | start.py | xiaoxiaokun22/scrapy-qsbk | 345f0e31e0619f9a9785ae42abc272d66d541e4c | [
"MIT"
] | null | null | null | from scrapy import cmdline
cmdline.execute(["scrapy","crawl","qsbk_spider"]); | 26 | 50 | 0.75641 |
796bc4ffeff1f6d716523c8b9a21c52c447ab881 | 6,502 | py | Python | rosetta/poutil.py | savoirfairelinux/django-rosetta | 0a6dfaeb32bcd5797fbe8a7484772c610c9c64fb | [
"MIT"
] | null | null | null | rosetta/poutil.py | savoirfairelinux/django-rosetta | 0a6dfaeb32bcd5797fbe8a7484772c610c9c64fb | [
"MIT"
] | null | null | null | rosetta/poutil.py | savoirfairelinux/django-rosetta | 0a6dfaeb32bcd5797fbe8a7484772c610c9c64fb | [
"MIT"
] | null | null | null | from datetime import datetime
from django.conf import settings
from rosetta.conf import settings as rosetta_settings
import django
import os
import inspect
from django.apps import AppConfig, apps
from django.utils import timezone
from django.core.cache import caches
cache = caches[rosetta_settings.ROSETTA_CACHE_NAME]
... | 36.122222 | 110 | 0.598124 |
796bc54406787eb26682c600741ba486b127bea1 | 3,037 | py | Python | tic-tac-toe.py | SunkeerthM/tic-tac-toe | 352458b0690f862c306fb85209e298db7a22690a | [
"MIT"
] | null | null | null | tic-tac-toe.py | SunkeerthM/tic-tac-toe | 352458b0690f862c306fb85209e298db7a22690a | [
"MIT"
] | null | null | null | tic-tac-toe.py | SunkeerthM/tic-tac-toe | 352458b0690f862c306fb85209e298db7a22690a | [
"MIT"
] | null | null | null | import itertools
def win(current_game):
#horizontal
def all_same(l):
if l.count(l[0]) == len(l) and l[0] !=0:
return True
else:
return False
for row in game:
print(row)
if all_same(row):
print (f"Player {row[0]} is the w... | 28.383178 | 91 | 0.498518 |
796bc5c0c4ab9c62026fbeb2dd9004f120debef6 | 1,877 | py | Python | fee/metrics/proximity_bias.py | FEE-Fair-Embedding-Engine/FEE | 013a540069ef433d579e4ea2e5f21aa2a3f86815 | [
"MIT"
] | 8 | 2020-09-26T13:27:25.000Z | 2020-12-15T04:00:53.000Z | fee/metrics/proximity_bias.py | FEE-Fair-Embedding-Engine/FEE | 013a540069ef433d579e4ea2e5f21aa2a3f86815 | [
"MIT"
] | null | null | null | fee/metrics/proximity_bias.py | FEE-Fair-Embedding-Engine/FEE | 013a540069ef433d579e4ea2e5f21aa2a3f86815 | [
"MIT"
] | 2 | 2020-11-24T13:47:10.000Z | 2021-09-15T12:35:57.000Z | import numpy as np
from ..utils import get_g, get_pair_idb
from tqdm import tqdm
from collections import defaultdict
def _bias_ratio(vals, l, thresh):
return len(vals[vals>thresh]) / l
def _get_nbs_i(E, word, n):
return np.argsort(E.vecs.dot(E.v(word)))[-n:][::-1]
def _prox_bias(word, E, g=None, thresh=0.05,... | 33.517857 | 76 | 0.561002 |
796bc62de7cd319b73efcdcae87dc2c11bbb4cca | 2,907 | py | Python | integration/sawtooth_integration/tests/intkey_client.py | ltavag/sawtooth-core | 50659f23437b27ecd666d4cf129f812e6adaedc4 | [
"Apache-2.0"
] | 18 | 2019-03-01T16:50:27.000Z | 2022-02-12T19:47:25.000Z | integration/sawtooth_integration/tests/intkey_client.py | ltavag/sawtooth-core | 50659f23437b27ecd666d4cf129f812e6adaedc4 | [
"Apache-2.0"
] | 20 | 2018-07-24T00:58:10.000Z | 2021-12-05T22:42:14.000Z | integration/sawtooth_integration/tests/intkey_client.py | ltavag/sawtooth-core | 50659f23437b27ecd666d4cf129f812e6adaedc4 | [
"Apache-2.0"
] | 40 | 2019-01-02T18:02:37.000Z | 2022-03-05T06:09:14.000Z | # Copyright 2016 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wri... | 33.034091 | 80 | 0.613003 |
796bc6e9c9215f3bf2f44053c40f9bdeb82378a0 | 4,187 | py | Python | utils_test.py | Xtuden-com/proteinfer | e2bc5c88eaae2ef3caca06c23592b1f85c82ca2e | [
"Apache-2.0"
] | 40 | 2019-04-25T15:55:41.000Z | 2022-03-31T19:24:29.000Z | utils_test.py | Xtuden-com/proteinfer | e2bc5c88eaae2ef3caca06c23592b1f85c82ca2e | [
"Apache-2.0"
] | 20 | 2020-01-28T22:41:10.000Z | 2022-02-24T01:41:14.000Z | utils_test.py | Xtuden-com/proteinfer | e2bc5c88eaae2ef3caca06c23592b1f85c82ca2e | [
"Apache-2.0"
] | 14 | 2019-06-20T19:57:08.000Z | 2022-01-29T17:30:07.000Z | # coding=utf-8
# Copyright 2020 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... | 34.319672 | 80 | 0.564605 |
796bc8025437d10530ff51062ac88b9b6dd65460 | 88,125 | py | Python | mypy/types.py | thomaslee/mypy | 211d1820f07d2cb423bbd40c68de38a92916088f | [
"PSF-2.0"
] | null | null | null | mypy/types.py | thomaslee/mypy | 211d1820f07d2cb423bbd40c68de38a92916088f | [
"PSF-2.0"
] | null | null | null | mypy/types.py | thomaslee/mypy | 211d1820f07d2cb423bbd40c68de38a92916088f | [
"PSF-2.0"
] | null | null | null | """Classes for representing mypy types."""
import sys
from abc import abstractmethod
from collections import OrderedDict
from typing import (
Any, TypeVar, Dict, List, Tuple, cast, Set, Optional, Union, Iterable, NamedTuple,
Sequence, Iterator, overload
)
from typing_extensions import ClassVar, Final, TYPE_CH... | 38.516171 | 99 | 0.613753 |
796bc88a1580cf72d9bc49861f507bab2a336b4b | 1,611 | py | Python | airtest/image/toolbox.py | mierly/airtest | 2329b48011f3f93a5c52c013d9301407eca0e322 | [
"BSD-3-Clause"
] | 98 | 2015-01-16T13:15:39.000Z | 2022-03-08T07:51:37.000Z | airtest/image/toolbox.py | mierly/airtest | 2329b48011f3f93a5c52c013d9301407eca0e322 | [
"BSD-3-Clause"
] | 13 | 2015-07-30T06:32:46.000Z | 2016-06-12T16:07:20.000Z | airtest/image/toolbox.py | mierly/airtest | 2329b48011f3f93a5c52c013d9301407eca0e322 | [
"BSD-3-Clause"
] | 34 | 2015-01-04T14:52:15.000Z | 2021-02-01T01:01:39.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import cv2
import numpy
def _readImage(FI, flag=cv2.IMREAD_COLOR):
''' FI can be cv2image or filename '''
img = None
if isinstance(FI, numpy.ndarray):
img = FI.copy()
if isinstance(FI, basestring):
img = cv2.imread(FI, flag)
assert img ... | 28.263158 | 74 | 0.594041 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.