hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
9e3584aec1037152174f7778fba1033725930677 | 425 | py | Python | xunit_viewer/migrations/0003_auto_20150805_2338.py | Mandibull/django_xunit_viewer | b69a443ac31ade2b8134c59c8626233177a39f76 | [
"MIT"
] | null | null | null | xunit_viewer/migrations/0003_auto_20150805_2338.py | Mandibull/django_xunit_viewer | b69a443ac31ade2b8134c59c8626233177a39f76 | [
"MIT"
] | null | null | null | xunit_viewer/migrations/0003_auto_20150805_2338.py | Mandibull/django_xunit_viewer | b69a443ac31ade2b8134c59c8626233177a39f76 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('xunit_viewer', '0002_auto_20150805_2337'),
]
operations = [
migrations.AlterField(
model_name='testresult',
... | 21.25 | 58 | 0.618824 |
d52223712d8cce8139a0b3435fe4aaf0a0be4723 | 1,980 | py | Python | aws-cfn-control/awscfnctl/get_asg_from_stack.py | veloduff/aws-cfn-control | ab0c9589e4eb22ef50d89c0bb73bc59e047c79a8 | [
"Apache-2.0"
] | 39 | 2018-05-16T10:17:09.000Z | 2022-03-30T10:07:44.000Z | aws-cfn-control/awscfnctl/get_asg_from_stack.py | veloduff/aws-cfn-control | ab0c9589e4eb22ef50d89c0bb73bc59e047c79a8 | [
"Apache-2.0"
] | null | null | null | aws-cfn-control/awscfnctl/get_asg_from_stack.py | veloduff/aws-cfn-control | ab0c9589e4eb22ef50d89c0bb73bc59e047c79a8 | [
"Apache-2.0"
] | 15 | 2018-05-14T03:54:08.000Z | 2021-09-20T20:12:02.000Z | #!/usr/bin/env python
#
# Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file
# except in compliance with the License. A copy of the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in... | 26.4 | 101 | 0.693434 |
099af6d67202427729a3cf636a2464185abdb8f9 | 9,742 | py | Python | website/canvas/migrations/0058_add_content_source_url.py | bopopescu/drawquest-web | 8d8f9149b6efeb65202809a5f8916386f58a1b3b | [
"BSD-3-Clause"
] | 61 | 2015-11-10T17:13:46.000Z | 2021-08-06T17:58:30.000Z | website/canvas/migrations/0058_add_content_source_url.py | bopopescu/drawquest-web | 8d8f9149b6efeb65202809a5f8916386f58a1b3b | [
"BSD-3-Clause"
] | 13 | 2015-11-11T07:49:41.000Z | 2021-06-09T03:45:31.000Z | website/canvas/migrations/0058_add_content_source_url.py | bopopescu/drawquest-web | 8d8f9149b6efeb65202809a5f8916386f58a1b3b | [
"BSD-3-Clause"
] | 18 | 2015-11-11T04:50:04.000Z | 2021-08-20T00:57:11.000Z | # encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'Content.source_url'
db.add_column('canvas_content', 'source_url', self.gf('django.db.model... | 73.80303 | 192 | 0.558407 |
61d2f4c12e44de1ee2fdb65fe83392bca0b01375 | 4,332 | py | Python | experiments/square.py | tqsd/QontainerNet | 31cd7aeb6c279b11fbd4b072b2487d0224e7edcb | [
"MIT"
] | null | null | null | experiments/square.py | tqsd/QontainerNet | 31cd7aeb6c279b11fbd4b072b2487d0224e7edcb | [
"MIT"
] | null | null | null | experiments/square.py | tqsd/QontainerNet | 31cd7aeb6c279b11fbd4b072b2487d0224e7edcb | [
"MIT"
] | 1 | 2022-02-22T09:48:38.000Z | 2022-02-22T09:48:38.000Z | #! /usr/bin/env python3
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
"""
About: Basic example to test quantum connection with Qontainernet
"""
import time
from comnetsemu.cli import CLI
from comnetsemu.net import Containernet
from mininet.link import TCLink
from mininet.log import info, setLogLevel
from mininet.node impo... | 33.84375 | 85 | 0.522853 |
85117809fc95325e7fb55c1be0b90fca77c63a2c | 12,967 | py | Python | model/models.py | davestroud/RL_Stocks | 18ae839db4e9adaa24ecc885f461c59ba59d774b | [
"MIT"
] | null | null | null | model/models.py | davestroud/RL_Stocks | 18ae839db4e9adaa24ecc885f461c59ba59d774b | [
"MIT"
] | null | null | null | model/models.py | davestroud/RL_Stocks | 18ae839db4e9adaa24ecc885f461c59ba59d774b | [
"MIT"
] | null | null | null | # common library
import pandas as pd
import numpy as np
import time
import gym
# RL models from stable-baselines
from stable_baselines import GAIL, SAC
from stable_baselines import ACER
from stable_baselines import PPO2
from stable_baselines import A2C
from stable_baselines import DDPG
from stable_baseline... | 46.310714 | 195 | 0.630524 |
392bf528f4887e1f3445c7fadbf8e4fc6692e9c8 | 1,030 | py | Python | Machine Learning/Linear Regression/lr_ols.py | FTJordane/Theory-Implementation | 0ada79ba3adc34f87f383279c2577a9f21dcd4d7 | [
"MIT"
] | null | null | null | Machine Learning/Linear Regression/lr_ols.py | FTJordane/Theory-Implementation | 0ada79ba3adc34f87f383279c2577a9f21dcd4d7 | [
"MIT"
] | null | null | null | Machine Learning/Linear Regression/lr_ols.py | FTJordane/Theory-Implementation | 0ada79ba3adc34f87f383279c2577a9f21dcd4d7 | [
"MIT"
] | null | null | null | '''
This is an implementation of the Linear Regression Machine Learning Algorithm using
ordinary least of squares to learn the parameters.
'''
import csv
# get the data set from a csv file
data_set_file = open("crickets.csv", newline='')
data_set = csv.reader(data_set_file)
# TODO: figure out how to remove headers fro... | 22.391304 | 83 | 0.687379 |
508379d154e53edd2c159c719600459274c091b1 | 169 | py | Python | model/XTDS/base.py | qy826687054/email-zeroshot | e93130f1c141949b80b6a896be154eabdbacf638 | [
"MIT"
] | null | null | null | model/XTDS/base.py | qy826687054/email-zeroshot | e93130f1c141949b80b6a896be154eabdbacf638 | [
"MIT"
] | null | null | null | model/XTDS/base.py | qy826687054/email-zeroshot | e93130f1c141949b80b6a896be154eabdbacf638 | [
"MIT"
] | null | null | null | import model.base
class Model(model.base.Model):
def get_pred(self, out):
pred = []
for ele in out:
pred.append(ele)
return pred | 21.125 | 30 | 0.56213 |
206d75ab36e893e0ab735a95fd1027be16cf8793 | 3,096 | py | Python | apps/user_operations/views.py | LauZyHou/MxShop_Back | 4e1be205ec88960b26262a51440fd91d952db37d | [
"MIT"
] | 1 | 2021-09-17T02:52:23.000Z | 2021-09-17T02:52:23.000Z | apps/user_operations/views.py | LauZyHou/MxShop_Back | 4e1be205ec88960b26262a51440fd91d952db37d | [
"MIT"
] | null | null | null | apps/user_operations/views.py | LauZyHou/MxShop_Back | 4e1be205ec88960b26262a51440fd91d952db37d | [
"MIT"
] | null | null | null | from django.shortcuts import render
from rest_framework import viewsets
from rest_framework import mixins
# Create your views here.
from .models import UserFav, UserLeavingMessage, UserAddress
from .serializers import UserFavSerializer, UserFavDetailSerializer, LeavingMessageSerializer, \
AddressSerializer
from res... | 30.96 | 96 | 0.689276 |
2f748f5074fcca8a828d4395bfaa12b57ea1dfd7 | 960 | py | Python | nipype/interfaces/dipy/tests/test_auto_Denoise.py | moloney/nipype | a7a9c85c79cb1412ba03406074f83200447ef50b | [
"Apache-2.0"
] | null | null | null | nipype/interfaces/dipy/tests/test_auto_Denoise.py | moloney/nipype | a7a9c85c79cb1412ba03406074f83200447ef50b | [
"Apache-2.0"
] | null | null | null | nipype/interfaces/dipy/tests/test_auto_Denoise.py | moloney/nipype | a7a9c85c79cb1412ba03406074f83200447ef50b | [
"Apache-2.0"
] | null | null | null | # AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
from __future__ import unicode_literals
from ..preprocess import Denoise
def test_Denoise_inputs():
input_map = dict(
block_radius=dict(),
in_file=dict(mandatory=True, ),
in_mask=dict(),
noise_mask=dict(),
noise_model=di... | 30 | 67 | 0.623958 |
e8a7f7828a121dc03f12acf1e3efb032cc00d334 | 13,252 | py | Python | cbuild.py | mahiuchun/cports | 37315875922d65a6d4f612cdc17bc0d88856d6d0 | [
"BSD-2-Clause"
] | null | null | null | cbuild.py | mahiuchun/cports | 37315875922d65a6d4f612cdc17bc0d88856d6d0 | [
"BSD-2-Clause"
] | null | null | null | cbuild.py | mahiuchun/cports | 37315875922d65a6d4f612cdc17bc0d88856d6d0 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python3
import os
import sys
import shutil
import shlex
import argparse
import signal
import pathlib
import importlib
import tempfile
import traceback
import configparser
# start from a sane directory
os.chdir(os.path.dirname(__file__))
# ensure files are created with sane permissions
os.umask(0o022)
... | 28.016913 | 79 | 0.652958 |
bd2a5739b2a31e1889c605e27fad87046a7650a9 | 6,185 | py | Python | lq_voc_xml_json.py | liuliu408/tianchi-kaggle | 5eef472a09bbae6b7c3d5de66ca874e02a666fc6 | [
"MIT"
] | null | null | null | lq_voc_xml_json.py | liuliu408/tianchi-kaggle | 5eef472a09bbae6b7c3d5de66ca874e02a666fc6 | [
"MIT"
] | null | null | null | lq_voc_xml_json.py | liuliu408/tianchi-kaggle | 5eef472a09bbae6b7c3d5de66ca874e02a666fc6 | [
"MIT"
] | null | null | null | import xml.etree.ElementTree as ET
import os
import json
coco = dict()
coco['images'] = []
coco['type'] = 'instances'
coco['annotations'] = []
coco['categories'] = []
category_set = dict()
image_set = set()
category_item_id = 0
image_id = 20180000000
annotation_id = 0
def addCatItem(name):
global category_item_... | 35.751445 | 125 | 0.557639 |
6158d9f5118828962bbd558cccbc224f607df7df | 32,183 | py | Python | venv/lib/python3.6/site-packages/sphinx/environment/__init__.py | harishbalakrishnan3/Visual-Categorization | 28c5fc4695fca931bb2a49697cf1776dae1e8259 | [
"MIT"
] | 8 | 2019-04-27T01:19:45.000Z | 2020-09-21T03:31:01.000Z | venv/Lib/site-packages/sphinx/environment/__init__.py | albert-lii/py-spiderman | 8ef46274b791ebf23569860719a6c669a34fd6e0 | [
"MIT"
] | 12 | 2021-03-09T03:01:16.000Z | 2022-03-11T23:59:36.000Z | venv/Lib/site-packages/sphinx/environment/__init__.py | albert-lii/py-spiderman | 8ef46274b791ebf23569860719a6c669a34fd6e0 | [
"MIT"
] | 5 | 2019-04-27T01:19:47.000Z | 2020-09-20T15:15:19.000Z | """
sphinx.environment
~~~~~~~~~~~~~~~~~~
Global creation environment.
:copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import os
import pickle
import warnings
from collections import defaultdict
from copy import copy
from io import Byte... | 40.997452 | 99 | 0.580555 |
b4a19e3f184d29e9ba382ce893a7057d1ec85040 | 15,204 | py | Python | src/pdb.py | freeknijweide/autoencoder-pdb-cleaning | 247f7ce375cea4aa4dce8f61b274268460aaf0d1 | [
"MIT"
] | 1 | 2021-06-29T18:27:46.000Z | 2021-06-29T18:27:46.000Z | src/pdb.py | fpjnijweide/autoencoder-pdb-cleaning | 247f7ce375cea4aa4dce8f61b274268460aaf0d1 | [
"MIT"
] | 7 | 2021-03-14T11:01:03.000Z | 2021-07-25T20:08:00.000Z | src/pdb.py | freeknijweide/autoencoder-pdb-cleaning | 247f7ce375cea4aa4dce8f61b274268460aaf0d1 | [
"MIT"
] | null | null | null | import csv
import os
import re
import numpy as np
import pandas as pd
import pyAgrum as gum
import scipy
import scipy.sparse
import scipy.stats
gpu_string = ""
def natural_key(string_):
if isinstance(string_, np.number) or isinstance(string_, bool) or isinstance(string_, int) or isinstance(string_,
... | 44.58651 | 173 | 0.646146 |
bd8084bafd2159845dbbe66d13093d7941a0a6aa | 5,985 | py | Python | mcquic/modules/entropyCoder.py | xiaosu-zhu/McQuic | 0c8396a50cddbba243bfe0896d6fff2b83f69771 | [
"Apache-2.0"
] | 27 | 2022-03-10T04:15:48.000Z | 2022-03-31T03:20:21.000Z | mcquic/modules/entropyCoder.py | xiaosu-zhu/McQuic | 0c8396a50cddbba243bfe0896d6fff2b83f69771 | [
"Apache-2.0"
] | 1 | 2022-03-31T12:05:30.000Z | 2022-03-31T12:05:30.000Z | mcquic/modules/entropyCoder.py | xiaosu-zhu/McQuic | 0c8396a50cddbba243bfe0896d6fff2b83f69771 | [
"Apache-2.0"
] | 2 | 2022-03-19T08:41:03.000Z | 2022-03-28T14:11:41.000Z | from typing import List, Tuple
import torch
from torch import nn
import torch.distributed as dist
# Port from CompressAI
from mcquic.rans import pmfToQuantizedCDF
from mcquic.rans import RansEncoder, RansDecoder
from mcquic.utils.specification import CodeSize
class EntropyCoder(nn.Module):
def __init__(self, m... | 39.635762 | 173 | 0.562406 |
b782a2e702ac03a8cdae37f484fdeab98835d035 | 1,399 | py | Python | pyjokes/pyjokes.py | grst/python-ci-versioning | 3669a8b9bb3d03767a24e51658a29bb7e252d922 | [
"BSD-3-Clause"
] | 293 | 2015-08-04T13:59:27.000Z | 2022-03-12T12:43:33.000Z | pyjokes/pyjokes.py | grst/python-ci-versioning | 3669a8b9bb3d03767a24e51658a29bb7e252d922 | [
"BSD-3-Clause"
] | 88 | 2015-07-26T13:08:16.000Z | 2022-02-10T07:51:28.000Z | pyjokes/pyjokes.py | grst/python-ci-versioning | 3669a8b9bb3d03767a24e51658a29bb7e252d922 | [
"BSD-3-Clause"
] | 103 | 2015-08-06T17:27:29.000Z | 2022-02-28T19:50:29.000Z | from __future__ import absolute_import
import random
from .jokes_en import jokes_en
from .jokes_de import jokes_de
from .jokes_es import jokes_es
from .jokes_gl import jokes_gl
from .jokes_eu import jokes_eu
from .jokes_it import jokes_it
all_jokes = {
'en': jokes_en,
'de': jokes_de,
'es': jokes_es,
'... | 19.985714 | 96 | 0.614725 |
2c0a6cf9657d706aa38beb87b881e6ae0204a295 | 2,754 | py | Python | app/recipe/tests/test_ingredients_api.py | sanrioyt/recipe-app-api | 920a54f2f048bc2d3133e05d437cd33221088a22 | [
"MIT"
] | null | null | null | app/recipe/tests/test_ingredients_api.py | sanrioyt/recipe-app-api | 920a54f2f048bc2d3133e05d437cd33221088a22 | [
"MIT"
] | null | null | null | app/recipe/tests/test_ingredients_api.py | sanrioyt/recipe-app-api | 920a54f2f048bc2d3133e05d437cd33221088a22 | [
"MIT"
] | null | null | null | from django.contrib.auth import get_user_model
from django.urls import reverse
from django.test import TestCase
from rest_framework import status
from rest_framework.test import APIClient
from core.models import Ingredient
from recipe.serializers import IngredientSerializer
INGREDIENTS_URL = reverse('recipe:ingred... | 33.180723 | 78 | 0.68228 |
7252008c26b1662083a1400694c806c34e33ed67 | 910 | py | Python | graviteeio_cli/lint/functions/length.py | gravitee-io/gravitee-cli | 8e3bf9f2c0c2873e0f6e67f8fcaf0d3b6c44b3ca | [
"Apache-2.0"
] | 12 | 2019-05-29T20:06:01.000Z | 2020-10-07T07:40:27.000Z | graviteeio_cli/lint/functions/length.py | gravitee-io/graviteeio-cli | 0e0069b00ce40813efc7d40142a6dc4b4ec7a261 | [
"Apache-2.0"
] | 41 | 2019-11-04T18:18:18.000Z | 2021-04-22T16:12:51.000Z | graviteeio_cli/lint/functions/length.py | gravitee-io/gravitee-cli | 8e3bf9f2c0c2873e0f6e67f8fcaf0d3b6c44b3ca | [
"Apache-2.0"
] | 6 | 2019-06-18T04:27:49.000Z | 2021-06-02T17:52:24.000Z | from graviteeio_cli.lint.types.function_result import FunctionResult
def length(value, **kwargs):
"""Count the length of a string an or array, the number of properties in an object, or a numeric value, and define minimum and/or maximum values."""
min = None
max = None
if "min" in kwargs and type(kwar... | 26 | 152 | 0.597802 |
85a4c05b906b34d7cf34c88d2dff82feb85afe0b | 17,740 | py | Python | WaveMix.py | pranavphoenix/WaveMix- | b1629b7a0bcd6c0db760a3ee0c134782eb475f34 | [
"CC-BY-4.0"
] | null | null | null | WaveMix.py | pranavphoenix/WaveMix- | b1629b7a0bcd6c0db760a3ee0c134782eb475f34 | [
"CC-BY-4.0"
] | null | null | null | WaveMix.py | pranavphoenix/WaveMix- | b1629b7a0bcd6c0db760a3ee0c134782eb475f34 | [
"CC-BY-4.0"
] | null | null | null | # -*- coding: utf-8 -*-
#When using 4 level DWT
import torch
import torch.nn.functional as F
import numpy as np
from torch.autograd import Function
import pywt
import torch.nn as nn
import functools
!pip install einops
from math import ceil
import pywt
from einops import rearrange, repeat
from einops.layers.torch impo... | 35.338645 | 121 | 0.542954 |
a280fb6a447aa3e2f4717cd1873b0016b9079a81 | 6,191 | py | Python | src/emuvim/api/openstack/resources/port.py | PedroPCardoso/fogbed | 11d9c8ce6ccd32ee71fbb77d719cc322dd9515da | [
"Apache-2.0"
] | null | null | null | src/emuvim/api/openstack/resources/port.py | PedroPCardoso/fogbed | 11d9c8ce6ccd32ee71fbb77d719cc322dd9515da | [
"Apache-2.0"
] | null | null | null | src/emuvim/api/openstack/resources/port.py | PedroPCardoso/fogbed | 11d9c8ce6ccd32ee71fbb77d719cc322dd9515da | [
"Apache-2.0"
] | null | null | null | import logging
import threading
import uuid
lock = threading.Lock()
intf_names = dict()
class Port:
def __init__(self, name, ip_address=None, mac_address=None, floating_ip=None):
self.name = name
self.intf_name = None
self.id = str(uuid.uuid4())
self.template_name = name
"... | 36.204678 | 116 | 0.566629 |
b2de08482a05e7539a47e0234994242200c23ccc | 4,178 | py | Python | sdk/python/pulumi_azure_native/providerhub/latest/get_notification_registration.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/providerhub/latest/get_notification_registration.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/providerhub/latest/get_notification_registration.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from ... import _utilities, _tables
from... | 39.046729 | 219 | 0.688128 |
1eb890e34c8bd42400a01d1d822b9fd6b11aaea4 | 3,214 | py | Python | wts/tests/csp/csp_enforcing_multiple_policies.py | Acidburn0zzz/web-testing-service | 1b46978e27a2e04f322d0f05f606ee96716642aa | [
"BSD-3-Clause"
] | null | null | null | wts/tests/csp/csp_enforcing_multiple_policies.py | Acidburn0zzz/web-testing-service | 1b46978e27a2e04f322d0f05f606ee96716642aa | [
"BSD-3-Clause"
] | null | null | null | wts/tests/csp/csp_enforcing_multiple_policies.py | Acidburn0zzz/web-testing-service | 1b46978e27a2e04f322d0f05f606ee96716642aa | [
"BSD-3-Clause"
] | null | null | null | def main(request, response):
import simplejson as json
f = file('config.json')
source = f.read()
s = json.JSONDecoder().decode(source)
url1 = "http://" + s['host'] + ":" + str(s['ports']['http'][1])
response.headers.set("Content-Security-Policy", "connect-src * 'unsafe-inline'")
response.hea... | 44.638889 | 149 | 0.700996 |
1d9fce1843be18b754c6a4cecaad75622acf13d2 | 963 | py | Python | odoo-13.0/addons/phone_validation/__manifest__.py | VaibhavBhujade/Blockchain-ERP-interoperability | b5190a037fb6615386f7cbad024d51b0abd4ba03 | [
"MIT"
] | null | null | null | odoo-13.0/addons/phone_validation/__manifest__.py | VaibhavBhujade/Blockchain-ERP-interoperability | b5190a037fb6615386f7cbad024d51b0abd4ba03 | [
"MIT"
] | null | null | null | odoo-13.0/addons/phone_validation/__manifest__.py | VaibhavBhujade/Blockchain-ERP-interoperability | b5190a037fb6615386f7cbad024d51b0abd4ba03 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': 'Phone Numbers Validation',
'version': '2.0',
'summary': 'Validate and format phone numbers',
'sequence': '9999',
'category': 'Hidden',
'description': """
Phone Numbers Validation
======... | 26.75 | 74 | 0.654206 |
2790f4e27491324bb72bd762d31bd52c44695b8a | 2,214 | py | Python | drivers-api/hardware_mock.py | xTomo/rbtm-drivers-api-example | 007a0d3171ba9cd83b86eb627f2f8acb3bc9d23f | [
"MIT"
] | null | null | null | drivers-api/hardware_mock.py | xTomo/rbtm-drivers-api-example | 007a0d3171ba9cd83b86eb627f2f8acb3bc9d23f | [
"MIT"
] | null | null | null | drivers-api/hardware_mock.py | xTomo/rbtm-drivers-api-example | 007a0d3171ba9cd83b86eb627f2f8acb3bc9d23f | [
"MIT"
] | null | null | null | import time
def sleep(seconds):
def sleep_decorator(func):
def wrapper(*args, **kwargs):
# time.sleep is used to emulate devices respond lag
time.sleep(seconds)
return func(*args, **kwargs)
return wrapper
return sleep_decorator
@sleep(1)
def get_source_s... | 20.5 | 86 | 0.63505 |
dab692ca7b8984fe18553df38b3f10128f163fed | 494 | py | Python | src/config/gunicorn.py | jonyr/docker-flask-template | d8c5be907f5e3ecb4458895aa245266e9d0bf459 | [
"MIT"
] | 1 | 2022-03-29T19:38:03.000Z | 2022-03-29T19:38:03.000Z | src/config/gunicorn.py | jonyr/docker-flask-template | d8c5be907f5e3ecb4458895aa245266e9d0bf459 | [
"MIT"
] | null | null | null | src/config/gunicorn.py | jonyr/docker-flask-template | d8c5be907f5e3ecb4458895aa245266e9d0bf459 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# pylint: disable=invalid-name
import multiprocessing
import os
from distutils.util import strtobool
bind = f'0.0.0.0:{os.getenv("GUNICORN_PORT", "8000")}'
accesslog = '-'
access_log_format = "%(h)s %(l)s %(u)s %(t)s '%(r)s' %(s)s %(b)s '%(f)s' '%(a)s' in %(D)sµs" # noqa: E501
workers = int(... | 30.875 | 106 | 0.653846 |
f7d54c9ff1a2d5465b1c7544102d4698dc135389 | 34,666 | py | Python | kornia/geometry/conversions.py | ChristophReich1996/kornia | 35f955b46e8015da1cb9faa28c6943ec2b09cc2a | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | kornia/geometry/conversions.py | ChristophReich1996/kornia | 35f955b46e8015da1cb9faa28c6943ec2b09cc2a | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | kornia/geometry/conversions.py | ChristophReich1996/kornia | 35f955b46e8015da1cb9faa28c6943ec2b09cc2a | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | import warnings
from typing import Tuple
import torch
import torch.nn as nn
import torch.nn.functional as F
import enum
from kornia.constants import pi
__all__ = [
# functional api
"rad2deg",
"deg2rad",
"pol2cart",
"cart2pol",
"convert_points_from_homogeneous",
"convert_points_to_homogeneo... | 37.315393 | 126 | 0.632579 |
5b8ecefb43acd6880f3c2cd2df7961e9cee28236 | 164 | py | Python | orders/urls.py | Marlinekhavele/EcommercePlatform | 86cfe1bae3571a25e02d29133e7c94ad250adf9c | [
"MIT"
] | null | null | null | orders/urls.py | Marlinekhavele/EcommercePlatform | 86cfe1bae3571a25e02d29133e7c94ad250adf9c | [
"MIT"
] | null | null | null | orders/urls.py | Marlinekhavele/EcommercePlatform | 86cfe1bae3571a25e02d29133e7c94ad250adf9c | [
"MIT"
] | null | null | null |
from django.urls import path
from orders import views
urlpatterns = [
path('checkout/', views.checkout),
path('orders/', views.OrdersList.as_view()),
] | 18.222222 | 50 | 0.689024 |
9bbf314b497fef1f8405b5741b38393eee0ad2d8 | 1,803 | py | Python | animatedledstrip/distance.py | AnimatedLEDStrip/client-python | 0502b1b70faf6ce9b9ff7b53ee4740372fccb4c3 | [
"MIT"
] | null | null | null | animatedledstrip/distance.py | AnimatedLEDStrip/client-python | 0502b1b70faf6ce9b9ff7b53ee4740372fccb4c3 | [
"MIT"
] | null | null | null | animatedledstrip/distance.py | AnimatedLEDStrip/client-python | 0502b1b70faf6ce9b9ff7b53ee4740372fccb4c3 | [
"MIT"
] | null | null | null | # Copyright (c) 2018-2021 AnimatedLEDStrip
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, p... | 33.388889 | 80 | 0.644481 |
3fd32e9bc7659c4cb5161f05703451d215de3e7d | 19,809 | py | Python | selfdrive/car/chrysler/values.py | guoxixu/openpilot | 141c3466f10ea160198ab456824438a17bea7588 | [
"MIT"
] | 3 | 2021-11-28T00:43:46.000Z | 2021-12-21T11:32:21.000Z | selfdrive/car/chrysler/values.py | byte-iot/openpilot | 7fc1b7dc0a5be75a3ae5d7217b9e887b34947c91 | [
"MIT"
] | 1 | 2022-02-27T14:38:59.000Z | 2022-02-27T14:38:59.000Z | selfdrive/car/chrysler/values.py | byte-iot/openpilot | 7fc1b7dc0a5be75a3ae5d7217b9e887b34947c91 | [
"MIT"
] | 5 | 2022-03-24T16:18:47.000Z | 2022-03-30T02:18:49.000Z | from selfdrive.car import dbc_dict
from cereal import car
Ecu = car.CarParams.Ecu
class CarControllerParams:
STEER_MAX = 261 # 262 faults
STEER_DELTA_UP = 3 # 3 is stock. 100 is fine. 200 is too much it seems
STEER_DELTA_DOWN = 3 # no faults on the way down it seems
STEER_ERROR_MAX = 80
class... | 225.102273 | 1,877 | 0.543642 |
d3f85dd6387eef71c707519b2001116763952486 | 982 | py | Python | Backtesting/PositionClass.py | yutiansut/Quantitative_Finance | 7097ed399fd31b7e15dba8fc816626884aeba8de | [
"MIT"
] | null | null | null | Backtesting/PositionClass.py | yutiansut/Quantitative_Finance | 7097ed399fd31b7e15dba8fc816626884aeba8de | [
"MIT"
] | null | null | null | Backtesting/PositionClass.py | yutiansut/Quantitative_Finance | 7097ed399fd31b7e15dba8fc816626884aeba8de | [
"MIT"
] | 1 | 2019-11-20T10:32:38.000Z | 2019-11-20T10:32:38.000Z | """ C++ For Quantitative Finance """
""" PositionClass """
""" David Li """
class Position:
def __init__(self):
self.symbol = None
self.buys, self.sells, self.net = 0, 0, 0
self.realized_pnl = 0
self.unrealized_pnl = 0
se... | 29.757576 | 59 | 0.523422 |
1a8fbe39fbb0633871f94ae23b8b68b22f0633ef | 959 | py | Python | after_process.py | fredryce/stocker | 041fbe8348f7a035a607a214477cf423c4259171 | [
"MIT"
] | null | null | null | after_process.py | fredryce/stocker | 041fbe8348f7a035a607a214477cf423c4259171 | [
"MIT"
] | null | null | null | after_process.py | fredryce/stocker | 041fbe8348f7a035a607a214477cf423c4259171 | [
"MIT"
] | null | null | null | #compute all the count values for each stock to date
#compute credibility score for each user
#https://www.machinelearningplus.com/nlp/training-custom-ner-model-in-spacy/
#def cred_compute(stock_name, total_caller, ): #this should behave like x^3 graph, computed daily
import os, sys, glob
import sqlite3
import pandas ... | 25.918919 | 97 | 0.729927 |
8766e28153121d3f7edf3df74a5f2d64f71cfcd5 | 1,325 | py | Python | spacy/lang/norm_exceptions.py | Dobita21/spaCy | 93b95bf5fe157ef37f28d697327194acc44c385f | [
"MIT"
] | 12 | 2019-03-20T20:43:47.000Z | 2020-04-13T11:10:52.000Z | spacy/lang/norm_exceptions.py | Dobita21/spaCy | 93b95bf5fe157ef37f28d697327194acc44c385f | [
"MIT"
] | 3 | 2022-02-13T15:21:42.000Z | 2022-02-27T06:12:44.000Z | spacy/lang/norm_exceptions.py | Dobita21/spaCy | 93b95bf5fe157ef37f28d697327194acc44c385f | [
"MIT"
] | 1 | 2020-05-12T16:00:38.000Z | 2020-05-12T16:00:38.000Z | # coding: utf8
from __future__ import unicode_literals
# These exceptions are used to add NORM values based on a token's ORTH value.
# Individual languages can also add their own exceptions and overwrite them -
# for example, British vs. American spelling in English.
# Norms are only set if no alternative is provide... | 22.844828 | 79 | 0.453585 |
e00d03ac98b94a85230ce4310d2b2a483600d6d7 | 791 | py | Python | tools/typemap.py | esoma/pyglm-typing | f47636b86d07d4f91692235e8dfe0af1bd22e883 | [
"MIT"
] | null | null | null | tools/typemap.py | esoma/pyglm-typing | f47636b86d07d4f91692235e8dfe0af1bd22e883 | [
"MIT"
] | null | null | null | tools/typemap.py | esoma/pyglm-typing | f47636b86d07d4f91692235e8dfe0af1bd22e883 | [
"MIT"
] | null | null | null |
__all__ = [
'DATA_TYPE_PREFIX_TO_C_TYPE',
'DATA_TYPE_PREFIX_TO_PYTHON_TYPE',
'DATA_TYPE_SIZE_PREFIX_TO_C_TYPE',
]
import ctypes
DATA_TYPE_PREFIX_TO_C_TYPE = {
'b': ctypes.c_bool,
'd': ctypes.c_double,
'f': ctypes.c_float,
'i': ctypes.c_int,
'u': ctypes.c_uint,
}
DATA_TYPE_PREFIX_TO_P... | 20.282051 | 38 | 0.584071 |
428610a1b6480135f3f8f5a8ceb51bbfb565a7b8 | 1,212 | py | Python | easyneuron/neighbours/_classes.py | Neuron-AI/easyNeuron | 8f8fdc5096f243396f19d3200e9c17e481e9f4f7 | [
"Apache-2.0"
] | 1 | 2021-11-07T20:16:55.000Z | 2021-11-07T20:16:55.000Z | easyneuron/neighbours/_classes.py | Neuron-AI/easyNeuron | 8f8fdc5096f243396f19d3200e9c17e481e9f4f7 | [
"Apache-2.0"
] | null | null | null | easyneuron/neighbours/_classes.py | Neuron-AI/easyNeuron | 8f8fdc5096f243396f19d3200e9c17e481e9f4f7 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 Neuron-AI GitHub 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 appli... | 31.076923 | 80 | 0.698845 |
4079500ed112196fb7b347806f663e3722d0ca07 | 15,312 | py | Python | technical_deployment/web_service/WebApp/model.py | ChaplinMarchais/cortana-intelligence-product-detection-from-images | a28894b2eeb1b8397d84286f66bdc8f947e543b4 | [
"MIT"
] | null | null | null | technical_deployment/web_service/WebApp/model.py | ChaplinMarchais/cortana-intelligence-product-detection-from-images | a28894b2eeb1b8397d84286f66bdc8f947e543b4 | [
"MIT"
] | 4 | 2021-06-08T23:55:34.000Z | 2022-03-12T00:55:55.000Z | technical_deployment/web_service/WebApp/model.py | isabella232/cortana-intelligence-product-detection-from-images | 2e5370098f9f83cd27cdaba2eab675f3c30ae157 | [
"MIT"
] | null | null | null | import os
os.environ['PATH'] = r'D:\home\site\wwwroot\cntk\cntk;' + os.environ['PATH']
APP_ROOT = os.path.dirname(os.path.abspath(__file__))
import sys, importlib, random
import PARAMETERS
import base64
import urllib
import numpy as np
import cntk
from PIL import Image, ImageOps
from io import BytesIO
from flask impo... | 38.862944 | 154 | 0.678357 |
e24e8e891ad6d9f5ca04ed1a962998aaf3a4dbf3 | 2,562 | py | Python | test/samples/test_samples_on_python.py | jsdelivrbot/ppci-mirror | 67195d628275e2332ceaf44c9e13fc58d0877157 | [
"BSD-2-Clause"
] | null | null | null | test/samples/test_samples_on_python.py | jsdelivrbot/ppci-mirror | 67195d628275e2332ceaf44c9e13fc58d0877157 | [
"BSD-2-Clause"
] | null | null | null | test/samples/test_samples_on_python.py | jsdelivrbot/ppci-mirror | 67195d628275e2332ceaf44c9e13fc58d0877157 | [
"BSD-2-Clause"
] | null | null | null | import unittest
import io
from sample_helpers import add_samples
from util import relpath, run_python
from util import do_long_tests, make_filename
from ppci.api import c3_to_ir, bf_to_ir, ir_to_python, optimize, c_to_ir
from ppci.utils.reporting import HtmlReportGenerator
from ppci.lang.c import COptions
@unittest... | 36.6 | 76 | 0.556206 |
155348d93620f70e8c2f9dcb1a2e659c225f36fa | 2,863 | py | Python | function/realtime.py | 4OH4/Object-detection-1 | 3e465124261bd976734ce520c0c5c06cdc943f38 | [
"MIT"
] | 496 | 2018-04-13T02:28:24.000Z | 2022-03-22T13:19:35.000Z | function/realtime.py | 4OH4/Object-detection-1 | 3e465124261bd976734ce520c0c5c06cdc943f38 | [
"MIT"
] | 18 | 2018-04-13T11:49:13.000Z | 2021-12-08T04:55:22.000Z | function/realtime.py | 4OH4/Object-detection-1 | 3e465124261bd976734ce520c0c5c06cdc943f38 | [
"MIT"
] | 219 | 2018-04-13T00:31:18.000Z | 2022-01-16T08:29:23.000Z | from __future__ import print_function
from utils.app_utils import *
from utils.objDet_utils import *
import argparse
import multiprocessing
from multiprocessing import Queue, Pool
import cv2
def realtime(args):
"""
Read and apply object detection to input real time stream (webcam)
"""
# If display is ... | 32.908046 | 103 | 0.572476 |
94863a48a42446f56040d4e3c18e5e756dedf937 | 5,755 | py | Python | fairseq/speech_recognition/datasets/data_preprocess.py | haiyangxue/fairseq | b142ceec20d69130aea823054b193a0d04a780e3 | [
"MIT"
] | null | null | null | fairseq/speech_recognition/datasets/data_preprocess.py | haiyangxue/fairseq | b142ceec20d69130aea823054b193a0d04a780e3 | [
"MIT"
] | null | null | null | fairseq/speech_recognition/datasets/data_preprocess.py | haiyangxue/fairseq | b142ceec20d69130aea823054b193a0d04a780e3 | [
"MIT"
] | null | null | null | import os
import json
def get_file_list(file_path):
dir_list = os.listdir(file_path)
if not dir_list:
return
else:
# 将文件按照最后修改时间顺序升序排列
# os.path.getmtime() 函数是获取文件最后修改时间
dir_list = sorted(dir_list, key=lambda x: os.path.getmtime(os.path.join(file_path, x)))
return dir... | 45.314961 | 154 | 0.566116 |
50a7aabe4f3e420286a7908625e9113f688e87e8 | 2,647 | py | Python | sdk/lusid/models/property_life_time.py | bogdanLicaFinbourne/lusid-sdk-python-preview | f0f91f992e0417733c4c8abd2674d080a52b6890 | [
"MIT"
] | null | null | null | sdk/lusid/models/property_life_time.py | bogdanLicaFinbourne/lusid-sdk-python-preview | f0f91f992e0417733c4c8abd2674d080a52b6890 | [
"MIT"
] | null | null | null | sdk/lusid/models/property_life_time.py | bogdanLicaFinbourne/lusid-sdk-python-preview | f0f91f992e0417733c4c8abd2674d080a52b6890 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
LUSID API
FINBOURNE Technology # noqa: E501
The version of the OpenAPI document: 0.11.2863
Contact: info@finbourne.com
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
class PropertyLifeTime(object):
"""NOTE: This class... | 25.95098 | 83 | 0.55119 |
c9222bf401b91067a68b654ed8e74de5e7e19d98 | 558 | py | Python | rllib/utils/exploration/__init__.py | ZhongxiaYan/ray | ee797ff2b52719f5f8a45cd102974ec192ca6570 | [
"Apache-2.0"
] | 1 | 2020-02-25T08:43:46.000Z | 2020-02-25T08:43:46.000Z | rllib/utils/exploration/__init__.py | mwbrulhardt/ray | b97b8c2be1c7d01e2c93ca97a0b87120bfa2bd1a | [
"Apache-2.0"
] | null | null | null | rllib/utils/exploration/__init__.py | mwbrulhardt/ray | b97b8c2be1c7d01e2c93ca97a0b87120bfa2bd1a | [
"Apache-2.0"
] | null | null | null | from ray.rllib.utils.exploration.exploration import Exploration
from ray.rllib.utils.exploration.epsilon_greedy import EpsilonGreedy
from ray.rllib.utils.exploration.per_worker_epsilon_greedy import \
PerWorkerEpsilonGreedy
from ray.rllib.utils.exploration.random import Random
from ray.rllib.utils.exploration.soft_... | 31 | 68 | 0.792115 |
eb1f4d89b3b5fb627856c0f9a0fd42a11e706721 | 718 | py | Python | tofino_test_builds/03_do_nothing__long_chain.test/codegen.py | gycsaba96/P4RROT | aa10d2063d566450674e4798e6f713e49877a604 | [
"MIT"
] | null | null | null | tofino_test_builds/03_do_nothing__long_chain.test/codegen.py | gycsaba96/P4RROT | aa10d2063d566450674e4798e6f713e49877a604 | [
"MIT"
] | null | null | null | tofino_test_builds/03_do_nothing__long_chain.test/codegen.py | gycsaba96/P4RROT | aa10d2063d566450674e4798e6f713e49877a604 | [
"MIT"
] | null | null | null | import sys
sys.path.append('../../')
from generator_tools import *
from known_types import *
UID.reset()
fp = TofinoFlowProcessor(
istruct=[('a',uint32_t),('b',uint32_t)],
ostruct=[('s',uint32_t)],
mstruct=[('t',uint32_t)],
method='RESPOND'
)
selectors = []
for port in... | 22.4375 | 49 | 0.623955 |
f51454284db34d76f5fcb1dd8d29556a03788416 | 670 | py | Python | gui/widgets/py_grips/__init__.py | ZETOsfx/PyOneDark_Qt_Widgets_Modern_GUI | f57ca92d41660d5f5cbdf498ad23a98ac06e006a | [
"MIT"
] | 318 | 2021-07-31T12:49:09.000Z | 2022-03-29T13:08:31.000Z | gui/widgets/py_grips/__init__.py | ZETOsfx/PyOneDark_Qt_Widgets_Modern_GUI | f57ca92d41660d5f5cbdf498ad23a98ac06e006a | [
"MIT"
] | 12 | 2021-08-08T15:22:01.000Z | 2022-03-27T22:10:34.000Z | gui/widgets/py_grips/__init__.py | ZETOsfx/PyOneDark_Qt_Widgets_Modern_GUI | f57ca92d41660d5f5cbdf498ad23a98ac06e006a | [
"MIT"
] | 121 | 2021-07-31T13:00:51.000Z | 2022-03-29T14:23:37.000Z | # ///////////////////////////////////////////////////////////////
#
# BY: WANDERSON M.PIMENTA
# PROJECT MADE WITH: Qt Designer and PySide6
# V: 1.0.0
#
# This project can be used freely for all uses, as long as they maintain the
# respective credits only in the Python scripts, any information in the visual
# in... | 37.222222 | 79 | 0.592537 |
9ff20a601f509b53073947e7db8bd3b958f9b8b4 | 4,877 | py | Python | purity_fb/purity_fb_1dot12/models/object_store_remote_credentials_response.py | tlewis-ps/purity_fb_python_client | 652835cbd485c95a86da27f8b661679727ec6ea0 | [
"Apache-2.0"
] | 5 | 2017-09-08T20:47:22.000Z | 2021-06-29T02:11:05.000Z | purity_fb/purity_fb_1dot12/models/object_store_remote_credentials_response.py | tlewis-ps/purity_fb_python_client | 652835cbd485c95a86da27f8b661679727ec6ea0 | [
"Apache-2.0"
] | 16 | 2017-11-27T20:57:48.000Z | 2021-11-23T18:46:43.000Z | purity_fb/purity_fb_1dot12/models/object_store_remote_credentials_response.py | tlewis-ps/purity_fb_python_client | 652835cbd485c95a86da27f8b661679727ec6ea0 | [
"Apache-2.0"
] | 22 | 2017-10-13T15:33:05.000Z | 2021-11-08T19:56:21.000Z | # coding: utf-8
"""
Pure Storage FlashBlade REST 1.12 Python SDK
Pure Storage FlashBlade REST 1.12 Python SDK. Compatible with REST API versions 1.0 - 1.12. Developed by [Pure Storage, Inc](http://www.purestorage.com/). Documentations can be found at [purity-fb.readthedocs.io](http://purity-fb.readthedocs.io/... | 32.298013 | 251 | 0.624974 |
0c0a14f41b317735eb562eb1ef8e3b2b435732f7 | 505 | py | Python | venv/lib/python2.7/dist-packages/landscape/lib/tag.py | pengwu/scapy_env | 3db9c5dea2e219048a2387649d6d89be342903d9 | [
"MIT"
] | null | null | null | venv/lib/python2.7/dist-packages/landscape/lib/tag.py | pengwu/scapy_env | 3db9c5dea2e219048a2387649d6d89be342903d9 | [
"MIT"
] | null | null | null | venv/lib/python2.7/dist-packages/landscape/lib/tag.py | pengwu/scapy_env | 3db9c5dea2e219048a2387649d6d89be342903d9 | [
"MIT"
] | null | null | null | import re
_tag_check = re.compile("^\w+[\w-]*$", re.UNICODE)
def is_valid_tag(tagname):
"""Return True if the tag meets our tag requirements."""
return _tag_check.match(tagname)
def is_valid_tag_list(tag_list):
"""Validate a tag_list string.
@param tag_list: string like london, server which will ... | 24.047619 | 74 | 0.681188 |
5931c46f06592c9635a3983c6e280352f4c41c43 | 4,898 | py | Python | test/test_mcmt.py | gawelk/aqua | 98ce06289cc6e12d087982cba95a45353ce0cb3b | [
"Apache-2.0"
] | null | null | null | test/test_mcmt.py | gawelk/aqua | 98ce06289cc6e12d087982cba95a45353ce0cb3b | [
"Apache-2.0"
] | null | null | null | test/test_mcmt.py | gawelk/aqua | 98ce06289cc6e12d087982cba95a45353ce0cb3b | [
"Apache-2.0"
] | 1 | 2019-06-05T01:08:23.000Z | 2019-06-05T01:08:23.000Z | # -*- coding: utf-8 -*-
# This code is part of Qiskit.
#
# (C) Copyright IBM 2019.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modif... | 41.508475 | 92 | 0.543895 |
46c8ee37547ab1dcdffbc816c0b025153b778677 | 2,599 | py | Python | tests/bugs/core_6531_test.py | reevespaul/firebird-qa | 98f16f425aa9ab8ee63b86172f959d63a2d76f21 | [
"MIT"
] | null | null | null | tests/bugs/core_6531_test.py | reevespaul/firebird-qa | 98f16f425aa9ab8ee63b86172f959d63a2d76f21 | [
"MIT"
] | null | null | null | tests/bugs/core_6531_test.py | reevespaul/firebird-qa | 98f16f425aa9ab8ee63b86172f959d63a2d76f21 | [
"MIT"
] | null | null | null | #coding:utf-8
#
# id: bugs.core_6531
# title: COMPUTED BY column looses charset and collate of source field <F> when <F> is either of type BLOB or VARCHAR casted to BLOB
# decription:
# Confirmed bug on 4.0.0.2394, 3.0.8.33426
# Checked on intermediate builds 4.0.... | 29.873563 | 139 | 0.55252 |
3c914460e1362191f22d2d14d4f28f51308e5408 | 64,493 | py | Python | models/syntaxnet/tensorflow/tensorflow/python/ops/array_ops.py | plowman/python-mcparseface | 4c09f46675c9f300ffadd3e4144710b1152bdab3 | [
"Apache-2.0"
] | 42 | 2016-08-22T03:49:32.000Z | 2020-06-29T14:00:27.000Z | models/syntaxnet/tensorflow/tensorflow/python/ops/array_ops.py | plowman/python-mcparseface | 4c09f46675c9f300ffadd3e4144710b1152bdab3 | [
"Apache-2.0"
] | 6 | 2016-09-02T03:44:35.000Z | 2018-11-27T13:20:36.000Z | models/syntaxnet/tensorflow/tensorflow/python/ops/array_ops.py | plowman/python-mcparseface | 4c09f46675c9f300ffadd3e4144710b1152bdab3 | [
"Apache-2.0"
] | 12 | 2017-03-18T22:22:28.000Z | 2020-06-19T20:54:53.000Z | # Copyright 2015 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | 32.522945 | 86 | 0.662056 |
573684d6b1deef4dbdf9bb05ced0ab84362c03dc | 873 | py | Python | parrot/demo.py | LBartolini/Parrot_Paraphraser | 3884a9f908971f5cee65dff6cc2192f044cbcc3a | [
"Apache-2.0"
] | null | null | null | parrot/demo.py | LBartolini/Parrot_Paraphraser | 3884a9f908971f5cee65dff6cc2192f044cbcc3a | [
"Apache-2.0"
] | null | null | null | parrot/demo.py | LBartolini/Parrot_Paraphraser | 3884a9f908971f5cee65dff6cc2192f044cbcc3a | [
"Apache-2.0"
] | null | null | null | from parrot import Parrot
import warnings
warnings.filterwarnings("ignore")
parrot = Parrot(model_tag="dbmdz/bert-base-italian-xxl-cased") #dbmdz/bert-base-italian-xxl-cased
phrases = ["L'hotel con vista mare ha quattro stanze da letto ognuna con un bagno"]
for phrase in phrases:
print("-"*100)
print(phrase)
... | 39.681818 | 97 | 0.552119 |
590c9e94c71714d8f7e444ef5dea74e9fd614ddf | 1,733 | py | Python | apps/users/urls.py | pixelpassion/django-saas-boilerplate | 8888d67181c760708edb18a4832d9002340878fa | [
"MIT"
] | 37 | 2020-11-30T17:05:00.000Z | 2022-03-25T11:03:23.000Z | apps/users/urls.py | gd-js/django-saas-boilerplate | 8888d67181c760708edb18a4832d9002340878fa | [
"MIT"
] | 5 | 2021-04-08T21:58:32.000Z | 2021-06-10T19:59:56.000Z | apps/users/urls.py | gd-js/django-saas-boilerplate | 8888d67181c760708edb18a4832d9002340878fa | [
"MIT"
] | 7 | 2021-04-24T14:17:16.000Z | 2022-02-08T13:38:12.000Z | from django.urls import path
from rest_auth.views import (
LogoutView,
PasswordChangeView,
PasswordResetConfirmView,
PasswordResetView,
)
from .constants.url_names import (
CHANGE_PASS_URL_NAME,
CREATE_USER_DATA_LINK_URL_NAME,
GET_USER_DATA_URL_NAME,
LOGOUT_URL_NAME,
PASS_RESET_CON... | 27.951613 | 87 | 0.686671 |
fcf0340a9f7e88a61dc5565915f1fe5228119aed | 640 | py | Python | icefuzz/tests/colbuf.py | jaxnb/icestorm | 0794aa3afa3776b5b0e7c408cfecc94823ca617e | [
"ISC"
] | 612 | 2015-07-18T12:15:58.000Z | 2020-06-23T13:01:53.000Z | icefuzz/tests/colbuf.py | jaxnb/icestorm | 0794aa3afa3776b5b0e7c408cfecc94823ca617e | [
"ISC"
] | 154 | 2015-07-29T14:06:23.000Z | 2020-06-22T12:41:25.000Z | icefuzz/tests/colbuf.py | jaxnb/icestorm | 0794aa3afa3776b5b0e7c408cfecc94823ca617e | [
"ISC"
] | 170 | 2015-07-20T01:45:20.000Z | 2020-06-23T07:36:54.000Z | #!/usr/bin/env python3
import fileinput
colbuf_tile = None
glbnet_tile = None
for line in fileinput.input():
line = line.split()
if len(line) == 0:
continue
if line[0] in [".io_tile", ".logic_tile", ".ramb_tile", ".ramt_tile"]:
current_tile = (int(line[1]), int(line[2]))
if line[0] ==... | 27.826087 | 97 | 0.621875 |
0e2319076eb954d7730c03a70536dcdf137360f4 | 2,060 | py | Python | ITSKenpoLogin/ITSScheduler.py | qqinyt/ITSKenpoLogin | 632fc7901f13a098a24c2f96e4c507945cc44079 | [
"Unlicense"
] | null | null | null | ITSKenpoLogin/ITSScheduler.py | qqinyt/ITSKenpoLogin | 632fc7901f13a098a24c2f96e4c507945cc44079 | [
"Unlicense"
] | null | null | null | ITSKenpoLogin/ITSScheduler.py | qqinyt/ITSKenpoLogin | 632fc7901f13a098a24c2f96e4c507945cc44079 | [
"Unlicense"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
'''
Required
Info
- author : "Simon"
- email : ""
- date : "2018.4.6"
'''
from apscheduler.schedulers.blocking import BlockingScheduler
from datetime import datetime
import ITSKenpoLogin
import ITSVitalInput
import ITSUpdateMission
import ITSView
import time
import rand... | 31.692308 | 154 | 0.647573 |
a6a939f05b186d5c2799ddca2747e5ea5fd77a41 | 650 | py | Python | xos/synchronizers/openstack/steps/sync_object.py | xmaruto/mcord | 3678a3d10c3703c2b73f396c293faebf0c82a4f4 | [
"Apache-2.0"
] | null | null | null | xos/synchronizers/openstack/steps/sync_object.py | xmaruto/mcord | 3678a3d10c3703c2b73f396c293faebf0c82a4f4 | [
"Apache-2.0"
] | null | null | null | xos/synchronizers/openstack/steps/sync_object.py | xmaruto/mcord | 3678a3d10c3703c2b73f396c293faebf0c82a4f4 | [
"Apache-2.0"
] | null | null | null | import os
import base64
from collections import defaultdict
from django.db.models import F, Q
from xos.config import Config
from synchronizers.base.openstacksyncstep import OpenStackSyncStep
from synchronizers.base.syncstep import *
from core.models import *
from synchronizers.base.ansible import *
from openstack.drive... | 30.952381 | 71 | 0.793846 |
fee1a71abd0bc01fdda7d3211edf04cea7dc8696 | 287 | py | Python | manage.py | eloygbm/slackbot | b68ab5fda2c15517d50352fba03172037bb5819b | [
"Apache-2.0"
] | 1 | 2016-07-13T09:14:46.000Z | 2016-07-13T09:14:46.000Z | manage.py | eloygbm/slackbot | b68ab5fda2c15517d50352fba03172037bb5819b | [
"Apache-2.0"
] | null | null | null | manage.py | eloygbm/slackbot | b68ab5fda2c15517d50352fba03172037bb5819b | [
"Apache-2.0"
] | null | null | null | """
Manage app
"""
from slackbot import db, app
from flask.ext.script import Manager
manager = Manager(app)
@manager.command
def init_db():
"""
To initialize the DB
"""
app.logger.debug("Init DB ...")
db.init_db()
if __name__ == "__main__":
manager.run() | 15.944444 | 36 | 0.620209 |
3a9b800e3bea1ebc4c7fe4678c43c0a00e292038 | 8,455 | py | Python | ci/tsqa/tests/test_hostdb.py | garfieldonly/ats_git | 940ff5c56bebabb96130a55c2a17212c5c518138 | [
"Apache-2.0"
] | 1 | 2022-01-19T14:34:34.000Z | 2022-01-19T14:34:34.000Z | ci/tsqa/tests/test_hostdb.py | mingzym/trafficserver | a01c3a357b4ff9193f2e2a8aee48e3751ef2177a | [
"Apache-2.0"
] | 2 | 2017-12-05T23:48:37.000Z | 2017-12-20T01:22:07.000Z | ci/tsqa/tests/test_hostdb.py | maskit/trafficserver | 3ffa19873f7cd7ced2fbdfed5a0ac8ddbbe70a68 | [
"Apache-2.0"
] | null | null | null | '''
Test hostdb
'''
# 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
#... | 38.963134 | 178 | 0.621171 |
de86ade5ad5e22d45dd7bec490ab603049b8c035 | 148 | py | Python | login.py | xiaobaiya12/- | c454096d69a6efd920f6b3802662740d9e37a83a | [
"MIT"
] | null | null | null | login.py | xiaobaiya12/- | c454096d69a6efd920f6b3802662740d9e37a83a | [
"MIT"
] | null | null | null | login.py | xiaobaiya12/- | c454096d69a6efd920f6b3802662740d9e37a83a | [
"MIT"
] | null | null | null | name1 = 10
name2 = 20
name3 = 30
name4 = 40
name5 = 50
<<<<<<< HEAD
name6 = 60
=======
name6 = 40
>>>>>>> d6d1d31a0b07c1ae90865a40c957451d51638f96
| 12.333333 | 48 | 0.628378 |
973de0796b2dbe99d63d20ab0019713e7252a301 | 3,212 | py | Python | test_enroll.py | harsh-kulkarni/MTech-project | f3e70758efb8e90e61dcd90136cc1db3d8c4d238 | [
"Apache-2.0"
] | null | null | null | test_enroll.py | harsh-kulkarni/MTech-project | f3e70758efb8e90e61dcd90136cc1db3d8c4d238 | [
"Apache-2.0"
] | null | null | null | test_enroll.py | harsh-kulkarni/MTech-project | f3e70758efb8e90e61dcd90136cc1db3d8c4d238 | [
"Apache-2.0"
] | 1 | 2019-05-25T09:32:42.000Z | 2019-05-25T09:32:42.000Z | import RPi.GPIO as gpio
import time
from RPLCD.gpio import CharLCD
from pyfingerprint.pyfingerprint import PyFingerprint
import mysql.connector
########### GPIO PIN Defines ########################
SW1=3
SW2=5
SW3=7
CRANK_LED=11
BOOM_LED=12
BUCKET_LED=32
HI=1
LO=0
PWM_FREQ=1000
#Global vars
... | 26.113821 | 115 | 0.664072 |
ecfd7ce915ab96aeea7d1b90d51c47de36c1fd1b | 1,013 | py | Python | setup.py | shardros/mock-picamera | 6ccc4f6809720d54a4f218fa22181048040b22cb | [
"MIT"
] | null | null | null | setup.py | shardros/mock-picamera | 6ccc4f6809720d54a4f218fa22181048040b22cb | [
"MIT"
] | null | null | null | setup.py | shardros/mock-picamera | 6ccc4f6809720d54a4f218fa22181048040b22cb | [
"MIT"
] | null | null | null | from distutils.core import setup
setup(
name = 'mock-picamera',
packages = ['mock-picamera'],
version = '0.1',
license='MIT',
description = 'A pi camera module which does nothing and so does not require a physical picamera',
author = 'Edwin Shepherd',
url = 'https://github.com/shardros/mock-picamera', #... | 40.52 | 114 | 0.657453 |
e9d24cd5dad491001be5750295a3abb0c287df4a | 236 | py | Python | anytask/users/common.py | AnnaSvalova/anytask | f814b43c496f67a2efe2a150873a1ae32ad97449 | [
"MIT"
] | 31 | 2015-03-24T21:11:44.000Z | 2022-03-28T22:55:12.000Z | anytask/users/common.py | AnnaSvalova/anytask | f814b43c496f67a2efe2a150873a1ae32ad97449 | [
"MIT"
] | 286 | 2015-06-11T10:32:16.000Z | 2022-03-28T12:01:04.000Z | anytask/users/common.py | AnnaSvalova/anytask | f814b43c496f67a2efe2a150873a1ae32ad97449 | [
"MIT"
] | 44 | 2015-05-23T21:30:51.000Z | 2021-11-07T12:56:59.000Z | # coding: utf-8
def get_user_fullname(user):
return u"%s %s" % (user.last_name, user.first_name)
def get_user_link(user):
return u'<a class="user" href="{0}">{1}</a>'.format(user.get_absolute_url(), get_user_fullname(user))
| 23.6 | 105 | 0.682203 |
53eab3749673a15cf5d0575ebf24ebec0ecf7a29 | 865 | py | Python | test/test_null.py | hirzel/jsonsubschema | 411b3b1fa0cbdc6e74e0d7975ef17ee99d79b175 | [
"Apache-2.0"
] | 16 | 2020-05-29T09:21:25.000Z | 2022-01-12T09:03:29.000Z | test/test_null.py | hirzel/jsonsubschema | 411b3b1fa0cbdc6e74e0d7975ef17ee99d79b175 | [
"Apache-2.0"
] | 9 | 2019-11-10T18:32:44.000Z | 2022-02-18T00:47:14.000Z | test/test_null.py | hirzel/jsonsubschema | 411b3b1fa0cbdc6e74e0d7975ef17ee99d79b175 | [
"Apache-2.0"
] | 9 | 2019-11-02T06:52:57.000Z | 2022-01-03T08:35:24.000Z | '''
Created on June 3, 2019
@author: Andrew Habib
'''
import unittest
from jsonsubschema import isSubschema
class TestNull(unittest.TestCase):
def test_null1(self):
s1 = {'enum': [None]}
s2 = {'type': 'null'}
with self.subTest():
self.assertTrue(isSubschema(s1, s2))
... | 22.179487 | 49 | 0.553757 |
0ec661a0b6c2bb9738960275495b9e453ea04c8b | 3,127 | py | Python | examples/mutag_gin.py | beneisner/pytorch_geometric | 53d44a96bd2de2753b1ab1d7153c026c92606a81 | [
"MIT"
] | 1 | 2022-02-17T09:40:17.000Z | 2022-02-17T09:40:17.000Z | examples/mutag_gin.py | beneisner/pytorch_geometric | 53d44a96bd2de2753b1ab1d7153c026c92606a81 | [
"MIT"
] | null | null | null | examples/mutag_gin.py | beneisner/pytorch_geometric | 53d44a96bd2de2753b1ab1d7153c026c92606a81 | [
"MIT"
] | 1 | 2021-06-16T11:40:43.000Z | 2021-06-16T11:40:43.000Z | import os.path as osp
import torch
import torch.nn.functional as F
from torch.nn import Sequential, Linear, BatchNorm1d, ReLU
from torch_geometric.datasets import TUDataset
from torch_geometric.data import DataLoader
from torch_geometric.nn import GINConv, global_add_pool
path = osp.join(osp.dirname(osp.realpath(__fi... | 31.908163 | 78 | 0.619124 |
54a3f57b687b092225eac224b24f0bb819bf3f80 | 375 | py | Python | tests/unit/test_oracle.py | Leibniz137/EthereumBridge | 4b82a68cdc09e5ea79ec2fbf87aa065a2a3a5ffa | [
"MIT"
] | null | null | null | tests/unit/test_oracle.py | Leibniz137/EthereumBridge | 4b82a68cdc09e5ea79ec2fbf87aa065a2a3a5ffa | [
"MIT"
] | null | null | null | tests/unit/test_oracle.py | Leibniz137/EthereumBridge | 4b82a68cdc09e5ea79ec2fbf87aa065a2a3a5ffa | [
"MIT"
] | null | null | null | from src.util.coins import Currency, Coin
from src.util.oracle.oracle import Oracle
def test_price_oracle():
oracle = Oracle()
coin = Coin.Ethereum
currency = Currency.USD
price = oracle.price(coin, currency)
print(price)
assert isinstance(price, float)
gas_price = oracle.gas_price()
... | 20.833333 | 41 | 0.704 |
4c330080144f4fbbc7ebe18fbfb93315bd5462d7 | 765 | py | Python | larkstongue/compress/rle.py | jorikemppi/larkstongue | d65682b6d2824de5c0e4bdc53cfd28c902c76b33 | [
"MIT"
] | 5 | 2020-05-09T07:38:06.000Z | 2020-08-11T06:50:43.000Z | larkstongue/compress/rle.py | jorikemppi/larkstongue | d65682b6d2824de5c0e4bdc53cfd28c902c76b33 | [
"MIT"
] | null | null | null | larkstongue/compress/rle.py | jorikemppi/larkstongue | d65682b6d2824de5c0e4bdc53cfd28c902c76b33 | [
"MIT"
] | null | null | null | def rleCompress(input):
output = ""
length = 0
char = input[0]
for input_char in input[1:]:
if input_char == char:
length += 1
if length == 16:
output = output + "f" + char
length = 0
else:
output = output + format... | 23.90625 | 56 | 0.488889 |
cc6e120540e8d49eb668e1570cae26edb4750a2b | 97 | py | Python | myProject/employeeapi/apps.py | parth-singh71/PostgreSQLBasics | 84ef8733faef0d62ca3e8fd8ca9bf25517ed6c6d | [
"MIT"
] | null | null | null | myProject/employeeapi/apps.py | parth-singh71/PostgreSQLBasics | 84ef8733faef0d62ca3e8fd8ca9bf25517ed6c6d | [
"MIT"
] | null | null | null | myProject/employeeapi/apps.py | parth-singh71/PostgreSQLBasics | 84ef8733faef0d62ca3e8fd8ca9bf25517ed6c6d | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class EmployeeapiConfig(AppConfig):
name = 'employeeapi'
| 16.166667 | 35 | 0.773196 |
ad06d9183510f958210ae296f0c941060207fd42 | 1,423 | py | Python | src/main.py | takeoverjp/tsdraw | 71e10082696df857c6fcd6fed41a434e33b8645e | [
"MIT"
] | null | null | null | src/main.py | takeoverjp/tsdraw | 71e10082696df857c6fcd6fed41a434e33b8645e | [
"MIT"
] | null | null | null | src/main.py | takeoverjp/tsdraw | 71e10082696df857c6fcd6fed41a434e33b8645e | [
"MIT"
] | null | null | null | from datetime import datetime
import click
from src.interface_adapter.database_count_repository import \
DatabaseCountRepository
from src.interface_adapter.record_count_controller import RecordCountController
from src.interface_adapter.report_count_controller import ReportCountController
from src.interface_adapte... | 27.901961 | 79 | 0.784961 |
10e9f7feee8349687362f01ca21586ee33b51021 | 2,651 | py | Python | tests/spot/sub_account/test_sub_account_futures_asset_transfer.py | Banging12/binance-connector-python | dc6fbbd0bb64fb08d73ad8b31e0b81d776efa30b | [
"MIT"
] | 512 | 2021-06-15T08:52:44.000Z | 2022-03-31T09:49:53.000Z | tests/spot/sub_account/test_sub_account_futures_asset_transfer.py | Banging12/binance-connector-python | dc6fbbd0bb64fb08d73ad8b31e0b81d776efa30b | [
"MIT"
] | 75 | 2021-06-20T13:49:50.000Z | 2022-03-30T02:45:31.000Z | tests/spot/sub_account/test_sub_account_futures_asset_transfer.py | Banging12/binance-connector-python | dc6fbbd0bb64fb08d73ad8b31e0b81d776efa30b | [
"MIT"
] | 156 | 2021-06-18T11:56:36.000Z | 2022-03-29T16:34:22.000Z | import responses
from tests.util import random_str
from tests.util import mock_http_response
from binance.spot import Spot as Client
from binance.lib.utils import encoded_string
from binance.error import ParameterRequiredError
mock_item = {"key_1": "value_1", "key_2": "value_2"}
key = random_str()
secret = random_st... | 29.131868 | 85 | 0.714825 |
e4d2a37a64ad47ec4cab5dddd8821ad3b8701e7d | 4,892 | py | Python | tests/python/pants_test/cache/cache_server.py | StephanErb/pants | a368267b6b4cf50138ba567f582409ed31bf5db9 | [
"Apache-2.0"
] | 94 | 2015-01-15T21:24:20.000Z | 2022-02-16T16:55:43.000Z | tests/python/pants_test/cache/cache_server.py | StephanErb/pants | a368267b6b4cf50138ba567f582409ed31bf5db9 | [
"Apache-2.0"
] | 5 | 2020-07-18T01:04:43.000Z | 2021-05-10T08:40:56.000Z | tests/python/pants_test/cache/cache_server.py | StephanErb/pants | a368267b6b4cf50138ba567f582409ed31bf5db9 | [
"Apache-2.0"
] | 47 | 2015-02-25T02:20:07.000Z | 2022-03-21T00:59:16.000Z | # coding=utf-8
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import absolute_import, division, print_function, unicode_literals
import http.server
import os
import re
import socketserver
from builtins import object, o... | 29.119048 | 95 | 0.719951 |
864c4ec03fb2235b5d64cb4afc6734cca52a9692 | 31,701 | py | Python | madminer/utils/interfaces/madminer_hdf5.py | rbarrue/madminer | e1d17b2d6be48cc5686b5cbe5d01f62f6cd2450c | [
"MIT"
] | null | null | null | madminer/utils/interfaces/madminer_hdf5.py | rbarrue/madminer | e1d17b2d6be48cc5686b5cbe5d01f62f6cd2450c | [
"MIT"
] | null | null | null | madminer/utils/interfaces/madminer_hdf5.py | rbarrue/madminer | e1d17b2d6be48cc5686b5cbe5d01f62f6cd2450c | [
"MIT"
] | null | null | null | import h5py
import logging
import numpy as np
import shutil
from collections import OrderedDict
logger = logging.getLogger(__name__)
def save_madminer_settings(
filename,
parameters,
benchmarks,
benchmarks_is_nuisance=None,
morphing_components=None,
morphing_matrix=None,
systematics=None... | 38.849265 | 120 | 0.665026 |
bd505721a2273cb5f478a0fea6e001b872bf987c | 18,937 | py | Python | lib/models/pose_hrnet_vector_cat_mid.py | chenmingjian/HRNet-Human-Pose-Estimation | 1652f2ed06e36c198af5642cd8aa576516ce7dff | [
"MIT"
] | null | null | null | lib/models/pose_hrnet_vector_cat_mid.py | chenmingjian/HRNet-Human-Pose-Estimation | 1652f2ed06e36c198af5642cd8aa576516ce7dff | [
"MIT"
] | null | null | null | lib/models/pose_hrnet_vector_cat_mid.py | chenmingjian/HRNet-Human-Pose-Estimation | 1652f2ed06e36c198af5642cd8aa576516ce7dff | [
"MIT"
] | null | null | null | # ------------------------------------------------------------------------------
# Copyright (c) Microsoft
# Licensed under the MIT License.
# Written by Bin Xiao (Bin.Xiao@microsoft.com)
# ------------------------------------------------------------------------------
from __future__ import absolute_import
from __futu... | 36.557915 | 93 | 0.529704 |
eccf09bcfaaff6430c151e3002cf70be9458e1e5 | 3,845 | py | Python | app/tests/v1/models/test_base_model.py | Dave-mash/flask-blog | 43cf4d7274b0b3d57e277f670882b1559c592638 | [
"MIT"
] | null | null | null | app/tests/v1/models/test_base_model.py | Dave-mash/flask-blog | 43cf4d7274b0b3d57e277f670882b1559c592638 | [
"MIT"
] | null | null | null | app/tests/v1/models/test_base_model.py | Dave-mash/flask-blog | 43cf4d7274b0b3d57e277f670882b1559c592638 | [
"MIT"
] | null | null | null | # """
# This module contains tests for the base model
# """
# # 3rd party imports
# import unittest
# import os
# # local imports
# from app.api.v1.models.base_model import BaseModel
# from app.database import InitializeDb
# class TestBaseModel(unittest.TestCase):
# def setUp(self):
# self.base_model = ... | 33.146552 | 95 | 0.604161 |
0fe1a28784ec1f376bd507921b2b36fefe0a6030 | 5,987 | py | Python | fonts/tvga-c4_8x14.py | ccccmagicboy/st7735_mpy | b15f1bde69fbe6e0eb4931c57e71c136d8e7f024 | [
"MIT"
] | 6 | 2020-07-11T16:59:19.000Z | 2021-07-16T19:32:49.000Z | ports/esp32/user_modules/st7735_mpy/fonts/tvga-c4_8x14.py | d4niele/micropython | a1f7b37d392bf46b28045ce215ae899fda8d8c38 | [
"MIT"
] | 1 | 2020-04-14T03:14:45.000Z | 2020-04-14T03:14:45.000Z | fonts/tvga-c4_8x14.py | ccccmagicboy/st7735_mpy | b15f1bde69fbe6e0eb4931c57e71c136d8e7f024 | [
"MIT"
] | null | null | null | """converted from ..\fonts\tvga-c4__8x14.bin """
WIDTH = 8
HEIGHT = 14
FIRST = 0x20
LAST = 0x7f
_FONT =\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x18\x3c\x3c\x3c\x18\x18\x00\x18\x18\x00\x00\x00'\
b'\x00\x66\x66\x66\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x6c\x6c\xfe\x6c\x6c\x... | 57.019048 | 60 | 0.704192 |
045a220ce4700298fec486d2e020a73d236299c5 | 401 | py | Python | Django Rest Model Viewset Session Throttle/DRF_throttle/wsgi.py | abhisheksahu92/Django-Rest-Framework | 45ddafb93ed1f2e232d2f537f144bf79cb30bf3d | [
"MIT"
] | null | null | null | Django Rest Model Viewset Session Throttle/DRF_throttle/wsgi.py | abhisheksahu92/Django-Rest-Framework | 45ddafb93ed1f2e232d2f537f144bf79cb30bf3d | [
"MIT"
] | null | null | null | Django Rest Model Viewset Session Throttle/DRF_throttle/wsgi.py | abhisheksahu92/Django-Rest-Framework | 45ddafb93ed1f2e232d2f537f144bf79cb30bf3d | [
"MIT"
] | null | null | null | """
WSGI config for DRF_throttle project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.1/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_... | 23.588235 | 78 | 0.790524 |
25b3975d541d3d6b0d313705313d1c1b28abc88b | 485 | py | Python | docs/conf.py | electroniceel/Glasgow | f6d8fda1d5baec006a6c43fa3d2547a33bdee666 | [
"Apache-2.0",
"0BSD"
] | 1,014 | 2019-10-05T16:21:43.000Z | 2022-03-31T09:26:43.000Z | docs/conf.py | attie/glasgow | eca2cb278478d9cb9a102e6e99dfc5bd2d77a549 | [
"Apache-2.0",
"0BSD"
] | 113 | 2019-10-06T07:49:37.000Z | 2022-03-24T04:33:08.000Z | docs/conf.py | attie/glasgow | eca2cb278478d9cb9a102e6e99dfc5bd2d77a549 | [
"Apache-2.0",
"0BSD"
] | 79 | 2019-10-08T07:36:03.000Z | 2022-03-21T07:00:27.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys, os
import sphinx_rtd_theme
# Configure our load path
sys.path.insert(0, os.path.abspath('../software'))
# Configure Sphinx
extensions = ['sphinx.ext.viewcode', 'sphinx.ext.autodoc', 'sphinxarg.ext']
autodoc_member_order = 'bysource'
source_suffix = '.rst'
ma... | 24.25 | 75 | 0.731959 |
dee4eb1c551ae723f5466845b8553f143a652f33 | 1,296 | py | Python | smaller-scenarios/other-scenarios/misc_scenarios/simple_static_three_node_forward.py | theuerse/emulation-lib-example-scenarios | 6ae7055e6b2c2171a5cda6d0e70e9129e434e990 | [
"MIT"
] | 2 | 2018-12-11T10:02:08.000Z | 2019-04-01T10:39:03.000Z | smaller-scenarios/other-scenarios/misc_scenarios/simple_static_three_node_forward.py | theuerse/emulation-lib-example-scenarios | 6ae7055e6b2c2171a5cda6d0e70e9129e434e990 | [
"MIT"
] | null | null | null | smaller-scenarios/other-scenarios/misc_scenarios/simple_static_three_node_forward.py | theuerse/emulation-lib-example-scenarios | 6ae7055e6b2c2171a5cda6d0e70e9129e434e990 | [
"MIT"
] | null | null | null | from emulation_lib.network_blocks.static_connection import StaticConnection
from emulation_lib.emulation import Emulation
from emulation_lib.network_blocks.static_network_block import StaticNetworkBlock
from emulation_lib.apps.udperf_app import UdperfApp
from emulation_lib.linkcmd_backends.bdl_ import BDL_
emu = Emula... | 30.857143 | 80 | 0.743056 |
0df6009dbd2d62fbc7ece0a813f994cc429cadbd | 3,146 | py | Python | Tests/(Manual)/szabo/szabo1a/excbug/server1.py | jwilk/Pyrex | 83dfbae1261788933472e3f9c501ad74c61a37c5 | [
"Apache-2.0"
] | 5 | 2019-05-26T20:48:36.000Z | 2021-07-09T01:38:38.000Z | Tests/(Manual)/szabo/szabo1a/excbug/server1.py | jwilk/Pyrex | 83dfbae1261788933472e3f9c501ad74c61a37c5 | [
"Apache-2.0"
] | null | null | null | Tests/(Manual)/szabo/szabo1a/excbug/server1.py | jwilk/Pyrex | 83dfbae1261788933472e3f9c501ad74c61a37c5 | [
"Apache-2.0"
] | 1 | 2022-02-10T07:14:58.000Z | 2022-02-10T07:14:58.000Z | # by pts@fazekas.hu at Sun Feb 14 21:02:26 CET 2010
# This doesn't matter much, we'll get a segfault anyway.
#import gc
#gc.disable()
import errno
import os
import os.path
import select
import socket
import ssl
import sys
import excbug
#import excbug_py as excbug
class sockwrapper(object):
def __init__(self, sock... | 28.6 | 77 | 0.63541 |
6312fd42f1b28509e086ddc52863e2be7809c962 | 407 | py | Python | articles/migrations/0003_auto_20190110_1633.py | solnsubuga/blog | c22023dc92a80a64f2a68a4af11c11dbc3e2c905 | [
"MIT"
] | 1 | 2018-04-09T02:09:06.000Z | 2018-04-09T02:09:06.000Z | articles/migrations/0003_auto_20190110_1633.py | solnsubuga/blog | c22023dc92a80a64f2a68a4af11c11dbc3e2c905 | [
"MIT"
] | 7 | 2020-06-05T19:43:22.000Z | 2022-03-11T23:38:50.000Z | articles/migrations/0003_auto_20190110_1633.py | solnsubuga/blog | c22023dc92a80a64f2a68a4af11c11dbc3e2c905 | [
"MIT"
] | null | null | null | # Generated by Django 2.1.5 on 2019-01-10 13:33
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('articles', '0002_auto_20190110_1248'),
]
operations = [
migrations.AlterField(
model_name='article',
name='image',
... | 21.421053 | 70 | 0.60688 |
3e6e4344f57620952321314fab3ae3451c923a7b | 1,779 | py | Python | perf/snapshot.py | Ryan-rsm-McKenzie/text | 15aaea4297e00ec4c74295e7913ead79c90e1502 | [
"BSL-1.0"
] | 265 | 2017-07-09T23:23:48.000Z | 2022-03-24T10:14:19.000Z | perf/snapshot.py | Ryan-rsm-McKenzie/text | 15aaea4297e00ec4c74295e7913ead79c90e1502 | [
"BSL-1.0"
] | 185 | 2017-08-30T16:44:51.000Z | 2021-08-13T12:02:46.000Z | perf/snapshot.py | Ryan-rsm-McKenzie/text | 15aaea4297e00ec4c74295e7913ead79c90e1502 | [
"BSL-1.0"
] | 25 | 2017-08-29T23:07:23.000Z | 2021-09-03T06:31:29.000Z | #!/usr/bin/env python
# Copyright (C) 2020 T. Zachary Laine
#
# Distributed under the Boost Software License, Version 1.0. (See
# accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
import argparse
import os
import shutil
import subprocess
parser = argparse.ArgumentParser(descriptio... | 33.566038 | 103 | 0.784148 |
826fb2caba9da1cd4d2f1b963eb0bb2325df3957 | 2,763 | py | Python | src/dispatch/individual/models.py | themullinator/dispatch | 68b38677c15315a114fd20f9492b5e114d2d73ec | [
"Apache-2.0"
] | 2 | 2020-03-24T13:37:41.000Z | 2020-04-11T04:00:43.000Z | src/dispatch/individual/models.py | stefanm8/dispatch | a7fe52f870a5deec8a161ca7395ca869aaf8f2c9 | [
"Apache-2.0"
] | null | null | null | src/dispatch/individual/models.py | stefanm8/dispatch | a7fe52f870a5deec8a161ca7395ca869aaf8f2c9 | [
"Apache-2.0"
] | null | null | null | from datetime import datetime
from typing import List, Optional
from pydantic import Field
from sqlalchemy import Column, ForeignKey, Integer, PrimaryKeyConstraint, String, Table
from sqlalchemy.sql.schema import UniqueConstraint
from sqlalchemy.orm import relationship
from sqlalchemy_utils import TSVectorType
from d... | 33.289157 | 97 | 0.732899 |
ecb3ea1d76ca165c6fb91388026c278f0486b598 | 164 | py | Python | class_1_testing.py | normangithub7/class_testing | 483d6294cb6841f48115a40bceef1a9f08dcb9ba | [
"MIT"
] | null | null | null | class_1_testing.py | normangithub7/class_testing | 483d6294cb6841f48115a40bceef1a9f08dcb9ba | [
"MIT"
] | null | null | null | class_1_testing.py | normangithub7/class_testing | 483d6294cb6841f48115a40bceef1a9f08dcb9ba | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Spyder Editor
This is a temporary script file.
"""
print('Hello World')
a = [i**2 for i in range(0, 5)]
print(a)
x = 10
print(x*2)
| 10.25 | 32 | 0.579268 |
fa822d3297557a91dcbbd0c31ea89dea0c07a88e | 4,747 | py | Python | tests/blipchain.py | akx/pyalleg | e14eb4dcf84f2a165fb2556ae40305a279d6e4c4 | [
"Zlib"
] | null | null | null | tests/blipchain.py | akx/pyalleg | e14eb4dcf84f2a165fb2556ae40305a279d6e4c4 | [
"Zlib"
] | null | null | null | tests/blipchain.py | akx/pyalleg | e14eb4dcf84f2a165fb2556ae40305a279d6e4c4 | [
"Zlib"
] | null | null | null | """
BLIPCHAIN
PyAlleg demo game
Objective: High score.
How-to: Click on a blip to cause a massive chain reaction.
Too slow?: Set the pov variable to zero to disable the persistence-of-vision effect.
This game *can* bring my Athlon XP 3200+ to its knees. And it has an arcane slowing
system.
"... | 19.697095 | 109 | 0.662734 |
ca01bef47f82f35cfb65a4d183d7e9a59a37753f | 670 | py | Python | server/migrations/versions/5fd43144a0ca_last_login_time_field.py | momikey/liblio | c7ad4fd8d72369358863b90e34f3ed89ddef753c | [
"MIT"
] | null | null | null | server/migrations/versions/5fd43144a0ca_last_login_time_field.py | momikey/liblio | c7ad4fd8d72369358863b90e34f3ed89ddef753c | [
"MIT"
] | null | null | null | server/migrations/versions/5fd43144a0ca_last_login_time_field.py | momikey/liblio | c7ad4fd8d72369358863b90e34f3ed89ddef753c | [
"MIT"
] | null | null | null | """Last login time field
Revision ID: 5fd43144a0ca
Revises: eca5db5f5472
Create Date: 2019-08-25 12:56:11.545827
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '5fd43144a0ca'
down_revision = 'eca5db5f5472'
branch_labels = None
depends_on = None
def upgrade()... | 23.103448 | 83 | 0.695522 |
2476facce6c2cba96a4c5cd60d3390985b702a00 | 1,592 | py | Python | openacademy/models/openacademy_course.py | GilbertoSB/openacademy-project | 07b635aa1cf3c10353fc5d4a1ecde784536a8b31 | [
"Apache-2.0"
] | null | null | null | openacademy/models/openacademy_course.py | GilbertoSB/openacademy-project | 07b635aa1cf3c10353fc5d4a1ecde784536a8b31 | [
"Apache-2.0"
] | null | null | null | openacademy/models/openacademy_course.py | GilbertoSB/openacademy-project | 07b635aa1cf3c10353fc5d4a1ecde784536a8b31 | [
"Apache-2.0"
] | null | null | null | from odoo import models, fields, api
'''
This module create model of course
'''
class Course(models.Model):
'''
This class create model of course
'''
_name = 'openacademy.course' # Nombre del modelo (tabla)
name = fields.Char(string='Title', required=True) # Campo reservado para ide... | 33.166667 | 115 | 0.531407 |
8d69fa235c0ea37485d0cd77541afab7c06d68d7 | 20,238 | py | Python | intersight/model/workflow_ssh_session.py | CiscoDevNet/intersight-python | 04b721f37c3044646a91c185c7259edfb991557a | [
"Apache-2.0"
] | 5 | 2021-12-16T15:13:32.000Z | 2022-03-29T16:09:54.000Z | intersight/model/workflow_ssh_session.py | CiscoDevNet/intersight-python | 04b721f37c3044646a91c185c7259edfb991557a | [
"Apache-2.0"
] | 4 | 2022-01-25T19:05:51.000Z | 2022-03-29T20:18:37.000Z | intersight/model/workflow_ssh_session.py | CiscoDevNet/intersight-python | 04b721f37c3044646a91c185c7259edfb991557a | [
"Apache-2.0"
] | 2 | 2020-07-07T15:01:08.000Z | 2022-01-31T04:27:35.000Z | """
Cisco Intersight
Cisco Intersight is a management platform delivered as a service with embedded analytics for your Cisco and 3rd party IT infrastructure. This platform offers an intelligent level of management that enables IT organizations to analyze, simplify, and automate their environments in more advan... | 65.283871 | 1,678 | 0.663702 |
c059eee3c296a7b9f23c038e174b6f09781ab49a | 943 | py | Python | pandapipes/plotting/__init__.py | nsanina/pandapipes | b2daaca6b83e7d8934502796721846bd9d552364 | [
"BSD-3-Clause"
] | null | null | null | pandapipes/plotting/__init__.py | nsanina/pandapipes | b2daaca6b83e7d8934502796721846bd9d552364 | [
"BSD-3-Clause"
] | null | null | null | pandapipes/plotting/__init__.py | nsanina/pandapipes | b2daaca6b83e7d8934502796721846bd9d552364 | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2020 by Fraunhofer Institute for Energy Economics
# and Energy System Technology (IEE), Kassel. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
from pandapipes.plotting.collections import *
from pandapipes.plotting.generic_geodata... | 24.815789 | 99 | 0.741251 |
3b0386ef9ff8671abad4b6970d675c4bf5125b04 | 1,201 | py | Python | ingestion/src/metadata/generated/schema/type/usageDetails.py | jbuoncri1/OpenMetadata | df1c197e1f2b3016402ca5d32ea8bf7a3f626352 | [
"Apache-2.0"
] | null | null | null | ingestion/src/metadata/generated/schema/type/usageDetails.py | jbuoncri1/OpenMetadata | df1c197e1f2b3016402ca5d32ea8bf7a3f626352 | [
"Apache-2.0"
] | null | null | null | ingestion/src/metadata/generated/schema/type/usageDetails.py | jbuoncri1/OpenMetadata | df1c197e1f2b3016402ca5d32ea8bf7a3f626352 | [
"Apache-2.0"
] | null | null | null | # generated by datamodel-codegen:
# filename: schema/type/usageDetails.json
# timestamp: 2021-10-01T19:50:55+00:00
from __future__ import annotations
from typing import Optional
from pydantic import BaseModel, Extra, Field, confloat, conint
from . import basic
class UsageStats(BaseModel):
class Config:
... | 30.794872 | 100 | 0.68443 |
c700711d5adf03e0a0c8fb2efc42aa525d820e59 | 1,134 | py | Python | crack.py | cisp/linux_hash_crack | 21cd692bdfa44e2b3b34d7fdc7ce1c951b57fdb7 | [
"MIT"
] | 3 | 2018-09-18T02:58:26.000Z | 2018-09-18T08:00:33.000Z | crack.py | cisp/linux_hash_crack | 21cd692bdfa44e2b3b34d7fdc7ce1c951b57fdb7 | [
"MIT"
] | null | null | null | crack.py | cisp/linux_hash_crack | 21cd692bdfa44e2b3b34d7fdc7ce1c951b57fdb7 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding:utf-8 -*-
import os
import sys
def _dict_load(passwordfile,saltstringfile):
_passwordlist = []
_saltstringlist = []
with open(passwordfile,'r') as fr:
while True:
line = fr.readline().split("\n")[0].split('\r')[0]
if line != '':
... | 26.372093 | 76 | 0.5097 |
f3f0c3705140058edb157fb43abaf34df88e07b0 | 440 | py | Python | test/test_phones.py | leestick/python_training | 34e5725daf8f00e23fab5901f5adc67ad4c7fb34 | [
"Apache-2.0"
] | null | null | null | test/test_phones.py | leestick/python_training | 34e5725daf8f00e23fab5901f5adc67ad4c7fb34 | [
"Apache-2.0"
] | null | null | null | test/test_phones.py | leestick/python_training | 34e5725daf8f00e23fab5901f5adc67ad4c7fb34 | [
"Apache-2.0"
] | null | null | null | __author__ = 'ioK'
def test_phones_on_home_page(app):
contact_from_home_page = app.contact.get_contact_list()[0]
contact_from_edit_page = app.contact.get_contact_info_from_edit_page(0)
assert contact_from_home_page.homephone == contact_from_edit_page.homephone
assert contact_from_home_page.workphone ==... | 40 | 83 | 0.827273 |
680ce8a53130fad1b8f75e560cb0629032fa939a | 1,797 | py | Python | tests/test_tox_py.py | adamchainz/tox-py | 5f6e3f9f8d7a46775a31ff42e435addacef3a1a9 | [
"MIT"
] | 3 | 2021-11-18T18:38:45.000Z | 2022-01-26T13:56:32.000Z | tests/test_tox_py.py | adamchainz/tox-py | 5f6e3f9f8d7a46775a31ff42e435addacef3a1a9 | [
"MIT"
] | 34 | 2021-04-17T19:44:52.000Z | 2022-01-10T16:39:47.000Z | tests/test_tox_py.py | adamchainz/tox-py | 5f6e3f9f8d7a46775a31ff42e435addacef3a1a9 | [
"MIT"
] | null | null | null | import os
from argparse import ArgumentTypeError
from types import SimpleNamespace
from unittest import mock
import pytest
from tox.config.parallel import ENV_VAR_KEY_PUBLIC as TOX_PARALLEL_ENV
from tox_py import parse_py, tox_configure
class TestParsePy:
def test_current(self):
assert parse_py("current... | 25.671429 | 75 | 0.628269 |
0e6159f050d7f8d124ebef746984a1b285a1fcb7 | 6,820 | py | Python | models/module.py | FangjinhuaWang/IterMVS | afb870c2d3e15b15e15f244f8d6822c4acb207d5 | [
"MIT"
] | 88 | 2021-12-10T02:05:23.000Z | 2022-03-31T08:45:48.000Z | models/module.py | FangjinhuaWang/IterMVS | afb870c2d3e15b15e15f244f8d6822c4acb207d5 | [
"MIT"
] | 2 | 2022-03-11T12:45:16.000Z | 2022-03-25T09:55:32.000Z | models/module.py | FangjinhuaWang/IterMVS | afb870c2d3e15b15e15f244f8d6822c4acb207d5 | [
"MIT"
] | 7 | 2021-12-10T06:50:08.000Z | 2022-03-02T11:27:07.000Z | import torch
import torch.nn as nn
import torch.nn.functional as F
import math
class ConvBnReLU(nn.Module):
def __init__(self, in_channels, out_channels, kernel_size=3, stride=1, pad=1, dilation=1):
super(ConvBnReLU, self).__init__()
self.conv = nn.Conv2d(in_channels, out_channels, kernel_size, str... | 44.868421 | 130 | 0.617155 |
edae4a177f089d6bb63e931bc78ef18c8e2497e9 | 60,048 | py | Python | python/ccxt/async_support/ftx.py | orikalinski/ccxt_new | 318caa4f8db7ffb719edab2c060a0989d2a9cd28 | [
"MIT"
] | 1 | 2019-09-26T09:16:37.000Z | 2019-09-26T09:16:37.000Z | python/ccxt/async_support/ftx.py | orikalinski/ccxt_new | 318caa4f8db7ffb719edab2c060a0989d2a9cd28 | [
"MIT"
] | 1 | 2020-09-03T10:11:29.000Z | 2020-09-03T10:11:29.000Z | python/ccxt/async_support/ftx.py | orikalinski/ccxt_new | 318caa4f8db7ffb719edab2c060a0989d2a9cd28 | [
"MIT"
] | 3 | 2019-09-26T09:17:26.000Z | 2021-02-01T11:51:49.000Z | # -*- coding: utf-8 -*-
# PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
from ccxt.async_support.base.exchange import Exchange
import hashlib
from ccxt.base.errors import ExchangeError
from ccxt.base.errors impor... | 40.793478 | 175 | 0.445144 |
98584dd68b596e5a8b2163f6690c3342694915c7 | 3,297 | py | Python | activity/views.py | manuforero/AffordSci | e15b9d1aeeb2dc0785a8485f85cb33d4427b1349 | [
"Apache-2.0"
] | null | null | null | activity/views.py | manuforero/AffordSci | e15b9d1aeeb2dc0785a8485f85cb33d4427b1349 | [
"Apache-2.0"
] | null | null | null | activity/views.py | manuforero/AffordSci | e15b9d1aeeb2dc0785a8485f85cb33d4427b1349 | [
"Apache-2.0"
] | null | null | null | from django.http import HttpResponse, HttpResponseRedirect
from django.shortcuts import loader
from django.shortcuts import (
render, get_object_or_404, redirect)
from django.core.urlresolvers import reverse
from django.views.generic import ListView
from django.views.generic.detail import DetailView
from .models imp... | 33.642857 | 81 | 0.697907 |
ffb487c22d1c384b70403a5ffff08bf346505b73 | 10,518 | py | Python | pybind/slxos/v16r_1_00b/rbridge_id/chassis/oper_address/__init__.py | shivharis/pybind | 4e1c6d54b9fd722ccec25546ba2413d79ce337e6 | [
"Apache-2.0"
] | null | null | null | pybind/slxos/v16r_1_00b/rbridge_id/chassis/oper_address/__init__.py | shivharis/pybind | 4e1c6d54b9fd722ccec25546ba2413d79ce337e6 | [
"Apache-2.0"
] | null | null | null | pybind/slxos/v16r_1_00b/rbridge_id/chassis/oper_address/__init__.py | shivharis/pybind | 4e1c6d54b9fd722ccec25546ba2413d79ce337e6 | [
"Apache-2.0"
] | 1 | 2021-11-05T22:15:42.000Z | 2021-11-05T22:15:42.000Z |
from operator import attrgetter
import pyangbind.lib.xpathhelper as xpathhelper
from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType, RestrictedClassType, TypedListType
from pyangbind.lib.yangtypes import YANGBool, YANGListType, YANGDynClass, ReferenceType
from pyangbind.lib.base import PybindBase
from d... | 63.361446 | 702 | 0.709355 |
f9388d20eb9f3ee43e8b7a4cebfed9b0f4b4c5f2 | 6,794 | py | Python | app/resources.py | RSOA-WEITI-2020/AuthService | 806faf08223f146ebcb30cca4ca160bbc8f3f067 | [
"MIT"
] | null | null | null | app/resources.py | RSOA-WEITI-2020/AuthService | 806faf08223f146ebcb30cca4ca160bbc8f3f067 | [
"MIT"
] | 2 | 2020-05-11T14:39:53.000Z | 2020-05-12T17:36:14.000Z | app/resources.py | RSOA-WEITI-2020/AuthService | 806faf08223f146ebcb30cca4ca160bbc8f3f067 | [
"MIT"
] | null | null | null | from typing import (
MutableMapping,
Type,
)
import bcrypt
from flask_restful import (
Resource,
reqparse,
abort,
)
from flask_jwt_extended import (
create_access_token,
create_refresh_token,
jwt_required,
jwt_refresh_token_required,
get_jwt_identity,
get_raw_jwt
)
from model... | 27.617886 | 114 | 0.594201 |
d2e0a526794d7b17471983b4c6323b4bc1796088 | 1,508 | py | Python | tests/test_QGrid_distance.py | nivlekp/abjad-ext-nauert | de39600b84eec8b326441f54bf388802d1584c8e | [
"MIT"
] | 2 | 2020-12-06T20:54:13.000Z | 2021-04-15T16:02:28.000Z | tests/test_QGrid_distance.py | nivlekp/abjad-ext-nauert | de39600b84eec8b326441f54bf388802d1584c8e | [
"MIT"
] | 34 | 2018-06-16T17:40:35.000Z | 2022-03-20T14:43:23.000Z | tests/test_QGrid_distance.py | nivlekp/abjad-ext-nauert | de39600b84eec8b326441f54bf388802d1584c8e | [
"MIT"
] | 1 | 2020-10-16T13:07:54.000Z | 2020-10-16T13:07:54.000Z | import abjad
import abjadext.nauert
def test_QGrid_distance_01():
q_grid = abjadext.nauert.QGrid()
assert q_grid.distance is None
a = abjadext.nauert.QEventProxy(abjadext.nauert.SilentQEvent(0, ["A"]), 0)
q_grid.fit_q_events([a])
assert q_grid.distance == abjad.Offset(0)
b = abjadext.nauer... | 29.568627 | 88 | 0.646552 |
328a6ea5f478a9a62bd65e0295bac2d5376fc15f | 1,414 | py | Python | libs/dense.py | Semere-Gr/CWD | e600ecf635b5621c97576bf9273fd4a00c9966cf | [
"BSD-2-Clause"
] | 586 | 2019-05-28T06:17:19.000Z | 2022-03-29T04:47:36.000Z | libs0.4/dense.py | Anikily/CDinkNet | 490736855475a51bb2984412e88ac7d50d817a3c | [
"MIT"
] | 66 | 2019-07-03T10:02:17.000Z | 2022-03-24T07:28:56.000Z | libs0.4/dense.py | Anikily/CDinkNet | 490736855475a51bb2984412e88ac7d50d817a3c | [
"MIT"
] | 161 | 2018-07-06T20:38:31.000Z | 2022-03-15T04:03:28.000Z | from collections import OrderedDict
import torch
import torch.nn as nn
from .bn import ABN
class DenseModule(nn.Module):
def __init__(self, in_channels, growth, layers, bottleneck_factor=4, norm_act=ABN, dilation=1):
super(DenseModule, self).__init__()
self.in_channels = in_channels
self... | 33.666667 | 113 | 0.579915 |
769e07af5ee0952d6859e1a14b4dc30bc9490401 | 11,259 | py | Python | sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/operations/_private_link_resources_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-09T08:59:13.000Z | 2022-03-09T08:59:13.000Z | sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/operations/_private_link_resources_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/operations/_private_link_resources_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-04T06:21:56.000Z | 2022-03-04T06:21:56.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 ... | 44.152941 | 232 | 0.686651 |
c9457ae92b39917718aa432b95e70ece1d995d10 | 13,192 | py | Python | homesensing_app_project/homesensing/views/db_views.py | matteoferla/Somewhat-Smart-Home | aa3b3855648b1732c733e8cc604ab2f0124d12c4 | [
"MIT"
] | null | null | null | homesensing_app_project/homesensing/views/db_views.py | matteoferla/Somewhat-Smart-Home | aa3b3855648b1732c733e8cc604ab2f0124d12c4 | [
"MIT"
] | null | null | null | homesensing_app_project/homesensing/views/db_views.py | matteoferla/Somewhat-Smart-Home | aa3b3855648b1732c733e8cc604ab2f0124d12c4 | [
"MIT"
] | null | null | null | from pyramid.view import view_config
from ..models import Measurement, Photo, Details, Sunpath
import pyramid.httpexceptions as exc
import datetime as dt
import os, re, shutil
import logging, time, requests
import uuid
from ..utilities import Authenticator, gifify
log = logging.getLogger(__name__)
class DBViews:
... | 37.584046 | 108 | 0.553517 |
1aa3979e52f91e90513f37db05a2c73413f3feca | 228 | py | Python | scripts/get-image-long-id.py | developmentseed/espa-dockerfiles | 766f8abeb936d4bae58b94639274ec78d4a16c9f | [
"Unlicense"
] | null | null | null | scripts/get-image-long-id.py | developmentseed/espa-dockerfiles | 766f8abeb936d4bae58b94639274ec78d4a16c9f | [
"Unlicense"
] | null | null | null | scripts/get-image-long-id.py | developmentseed/espa-dockerfiles | 766f8abeb936d4bae58b94639274ec78d4a16c9f | [
"Unlicense"
] | 1 | 2020-07-28T13:41:31.000Z | 2020-07-28T13:41:31.000Z | #! /usr/bin/env python
import os
import sys
import json
def main():
data = json.load(sys.stdin)
long_id = data[0]['Id'].split(':')[1]
print long_id
return 0
if __name__ == '__main__':
sys.exit(main())
| 12 | 41 | 0.600877 |
f7c618d146001a6bbebc2b19b8bfe4b722b4188a | 40,193 | py | Python | app.py | mikemaer1990/MovieReleaseTracker | d0a5b9c82d8605e85048bdd827c0a0bc436a9cab | [
"MIT",
"PostgreSQL",
"Unlicense"
] | null | null | null | app.py | mikemaer1990/MovieReleaseTracker | d0a5b9c82d8605e85048bdd827c0a0bc436a9cab | [
"MIT",
"PostgreSQL",
"Unlicense"
] | 2 | 2021-06-14T06:12:00.000Z | 2021-06-14T06:12:32.000Z | app.py | mikemaer1990/MovieReleaseTracker | d0a5b9c82d8605e85048bdd827c0a0bc436a9cab | [
"MIT",
"PostgreSQL",
"Unlicense"
] | null | null | null | import os
import configuration
import re
import requests
import math
from datetime import date
from dateutil.relativedelta import relativedelta
from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from flask import flash, g, redirect, render_template, request, url_for, session
from itsdangerous i... | 43.878821 | 289 | 0.613888 |
a1aa9b5ce00f19f9bbd9e64abcd2fb196ab91b9b | 189,055 | py | Python | vsts/vsts/git/v4_1/git_client_base.py | dhilmathy/azure-devops-python-api | d16026911f93361becb52d2f1c124d5c3e8a82e7 | [
"MIT"
] | null | null | null | vsts/vsts/git/v4_1/git_client_base.py | dhilmathy/azure-devops-python-api | d16026911f93361becb52d2f1c124d5c3e8a82e7 | [
"MIT"
] | 37 | 2020-04-27T07:45:19.000Z | 2021-04-05T07:27:15.000Z | vsts/vsts/git/v4_1/git_client_base.py | dhilmathy/azure-devops-python-api | d16026911f93361becb52d2f1c124d5c3e8a82e7 | [
"MIT"
] | null | null | null | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# -------------------------------------------------------------------... | 61.481301 | 527 | 0.645008 |
dc977e52965cce33f325667ae74a8744633567cc | 1,139 | py | Python | src/setup.py | Aadityajoshi151/Easyry | 2295235b68b5926d8229f728a1b5f73f176ba0e9 | [
"MIT"
] | null | null | null | src/setup.py | Aadityajoshi151/Easyry | 2295235b68b5926d8229f728a1b5f73f176ba0e9 | [
"MIT"
] | null | null | null | src/setup.py | Aadityajoshi151/Easyry | 2295235b68b5926d8229f728a1b5f73f176ba0e9 | [
"MIT"
] | null | null | null | from context_menu import menus
import modules
print("Press 1 to install Easyry")
print("Press 2 to uninstall Easyry")
ch=int(input())
if ch == 1:
cm = menus.ContextMenu("Easyry", type="FILES")
cm.add_items([
menus.ContextCommand("📁 Move To Folder", python=modules.moveToFolder),
... | 42.185185 | 97 | 0.65496 |
5290936d228bc2a6f33948324934feac3c5b18f0 | 1,453 | py | Python | broadcast.py | NasirHossainAkash/yt-dlp-bot | 6ded5c62dbec8cf059feaae3c269db16d93c4ed6 | [
"Apache-2.0"
] | null | null | null | broadcast.py | NasirHossainAkash/yt-dlp-bot | 6ded5c62dbec8cf059feaae3c269db16d93c4ed6 | [
"Apache-2.0"
] | null | null | null | broadcast.py | NasirHossainAkash/yt-dlp-bot | 6ded5c62dbec8cf059feaae3c269db16d93c4ed6 | [
"Apache-2.0"
] | null | null | null | import argparse
import contextlib
import logging
import random
import sys
import tempfile
import time
from tqdm import tqdm
from limit import Redis
from ytdl import create_app
parser = argparse.ArgumentParser(description='Broadcast to users')
parser.add_argument('-m', help='message', required=True)
parser.add_argume... | 26.907407 | 101 | 0.683414 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.