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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ec6726113587e1a0aef7d4b9d7aedb437406729a | 1,295 | py | Python | colossus/apps/lists/mixins.py | CreativeWurks/emailerpro | 5f8d668d1b98f5add8123794a1802b82381560eb | [
"MIT"
] | 372 | 2018-08-13T20:51:32.000Z | 2022-03-21T12:55:58.000Z | colossus/apps/lists/mixins.py | CreativeWurks/emailerpro | 5f8d668d1b98f5add8123794a1802b82381560eb | [
"MIT"
] | 30 | 2018-08-13T19:34:17.000Z | 2022-03-20T21:28:49.000Z | colossus/apps/lists/mixins.py | CreativeWurks/emailerpro | 5f8d668d1b98f5add8123794a1802b82381560eb | [
"MIT"
] | 117 | 2018-08-13T21:54:42.000Z | 2022-03-24T16:45:48.000Z | from django.http import Http404
from django.shortcuts import get_object_or_404
from django.views.generic.base import ContextMixin
from colossus.apps.subscribers.constants import TemplateKeys
from colossus.apps.subscribers.models import SubscriptionFormTemplate
from .models import MailingList
class MailingListMixin(... | 31.585366 | 90 | 0.688803 |
c154fe1155b8499e0d3fdbd6be64ead53aadc801 | 4,987 | py | Python | assemyaml/types.py | dacut/Assemyaml | 7d23ce708822f998df51f348df02f8ecc756c919 | [
"Apache-2.0"
] | 2 | 2017-08-11T00:14:38.000Z | 2017-08-17T00:51:49.000Z | assemyaml/types.py | dacut/Assemyaml | 7d23ce708822f998df51f348df02f8ecc756c919 | [
"Apache-2.0"
] | null | null | null | assemyaml/types.py | dacut/Assemyaml | 7d23ce708822f998df51f348df02f8ecc756c919 | [
"Apache-2.0"
] | null | null | null | from __future__ import absolute_import, print_function
from logging import getLogger
from six.moves import range
from yaml.nodes import (
CollectionNode, MappingNode, Node, ScalarNode, SequenceNode,
)
log = getLogger("assemyaml.types")
# Assemyaml-specific tags
ASSEMYAML_NS = u"tag:assemyaml.nz,2017:"
GLOBAL_ASSE... | 26.668449 | 78 | 0.636856 |
17652335786c89817cd65699bf4555542f1927cd | 704 | py | Python | energyuse/apps/concepts/management/commands/fixtags.py | evhart/energyuse | be76bac535bfea33d30867e232c2dcb35e1c7740 | [
"MIT"
] | null | null | null | energyuse/apps/concepts/management/commands/fixtags.py | evhart/energyuse | be76bac535bfea33d30867e232c2dcb35e1c7740 | [
"MIT"
] | 14 | 2019-12-26T17:01:14.000Z | 2022-03-21T22:16:52.000Z | energyuse/apps/concepts/management/commands/fixtags.py | evhart/energyuse | be76bac535bfea33d30867e232c2dcb35e1c7740 | [
"MIT"
] | null | null | null | from django.core.management.base import BaseCommand, CommandError
import json
import re
import urllib
from biostar.apps.posts.models import Vote, Post, Tag
from energyuse.apps.concepts.models import Concept
from energyuse.apps.eusers.models import User
class Command(BaseCommand):
help = 'Fix missing tags from fie... | 25.142857 | 73 | 0.627841 |
10ca25647801dd52cd620e39087dc9333dc7b095 | 1,311 | py | Python | users/utils.py | LeandroFrazao/devsearch-Django-Website | e567bd2649bf9c362c4d588b54acba31a499281c | [
"Apache-2.0"
] | 1 | 2021-09-02T16:30:05.000Z | 2021-09-02T16:30:05.000Z | users/utils.py | LeandroFrazao/devsearch-Django-Website | e567bd2649bf9c362c4d588b54acba31a499281c | [
"Apache-2.0"
] | null | null | null | users/utils.py | LeandroFrazao/devsearch-Django-Website | e567bd2649bf9c362c4d588b54acba31a499281c | [
"Apache-2.0"
] | null | null | null | from django.db.models import Q
from .models import Profile, Skill
from django.core.paginator import Paginator, PageNotAnInteger, EmptyPage
def paginateProfiles(request, profiles, results):
page = request.GET.get('page')
paginator = Paginator(profiles,results)
try:
profiles = paginator.page(page)
... | 26.22 | 72 | 0.670481 |
4398aab2cd7ded774c9eceeabb642cd8318aa026 | 2,467 | py | Python | chapter2/Doolittle.py | ElliotShang/numerical-analysis | 769610dc45cc4498b49f8311d7023b725c1c7bc2 | [
"MIT"
] | null | null | null | chapter2/Doolittle.py | ElliotShang/numerical-analysis | 769610dc45cc4498b49f8311d7023b725c1c7bc2 | [
"MIT"
] | null | null | null | chapter2/Doolittle.py | ElliotShang/numerical-analysis | 769610dc45cc4498b49f8311d7023b725c1c7bc2 | [
"MIT"
] | null | null | null | import numpy as np
from scipy.linalg import lu, lu_factor
def Doolittle_withoutprivot(A):
n = len(A)
M = np.zeros((n, n))
# U = np.zeros((n, n))
for k in range(n):
# upper triangular
s = 0
for j in range(k, n):
s = sum(M[k][t] * M[t][j] for t in range(k)... | 26.244681 | 79 | 0.398054 |
fd3c81402e7fcc92e7ef472c285fc0aa68138a22 | 4,301 | py | Python | wooey/tests/test_models.py | 8dspaces/Wooey-Flask | 44d3ce02474859cdd8d6f1138ba48ce62b739524 | [
"BSD-3-Clause"
] | 1 | 2020-11-05T15:04:33.000Z | 2020-11-05T15:04:33.000Z | wooey/tests/test_models.py | 8dspaces/Wooey-Flask | 44d3ce02474859cdd8d6f1138ba48ce62b739524 | [
"BSD-3-Clause"
] | null | null | null | wooey/tests/test_models.py | 8dspaces/Wooey-Flask | 44d3ce02474859cdd8d6f1138ba48ce62b739524 | [
"BSD-3-Clause"
] | null | null | null | import os
import uuid
from django.test import TestCase, Client
from . import factories, config, mixins
from .. import version
class ScriptTestCase(mixins.ScriptFactoryMixin, TestCase):
def test_multiple_choices(self):
# load our choice script
script = self.choice_script
multiple_choice... | 40.961905 | 124 | 0.660079 |
891a1b37b4591a867d00f12111c8535c5960f062 | 4,382 | py | Python | utility_functions.py | Matt-Gleich/Photo-Merge | 1299378db4e2f9d6011e8a757d0f4b228424de6d | [
"MIT"
] | 3 | 2019-11-06T22:57:45.000Z | 2021-05-31T03:26:16.000Z | utility_functions.py | gleich/Photo-Sort | 1299378db4e2f9d6011e8a757d0f4b228424de6d | [
"MIT"
] | 17 | 2019-06-01T19:03:35.000Z | 2019-11-29T03:50:30.000Z | utility_functions.py | gleich/Photo-Sort | 1299378db4e2f9d6011e8a757d0f4b228424de6d | [
"MIT"
] | 1 | 2019-05-19T22:06:28.000Z | 2019-05-19T22:06:28.000Z | import subprocess
from termcolor import colored
#######################
#Subprocess functions:#
#######################
def get_subprocess_output(subprocess_command):
"""
Will get the output of a subprocess command that has been ran.
:param subprocess_command: the command that was recorded.
:return:... | 27.559748 | 93 | 0.620949 |
abcabdb4ea6ef2352e5fb6e5893ae8f0426e4ad5 | 7,489 | py | Python | sweetviz/series_analyzer.py | marami52/sweetviz | d06df4a2741c73985c574eb63e913a98c4066592 | [
"MIT"
] | 1 | 2020-12-06T18:15:13.000Z | 2020-12-06T18:15:13.000Z | sweetviz/series_analyzer.py | marami52/sweetviz | d06df4a2741c73985c574eb63e913a98c4066592 | [
"MIT"
] | null | null | null | sweetviz/series_analyzer.py | marami52/sweetviz | d06df4a2741c73985c574eb63e913a98c4066592 | [
"MIT"
] | null | null | null | import pandas as pd
from sweetviz.sv_types import NumWithPercent, FeatureType, FeatureToProcess
from sweetviz.type_detection import determine_feature_type
import sweetviz.series_analyzer_numeric
import sweetviz.series_analyzer_cat
import sweetviz.series_analyzer_text
def get_counts(series: pd.Series) -> dict:
# T... | 49.926667 | 113 | 0.707304 |
9eea7c820aeb5f7d89bb6698436bbb98fb2818c4 | 150,117 | py | Python | test/test_nat44_ed.py | yasics/vpp | a4d0956082f12ac8269fd415134af7f605c1f3c9 | [
"Apache-2.0"
] | 1 | 2021-07-01T02:47:27.000Z | 2021-07-01T02:47:27.000Z | test/test_nat44_ed.py | yasics/vpp | a4d0956082f12ac8269fd415134af7f605c1f3c9 | [
"Apache-2.0"
] | null | null | null | test/test_nat44_ed.py | yasics/vpp | a4d0956082f12ac8269fd415134af7f605c1f3c9 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
import unittest
from io import BytesIO
from random import randint, shuffle, choice
import scapy.compat
from framework import VppTestCase, VppTestRunner
from scapy.data import IP_PROTOS
from scapy.layers.inet import IP, TCP, UDP, ICMP, GRE
from scapy.layers.inet import IPerror, TCPerror
from sca... | 39.671512 | 79 | 0.572553 |
daed0000c6137c31b6fc25867909c0032976bb4f | 48 | py | Python | evaluate/__init__.py | YantaoShen/openBCT | 69e798c2dd6380572da7a88b68e0e9d31d9b08a4 | [
"BSD-2-Clause"
] | 64 | 2020-10-13T06:24:41.000Z | 2022-03-08T11:23:22.000Z | evaluate/__init__.py | YantaoShen/openBCT | 69e798c2dd6380572da7a88b68e0e9d31d9b08a4 | [
"BSD-2-Clause"
] | 4 | 2020-12-29T05:57:34.000Z | 2022-01-13T18:07:05.000Z | evaluate/__init__.py | YantaoShen/openBCT | 69e798c2dd6380572da7a88b68e0e9d31d9b08a4 | [
"BSD-2-Clause"
] | 10 | 2020-10-13T06:25:51.000Z | 2022-03-03T00:06:06.000Z | from .evaluators import *
from .ranking import * | 24 | 25 | 0.770833 |
71f88d312aa65f720ee0fcd653b3c5dfa6c07869 | 604 | py | Python | setup.py | blakeaw/ORBILT | ed402dd496534dccd00f3e75b57007d944c58c1d | [
"MIT"
] | 11 | 2019-07-29T16:21:53.000Z | 2022-02-02T11:44:57.000Z | setup.py | blakeaw/ORBILT | ed402dd496534dccd00f3e75b57007d944c58c1d | [
"MIT"
] | 11 | 2019-05-15T09:30:05.000Z | 2021-07-19T16:49:59.000Z | setup.py | blakeaw/ORBILT | ed402dd496534dccd00f3e75b57007d944c58c1d | [
"MIT"
] | 9 | 2019-08-12T11:14:45.000Z | 2020-12-22T18:22:55.000Z | from distutils.core import setup
setup(name='pybilt',
version='0.3.0',
description='Lipid bilayer analysis toolkit.',
author='Blake A. Wilson',
author_email='blake.a.wilson@vanderbilt.edu',
url='http://pybilt.readthedocs.io/en/latest/index.html',
packages=['pybilt', 'pybilt.bilayer_... | 37.75 | 69 | 0.627483 |
a2663592a3e7f6ad58f2d7ad6d9c3c4c621516a6 | 16,124 | py | Python | DRACO/inv_changed.py | RahulSajnani/DRACO-Weakly-Supervised-Dense-Reconstruction-And-Canonicalization-of-Objects | d697905da990487589f88068c886a32d2ef57118 | [
"MIT"
] | 3 | 2021-06-20T17:46:32.000Z | 2021-12-17T16:55:00.000Z | DRACO/inv_changed.py | RahulSajnani/DRACO-Weakly-Supervised-Dense-Reconstruction-And-Canonicalization-of-Objects | d697905da990487589f88068c886a32d2ef57118 | [
"MIT"
] | 1 | 2022-01-13T01:41:00.000Z | 2022-01-13T06:54:29.000Z | DRACO/inv_changed.py | RahulSajnani/DRACO-Weakly-Supervised-Dense-Reconstruction-And-Canonicalization-of-Objects | d697905da990487589f88068c886a32d2ef57118 | [
"MIT"
] | 1 | 2021-09-14T06:17:55.000Z | 2021-09-14T06:17:55.000Z | # Code adapted from https://github.com/ClementPinard/SfmLearner-Pytorch/blob/master/inverse_warp.py
from __future__ import division
from pytorch3d.ops.knn import knn_points
import torch
import torch.nn.functional as F
import cv2
import matplotlib.pyplot as plt
import numpy as np
from PIL import Image
import helper_fun... | 38.028302 | 174 | 0.661808 |
f073caa0a15c3edb6d2672b3bf00e7ef7bde7f5e | 3,436 | py | Python | orquesta/tests/unit/conducting/test_workflow_conductor_data_flow.py | batk0/orquesta | f03f3f2f3820bf111a9277f4f6c5d6c83a89d004 | [
"Apache-2.0"
] | null | null | null | orquesta/tests/unit/conducting/test_workflow_conductor_data_flow.py | batk0/orquesta | f03f3f2f3820bf111a9277f4f6c5d6c83a89d004 | [
"Apache-2.0"
] | null | null | null | orquesta/tests/unit/conducting/test_workflow_conductor_data_flow.py | batk0/orquesta | f03f3f2f3820bf111a9277f4f6c5d6c83a89d004 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, softwa... | 30.40708 | 96 | 0.606519 |
9b22197c3b0915e6f764e2d9fc2f420f0b3f043b | 2,576 | py | Python | caffe2/python/operator_test/listwise_l2r_operator_test.py | KevinKecc/caffe2 | a2b6c6e2f0686358a84277df65e9489fb7d9ddb2 | [
"Apache-2.0"
] | 58 | 2019-01-03T02:20:41.000Z | 2022-02-25T14:24:13.000Z | caffe2/python/operator_test/listwise_l2r_operator_test.py | mingzhe09088/caffe2 | 8f41717c46d214aaf62b53e5b3b9b308b5b8db91 | [
"Apache-2.0"
] | 27 | 2018-04-14T06:44:22.000Z | 2018-08-01T18:02:39.000Z | caffe2/python/operator_test/listwise_l2r_operator_test.py | mingzhe09088/caffe2 | 8f41717c46d214aaf62b53e5b3b9b308b5b8db91 | [
"Apache-2.0"
] | 23 | 2018-04-13T10:47:31.000Z | 2021-05-06T08:38:06.000Z | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from caffe2.python import core, workspace
from hypothesis import given
import caffe2.python.hypothesis_test_util as hu
import hypothesis.strategies as st
import numpy as n... | 34.346667 | 78 | 0.550466 |
ccbe8a9d93495091e7ed3afe8dc730a382529ffe | 5,823 | py | Python | sdk/python/pulumi_google_native/binaryauthorization/v1/get_policy_iam_policy.py | AaronFriel/pulumi-google-native | 75d1cda425e33d4610348972cd70bddf35f1770d | [
"Apache-2.0"
] | 44 | 2021-04-18T23:00:48.000Z | 2022-02-14T17:43:15.000Z | sdk/python/pulumi_google_native/binaryauthorization/v1/get_policy_iam_policy.py | AaronFriel/pulumi-google-native | 75d1cda425e33d4610348972cd70bddf35f1770d | [
"Apache-2.0"
] | 354 | 2021-04-16T16:48:39.000Z | 2022-03-31T17:16:39.000Z | sdk/python/pulumi_google_native/binaryauthorization/v1/get_policy_iam_policy.py | AaronFriel/pulumi-google-native | 75d1cda425e33d4610348972cd70bddf35f1770d | [
"Apache-2.0"
] | 8 | 2021-04-24T17:46:51.000Z | 2022-01-05T10:40:21.000Z | # 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, overload
from ... import _utilities
fro... | 60.030928 | 1,084 | 0.712348 |
92791df3ac0af78b20b7eec4c5bbe219048c526c | 5,983 | py | Python | src/generator/AutoRest.Python.Tests/AcceptanceTests/string_tests.py | yugangw-msft/AutoRest | 32775a902b522e5e7fda9debb8dfc1d40cfb6de0 | [
"MIT"
] | 3 | 2018-03-20T22:36:32.000Z | 2021-07-15T02:36:51.000Z | src/generator/AutoRest.Python.Tests/AcceptanceTests/string_tests.py | yugangw-msft/AutoRest | 32775a902b522e5e7fda9debb8dfc1d40cfb6de0 | [
"MIT"
] | null | null | null | src/generator/AutoRest.Python.Tests/AcceptanceTests/string_tests.py | yugangw-msft/AutoRest | 32775a902b522e5e7fda9debb8dfc1d40cfb6de0 | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
#
# Copyright (c) Microsoft Corporation. All rights reserved.
#
# The MIT License (MIT)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the ... | 49.040984 | 118 | 0.660872 |
201c3b01dc9a473c0cc594946b6bf0c1fdfb00c4 | 8,249 | py | Python | sfx-restaurant/input/convert.py | leotilli/tgen | cbc13df5dc1c6b343d5b17a8d5bc6f63008003f3 | [
"Apache-2.0"
] | null | null | null | sfx-restaurant/input/convert.py | leotilli/tgen | cbc13df5dc1c6b343d5b17a8d5bc6f63008003f3 | [
"Apache-2.0"
] | null | null | null | sfx-restaurant/input/convert.py | leotilli/tgen | cbc13df5dc1c6b343d5b17a8d5bc6f63008003f3 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Converting the SFX data sets (Cambridge, Wen et al. NAACL 2015) to our data format.
"""
from __future__ import unicode_literals
import json
import re
import argparse
from math import ceil
import sys
import os
sys.path.insert(0, os.path.abspath('../../')) # add tge... | 38.910377 | 114 | 0.582252 |
527bb2d3efebe9fc16220773a6f0dade6177c97c | 529 | py | Python | api/migrations/0025_activity_creation.py | eiling/SchoolIdolAPI | a05980fdb33b143dbe2febfc1ad6cf723f025c8d | [
"Apache-2.0"
] | 65 | 2017-12-29T12:28:11.000Z | 2022-03-15T06:42:26.000Z | api/migrations/0025_activity_creation.py | eiling/SchoolIdolAPI | a05980fdb33b143dbe2febfc1ad6cf723f025c8d | [
"Apache-2.0"
] | 31 | 2017-12-18T02:03:09.000Z | 2022-01-13T00:43:35.000Z | api/migrations/0025_activity_creation.py | eiling/SchoolIdolAPI | a05980fdb33b143dbe2febfc1ad6cf723f025c8d | [
"Apache-2.0"
] | 7 | 2018-08-27T15:11:01.000Z | 2021-08-16T05:15:13.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import django.utils.datetime_safe
class Migration(migrations.Migration):
dependencies = [
('api', '0024_auto_20150227_0315'),
]
operations = [
migrations.AddField(
model_... | 24.045455 | 109 | 0.650284 |
f4a7f0179c7330dbf97a203b02591a965ad4530f | 5,091 | py | Python | google-cloud-sdk/lib/surface/compute/instances/detach_disk.py | bopopescu/searchparty | afdc2805cb1b77bd5ac9fdd1a76217f4841f0ea6 | [
"Apache-2.0"
] | null | null | null | google-cloud-sdk/lib/surface/compute/instances/detach_disk.py | bopopescu/searchparty | afdc2805cb1b77bd5ac9fdd1a76217f4841f0ea6 | [
"Apache-2.0"
] | null | null | null | google-cloud-sdk/lib/surface/compute/instances/detach_disk.py | bopopescu/searchparty | afdc2805cb1b77bd5ac9fdd1a76217f4841f0ea6 | [
"Apache-2.0"
] | 3 | 2017-07-27T18:44:13.000Z | 2020-07-25T17:48:53.000Z | # Copyright 2014 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | 37.711111 | 80 | 0.685327 |
35bb5ac1200646e41f3275a250552b234b800421 | 2,653 | py | Python | sunpos.py | marcocipriani01/AllSky-new | 8e3951bccdb4709ef3abfeb7c5bf8961e9c8d3f1 | [
"MIT"
] | null | null | null | sunpos.py | marcocipriani01/AllSky-new | 8e3951bccdb4709ef3abfeb7c5bf8961e9c8d3f1 | [
"MIT"
] | null | null | null | sunpos.py | marcocipriani01/AllSky-new | 8e3951bccdb4709ef3abfeb7c5bf8961e9c8d3f1 | [
"MIT"
] | null | null | null | # Credits:
# https://levelup.gitconnected.com/python-sun-position-for-solar-energy-and-research-7a4ead801777
import datetime
from dateutil.tz import tzutc
from math import sin, cos, tan, asin, atan2, radians as rad, degrees as deg
def sun_position(location, utc=None, refraction=True):
if utc is None:
utc... | 34.907895 | 97 | 0.637392 |
084bbd62b70b208da78b085a71cadd9fbb907ca7 | 77,606 | py | Python | gtfspy/gtfs.py | Leo-Ryu/gtfspy | 732abdf6bfb6427454ac4c0a676dc3f8fc838cf4 | [
"MIT"
] | 118 | 2017-03-14T11:17:54.000Z | 2022-03-31T07:46:31.000Z | gtfspy/gtfs.py | Leo-Ryu/gtfspy | 732abdf6bfb6427454ac4c0a676dc3f8fc838cf4 | [
"MIT"
] | 27 | 2017-05-02T12:39:36.000Z | 2020-03-24T18:29:20.000Z | gtfspy/gtfs.py | Leo-Ryu/gtfspy | 732abdf6bfb6427454ac4c0a676dc3f8fc838cf4 | [
"MIT"
] | 29 | 2017-08-21T15:22:41.000Z | 2022-03-13T07:27:52.000Z | import calendar
import datetime
import logging
import os
import sqlite3
import sys
import time
import warnings
from collections import Counter, defaultdict
from datetime import timedelta
import numpy
import pandas as pd
import pytz
from six import string_types
from gtfspy import shapes
from gtfspy.route_types import ... | 39.859271 | 127 | 0.575445 |
3a4c62880f7d84686898a28d3a02f2a767b78fbe | 2,735 | py | Python | src/gtk/toga_gtk/window.py | jrwdunham/toga | db343c99d0f174aea86c4656849ea25ffb7bfe7a | [
"BSD-3-Clause"
] | null | null | null | src/gtk/toga_gtk/window.py | jrwdunham/toga | db343c99d0f174aea86c4656849ea25ffb7bfe7a | [
"BSD-3-Clause"
] | null | null | null | src/gtk/toga_gtk/window.py | jrwdunham/toga | db343c99d0f174aea86c4656849ea25ffb7bfe7a | [
"BSD-3-Clause"
] | null | null | null | from gi.repository import Gtk
from toga.interface.window import Window as WindowInterface
from .command import SEPARATOR, SPACER, EXPANDING_SPACER
from .container import Container
from .utils import wrapped_handler
from . import dialogs
class Window(WindowInterface):
_IMPL_CLASS = Gtk.Window
_CONTAINER_CLAS... | 35.986842 | 153 | 0.670201 |
54d7caf3003cc8c38a940ad9f53736eeae0dfda4 | 2,817 | py | Python | Pilot3/P3B5/p3b5_darts.py | vgutta/Benchmarks | f739c1fb2b02dd8fb310e2182fa8c4baaaea7caf | [
"MIT"
] | 51 | 2017-01-24T20:57:27.000Z | 2022-02-15T00:33:45.000Z | Pilot3/P3B5/p3b5_darts.py | vgutta/Benchmarks | f739c1fb2b02dd8fb310e2182fa8c4baaaea7caf | [
"MIT"
] | 59 | 2017-08-21T22:19:44.000Z | 2021-11-01T16:05:35.000Z | Pilot3/P3B5/p3b5_darts.py | vgutta/Benchmarks | f739c1fb2b02dd8fb310e2182fa8c4baaaea7caf | [
"MIT"
] | 90 | 2016-11-22T03:57:07.000Z | 2022-01-11T04:43:23.000Z | import os
import sys
import candle
import p3b5 as bmk
import torch
import torch.nn as nn
from torch import optim
import torch.nn.functional as F
from torch.utils.data import DataLoader
file_path = os.path.dirname(os.path.realpath(__file__))
lib_path = os.path.abspath(os.path.join(file_path, '..'))
sys.path.append(li... | 26.828571 | 81 | 0.624778 |
c950cc5e703e07a9357ee9957b76d59c2f9f4f94 | 1,436 | py | Python | setup.py | bmjjr/pyecore | d8ef263e259dc0835806a15a21fc68f581ef27bf | [
"BSD-3-Clause"
] | null | null | null | setup.py | bmjjr/pyecore | d8ef263e259dc0835806a15a21fc68f581ef27bf | [
"BSD-3-Clause"
] | null | null | null | setup.py | bmjjr/pyecore | d8ef263e259dc0835806a15a21fc68f581ef27bf | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
import sys
from setuptools import setup
if sys.version_info < (3, 3):
sys.exit('Sorry, Python < 3.3 is not supported')
packages = ['pyecore',
'pyecore.resources',
'pyecore.type']
setup(
name='pyecore',
version='0.9.0',
description=('A Python(ic) Implemen... | 31.217391 | 71 | 0.589136 |
369e9b0e28e5fac18e6c9b72b46907ce27baed0e | 16,639 | py | Python | src/unity/python/turicreate/test/test_python_decision_tree.py | fossabot/turicreate | a500d5e52143ad15ebdf771d9f74198982c7c45c | [
"BSD-3-Clause"
] | 1 | 2019-04-16T19:51:18.000Z | 2019-04-16T19:51:18.000Z | src/unity/python/turicreate/test/test_python_decision_tree.py | tashby/turicreate | 7f07ce795833d0c56c72b3a1fb9339bed6d178d1 | [
"BSD-3-Clause"
] | 3 | 2021-09-08T02:18:00.000Z | 2022-03-12T00:39:44.000Z | src/unity/python/turicreate/test/test_python_decision_tree.py | tashby/turicreate | 7f07ce795833d0c56c72b3a1fb9339bed6d178d1 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright © 2017 Apple Inc. All rights reserved.
#
# Use of this source code is governed by a BSD-3-clause license that can
# be found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause
from __future__ import print_function as _
from __future__ import division as _
from... | 36.975556 | 88 | 0.446 |
101c8c359c4788edeb74ea0188c24e828c9a9464 | 1,567 | py | Python | applications/cli/commands/predict/view.py | starcell/deepcell-ncluster | 885d6b3678c1413ecdd8681c08306402484706e9 | [
"Apache-2.0"
] | null | null | null | applications/cli/commands/predict/view.py | starcell/deepcell-ncluster | 885d6b3678c1413ecdd8681c08306402484706e9 | [
"Apache-2.0"
] | null | null | null | applications/cli/commands/predict/view.py | starcell/deepcell-ncluster | 885d6b3678c1413ecdd8681c08306402484706e9 | [
"Apache-2.0"
] | null | null | null | #
# Copyright (c) 2019 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 ... | 35.613636 | 107 | 0.745373 |
4bd5fb9d27a17bf84c555e775c0b57b1514dde4a | 620 | py | Python | setup.py | michelepagot/ciaomuloni | 8f7c2187d223bb3d26aeeafe180d39841094d1ad | [
"MIT"
] | null | null | null | setup.py | michelepagot/ciaomuloni | 8f7c2187d223bb3d26aeeafe180d39841094d1ad | [
"MIT"
] | null | null | null | setup.py | michelepagot/ciaomuloni | 8f7c2187d223bb3d26aeeafe180d39841094d1ad | [
"MIT"
] | null | null | null | import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name="ciaomuloni",
version="0.0.1",
author="Michele Pagot",
author_email="michele.pagot@hotmail.it",
description="A small example package",
long_description=long_description,
long_descri... | 29.52381 | 53 | 0.670968 |
950a65299e4aa9b7b0acdcfb163917b3dfdbdb2a | 6,997 | py | Python | blitzdb/backends/file/queries.py | cwoebker/blitzdb | b2e8c1459d322d801a58be5e12ba6f4a7ce9ce17 | [
"MIT"
] | null | null | null | blitzdb/backends/file/queries.py | cwoebker/blitzdb | b2e8c1459d322d801a58be5e12ba6f4a7ce9ce17 | [
"MIT"
] | null | null | null | blitzdb/backends/file/queries.py | cwoebker/blitzdb | b2e8c1459d322d801a58be5e12ba6f4a7ce9ce17 | [
"MIT"
] | null | null | null | """Query operators for the file backend."""
import operator
import re
import six
if six.PY3:
from functools import reduce
def boolean_operator_query(boolean_operator):
"""Generate boolean operator checking function."""
def _boolean_operator_query(expressions):
"""Apply boolean operator to expres... | 33.966019 | 77 | 0.630556 |
eec0adde50a20fe01d4a077d64f78bd74475dd61 | 1,225 | py | Python | ddtrace/contrib/cassandra/__init__.py | mykytarudenko/new-project | e06a912382239739dd3f93b54d545b9506102372 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | ddtrace/contrib/cassandra/__init__.py | mykytarudenko/new-project | e06a912382239739dd3f93b54d545b9506102372 | [
"Apache-2.0",
"BSD-3-Clause"
] | 1 | 2021-01-27T04:53:24.000Z | 2021-01-27T04:53:24.000Z | ddtrace/contrib/cassandra/__init__.py | mykytarudenko/new-project | e06a912382239739dd3f93b54d545b9506102372 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | """Instrument Cassandra to report Cassandra queries.
``patch_all`` will automatically patch your Cluster instance to make it work.
::
from ddtrace import Pin, patch
from cassandra.cluster import Cluster
# If not patched yet, you can patch cassandra specifically
patch(cassandra=True)
# This will ... | 33.108108 | 85 | 0.702041 |
179d2ab97f67d755875df51fa69f11d27a53a39c | 373 | py | Python | lang/Python/amb-2.py | ethansaxenian/RosettaDecode | 8ea1a42a5f792280b50193ad47545d14ee371fb7 | [
"MIT"
] | null | null | null | lang/Python/amb-2.py | ethansaxenian/RosettaDecode | 8ea1a42a5f792280b50193ad47545d14ee371fb7 | [
"MIT"
] | null | null | null | lang/Python/amb-2.py | ethansaxenian/RosettaDecode | 8ea1a42a5f792280b50193ad47545d14ee371fb7 | [
"MIT"
] | null | null | null | # joins :: String -> String -> Bool
def joins(a, b):
return a[-1] == b[0]
print(
[
' '.join([w1, w2, w3, w4])
for w1 in ['the', 'that', 'a']
for w2 in ['frog', 'elephant', 'thing']
for w3 in ['walked', 'treaded', 'grows']
for w4 in ['slowly', 'quickly']
if joins... | 23.3125 | 60 | 0.474531 |
d8405c1c3dee676d0f5738eb10bb599a0c2b1d72 | 4,202 | py | Python | zuul.d/octavia/controller/worker/amphora_rate_limit.py | yi-cloud/octavia | b7f5cfa4c3c454925a90c24984049539228806d7 | [
"Apache-2.0"
] | null | null | null | zuul.d/octavia/controller/worker/amphora_rate_limit.py | yi-cloud/octavia | b7f5cfa4c3c454925a90c24984049539228806d7 | [
"Apache-2.0"
] | null | null | null | zuul.d/octavia/controller/worker/amphora_rate_limit.py | yi-cloud/octavia | b7f5cfa4c3c454925a90c24984049539228806d7 | [
"Apache-2.0"
] | null | null | null | # Copyright 2016 Hewlett-Packard Development Company, L.P.
#
# 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... | 43.319588 | 80 | 0.684912 |
a0c227ff10bd6aeb91199f91d7015088f839ae61 | 9,629 | py | Python | lib/googlecloudsdk/command_lib/certificate_manager/resource_args.py | google-cloud-sdk-unofficial/google-cloud-sdk | 2a48a04df14be46c8745050f98768e30474a1aac | [
"Apache-2.0"
] | 2 | 2019-11-10T09:17:07.000Z | 2019-12-18T13:44:08.000Z | lib/googlecloudsdk/command_lib/certificate_manager/resource_args.py | google-cloud-sdk-unofficial/google-cloud-sdk | 2a48a04df14be46c8745050f98768e30474a1aac | [
"Apache-2.0"
] | null | null | null | lib/googlecloudsdk/command_lib/certificate_manager/resource_args.py | google-cloud-sdk-unofficial/google-cloud-sdk | 2a48a04df14be46c8745050f98768e30474a1aac | [
"Apache-2.0"
] | 1 | 2020-07-25T01:40:19.000Z | 2020-07-25T01:40:19.000Z | # -*- coding: utf-8 -*- #
# Copyright 2020 Google LLC. 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 requir... | 37.760784 | 94 | 0.672552 |
99ac054760433bf5b848263e3cff5bd6e28611e4 | 131 | py | Python | constants.py | abkraynak/snake | 2cbc24a589ff8099546c152ebbc7e7c93709bf93 | [
"MIT"
] | null | null | null | constants.py | abkraynak/snake | 2cbc24a589ff8099546c152ebbc7e7c93709bf93 | [
"MIT"
] | null | null | null | constants.py | abkraynak/snake | 2cbc24a589ff8099546c152ebbc7e7c93709bf93 | [
"MIT"
] | null | null | null | BOXSIZE = 20
CLOCK = 20
WIN_HGT = 400
WIN_WID = 400
BLACK = (0, 0, 0)
BLUE = (0, 0, 255)
RED = (255, 0, 0)
WHITE = (255, 255, 255) | 14.555556 | 23 | 0.572519 |
23aef1017cf4c7eca2c62975a3dc9e50bf056f46 | 19,090 | py | Python | madminer/ml/score.py | siyuchen95/madminer | dfcbd7ee26c47dd294610c195fafce15f74c10eb | [
"MIT"
] | 2 | 2020-09-09T20:58:31.000Z | 2020-09-10T01:35:35.000Z | madminer/ml/score.py | siyuchen95/madminer | dfcbd7ee26c47dd294610c195fafce15f74c10eb | [
"MIT"
] | null | null | null | madminer/ml/score.py | siyuchen95/madminer | dfcbd7ee26c47dd294610c195fafce15f74c10eb | [
"MIT"
] | null | null | null | from __future__ import absolute_import, division, print_function
import logging
import numpy as np
from collections import OrderedDict
from ..utils.ml.models.score import DenseLocalScoreModel
from ..utils.ml.eval import evaluate_local_score_model
from ..utils.ml.utils import get_optimizer, get_loss
from ..utils.vario... | 40.359408 | 120 | 0.637926 |
4879b6d25e9bc9924a5d5a0f10250f1d909f1224 | 12,337 | py | Python | symphony/bdk/gen/pod_model/stream_list.py | symphony-mariacristina/symphony-bdk-python | ef65762739890e826ccfaf38f7a41d61b95e7f22 | [
"Apache-2.0"
] | null | null | null | symphony/bdk/gen/pod_model/stream_list.py | symphony-mariacristina/symphony-bdk-python | ef65762739890e826ccfaf38f7a41d61b95e7f22 | [
"Apache-2.0"
] | null | null | null | symphony/bdk/gen/pod_model/stream_list.py | symphony-mariacristina/symphony-bdk-python | ef65762739890e826ccfaf38f7a41d61b95e7f22 | [
"Apache-2.0"
] | null | null | null | """
Pod API
This document refers to Symphony API calls that do not need encryption or decryption of content. - sessionToken can be obtained by calling the authenticationAPI on the symphony back end and the key manager respectively. Refer to the methods described in authenticatorAPI.yaml. - Actions are defined... | 43.748227 | 637 | 0.577693 |
c30eb0501746ed89bf30970af677f25ccb7b5a99 | 3,982 | py | Python | benchmark/startCirq1402.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | benchmark/startCirq1402.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | benchmark/startCirq1402.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 5/15/20 4:49 PM
# @File : grover.py
# qubit number=5
# total number=54
import cirq
import cirq.google as cg
from typing import Optional
import sys
from math import log2
import numpy as np
#thatsNoCode
from cirq.contrib.svg import SVGCircuit
# Symbols for... | 38.288462 | 77 | 0.651683 |
19bc73f518f38f06aa98ba63decb19e4dadcc244 | 459 | py | Python | setup.py | philipwfowler/bashthebug | 8b229078405b9e1f46d3152fcfe7cd9d77c54b30 | [
"MIT"
] | null | null | null | setup.py | philipwfowler/bashthebug | 8b229078405b9e1f46d3152fcfe7cd9d77c54b30 | [
"MIT"
] | null | null | null | setup.py | philipwfowler/bashthebug | 8b229078405b9e1f46d3152fcfe7cd9d77c54b30 | [
"MIT"
] | null | null | null | from setuptools import setup
setup(
install_requires=[
"pandas >= 0.21.0",
"tqdm >= 4.19",
"ujson >= 1.35",
"matplotlib >= 2.1.1"
],
name='bashthebug',
version='0.1.0',
url='https://github.com/philipwfowler/bashthebug',
author='Philip W Fowler',
packages=['ba... | 24.157895 | 58 | 0.590414 |
053a93c59bc0242ef5de5a4c872ede47baea251f | 11,804 | py | Python | ksiga/main.py | yumyai/ksiga | a5bd73669d11842696c21af83a17296e13d6c2f5 | [
"Apache-2.0"
] | null | null | null | ksiga/main.py | yumyai/ksiga | a5bd73669d11842696c21af83a17296e13d6c2f5 | [
"Apache-2.0"
] | 5 | 2017-01-31T20:02:13.000Z | 2017-07-21T18:01:36.000Z | ksiga/main.py | yumyai/ksiga | a5bd73669d11842696c21af83a17296e13d6c2f5 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
""" Main entry of the script.
"""
import argparse
import sys
import os
import gzip
import datetime
import numpy as np
from sklearn.preprocessing import normalize
from ksiga import ksignature
from ksiga import logutil
from ksiga import fsig
USAGE = """
"""
def openner(filename, **kwargs):
... | 29.658291 | 120 | 0.644358 |
646c9ecc0970eb7e5e967f8f6418696246b4f9de | 3,188 | py | Python | scout/constants/so_terms.py | Clinical-Genomics/scout | 1ec4daa76093c2ffa4655612b63d325970253f58 | [
"BSD-3-Clause"
] | 111 | 2015-01-15T11:53:20.000Z | 2022-03-26T19:55:24.000Z | scout/constants/so_terms.py | Clinical-Genomics/scout | 1ec4daa76093c2ffa4655612b63d325970253f58 | [
"BSD-3-Clause"
] | 2,995 | 2015-01-15T16:14:20.000Z | 2022-03-31T13:36:32.000Z | scout/constants/so_terms.py | Clinical-Genomics/scout | 1ec4daa76093c2ffa4655612b63d325970253f58 | [
"BSD-3-Clause"
] | 55 | 2015-05-31T19:09:49.000Z | 2021-11-01T10:50:31.000Z | # These are the valid SO terms with corresponfing severity rank
SO_TERMS = {
"transcript_ablation": {"rank": 1, "region": "exonic"},
"splice_donor_variant": {"rank": 2, "region": "splicing"},
"splice_acceptor_variant": {"rank": 3, "region": "splicing"},
"stop_gained": {"rank": 4, "region": "exonic"},
... | 47.58209 | 83 | 0.647114 |
c82cd5ccf335fac2f031db4c508782a0f208bf28 | 8,934 | py | Python | ctrl4ai/helper.py | vkreat-tech/ctrl4ai | dfcea2735a024216557ad01fc72a22fb7117f687 | [
"MIT"
] | 12 | 2020-06-29T20:09:29.000Z | 2022-03-23T10:56:20.000Z | ctrl4ai/helper.py | vkreat-tech/ctrl4ai | dfcea2735a024216557ad01fc72a22fb7117f687 | [
"MIT"
] | 1 | 2020-12-08T15:47:56.000Z | 2020-12-08T15:47:56.000Z | build/lib/ctrl4ai/helper.py | vkreat-tech/ctrl4ai | dfcea2735a024216557ad01fc72a22fb7117f687 | [
"MIT"
] | 5 | 2020-06-27T12:24:37.000Z | 2022-03-03T05:28:41.000Z | # -*- coding: utf-8 -*-
"""
Created on Tue May 19 15:27:31 2020
@author: Shaji,Charu,Selva
"""
import numpy as np
import pandas as pd
from math import radians, cos, sin, asin, sqrt
from scipy import stats
import json
from . import _ordinal_dictionary
pd.set_option('mode.chained_assignment', None)
def isNaN(num):
... | 30.701031 | 213 | 0.61585 |
fc04b61a0cfd5f520f562b43e38b337046ab41b3 | 4,376 | py | Python | test/conftest.py | selik/xport | 8ef991022a7bfb6a25c2b038d112019051f6fc6f | [
"MIT"
] | 36 | 2016-09-12T19:51:41.000Z | 2022-01-20T04:00:14.000Z | test/conftest.py | gcp-lopo/xport-1 | 077ce12bf28486e8550890a729183ba4d96a633f | [
"MIT"
] | 73 | 2016-07-05T13:21:17.000Z | 2022-03-27T00:19:57.000Z | test/conftest.py | gcp-lopo/xport-1 | 077ce12bf28486e8550890a729183ba4d96a633f | [
"MIT"
] | 21 | 2015-09-12T19:59:13.000Z | 2022-02-16T08:43:32.000Z | """
Shared test fixtures.
"""
# Standard Library
from datetime import datetime
# Community Packages
import pytest
# Xport Modules
import xport
@pytest.fixture(scope='session') # Take care not to mutate!
def library():
"""
Create a 4-column, 6-row dataset with numbers and text.
"""
ds = xport.Datas... | 46.553191 | 209 | 0.603062 |
5dd36625e409b80ee6b5dc559957df413c043a79 | 2,986 | py | Python | distseq/training/ops/pytorch/util.py | Shenggan/distseq | 5c9a84d32b953b9cf230bb587b4ad5170164ed0f | [
"Apache-2.0"
] | null | null | null | distseq/training/ops/pytorch/util.py | Shenggan/distseq | 5c9a84d32b953b9cf230bb587b4ad5170164ed0f | [
"Apache-2.0"
] | null | null | null | distseq/training/ops/pytorch/util.py | Shenggan/distseq | 5c9a84d32b953b9cf230bb587b4ad5170164ed0f | [
"Apache-2.0"
] | null | null | null | import math
import numpy as np
import torch
def copy_para(x):
return torch.nn.Parameter(torch.empty_like(x).copy_(x))
def state_dict(module, destination=None, prefix="", keep_vars=False):
destination = torch.nn.Module.state_dict(
module, destination=destination, prefix=prefix, keep_vars=keep_vars
... | 28.438095 | 85 | 0.683188 |
8c5b5c48aed19e0db02bb04919c5f423f180832c | 1,225 | py | Python | corehq/apps/app_manager/views/media_utils.py | kkrampa/commcare-hq | d64d7cad98b240325ad669ccc7effb07721b4d44 | [
"BSD-3-Clause"
] | 1 | 2020-05-05T13:10:01.000Z | 2020-05-05T13:10:01.000Z | corehq/apps/app_manager/views/media_utils.py | kkrampa/commcare-hq | d64d7cad98b240325ad669ccc7effb07721b4d44 | [
"BSD-3-Clause"
] | 1 | 2019-12-09T14:00:14.000Z | 2019-12-09T14:00:14.000Z | corehq/apps/app_manager/views/media_utils.py | MaciejChoromanski/commcare-hq | fd7f65362d56d73b75a2c20d2afeabbc70876867 | [
"BSD-3-Clause"
] | 5 | 2015-11-30T13:12:45.000Z | 2019-07-01T19:27:07.000Z | from __future__ import unicode_literals
def process_media_attribute(attribute, resp, val):
if val:
val = interpolate_media_path(val)
resp['corrections'][attribute] = val
else:
val = None
return val
def interpolate_media_path(val):
if not val:
return val
if val.st... | 27.222222 | 86 | 0.609796 |
5e1f0f7cc7ed3f4fc4f98bb8d221fdcd896433a0 | 384 | py | Python | crawler/job_info/excute_collect.py | lupingchn/python-demo | 97129ca38d4cbe87796b6180503ae2e2a1c7a592 | [
"Unlicense"
] | null | null | null | crawler/job_info/excute_collect.py | lupingchn/python-demo | 97129ca38d4cbe87796b6180503ae2e2a1c7a592 | [
"Unlicense"
] | null | null | null | crawler/job_info/excute_collect.py | lupingchn/python-demo | 97129ca38d4cbe87796b6180503ae2e2a1c7a592 | [
"Unlicense"
] | null | null | null | # coding=utf-8
import sys
reload(sys)
sys.setdefaultencoding('utf8')
import data_collect.collecter_51job
import data_collect.collecter_liepin
import data_collect.collecter_zhilian
job = 'java' # 以爬取java工程师职业为例
data_collect.collecter_51job.get_job_in_51job(job)
data_collect.collecter_zhilian.get_job_url_in_zhilian... | 22.588235 | 58 | 0.856771 |
9a3130bcf97961fe6a3a5e9fc6e35d9e8e682ee9 | 267 | py | Python | app/database.py | sreenathmmenon/malware-checker | 84cca46bdef51536a8278c306776afc864f61640 | [
"Apache-2.0"
] | null | null | null | app/database.py | sreenathmmenon/malware-checker | 84cca46bdef51536a8278c306776afc864f61640 | [
"Apache-2.0"
] | null | null | null | app/database.py | sreenathmmenon/malware-checker | 84cca46bdef51536a8278c306776afc864f61640 | [
"Apache-2.0"
] | 1 | 2021-05-17T15:00:58.000Z | 2021-05-17T15:00:58.000Z | from sqlalchemy import create_engine
from sqlalchemy.orm import scoped_session, sessionmaker
from sqlalchemy.ext.declarative import declarative_base
engine = create_engine('mysql://mlwrUser:mlwr768@127.0.0.1:3306/malware_checker?charset=utf8', convert_unicode=True)
| 44.5 | 116 | 0.846442 |
b78318b8c6c21b9d697bf56aafa0b1045dd28fc4 | 811 | py | Python | src/pandas_profiling/report/presentation/flavours/html/alerts.py | abhicantdraw/pandas-profiling | a12ebb7a94b9371df94bf611237a389d99f8bc00 | [
"MIT"
] | 8,107 | 2018-01-07T23:27:39.000Z | 2022-02-22T12:57:11.000Z | src/pandas_profiling/report/presentation/flavours/html/alerts.py | abhicantdraw/pandas-profiling | a12ebb7a94b9371df94bf611237a389d99f8bc00 | [
"MIT"
] | 771 | 2018-01-06T11:33:08.000Z | 2022-02-21T11:16:02.000Z | src/pandas_profiling/report/presentation/flavours/html/alerts.py | abhicantdraw/pandas-profiling | a12ebb7a94b9371df94bf611237a389d99f8bc00 | [
"MIT"
] | 1,308 | 2018-01-08T21:22:08.000Z | 2022-02-21T04:10:21.000Z | from pandas_profiling.report.presentation.core.alerts import Alerts
from pandas_profiling.report.presentation.flavours.html import templates
class HTMLAlerts(Alerts):
def render(self) -> str:
styles = {
"constant": "warning",
"unsupported": "warning",
"type_date": "warn... | 32.44 | 86 | 0.549938 |
cb85049595ee55f43aeeeed933bec3962300b666 | 6,461 | py | Python | chemdataextractor/reader/uspto.py | edbeard/chemdataextractor-uvvis2018 | a5750d5313a250468e29d244cd4aeafdfc3250da | [
"MIT"
] | 6 | 2019-12-05T17:10:19.000Z | 2021-08-10T15:15:10.000Z | chemdataextractor/reader/uspto.py | edbeard/chemdataextractor-uvvis2018 | a5750d5313a250468e29d244cd4aeafdfc3250da | [
"MIT"
] | null | null | null | chemdataextractor/reader/uspto.py | edbeard/chemdataextractor-uvvis2018 | a5750d5313a250468e29d244cd4aeafdfc3250da | [
"MIT"
] | 2 | 2020-06-29T06:58:53.000Z | 2021-03-21T08:39:36.000Z | # -*- coding: utf-8 -*-
"""
chemdataextractor.reader.uspto
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Readers for USPTO patents.
:copyright: Copyright 2016 by Matt Swain.
:license: MIT, see LICENSE file for more details.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_func... | 40.892405 | 135 | 0.524222 |
9c457c6e1cfc6796fa9ca617098435e78153d1a9 | 30,898 | py | Python | salt/modules/boto_route53.py | amaclean199/salt | 8aaac011b4616e3c9e74a1daafb4a2146a5a430f | [
"Apache-2.0"
] | null | null | null | salt/modules/boto_route53.py | amaclean199/salt | 8aaac011b4616e3c9e74a1daafb4a2146a5a430f | [
"Apache-2.0"
] | null | null | null | salt/modules/boto_route53.py | amaclean199/salt | 8aaac011b4616e3c9e74a1daafb4a2146a5a430f | [
"Apache-2.0"
] | 1 | 2019-06-10T17:42:31.000Z | 2019-06-10T17:42:31.000Z | # -*- coding: utf-8 -*-
'''
Connection module for Amazon Route53
.. versionadded:: 2014.7.0
:configuration: This module accepts explicit route53 credentials but can also
utilize IAM roles assigned to the instance through Instance Profiles.
Dynamic credentials are then automatically obtained from AWS API and n... | 33.731441 | 103 | 0.602725 |
08c86cf42f5706b4ad158032639e81dfaef76dce | 7,136 | py | Python | medium/tictactoe/minimax.py | nightmarebadger/tutorials-python-basic | a4c49e01bf9c9c5006239c013c81d85603dd96fd | [
"MIT"
] | null | null | null | medium/tictactoe/minimax.py | nightmarebadger/tutorials-python-basic | a4c49e01bf9c9c5006239c013c81d85603dd96fd | [
"MIT"
] | null | null | null | medium/tictactoe/minimax.py | nightmarebadger/tutorials-python-basic | a4c49e01bf9c9c5006239c013c81d85603dd96fd | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
A basic implementation of the TicTacToe game which can be played humans or
computer players (human vs human, human vs ai, ai vs ai).
"""
import random
import time
board_print_style = """
+---+---+---+
| {6} | {7} | {8} |
+---+---+---+
| {3} | {4} | {5} |
+---+---+---+
| {0} | {1} | {2} ... | 26.626866 | 78 | 0.507287 |
78ca29748c230db93a13aa7d58d1582eca051db0 | 19,181 | py | Python | test/integration/ggrc/models/test_revision.py | sfarbotka/ggrc-core | ef7aae6bc09ad2f53a2414f643572e07d689784a | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | test/integration/ggrc/models/test_revision.py | sfarbotka/ggrc-core | ef7aae6bc09ad2f53a2414f643572e07d689784a | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | test/integration/ggrc/models/test_revision.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 for ggrc.models.Revision """
from datetime import datetime
from freezegun import freeze_time
import ddt
import mock
import ggrc.models
from ggrc.models import all_models
import integration.ggrc.g... | 34.811252 | 79 | 0.62734 |
c8762f6bd68e5de1617f5211445a0dbc1b059e1d | 29,017 | py | Python | msp430/asm/ld.py | pvrs12/python-msp430-tools | bd9b1d55b43f884368eaef9dc537330882058fd9 | [
"BSD-3-Clause"
] | 15 | 2017-10-18T01:56:40.000Z | 2022-02-28T04:33:01.000Z | msp430/asm/ld.py | pvrs12/python-msp430-tools | bd9b1d55b43f884368eaef9dc537330882058fd9 | [
"BSD-3-Clause"
] | 3 | 2017-07-24T13:41:04.000Z | 2019-11-08T19:13:54.000Z | msp430/asm/ld.py | pvrs12/python-msp430-tools | bd9b1d55b43f884368eaef9dc537330882058fd9 | [
"BSD-3-Clause"
] | 8 | 2017-10-11T14:05:29.000Z | 2022-03-22T02:13:01.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# This file is part of https://github.com/zsquareplusc/python-msp430-tools
# (C) 2001-2010 Chris Liechti <cliechti@gmx.net>
#
# SPDX-License-Identifier: BSD-3-Clause
"""\
Linker for TI MSP430.
Inputs are '.o4' files from 'as.py'
"""
import sys
import codecs
from msp4... | 36.090796 | 148 | 0.582279 |
7a954ea682febfa3e53bcb29981f0bf5ddf6cff8 | 3,884 | py | Python | tools/sty2html.py | AnjaneyuluBatta505/epydoc | e074483d519912218b1fb1d4eacb492076a1ed73 | [
"MIT"
] | 1 | 2022-01-29T08:19:34.000Z | 2022-01-29T08:19:34.000Z | tools/sty2html.py | AnjaneyuluBatta505/epydoc | e074483d519912218b1fb1d4eacb492076a1ed73 | [
"MIT"
] | null | null | null | tools/sty2html.py | AnjaneyuluBatta505/epydoc | e074483d519912218b1fb1d4eacb492076a1ed73 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#
# Convert epydoc's LaTeX sty files to HTML
from __future__ import absolute_import
from __future__ import print_function
from epydoc.docwriter.latex_sty import STYLESHEETS
import re, sys, os.path
TEMPLATE = """\
<?xml version="1.0" encoding="ascii" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1... | 32.638655 | 77 | 0.583419 |
d660973d14033824e9c34cf9c05e06fe7f388dbc | 960 | py | Python | scripts/file_generator.py | qian-long/TileDB-multinode | ba2a38b2cc6169935c73b76af8c53e8544c11300 | [
"MIT"
] | null | null | null | scripts/file_generator.py | qian-long/TileDB-multinode | ba2a38b2cc6169935c73b76af8c53e8544c11300 | [
"MIT"
] | null | null | null | scripts/file_generator.py | qian-long/TileDB-multinode | ba2a38b2cc6169935c73b76af8c53e8544c11300 | [
"MIT"
] | null | null | null | #! /usr/bin/python
import random
import sys
random.seed(0)
BOTTOM = 0
TOP = 1000000
COEF = 1000.0/27.5
def size_to_rows(size): #size in megabytes
size = size * 1000 # size in kilobytes
return int(size * COEF)
def gen_row():
return (random.randint(BOTTOM, TOP), random.randint(BOTTOM, TOP), random.randint... | 27.428571 | 127 | 0.626042 |
6b5916b84517c7089f225c3ff7d538a650388e34 | 783 | py | Python | backend/authentication/views.py | r-kaminski/innovativeproject-inventory-of-supplies | b3352cb6432ec2e7c5b83b648231808eabf56734 | [
"MIT"
] | 1 | 2019-05-05T17:50:37.000Z | 2019-05-05T17:50:37.000Z | backend/authentication/views.py | r-kaminski/innovativeproject-inventory-of-supplies | b3352cb6432ec2e7c5b83b648231808eabf56734 | [
"MIT"
] | 117 | 2019-03-05T20:34:55.000Z | 2022-03-11T23:45:54.000Z | backend/authentication/views.py | r-kaminski/innovativeproject-inventory-of-supplies | b3352cb6432ec2e7c5b83b648231808eabf56734 | [
"MIT"
] | 5 | 2019-08-04T15:36:43.000Z | 2021-06-16T20:49:49.000Z | from .serializers import NameRegisterSerializer
from rest_auth.registration.views import RegisterView
from rest_framework_jwt.authentication import JSONWebTokenAuthentication
from rest_framework import permissions
from rest_framework.response import Response
from rest_framework.views import APIView
class NameRegister... | 30.115385 | 72 | 0.785441 |
86e481fc35e56fe313328088f48a704998ba2e66 | 207 | py | Python | Utest_PublishStatus.py | nerusm/srv_mod | 94f55b34f7210e87951099709adfa0a1aa569430 | [
"Apache-2.0"
] | null | null | null | Utest_PublishStatus.py | nerusm/srv_mod | 94f55b34f7210e87951099709adfa0a1aa569430 | [
"Apache-2.0"
] | null | null | null | Utest_PublishStatus.py | nerusm/srv_mod | 94f55b34f7210e87951099709adfa0a1aa569430 | [
"Apache-2.0"
] | null | null | null | __author__ = 'suren'
from config import Config
from publish_status import SendStatus
config = Config()
send_status = SendStatus(config=config, status=True, user_name='Suren')
send_status.publish_message()
| 23 | 71 | 0.801932 |
141eb952c7f732cdeb3a4489bad0f3f92e6c77ca | 25,117 | py | Python | tests/http_validator.py | webberian/webperf_core | 718ae7332f7e4f363ac74958f9b778d1c87290b3 | [
"MIT"
] | null | null | null | tests/http_validator.py | webberian/webperf_core | 718ae7332f7e4f363ac74958f9b778d1c87290b3 | [
"MIT"
] | null | null | null | tests/http_validator.py | webberian/webperf_core | 718ae7332f7e4f363ac74958f9b778d1c87290b3 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import http3
import h2
import h11
import dns.resolver
import urllib.parse
import textwrap
import ipaddress
import hashlib
import datetime
import binascii
import base64
import sys
import socket
import ssl
import json
import requests
from requests.adapters import HTTPAdapter
from requests.packages... | 32.704427 | 133 | 0.632639 |
490e1cd5a5a05265de35aee780f8c682dd07c499 | 1,522 | py | Python | nova_dveri_ru/main.py | Aleksey-Voko/nova_dveri_ru | 7657c81e12f4486100385b9f181895f7688a8106 | [
"MIT"
] | null | null | null | nova_dveri_ru/main.py | Aleksey-Voko/nova_dveri_ru | 7657c81e12f4486100385b9f181895f7688a8106 | [
"MIT"
] | null | null | null | nova_dveri_ru/main.py | Aleksey-Voko/nova_dveri_ru | 7657c81e12f4486100385b9f181895f7688a8106 | [
"MIT"
] | null | null | null | from pathlib import Path
from urllib.parse import urljoin
from data import BASE_URL, HTML_SITE_MAP
from parsing.product_card import get_product_cards
from utils import add_in_yaml, get_from_yaml
from sitemap.html_site_map import (get_html,
get_sub_links_to_html_sitemap,
... | 35.395349 | 71 | 0.689225 |
1556ee43c6a706ba96a0daa96fd119f84e8d7b33 | 166 | py | Python | src/yellowdog_client/model/node_worker_target_type.py | yellowdog/yellowdog-sdk-python-public | da69a7d6e45c92933e34fefcaef8b5d98dcd6036 | [
"Apache-2.0"
] | null | null | null | src/yellowdog_client/model/node_worker_target_type.py | yellowdog/yellowdog-sdk-python-public | da69a7d6e45c92933e34fefcaef8b5d98dcd6036 | [
"Apache-2.0"
] | null | null | null | src/yellowdog_client/model/node_worker_target_type.py | yellowdog/yellowdog-sdk-python-public | da69a7d6e45c92933e34fefcaef8b5d98dcd6036 | [
"Apache-2.0"
] | null | null | null | from enum import Enum
class NodeWorkerTargetType(Enum):
PER_NODE = "PER_NODE"
PER_VCPU = "PER_VCPU"
def __str__(self) -> str:
return self.name
| 16.6 | 33 | 0.662651 |
4c63fe6032200e045fb52ba0358fd74aecf5e72c | 2,620 | py | Python | core/context.py | Shihira/policy-control | f0fb7b8f1b9700ccb41ef989e0985434db39f843 | [
"MIT"
] | null | null | null | core/context.py | Shihira/policy-control | f0fb7b8f1b9700ccb41ef989e0985434db39f843 | [
"MIT"
] | null | null | null | core/context.py | Shihira/policy-control | f0fb7b8f1b9700ccb41ef989e0985434db39f843 | [
"MIT"
] | null | null | null | # Copyright(c) 2015, Shihira Fung <fengzhiping@hotmail.com>
class context(object):
"""
Context stores and manages runtime infomation like local-variables, the
pointer pointing to currently running command, etc. The concrete content of
context depends on command implementations.
context is picklale... | 31.566265 | 79 | 0.607634 |
cf4b2690781dccb6c70284efa3cd99eb181dd40e | 11,282 | py | Python | advanced-analytics/recommendation-engine/recommendation_engine.py | m0ps/gcp-fsi-design-pattern-ipre | 391fc03c70bd7e2fb38605980d25e32ede6c7d27 | [
"Apache-2.0"
] | 7 | 2021-06-23T08:09:42.000Z | 2022-01-16T05:17:07.000Z | advanced-analytics/recommendation-engine/recommendation_engine.py | skylinepro/gcp-fsi-design-pattern-ipre | 7a933e742b29a4b1b9acde2c2a03ff29bf61e600 | [
"Apache-2.0"
] | null | null | null | advanced-analytics/recommendation-engine/recommendation_engine.py | skylinepro/gcp-fsi-design-pattern-ipre | 7a933e742b29a4b1b9acde2c2a03ff29bf61e600 | [
"Apache-2.0"
] | 3 | 2021-06-29T12:53:09.000Z | 2021-12-14T01:34:50.000Z | """ The recommendation service module provides functions for loading remote data,
portfolio optimization, investment analytics.
`recommendation_engine.py` requires env variables:
- QUOTES_BUCKET -- GCS bucket name with capital markets quotes data
- QUOTES_BLOB -- name of capital markets quotes file, e.g. capit... | 39.310105 | 122 | 0.650948 |
752aab94b740a814eb7bca568d1b19d3b4baaf29 | 3,786 | py | Python | ask-smapi-model/ask_smapi_model/v1/skill/asr/evaluations/audio_asset.py | alexa-labs/alexa-apis-for-python | 52838be4f57ee1a2479402ea78b1247b56017942 | [
"Apache-2.0"
] | 90 | 2018-09-19T21:56:42.000Z | 2022-03-30T11:25:21.000Z | ask-smapi-model/ask_smapi_model/v1/skill/asr/evaluations/audio_asset.py | ishitaojha/alexa-apis-for-python | a68f94b7a0e41f819595d6fe56e800403e8a4194 | [
"Apache-2.0"
] | 11 | 2018-09-23T12:16:48.000Z | 2021-06-10T19:49:45.000Z | ask-smapi-model/ask_smapi_model/v1/skill/asr/evaluations/audio_asset.py | ishitaojha/alexa-apis-for-python | a68f94b7a0e41f819595d6fe56e800403e8a4194 | [
"Apache-2.0"
] | 28 | 2018-09-19T22:30:38.000Z | 2022-02-22T22:57:07.000Z | # coding: utf-8
#
# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file
# except in compliance with the License. A copy of the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "lice... | 32.637931 | 96 | 0.602483 |
eb35ed497a07efe22b8ee3e27f235f85ab43bd0b | 2,949 | py | Python | network2json.py | pablocarb/rpviz | 9309a8853be9cd1a69ad3d8b2accdcfc811ff7fc | [
"MIT"
] | null | null | null | network2json.py | pablocarb/rpviz | 9309a8853be9cd1a69ad3d8b2accdcfc811ff7fc | [
"MIT"
] | 1 | 2019-05-31T09:23:41.000Z | 2019-05-31T09:29:38.000Z | network2json.py | pablocarb/rpviz | 9309a8853be9cd1a69ad3d8b2accdcfc811ff7fc | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Thu May 30 16:23:33 2019
@author: anael
"""
import networkx as nx
import random
def network2(G,LR,Lreact,Lprod,name,sp_smiles,reac_smiles,image,\
image2,spname,sp_links,roots,dic_types,\
image2big, data_tab, dfG_prime_o,dfG_prime_m, dfG_uncert,\
... | 33.511364 | 100 | 0.68057 |
78fc8f1c5a366c3a01163e414ff9e05b27b233f9 | 369 | py | Python | boardproject/urls.py | kazumaro756/django_sns | 6298d385e4cabb95f69597e71fc789b558fedf93 | [
"MIT"
] | null | null | null | boardproject/urls.py | kazumaro756/django_sns | 6298d385e4cabb95f69597e71fc789b558fedf93 | [
"MIT"
] | null | null | null | boardproject/urls.py | kazumaro756/django_sns | 6298d385e4cabb95f69597e71fc789b558fedf93 | [
"MIT"
] | null | null | null | from django.contrib import admin
from django.urls import path,include
from django.conf import settings
from django.conf.urls.static import static
urlpatterns = [
path('admin/', admin.site.urls),
path('',include('boardapp.urls'))
]+ static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)+ static(settings... | 33.545455 | 129 | 0.783198 |
626ee88da259add9f47748406d2f23e3252ac7dd | 34,870 | py | Python | bluebottle/funding_stripe/tests/test_api.py | terrameijar/bluebottle | b4f5ba9c4f03e678fdd36091b29240307ea69ffd | [
"BSD-3-Clause"
] | 10 | 2015-05-28T18:26:40.000Z | 2021-09-06T10:07:03.000Z | bluebottle/funding_stripe/tests/test_api.py | terrameijar/bluebottle | b4f5ba9c4f03e678fdd36091b29240307ea69ffd | [
"BSD-3-Clause"
] | 762 | 2015-01-15T10:00:59.000Z | 2022-03-31T15:35:14.000Z | bluebottle/funding_stripe/tests/test_api.py | terrameijar/bluebottle | b4f5ba9c4f03e678fdd36091b29240307ea69ffd | [
"BSD-3-Clause"
] | 9 | 2015-02-20T13:19:30.000Z | 2022-03-08T14:09:17.000Z | from builtins import str
import json
import mock
import munch
from django.db import connection
from django.urls import reverse
from rest_framework import status
import stripe
from bluebottle.funding.tests.factories import FundingFactory, DonorFactory
from bluebottle.funding_stripe.models import StripePaymentProvid... | 36.860465 | 108 | 0.5655 |
6afc0aaf95ee12dd18f650e06517938c675f6a04 | 4,585 | py | Python | Chimera/python3_scripts/zynq_tcp_server.py | zzpwahaha/Chimera-Control-Trim | df1bbf6bea0b87b8c7c9a99dce213fdc249118f2 | [
"MIT"
] | null | null | null | Chimera/python3_scripts/zynq_tcp_server.py | zzpwahaha/Chimera-Control-Trim | df1bbf6bea0b87b8c7c9a99dce213fdc249118f2 | [
"MIT"
] | null | null | null | Chimera/python3_scripts/zynq_tcp_server.py | zzpwahaha/Chimera-Control-Trim | df1bbf6bea0b87b8c7c9a99dce213fdc249118f2 | [
"MIT"
] | null | null | null | #!/usr/bin/python
#from __future__ import print_function
import socket
import errno
import sys
import binascii
import time
import sequencer
from axis_fifo import AXIS_FIFO
from devices import fifo_devices
from devices import gpio_devices
from axi_gpio import AXI_GPIO
import dds_lock_pll
from reset_all import reset
fr... | 29.96732 | 140 | 0.697928 |
01db2191b9bb4106500511a0cb830d84e6543204 | 5,946 | py | Python | inb4404.py | Nachtalb/4chan-downloader | a3311b8880444300e59c0208b446fd2287c693b5 | [
"MIT"
] | null | null | null | inb4404.py | Nachtalb/4chan-downloader | a3311b8880444300e59c0208b446fd2287c693b5 | [
"MIT"
] | null | null | null | inb4404.py | Nachtalb/4chan-downloader | a3311b8880444300e59c0208b446fd2287c693b5 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
import urllib.request, urllib.error, urllib.parse, argparse, logging
import os, re, time
import http.client
import fileinput
from multiprocessing import Process
log = logging.getLogger('inb4404')
workpath = os.path.dirname(os.path.realpath(__file__))
args = None
def main():
global args
par... | 41.291667 | 166 | 0.550454 |
d8e7133f2cb70ff9a3ce0e48caa02332b9c292b4 | 3,523 | py | Python | Eval/noiseGen_LBPH.py | SchemingWeasels/EEEE1027_face-recognition_template-matching | 22a9ebf174d21bbbfbe637d9c7dadba34d468614 | [
"MIT"
] | null | null | null | Eval/noiseGen_LBPH.py | SchemingWeasels/EEEE1027_face-recognition_template-matching | 22a9ebf174d21bbbfbe637d9c7dadba34d468614 | [
"MIT"
] | null | null | null | Eval/noiseGen_LBPH.py | SchemingWeasels/EEEE1027_face-recognition_template-matching | 22a9ebf174d21bbbfbe637d9c7dadba34d468614 | [
"MIT"
] | null | null | null | import cv2
import os
import numpy as np
import cv2.cuda
import time
import csv
CSV_MODE = 'a'
noise_sd = [0, 0.5, 1.0, 1.5, 2.0, 2.5, 3]
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
DATA_DIR = os.path.join(BASE_DIR, 'noise')
ENCODING_DIR = os.path.join(BASE_DIR, '..', 'Task 1')
recognizer = cv2.face.LBPHFac... | 34.881188 | 127 | 0.61652 |
3fab256836e3c2695afaebffbd3e344034438d33 | 4,413 | py | Python | emissionsapi/db.py | brennerm/emissions-api | 577fa209ffd27476ff1ad0904ecc081564cf8f53 | [
"MIT"
] | null | null | null | emissionsapi/db.py | brennerm/emissions-api | 577fa209ffd27476ff1ad0904ecc081564cf8f53 | [
"MIT"
] | null | null | null | emissionsapi/db.py | brennerm/emissions-api | 577fa209ffd27476ff1ad0904ecc081564cf8f53 | [
"MIT"
] | null | null | null | """Database Layer for the Emmission API.
"""
from functools import wraps
from sqlalchemy import create_engine, Column, DateTime, Integer, Float, String
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker
import geoalchemy2
from emissionsapi.config import config
import emi... | 30.226027 | 78 | 0.686155 |
c8357f7944bf2609dd98e46a4eb4f94840915d8d | 6,668 | py | Python | python/gstgva/region_of_interest.py | LikHait/gst-video-analytics | 492561548051ee7be0ad5f1045108fb56bd1a3ac | [
"MIT"
] | null | null | null | python/gstgva/region_of_interest.py | LikHait/gst-video-analytics | 492561548051ee7be0ad5f1045108fb56bd1a3ac | [
"MIT"
] | null | null | null | python/gstgva/region_of_interest.py | LikHait/gst-video-analytics | 492561548051ee7be0ad5f1045108fb56bd1a3ac | [
"MIT"
] | 1 | 2020-05-14T15:30:03.000Z | 2020-05-14T15:30:03.000Z | # ==============================================================================
# Copyright (C) 2018-2020 Intel Corporation
#
# SPDX-License-Identifier: MIT
# ==============================================================================
## @file region_of_interest.py
# @brief This file contains gstgva.region_of_int... | 50.135338 | 197 | 0.697361 |
832016ab8cc6843449f450efde09286aa48a9428 | 7,096 | py | Python | kmeans_ae_removal.py | anonxyz123/fgk62af5 | 6dd028b0c5e90c3f296eb32dfae033c5612fcae1 | [
"MIT"
] | null | null | null | kmeans_ae_removal.py | anonxyz123/fgk62af5 | 6dd028b0c5e90c3f296eb32dfae033c5612fcae1 | [
"MIT"
] | null | null | null | kmeans_ae_removal.py | anonxyz123/fgk62af5 | 6dd028b0c5e90c3f296eb32dfae033c5612fcae1 | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
import torchvision
import torchvision.transforms as transforms
import random
import numpy as np
from sklearn.cluster import KMeans
from sklearn.preprocessing import StandardScaler
import numpy as np
import torch.optim as optim
import torchvision.utils as vutils
from tqdm import tqdm
i... | 36.389744 | 130 | 0.61133 |
083c23c6dd23922c92ca7fc4e23e3804b3f05275 | 59,148 | py | Python | web/addons/survey/survey.py | diogocs1/comps | 63df07f6cf21c41e4527c06e2d0499f23f4322e7 | [
"Apache-2.0"
] | null | null | null | web/addons/survey/survey.py | diogocs1/comps | 63df07f6cf21c41e4527c06e2d0499f23f4322e7 | [
"Apache-2.0"
] | null | null | null | web/addons/survey/survey.py | diogocs1/comps | 63df07f6cf21c41e4527c06e2d0499f23f4322e7 | [
"Apache-2.0"
] | null | null | null | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-TODAY OpenERP S.A. <http://www.openerp.com>
#
# This program is free software: you can redistribute it and / or modify
# it under the ter... | 47.3184 | 184 | 0.585785 |
b39d05e420ce90896622ccca139d5d784fdbe259 | 6,436 | py | Python | Main.py | david-c-stein/Python-PowerSwitchRaspPi | db261109f81d322da11f49e3306d76aaaa3072ff | [
"MIT"
] | null | null | null | Main.py | david-c-stein/Python-PowerSwitchRaspPi | db261109f81d322da11f49e3306d76aaaa3072ff | [
"MIT"
] | null | null | null | Main.py | david-c-stein/Python-PowerSwitchRaspPi | db261109f81d322da11f49e3306d76aaaa3072ff | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import datetime
import getopt
import inspect
import json
import os
import platform
import sys
import time
import threading
from Global import __MULTIPROCESSING__
__version__ = '0.1'
if __MULTIPROCESSING__:
import multiprocessing
from multiprocessing import Queue
else:
if sys.vers... | 29.796296 | 143 | 0.516004 |
ad6c305dcc5a14e6b4baae0eb52b27574845cc23 | 37,412 | py | Python | tests/functional/demos/test_demos_linux.py | artanokhov/docker_ci | 97259f66baaffe72cd5ed93880c8f38cc170471d | [
"Apache-2.0"
] | null | null | null | tests/functional/demos/test_demos_linux.py | artanokhov/docker_ci | 97259f66baaffe72cd5ed93880c8f38cc170471d | [
"Apache-2.0"
] | null | null | null | tests/functional/demos/test_demos_linux.py | artanokhov/docker_ci | 97259f66baaffe72cd5ed93880c8f38cc170471d | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (C) 2019-2021 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import pytest
@pytest.mark.usefixtures('_is_image_os', '_is_distribution')
@pytest.mark.parametrize('_is_image_os', [('ubuntu18', 'ubuntu20')], indirect=True)
@pytest.mark.parametrize('_is_distribution', [('data_... | 59.955128 | 120 | 0.628889 |
1261f438e673657e8109fe0df44a287045639be1 | 17,559 | py | Python | yt_dlp/extractor/instagram.py | jhwgh1968/yt-dlp | b6a35ad83bbe2cbb9cda17052fd68e2dff16e99b | [
"Unlicense"
] | 5 | 2021-08-24T17:08:12.000Z | 2022-03-03T13:06:09.000Z | yt_dlp/extractor/instagram.py | jhwgh1968/yt-dlp | b6a35ad83bbe2cbb9cda17052fd68e2dff16e99b | [
"Unlicense"
] | null | null | null | yt_dlp/extractor/instagram.py | jhwgh1968/yt-dlp | b6a35ad83bbe2cbb9cda17052fd68e2dff16e99b | [
"Unlicense"
] | null | null | null | from __future__ import unicode_literals
import itertools
import hashlib
import json
import re
from .common import InfoExtractor
from ..compat import (
compat_str,
compat_HTTPError,
)
from ..utils import (
ExtractorError,
float_or_none,
get_element_by_attribute,
int_or_none,
lowercase_escap... | 37.044304 | 139 | 0.50168 |
bb8b1a844ead551395492e5193b4c848f257ae5b | 1,504 | py | Python | .ls/views.py | millerthegorilla/django_users_app | f63c5bdcdd9700366099bc1189c3f21bf5e3fc2c | [
"MIT"
] | null | null | null | .ls/views.py | millerthegorilla/django_users_app | f63c5bdcdd9700366099bc1189c3f21bf5e3fc2c | [
"MIT"
] | null | null | null | .ls/views.py | millerthegorilla/django_users_app | f63c5bdcdd9700366099bc1189c3f21bf5e3fc2c | [
"MIT"
] | null | null | null | from django.shortcuts import render, redirect
from django.views.generic.base import TemplateView
from django.contrib.auth.mixins import LoginRequiredMixin
from django.views.generic.edit import CreateView, UpdateView
from django.contrib.auth.views import LoginView
from django.contrib.auth.models import User
from django.... | 35.809524 | 72 | 0.757979 |
ee49e0d759991d41f8afe6bc968c792da2769afa | 1,320 | py | Python | f5/bigip/shared/test/functional/test_licensing.py | nghia-tran/f5-common-python | acb23a6e5830a119b460c19a578654113419f5c3 | [
"Apache-2.0"
] | 272 | 2016-02-23T06:05:44.000Z | 2022-02-20T02:09:32.000Z | f5/bigip/shared/test/functional/test_licensing.py | nghia-tran/f5-common-python | acb23a6e5830a119b460c19a578654113419f5c3 | [
"Apache-2.0"
] | 1,103 | 2016-02-11T17:48:03.000Z | 2022-02-15T17:13:37.000Z | f5/bigip/shared/test/functional/test_licensing.py | nghia-tran/f5-common-python | acb23a6e5830a119b460c19a578654113419f5c3 | [
"Apache-2.0"
] | 167 | 2016-02-11T17:48:21.000Z | 2022-01-17T20:13:05.000Z | # Copyright 2016 F5 Networks Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writi... | 34.736842 | 74 | 0.733333 |
edcc4a1dec3d68b6456b7e380655a2290cbbfdd8 | 681 | py | Python | py/tidy.py | ashlinrichardson/flatfile_tools | 749071129cab7a598bd4c2edf050dce59324a97f | [
"Apache-2.0"
] | 2 | 2019-03-06T04:30:12.000Z | 2019-03-26T16:23:56.000Z | py/tidy.py | ashlinrichardson/flatfile_tools | 749071129cab7a598bd4c2edf050dce59324a97f | [
"Apache-2.0"
] | 9 | 2020-01-18T05:02:52.000Z | 2022-03-14T18:09:53.000Z | py/tidy.py | bcgov/flatfile-tools | 749071129cab7a598bd4c2edf050dce59324a97f | [
"Apache-2.0"
] | null | null | null | # 20190711 : tidy up the folders by executing ws and dent
import os
import sys
from misc import *
if not (os.path.exists('R') and os.path.exists('c') and os.path.exists('cpp') and os.path.exists('py')):
err("must execute from within bin folder")
py = os.popen("find ./ -name '*.py'").readlines()
py = [py[i].strip(... | 28.375 | 104 | 0.581498 |
5edad76896388bd601ccdff72130c4c1e3786d37 | 4,527 | py | Python | tools/utils.py | pma-pj/Sollumz | bd43c23b8c114b5470b558c38a35423d2fb0d2bd | [
"MIT"
] | 4 | 2021-02-14T15:09:35.000Z | 2022-02-01T20:07:01.000Z | tools/utils.py | pma-pj/Sollumz | bd43c23b8c114b5470b558c38a35423d2fb0d2bd | [
"MIT"
] | null | null | null | tools/utils.py | pma-pj/Sollumz | bd43c23b8c114b5470b558c38a35423d2fb0d2bd | [
"MIT"
] | 1 | 2021-08-21T19:25:57.000Z | 2021-08-21T19:25:57.000Z | from mathutils import Vector
import numpy
from math import inf, sqrt
from mathutils import Vector, Quaternion, Matrix
def get_list_item(list, index):
"""Get item of list without the risk of an error being thrown"""
if 0 <= index < len(list):
return list[index]
else:
return None
def flag_... | 21.055814 | 73 | 0.520654 |
dcd36c1f54c0999517c1bdb0fcfd939b33cedeb1 | 164,986 | py | Python | modin/pandas/test/test_series.py | maksimbo1/modin | e15657e6f6239f848d30fcd3dc997528ea900415 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | modin/pandas/test/test_series.py | maksimbo1/modin | e15657e6f6239f848d30fcd3dc997528ea900415 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | modin/pandas/test/test_series.py | maksimbo1/modin | e15657e6f6239f848d30fcd3dc997528ea900415 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # Licensed to Modin Development Team under one or more contributor license agreements.
# See the NOTICE file distributed with this work for additional information regarding
# copyright ownership. The Modin Development Team licenses this file to you under the
# Apache License, Version 2.0 (the "License"); you may not u... | 36.197016 | 104 | 0.707478 |
b55b0a9153fbe48ab46176c41073cb41d3986821 | 28,483 | py | Python | planning/GamesTests/games/spaceinvaders/Space_Invaders.py | ChristsY12Robots/Robots | 306f000f85b41731a9e1249847434858319e5415 | [
"MIT"
] | null | null | null | planning/GamesTests/games/spaceinvaders/Space_Invaders.py | ChristsY12Robots/Robots | 306f000f85b41731a9e1249847434858319e5415 | [
"MIT"
] | null | null | null | planning/GamesTests/games/spaceinvaders/Space_Invaders.py | ChristsY12Robots/Robots | 306f000f85b41731a9e1249847434858319e5415 | [
"MIT"
] | null | null | null | #!python3
# Space Invaders
# Created by Lee Robinson
#IMPORTANT
#use ctrl-f to seach for 'CHANGE' and uncomment the line 'save(save)'
#was disabled for testing
from pygame import *
import sys
from random import shuffle, randrange, choice
import os
import getpass
import profile
#import mysql.connector... | 41.10101 | 136 | 0.535337 |
dc8c4aa877311bcb0da2f24033978d798fa204bd | 414 | py | Python | backend/MALTrendsWeb/wsgi.py | danielzhaotongliu/MALTrendsWeb | 59e9aed1d2451739a53460aaf044bf348ee3c36a | [
"MIT"
] | 1 | 2019-11-14T04:48:22.000Z | 2019-11-14T04:48:22.000Z | backend/MALTrendsWeb/wsgi.py | danielzhaotongliu/MALTrendsWeb | 59e9aed1d2451739a53460aaf044bf348ee3c36a | [
"MIT"
] | 13 | 2019-12-09T04:56:32.000Z | 2022-02-26T20:12:03.000Z | backend/MALTrendsWeb/wsgi.py | danielzhaotongliu/MALTrendsWeb | 59e9aed1d2451739a53460aaf044bf348ee3c36a | [
"MIT"
] | null | null | null | """
WSGI config for MALTrendsWeb 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/1.10/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANG... | 23 | 83 | 0.792271 |
ac63cfea7344a15a77510a48526e6a66f20db854 | 9,243 | py | Python | tests/test_abstract_quotes_fetcher.py | romepeng/omega | f42a9dd4299914bde589235909f6c56c2116df81 | [
"MIT"
] | 1 | 2021-03-03T12:52:53.000Z | 2021-03-03T12:52:53.000Z | tests/test_abstract_quotes_fetcher.py | romepeng/omega | f42a9dd4299914bde589235909f6c56c2116df81 | [
"MIT"
] | null | null | null | tests/test_abstract_quotes_fetcher.py | romepeng/omega | f42a9dd4299914bde589235909f6c56c2116df81 | [
"MIT"
] | null | null | null | import datetime
import logging
import os
import unittest
import arrow
import cfg4py
import numpy as np
import omicron
from omicron import cache
from omicron.core.timeframe import tf
from omicron.core.types import FrameType
from omega.fetcher.abstract_quotes_fetcher import AbstractQuotesFetcher as aq
from tests import... | 38.352697 | 87 | 0.608569 |
40a5b65387967e742b49613982f016c2e7ba7fc4 | 7,211 | py | Python | calculate_snv_distances.py | ngarud/microbiome_evolution | 4015ec03e2cbdbfb7d062415fb6a8c869f37a32e | [
"BSD-2-Clause"
] | 2 | 2020-08-09T06:19:11.000Z | 2021-08-18T17:12:23.000Z | calculate_snv_distances.py | benjaminhgood/microbiome_evolution | 4015ec03e2cbdbfb7d062415fb6a8c869f37a32e | [
"BSD-2-Clause"
] | null | null | null | calculate_snv_distances.py | benjaminhgood/microbiome_evolution | 4015ec03e2cbdbfb7d062415fb6a8c869f37a32e | [
"BSD-2-Clause"
] | 8 | 2019-02-20T22:21:55.000Z | 2021-02-13T00:55:40.000Z | import config
import parse_midas_data
import parse_HMP_data
import os.path
import pylab
import sys
import numpy
import diversity_utils
import gene_diversity_utils
import stats_utils
from math import log10,ceil
from numpy.random import randint
import core_gene_utils
import gzip
import calculate_substitution_rates
imp... | 40.971591 | 254 | 0.69283 |
043f27c3e3d123ab77fa6a57d6493aa11951e0c5 | 5,107 | py | Python | datasets/web_of_science/web_of_science.py | dkajtoch/datasets | 12ef7f0d541a5aca5b29ebc2dddf5e1214f0e3e9 | [
"Apache-2.0"
] | 9 | 2021-04-26T14:43:52.000Z | 2021-11-08T09:47:24.000Z | datasets/web_of_science/web_of_science.py | jramapuram/huggingface_datasets | 62c7ac0783a00bdc1192b6a75439a65d522b6cbc | [
"Apache-2.0"
] | null | null | null | datasets/web_of_science/web_of_science.py | jramapuram/huggingface_datasets | 62c7ac0783a00bdc1192b6a75439a65d522b6cbc | [
"Apache-2.0"
] | 3 | 2021-01-03T22:08:20.000Z | 2021-08-12T20:09:39.000Z | # coding=utf-8
# Copyright 2020 The TensorFlow Datasets Authors and the HuggingFace Datasets 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/LI... | 38.689394 | 159 | 0.644018 |
f5c764fa6f4858f8dfc45851b16918bd83cb2a8c | 1,134 | py | Python | Midterm Exam Program 1.py | DirkTayab/OOP-1-1 | 75d4259c7e7bd02b68bd722c8d3622d44d11eab2 | [
"Apache-2.0"
] | null | null | null | Midterm Exam Program 1.py | DirkTayab/OOP-1-1 | 75d4259c7e7bd02b68bd722c8d3622d44d11eab2 | [
"Apache-2.0"
] | null | null | null | Midterm Exam Program 1.py | DirkTayab/OOP-1-1 | 75d4259c7e7bd02b68bd722c8d3622d44d11eab2 | [
"Apache-2.0"
] | null | null | null | def main():
class TemperatureConversion:
def __init__(self, temp=1):
self._temp = temp
class CelsiusToFahrenheit(TemperatureConversion):
def conversion(self):
return (self._temp * 9) / 5 + 32
class CelsiusToKelvin(TemperatureConversion):
def conversion(self):
return self._temp + 273.15
clas... | 34.363636 | 74 | 0.727513 |
9fa0a4c14f076bb07101b08e857e53627e5b790b | 3,182 | py | Python | CalibTracker/SiStripESProducers/test/python/siStripDelayDummyPrinter_cfg.py | SWuchterl/cmssw | 769b4a7ef81796579af7d626da6039dfa0347b8e | [
"Apache-2.0"
] | 6 | 2017-09-08T14:12:56.000Z | 2022-03-09T23:57:01.000Z | CalibTracker/SiStripESProducers/test/python/siStripDelayDummyPrinter_cfg.py | SWuchterl/cmssw | 769b4a7ef81796579af7d626da6039dfa0347b8e | [
"Apache-2.0"
] | 545 | 2017-09-19T17:10:19.000Z | 2022-03-07T16:55:27.000Z | CalibTracker/SiStripESProducers/test/python/siStripDelayDummyPrinter_cfg.py | SWuchterl/cmssw | 769b4a7ef81796579af7d626da6039dfa0347b8e | [
"Apache-2.0"
] | 14 | 2017-10-04T09:47:21.000Z | 2019-10-23T18:04:45.000Z | # -*- coding: utf-8 -*-
# The following comments couldn't be translated into the new config version:
# upload to database
#string timetype = "timestamp"
import FWCore.ParameterSet.Config as cms
process = cms.Process("Reader")
# Use this to have also debug info (WARNING: the resulting file is > 200MB.
process.... | 34.967033 | 88 | 0.686047 |
dd47bfd4c7f418aa619274341721987ee83378cb | 1,646 | py | Python | env/Lib/site-packages/jupyter_server/services/api/handlers.py | andresgreen-byte/Laboratorio-1--Inversion-de-Capital | 8a4707301d19c3826c31026c4077930bcd6a8182 | [
"MIT"
] | 1 | 2022-03-17T12:56:14.000Z | 2022-03-17T12:56:14.000Z | env/Lib/site-packages/jupyter_server/services/api/handlers.py | andresgreen-byte/Laboratorio-1--Inversion-de-Capital | 8a4707301d19c3826c31026c4077930bcd6a8182 | [
"MIT"
] | null | null | null | env/Lib/site-packages/jupyter_server/services/api/handlers.py | andresgreen-byte/Laboratorio-1--Inversion-de-Capital | 8a4707301d19c3826c31026c4077930bcd6a8182 | [
"MIT"
] | 1 | 2022-03-28T09:19:34.000Z | 2022-03-28T09:19:34.000Z | """Tornado handlers for api specifications."""
# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
import json
import os
from tornado import web
from ...base.handlers import APIHandler
from ...base.handlers import JupyterHandler
from jupyter_server._tz import isoformat... | 29.927273 | 78 | 0.698056 |
85dd7cf75c4b259c3565716f6f3cf7aaa1f4bde8 | 587 | py | Python | src/core/migrations/0004_auto_20190527_0926.py | pradipta/back-end | 05895b051afc4c8e0cb17db708063d80102e9de5 | [
"MIT"
] | 17 | 2019-05-11T22:15:34.000Z | 2022-03-26T22:45:33.000Z | src/core/migrations/0004_auto_20190527_0926.py | pradipta/back-end | 05895b051afc4c8e0cb17db708063d80102e9de5 | [
"MIT"
] | 390 | 2019-05-23T10:48:57.000Z | 2021-12-17T21:01:43.000Z | src/core/migrations/0004_auto_20190527_0926.py | pradipta/back-end | 05895b051afc4c8e0cb17db708063d80102e9de5 | [
"MIT"
] | 40 | 2019-05-21T14:41:57.000Z | 2021-01-30T13:39:38.000Z | # Generated by Django 2.2.1 on 2019-05-27 14:26
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [("core", "0003_auto_20190526_2129")]
operations = [
migrations.AddField(
model_name="profile",
name="disciplines",
fiel... | 26.681818 | 74 | 0.613288 |
6f0bf8944a7f0301260c1b7d0d26bf2e5f31ae7b | 3,247 | py | Python | CADRE/orbit_dymos/orbit_eom.py | johnjasa/CADRE | a4ffd61582b8474953fc309aa540838a14f29dcf | [
"Apache-2.0"
] | null | null | null | CADRE/orbit_dymos/orbit_eom.py | johnjasa/CADRE | a4ffd61582b8474953fc309aa540838a14f29dcf | [
"Apache-2.0"
] | null | null | null | CADRE/orbit_dymos/orbit_eom.py | johnjasa/CADRE | a4ffd61582b8474953fc309aa540838a14f29dcf | [
"Apache-2.0"
] | null | null | null | """
Orbit discipline for CADRE
"""
from math import sqrt
from six.moves import range
import numpy as np
from openmdao.api import ExplicitComponent
from CADRE import rk4
# Constants
mu = 398600.44
Re = 6378.137
J2 = 1.08264e-3
J3 = -2.51e-6
J4 = -1.60e-6
C1 = -mu
C2 = -1.5*mu*J2*Re**2
C3 = -2.5*mu*J3*Re**3
C4 = 1.... | 33.822917 | 94 | 0.577764 |
20e0ef206f6d200e2ed56e98609686b0a3bce45a | 152,930 | py | Python | pysnmp-with-texts/H3C-ACL-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 8 | 2019-05-09T17:04:00.000Z | 2021-06-09T06:50:51.000Z | pysnmp-with-texts/H3C-ACL-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 4 | 2019-05-31T16:42:59.000Z | 2020-01-31T21:57:17.000Z | pysnmp-with-texts/H3C-ACL-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 10 | 2019-04-30T05:51:36.000Z | 2022-02-16T03:33:41.000Z | #
# PySNMP MIB module H3C-ACL-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/H3C-ACL-MIB
# Produced by pysmi-0.3.4 at Wed May 1 13:21:21 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 0... | 142.658582 | 11,397 | 0.784019 |
e46e86b808a12dd82c45a94241200612f1e297d2 | 745 | py | Python | combo_cases_and_deaths/setup.py | JedGrabman/covidcast-indicators | d2a5a232431c8392c54bfc301dcb9beecc541b97 | [
"MIT"
] | null | null | null | combo_cases_and_deaths/setup.py | JedGrabman/covidcast-indicators | d2a5a232431c8392c54bfc301dcb9beecc541b97 | [
"MIT"
] | null | null | null | combo_cases_and_deaths/setup.py | JedGrabman/covidcast-indicators | d2a5a232431c8392c54bfc301dcb9beecc541b97 | [
"MIT"
] | null | null | null | from setuptools import setup
from setuptools import find_packages
required = [
"pandas",
"pytest",
"pytest-cov",
"pylint",
"delphi-utils",
"covidcast"
]
setup(
name="delphi_combo_cases_and_deaths",
version="0.1.0",
description="A combined signal for cases and deaths using JHU for P... | 26.607143 | 113 | 0.668456 |
c26ca1573bd36635f0f58ecada3416123cd69422 | 4,840 | py | Python | fnl/fnlx.py | decorator-factory/python-fnl | 20db64d5f983c002846df125c55080a62e1b577e | [
"MIT"
] | null | null | null | fnl/fnlx.py | decorator-factory/python-fnl | 20db64d5f983c002846df125c55080a62e1b577e | [
"MIT"
] | null | null | null | fnl/fnlx.py | decorator-factory/python-fnl | 20db64d5f983c002846df125c55080a62e1b577e | [
"MIT"
] | null | null | null | import json
import fnl
from . import entities as e
from . import entity_types as et
from .definitions import fn
from context_manager_patma import match
from typing import Dict, List, NamedTuple, Iterable
from enum import Enum
exports: Dict[str, e.Entity] = {}
class TagKind(Enum):
Open = 0
ClosedWithSlash ... | 32.05298 | 94 | 0.585537 |
6e2ca108ed1e4737bdbcaf16c619d6f48be50061 | 20,374 | py | Python | kratos/tests/test_exact_integration.py | clazaro/Kratos | b947b82c90dfcbf13d60511427f85990d36b90be | [
"BSD-4-Clause"
] | 2 | 2020-12-22T11:50:11.000Z | 2021-09-15T11:36:30.000Z | kratos/tests/test_exact_integration.py | clazaro/Kratos | b947b82c90dfcbf13d60511427f85990d36b90be | [
"BSD-4-Clause"
] | 3 | 2021-08-18T16:12:20.000Z | 2021-09-02T07:36:15.000Z | kratos/tests/test_exact_integration.py | clazaro/Kratos | b947b82c90dfcbf13d60511427f85990d36b90be | [
"BSD-4-Clause"
] | 1 | 2017-05-02T00:52:44.000Z | 2017-05-02T00:52:44.000Z | import KratosMultiphysics
import KratosMultiphysics.KratosUnittest as KratosUnittest
class TestExactIntegration(KratosUnittest.TestCase):
def setUp(self):
pass
# Test exact integration in 2D
# LINE
def test_line_exact_integration_1(self):
current_model = KratosMultiphysics.Model()
... | 47.053118 | 117 | 0.714587 |
f6ef41fa89cc98faf93c353870deefa90752a7a9 | 5,285 | py | Python | aiida/cmdline/commands/cmd_user.py | tomzhang/aiida_core | 949810e9f3daff0f748c5c9aa1dde4f5222bb49b | [
"BSD-2-Clause"
] | 1 | 2019-04-29T12:39:31.000Z | 2019-04-29T12:39:31.000Z | aiida/cmdline/commands/cmd_user.py | tomzhang/aiida_core | 949810e9f3daff0f748c5c9aa1dde4f5222bb49b | [
"BSD-2-Clause"
] | null | null | null | aiida/cmdline/commands/cmd_user.py | tomzhang/aiida_core | 949810e9f3daff0f748c5c9aa1dde4f5222bb49b | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
# ... | 32.423313 | 103 | 0.620246 |
274dea3e036eb754e7b8fe458d1f35bb40d13fcc | 2,750 | py | Python | examples/process_param_sweep_sims.py | georgegunter/flow | 15848ec9bafd250364a51fa162786037645b19bf | [
"MIT"
] | null | null | null | examples/process_param_sweep_sims.py | georgegunter/flow | 15848ec9bafd250364a51fa162786037645b19bf | [
"MIT"
] | null | null | null | examples/process_param_sweep_sims.py | georgegunter/flow | 15848ec9bafd250364a51fa162786037645b19bf | [
"MIT"
] | null | null | null | import sys
import os
import numpy as np
from copy import deepcopy
import csv
import ray
def get_sim_data_dict_i24(csv_path):
row_num = 1
curr_veh_id = 'id'
sim_dict = {}
curr_veh_data = []
with open(csv_path, newline='') as csvfile:
csvreader = csv.reader(csvfile, delimiter=',')
for row in csvreader:
if(... | 26.960784 | 88 | 0.705091 |
afae709ce5a9d1f52d0645819e9b85c3e7befd13 | 255 | py | Python | tests/manage.py | jmons/ramlwrap | 43506cde5aa1d5717b217273ab460e877ef25db1 | [
"MIT"
] | 9 | 2016-10-24T09:00:53.000Z | 2021-12-24T10:15:14.000Z | tests/manage.py | jmons/ramlwrap | 43506cde5aa1d5717b217273ab460e877ef25db1 | [
"MIT"
] | 33 | 2017-03-14T11:36:59.000Z | 2021-12-27T11:20:09.000Z | tests/manage.py | jmons/ramlwrap | 43506cde5aa1d5717b217273ab460e877ef25db1 | [
"MIT"
] | 4 | 2017-03-30T09:58:22.000Z | 2020-02-18T12:42:28.000Z | #!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "RamlWrapTest.settings")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
| 23.181818 | 76 | 0.776471 |
87137f8839e4ca1e8e53ec5b61ef86e5b578fc2d | 6,420 | py | Python | tests/matchers/test_classification_match.py | phillips96/similarity | 3794f288f17f47f1f90b5368e5c0eeac1e81e10d | [
"Apache-2.0"
] | 706 | 2021-09-04T02:11:05.000Z | 2022-03-31T13:29:14.000Z | tests/matchers/test_classification_match.py | phillips96/similarity | 3794f288f17f47f1f90b5368e5c0eeac1e81e10d | [
"Apache-2.0"
] | 119 | 2021-09-01T22:32:40.000Z | 2022-03-30T22:39:27.000Z | tests/matchers/test_classification_match.py | phillips96/similarity | 3794f288f17f47f1f90b5368e5c0eeac1e81e10d | [
"Apache-2.0"
] | 57 | 2021-09-04T02:11:14.000Z | 2022-03-31T13:29:15.000Z | import re
from typing import Tuple
import numpy as np
import pytest
import tensorflow as tf
from tensorflow_similarity.matchers import ClassificationMatch
from tensorflow_similarity.types import FloatTensor, IntTensor
attributes = ("tp", "fp", "tn", "fn", "count")
class ConcreteClassificationMatch(ClassificationMa... | 32.261307 | 79 | 0.661215 |
0bbfff14eeef42b5fcb9316cb03104b5f9b5ac91 | 1,264 | py | Python | nnvm/tvm/apps/extension/tests/test_ext.py | CynthiaProtector/helo | ad9e22363a92389b3fa519ecae9061c6ead28b05 | [
"Apache-2.0"
] | 22 | 2019-02-20T12:42:20.000Z | 2021-12-25T06:09:46.000Z | nnvm/tvm/apps/extension/tests/test_ext.py | CynthiaProtector/helo | ad9e22363a92389b3fa519ecae9061c6ead28b05 | [
"Apache-2.0"
] | 4 | 2019-04-01T07:36:04.000Z | 2022-03-24T03:11:26.000Z | nnvm/tvm/apps/extension/tests/test_ext.py | CynthiaProtector/helo | ad9e22363a92389b3fa519ecae9061c6ead28b05 | [
"Apache-2.0"
] | 7 | 2019-03-20T16:04:37.000Z | 2021-04-28T18:40:11.000Z | import tvm_ext
import tvm
import numpy as np
def test_bind_add():
def add(a, b):
return a + b
f = tvm_ext.bind_add(add, 1)
assert f(2) == 3
def test_ext_dev():
n = 10
A = tvm.placeholder((n,), name='A')
B = tvm.compute((n,), lambda *i: A(*i) + 1.0, name='B')
s = tvm.create_schedul... | 24.307692 | 72 | 0.567247 |
89802780bb1e9157efa65ed027fa1ee95649e3fa | 2,128 | py | Python | python/interview_questions/longest_repeated_substring.py | rcanepa/cs-fundamentals | b362fc206417501e53a5739df1edf7568901eef8 | [
"MIT"
] | null | null | null | python/interview_questions/longest_repeated_substring.py | rcanepa/cs-fundamentals | b362fc206417501e53a5739df1edf7568901eef8 | [
"MIT"
] | null | null | null | python/interview_questions/longest_repeated_substring.py | rcanepa/cs-fundamentals | b362fc206417501e53a5739df1edf7568901eef8 | [
"MIT"
] | null | null | null | """Longest repeated substring (or LCP = longest common prefix in a suffix array).
Problem: find the longest repeated substring inside a string.
Steps:
1. Create suffixes. This should be linear in time and space, but it isn't.
Slicing strings in Python (with slice or [a:b]) is a linear operation
wit... | 31.294118 | 103 | 0.577068 |
34176b51c02959053b90ad062a51e6997b5647ad | 4,160 | py | Python | tools/make_test_data.py | bclau/ceilometer | 90ad86c08494596dfa03c8cbfcea2c2be58fc8dc | [
"Apache-2.0"
] | null | null | null | tools/make_test_data.py | bclau/ceilometer | 90ad86c08494596dfa03c8cbfcea2c2be58fc8dc | [
"Apache-2.0"
] | null | null | null | tools/make_test_data.py | bclau/ceilometer | 90ad86c08494596dfa03c8cbfcea2c2be58fc8dc | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
#
# Copyright © 2012 New Dream Network, LLC (DreamHost)
#
# Author: Doug Hellmann <doug.hellmann@dreamhost.com>
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy o... | 28.493151 | 75 | 0.602644 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.