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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
e6832faf31cfe41fab948d42e1ab9c6499edab56 | 17,858 | py | Python | apistar/schemas/openapi.py | abhilekh/apistar | f2be7e5a49d32a5efe1bfd2e69978baf46cfd28b | [
"BSD-3-Clause"
] | null | null | null | apistar/schemas/openapi.py | abhilekh/apistar | f2be7e5a49d32a5efe1bfd2e69978baf46cfd28b | [
"BSD-3-Clause"
] | null | null | null | apistar/schemas/openapi.py | abhilekh/apistar | f2be7e5a49d32a5efe1bfd2e69978baf46cfd28b | [
"BSD-3-Clause"
] | null | null | null | import re
from urllib.parse import urljoin, ParseResult
import typesystem
from apistar.document import Document, Field, Link, Section
from apistar.schemas.jsonschema import JSON_SCHEMA
import apistar.schemas.util as sutil
SCHEMA_REF = typesystem.Object(
properties={"$ref": typesystem.String(pattern="^#/component... | 34.743191 | 131 | 0.607739 |
d9e99a0233820cec3fe6e7d5c5b46928abaef791 | 1,521 | py | Python | saleor/dashboard/shipping/filters.py | dedhio/bellastore | 03cad4d11c039c6c33291021def812570c09fe36 | [
"BSD-3-Clause"
] | 3 | 2019-06-09T18:00:54.000Z | 2019-06-18T10:07:39.000Z | saleor/dashboard/shipping/filters.py | dedhio/bellastore | 03cad4d11c039c6c33291021def812570c09fe36 | [
"BSD-3-Clause"
] | 2 | 2019-07-03T21:08:32.000Z | 2019-08-06T02:09:26.000Z | saleor/dashboard/shipping/filters.py | techonomics69/saleor | fd4cf8531b65fed24b742d51bec8f015d61f3efc | [
"CC-BY-4.0"
] | 1 | 2021-04-15T07:16:34.000Z | 2021-04-15T07:16:34.000Z | from django.utils.translation import npgettext, pgettext_lazy
from django_filters import CharFilter, ChoiceFilter, OrderingFilter, RangeFilter
from ...core.filters import SortedFilterSet
from ...core.i18n import COUNTRY_CODE_CHOICES
from ...shipping.models import ShippingZone
SORT_BY_FIELDS = {"name": pgettext_lazy("... | 34.568182 | 86 | 0.675214 |
5d46dcab24252327565d1f82e9c898c248a6baac | 4,644 | py | Python | twitterGeoRank.py | zack0518/a1 | 7d21769abe1bd61df2dfc36efcaae3e1cee08923 | [
"Unlicense"
] | null | null | null | twitterGeoRank.py | zack0518/a1 | 7d21769abe1bd61df2dfc36efcaae3e1cee08923 | [
"Unlicense"
] | null | null | null | twitterGeoRank.py | zack0518/a1 | 7d21769abe1bd61df2dfc36efcaae3e1cee08923 | [
"Unlicense"
] | null | null | null | from mpi4py import MPI
import json
import re
from collections import Counter as c
from collections import Counter, defaultdict
from collections import OrderedDict
import time
import sys
comm = MPI.COMM_WORLD
rank = comm.Get_rank()
size = comm.Get_size()
grids = {}
gridCounter = {}
hashtagCounter = {}
start_time = tim... | 30.96 | 93 | 0.560078 |
0f0cffca8b13e9d084e2a5fb7f46a2a5336da0d8 | 2,761 | py | Python | test/test_network.py | dais-ita/DeepProbCEP | 22790c1672c1cce49a59d18921c710f61cdde2f2 | [
"MIT"
] | 6 | 2020-09-10T03:40:53.000Z | 2021-05-26T07:30:20.000Z | test/test_network.py | dais-ita/DeepProbCEP | 22790c1672c1cce49a59d18921c710f61cdde2f2 | [
"MIT"
] | null | null | null | test/test_network.py | dais-ita/DeepProbCEP | 22790c1672c1cce49a59d18921c710f61cdde2f2 | [
"MIT"
] | 1 | 2020-11-23T15:55:57.000Z | 2020-11-23T15:55:57.000Z | import unittest
import problog
from network import Network
from standard_networks import FC
parser = problog.parser.PrologParser(problog.program.ExtendedPrologFactory())
class TestNetwork(unittest.TestCase):
def test_ad_instantiate(self):
fc = FC(10,2)
net = Network(fc, 'fc', None)
in_li... | 39.442857 | 85 | 0.586744 |
5b832cc9570eaaed7963140039a9c431bea3aae5 | 5,689 | py | Python | topo/tests/unit/testcfsom.py | antolikjan/topographica-recovered | dfd06574f13400de7d634d13bc72ce25a6e4eec5 | [
"BSD-3-Clause"
] | null | null | null | topo/tests/unit/testcfsom.py | antolikjan/topographica-recovered | dfd06574f13400de7d634d13bc72ce25a6e4eec5 | [
"BSD-3-Clause"
] | null | null | null | topo/tests/unit/testcfsom.py | antolikjan/topographica-recovered | dfd06574f13400de7d634d13bc72ce25a6e4eec5 | [
"BSD-3-Clause"
] | null | null | null | """
See test_cfsom(self) and ImagePoster for an example of how to use and call
the PlotEngine system from a simulation.
"""
import unittest
import random
from pprint import pprint
from math import pi
import param
import topo
from topo.pattern import Gaussian
from topo.plotting import plot
from topo.plotting.bitmap i... | 31.605556 | 92 | 0.641765 |
d008b9756d434d6f97071c68ac0494cd16763d23 | 3,334 | py | Python | serve.py | Aryagm/gpt-j-api | 0fd0bca4c7fce559f8ee0fd003e09a15df41cabe | [
"MIT"
] | null | null | null | serve.py | Aryagm/gpt-j-api | 0fd0bca4c7fce559f8ee0fd003e09a15df41cabe | [
"MIT"
] | null | null | null | serve.py | Aryagm/gpt-j-api | 0fd0bca4c7fce559f8ee0fd003e09a15df41cabe | [
"MIT"
] | null | null | null | import time
import jax
from jax.experimental import maps
import numpy as np
import optax
import transformers
from mesh_transformer.checkpoint import read_ckpt
from mesh_transformer.sampling import nucleaus_sample
from mesh_transformer.transformer_shard import CausalTransformer
from fastapi import FastAPI
import uvic... | 30.309091 | 242 | 0.70216 |
7dc0ae3f18451b26cd8a8f16218dc469e476bbf3 | 190 | py | Python | pandases/operators/__init__.py | bearrundr/pandases | 1aff63b8a6da4bfb42abb1d9d22b94e06a8f3520 | [
"MIT"
] | null | null | null | pandases/operators/__init__.py | bearrundr/pandases | 1aff63b8a6da4bfb42abb1d9d22b94e06a8f3520 | [
"MIT"
] | null | null | null | pandases/operators/__init__.py | bearrundr/pandases | 1aff63b8a6da4bfb42abb1d9d22b94e06a8f3520 | [
"MIT"
] | 1 | 2020-07-27T11:38:25.000Z | 2020-07-27T11:38:25.000Z | # -*- coding: UTF-8 -*-
from pandases.operators.aggregator import *
from pandases.operators.grouper import *
from pandases.operators.filter import *
from pandases.operators.sorter import *
| 27.142857 | 43 | 0.773684 |
3d14582837b72a21f5742b44362a06b227a791d8 | 823 | py | Python | care/facility/migrations/0275_auto_20210927_2033.py | khavinshankar/care | 604d7cc709294d433e88415e7f7eea7f8bd0372a | [
"MIT"
] | 189 | 2020-03-17T17:18:58.000Z | 2022-02-22T09:49:45.000Z | care/facility/migrations/0275_auto_20210927_2033.py | khavinshankar/care | 604d7cc709294d433e88415e7f7eea7f8bd0372a | [
"MIT"
] | 598 | 2020-03-19T21:22:09.000Z | 2022-03-30T05:08:37.000Z | care/facility/migrations/0275_auto_20210927_2033.py | khavinshankar/care | 604d7cc709294d433e88415e7f7eea7f8bd0372a | [
"MIT"
] | 159 | 2020-03-19T18:45:56.000Z | 2022-03-17T13:23:12.000Z | # Generated by Django 2.2.11 on 2021-09-27 15:03
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('facility', '0274_auto_20210910_1647'),
]
operations = [
migrations.AlterField(
model_name='historicalpatientregistration',
... | 34.291667 | 170 | 0.577157 |
eb779ecad62d774625a3b784a5581351409538ec | 303 | py | Python | recognize_seven_segment/utils/leading_rectangles_to_str.py | josefondrej/glucoscan | 039a2c895e5680bf11638812ac733c422238e24d | [
"MIT"
] | 1 | 2021-01-22T11:35:01.000Z | 2021-01-22T11:35:01.000Z | recognize_seven_segment/utils/leading_rectangles_to_str.py | josefondrej/glucoscan | 039a2c895e5680bf11638812ac733c422238e24d | [
"MIT"
] | null | null | null | recognize_seven_segment/utils/leading_rectangles_to_str.py | josefondrej/glucoscan | 039a2c895e5680bf11638812ac733c422238e24d | [
"MIT"
] | 1 | 2021-03-06T19:32:12.000Z | 2021-03-06T19:32:12.000Z | from typing import List, Tuple
def leading_rectangles_to_str(rectangles: List[Tuple[List[int], float, int]]) -> str:
rectangles.sort(key=lambda x: x[0][0])
digits = [str(r[-1]) for r in rectangles]
str_representation = "".join(digits[:-1]) + "." + digits[-1]
return str_representation
| 33.666667 | 85 | 0.673267 |
8de1e8369d1f85296dd74982b987e41310190dbf | 2,319 | py | Python | src/openbiolink/graph_creation/metadata_edge/edge/edgeMetaGeneOverAna.py | jerryhluo/OpenBioLink | 6fc073af978daec0b0db5938b73beed37f57f495 | [
"MIT"
] | 97 | 2019-11-26T09:53:18.000Z | 2022-03-19T10:33:10.000Z | src/openbiolink/graph_creation/metadata_edge/edge/edgeMetaGeneOverAna.py | jerryhluo/OpenBioLink | 6fc073af978daec0b0db5938b73beed37f57f495 | [
"MIT"
] | 67 | 2019-12-09T21:01:52.000Z | 2021-12-21T15:19:41.000Z | src/openbiolink/graph_creation/metadata_edge/edge/edgeMetaGeneOverAna.py | jerryhluo/OpenBioLink | 6fc073af978daec0b0db5938b73beed37f57f495 | [
"MIT"
] | 20 | 2020-01-13T23:02:25.000Z | 2022-03-16T21:43:31.000Z | import os
from openbiolink.graph_creation import graphCreationConfig as glob
from openbiolink.graph_creation.metadata_edge.edgeRegularMetadata import EdgeRegularMetadata
from openbiolink.graph_creation.metadata_infile import InMetaEdgeBgeeOverExpr, InMetaMapOntoUberonAltid
from openbiolink.graph_creation.metadata_infi... | 49.340426 | 103 | 0.763691 |
b4a29a69d9feb3f934916069fda486e100906248 | 2,348 | py | Python | verification/loop/evaluation.py | rstebbing/subdivision | 42688c654b70188a5cb53485c5848102bd8072c9 | [
"MIT"
] | 9 | 2015-09-11T13:07:57.000Z | 2021-01-24T07:46:18.000Z | verification/loop/evaluation.py | rstebbing/subdivision | 42688c654b70188a5cb53485c5848102bd8072c9 | [
"MIT"
] | null | null | null | verification/loop/evaluation.py | rstebbing/subdivision | 42688c654b70188a5cb53485c5848102bd8072c9 | [
"MIT"
] | 2 | 2016-04-06T10:51:54.000Z | 2017-12-10T18:10:05.000Z | ##########################################
# File: evaluation.py #
# Copyright Richard Stebbing 2014. #
# Distributed under the MIT License. #
# (See accompany file LICENSE or copy at #
# http://opensource.org/licenses/MIT) #
##########################################
# Imports
... | 33.070423 | 80 | 0.540886 |
e87dd42d2245739b171b87b3cb3c75d460c57bf1 | 16,599 | py | Python | reframe/core/variables.py | CLIP-HPC/reframe | eddf0b2508c2ba644e4c3aba5652e57fddfde106 | [
"BSD-3-Clause"
] | 167 | 2017-11-14T20:37:28.000Z | 2022-03-31T11:19:18.000Z | reframe/core/variables.py | CLIP-HPC/reframe | eddf0b2508c2ba644e4c3aba5652e57fddfde106 | [
"BSD-3-Clause"
] | 2,190 | 2017-06-14T12:48:13.000Z | 2022-03-31T16:09:51.000Z | reframe/core/variables.py | CLIP-HPC/reframe | eddf0b2508c2ba644e4c3aba5652e57fddfde106 | [
"BSD-3-Clause"
] | 83 | 2017-05-29T19:12:16.000Z | 2022-03-18T09:49:21.000Z | # Copyright 2016-2021 Swiss National Supercomputing Centre (CSCS/ETH Zurich)
# ReFrame Project Developers. See the top-level LICENSE file for details.
#
# SPDX-License-Identifier: BSD-3-Clause
#
# Functionality to build extensible variable spaces into ReFrame tests.
#
import math
import copy
import reframe.core.fiel... | 30.234973 | 78 | 0.638472 |
0bf5baef410a2798fc149e4ccf77fd0b7994e577 | 33,298 | py | Python | sympy/solvers/inequalities.py | utkarshdeorah/sympy | dcdf59bbc6b13ddbc329431adf72fcee294b6389 | [
"BSD-3-Clause"
] | 1 | 2020-01-12T17:16:05.000Z | 2020-01-12T17:16:05.000Z | sympy/solvers/inequalities.py | utkarshdeorah/sympy | dcdf59bbc6b13ddbc329431adf72fcee294b6389 | [
"BSD-3-Clause"
] | 14 | 2018-02-08T10:11:03.000Z | 2019-04-16T10:32:46.000Z | sympy/solvers/inequalities.py | utkarshdeorah/sympy | dcdf59bbc6b13ddbc329431adf72fcee294b6389 | [
"BSD-3-Clause"
] | 1 | 2022-02-04T13:50:29.000Z | 2022-02-04T13:50:29.000Z | """Tools for solving inequalities and systems of inequalities. """
from sympy.calculus.util import (continuous_domain, periodicity,
function_range)
from sympy.core import Symbol, Dummy, sympify
from sympy.core.exprtools import factor_terms
from sympy.core.relational import Relational, Eq, Ge, Lt
from sympy.sets.se... | 33.298 | 102 | 0.537029 |
8beb38bf0885810119954b7774447592f90f7857 | 3,849 | py | Python | iwg_blog/utils/forms/widgets.py | razortheory/who-iwg-webapp | e2318d286cd9ab87d4d8103bc7b3072cfb99bf76 | [
"MIT"
] | null | null | null | iwg_blog/utils/forms/widgets.py | razortheory/who-iwg-webapp | e2318d286cd9ab87d4d8103bc7b3072cfb99bf76 | [
"MIT"
] | null | null | null | iwg_blog/utils/forms/widgets.py | razortheory/who-iwg-webapp | e2318d286cd9ab87d4d8103bc7b3072cfb99bf76 | [
"MIT"
] | null | null | null | from django.contrib.admin.widgets import AdminFileWidget
from django.core.urlresolvers import reverse
from django.forms import CheckboxSelectMultiple, Textarea
from django.forms.utils import flatatt
from django.template import loader
from django.utils.html import format_html
from django.utils.safestring import mark_saf... | 34.990909 | 121 | 0.641725 |
b1c7c0fbf6960c9d888386e44a04e7d9919619f1 | 74,903 | py | Python | address.py | pywaves/pywaves | 2d31e97bbf74be6f352fb8648c6046746bcecfda | [
"MIT"
] | null | null | null | address.py | pywaves/pywaves | 2d31e97bbf74be6f352fb8648c6046746bcecfda | [
"MIT"
] | null | null | null | address.py | pywaves/pywaves | 2d31e97bbf74be6f352fb8648c6046746bcecfda | [
"MIT"
] | null | null | null | import math
import pywaves
import axolotl_curve25519 as curve
import os
import pywaves.crypto as crypto
import time
import struct
import json
import base58
import base64
import logging
from .protobuf import transaction_pb2
from .protobuf.waves import amount_pb2
from google.protobuf.json_format import MessageToJson
wo... | 52.637386 | 175 | 0.516535 |
19fb755f7292a62b3ae77777cfb82f3504004127 | 1,692 | py | Python | tests/python/pants_test/util/test_tarutil.py | anthonyjpratti/pants | d98e53af6ddd877861231bce8343f8204da0a9d1 | [
"Apache-2.0"
] | 1 | 2020-08-26T03:30:31.000Z | 2020-08-26T03:30:31.000Z | tests/python/pants_test/util/test_tarutil.py | anthonyjpratti/pants | d98e53af6ddd877861231bce8343f8204da0a9d1 | [
"Apache-2.0"
] | 1 | 2019-07-29T16:58:21.000Z | 2019-07-29T16:58:21.000Z | tests/python/pants_test/util/test_tarutil.py | anthonyjpratti/pants | d98e53af6ddd877861231bce8343f8204da0a9d1 | [
"Apache-2.0"
] | null | null | null | # Copyright 2016 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
import os
import tarfile
import unittest
from pants.util.dirutil import safe_delete, safe_mkdtemp, safe_rmtree, touch
from pants.util.tarutil import TarFile
class TarutilTest(unittest.T... | 30.763636 | 76 | 0.698582 |
b07cffe3ff81bed7308c7963c1e01a38ac8b6265 | 2,027 | py | Python | thinplate/tests/test_tps_numpy.py | kingsj0405/py-thin-plate-spline | f16c5c42671087ebd120632f2d9d64b232c38c52 | [
"MIT"
] | 120 | 2018-11-02T06:38:38.000Z | 2022-03-16T08:24:31.000Z | py-thin-plate-spline/thinplate/tests/test_tps_numpy.py | vcl-iisc/ILAPE-RBF-k-DPP | 05e9bce8cbacfd2b342ca5ef3722232bde96e18d | [
"MIT"
] | 5 | 2019-07-03T04:48:56.000Z | 2020-08-03T15:02:39.000Z | py-thin-plate-spline/thinplate/tests/test_tps_numpy.py | vcl-iisc/ILAPE-RBF-k-DPP | 05e9bce8cbacfd2b342ca5ef3722232bde96e18d | [
"MIT"
] | 35 | 2019-01-27T00:44:54.000Z | 2022-03-06T04:08:17.000Z |
import numpy as np
from numpy.testing import assert_allclose
import thinplate as tps
def test_numpy_fit():
c = np.array([
[0., 0, 0.0],
[1., 0, 0.0],
[1., 1, 0.0],
[0, 1, 0.0],
])
theta = tps.TPS.fit(c)
assert_allclose(theta, 0)
assert_allclose(tps.TPS.z(c, c, ... | 23.569767 | 75 | 0.514554 |
cc95be38eb30bc43f313f9e250d546abe7b64979 | 535 | py | Python | config.py | ig248/dash-zoom | a8d955e5b19a1b0f4d3c7bdbc0df4c0f2a6f2143 | [
"MIT"
] | null | null | null | config.py | ig248/dash-zoom | a8d955e5b19a1b0f4d3c7bdbc0df4c0f2a6f2143 | [
"MIT"
] | null | null | null | config.py | ig248/dash-zoom | a8d955e5b19a1b0f4d3c7bdbc0df4c0f2a6f2143 | [
"MIT"
] | null | null | null | # data settings
FILENAMES_LIST = [
('1e6 points with ARes', 'data/demo1e6.hdf'),
('1e6 points raw', 'data/demo1e6_raw.hdf'),
('1e7 points with ARes', 'data/demo1e7.hdf'),
]
IDs = [id for id, fn in FILENAMES_LIST]
FILENAMES = {id: fn for id, fn in FILENAMES_LIST}
# plot settings
PRELOAD_MARGIN = 1. # multi... | 38.214286 | 101 | 0.723364 |
405cc705c8c1d1195ecaec1a6970c423ea89c7b4 | 3,989 | py | Python | stagecraft/apps/datasets/admin/data_set.py | NRCan/stagecraft | 2128c797e4e0fb00310ddffddbcdfa081514fdac | [
"MIT"
] | null | null | null | stagecraft/apps/datasets/admin/data_set.py | NRCan/stagecraft | 2128c797e4e0fb00310ddffddbcdfa081514fdac | [
"MIT"
] | null | null | null | stagecraft/apps/datasets/admin/data_set.py | NRCan/stagecraft | 2128c797e4e0fb00310ddffddbcdfa081514fdac | [
"MIT"
] | 1 | 2020-05-20T13:33:51.000Z | 2020-05-20T13:33:51.000Z | from __future__ import unicode_literals
import logging
from sets import Set
logger = logging.getLogger(__name__)
from django.contrib import admin
import reversion
from django.conf import settings
from django.core.urlresolvers import reverse
from django.shortcuts import redirect
from performanceplatform.client.data... | 30.922481 | 76 | 0.610429 |
76fb6a57405b5bb5c073a2031ce2ce361cb55e80 | 5,541 | py | Python | scripts/make_encodings.py | rudyn2/tsad | d606fc60c35772bc9052cf4283ea06c64bbd61d3 | [
"MIT"
] | null | null | null | scripts/make_encodings.py | rudyn2/tsad | d606fc60c35772bc9052cf4283ea06c64bbd61d3 | [
"MIT"
] | null | null | null | scripts/make_encodings.py | rudyn2/tsad | d606fc60c35772bc9052cf4283ea06c64bbd61d3 | [
"MIT"
] | 1 | 2021-10-04T22:20:47.000Z | 2021-10-04T22:20:47.000Z | from models.carlaDatasetEncodings import CarlaEncodingDataset
from models.TemporalEncoder import SequenceRNNEncoder
from models.ADEncoder import ADEncoder
import argparse
import torch
from collections import defaultdict
import h5py
import json
from tqdm import tqdm
import torchvision.transforms as T
import numpy as np
... | 43.289063 | 119 | 0.595199 |
e86e9ec182302da5464a1b44e4b4250b7c7d363a | 350 | py | Python | kba/__init__.py | blurks/kba | 7a0eaa78f5cac7dc431967a81ba20c849742164d | [
"Apache-2.0"
] | null | null | null | kba/__init__.py | blurks/kba | 7a0eaa78f5cac7dc431967a81ba20c849742164d | [
"Apache-2.0"
] | 2 | 2018-11-16T11:18:21.000Z | 2020-03-23T12:53:43.000Z | kba/__init__.py | blurks/kba | 7a0eaa78f5cac7dc431967a81ba20c849742164d | [
"Apache-2.0"
] | 1 | 2021-12-07T01:35:54.000Z | 2021-12-07T01:35:54.000Z | from pyramid.config import Configurator
# we must make sure custom models are known at database initialization!
from kba import models
def main(global_config, **settings):
""" This function returns a Pyramid WSGI application.
"""
config = Configurator(settings=settings)
config.include('clldmpg')
... | 26.923077 | 71 | 0.745714 |
3d5b685968079df20de8c46992240c72f1b217b8 | 257,724 | py | Python | instances/passenger_demand/pas-20210422-1717-int12e/11.py | LHcau/scheduling-shared-passenger-and-freight-transport-on-a-fixed-infrastructure | bba1e6af5bc8d9deaa2dc3b83f6fe9ddf15d2a11 | [
"BSD-3-Clause"
] | null | null | null | instances/passenger_demand/pas-20210422-1717-int12e/11.py | LHcau/scheduling-shared-passenger-and-freight-transport-on-a-fixed-infrastructure | bba1e6af5bc8d9deaa2dc3b83f6fe9ddf15d2a11 | [
"BSD-3-Clause"
] | null | null | null | instances/passenger_demand/pas-20210422-1717-int12e/11.py | LHcau/scheduling-shared-passenger-and-freight-transport-on-a-fixed-infrastructure | bba1e6af5bc8d9deaa2dc3b83f6fe9ddf15d2a11 | [
"BSD-3-Clause"
] | null | null | null |
"""
PASSENGERS
"""
numPassengers = 23411
passenger_arriving = (
(5, 6, 6, 11, 5, 2, 0, 1, 3, 2, 2, 0, 0, 8, 1, 4, 2, 3, 4, 2, 1, 4, 4, 1, 0, 0), # 0
(4, 8, 3, 4, 9, 4, 4, 2, 4, 0, 1, 0, 0, 2, 7, 7, 6, 6, 4, 4, 1, 2, 2, 0, 0, 0), # 1
(8, 0, 5, 5, 5, 2, 4, 1, 1, 2, 0, 0, 0, 6, 8, 5, 2, 3, 6, 0, 4, 1, 2, 2, 0, 0),... | 275.640642 | 493 | 0.76904 |
ec73c8c8f26fbe352ebc811317cbc89bbf747f0b | 5,456 | py | Python | Alpha/modules/flood.py | VenujaTSB/Alpha-Zero | a61ca6cbb70651e9823a238b20b5c0a653229dab | [
"MIT"
] | 1 | 2022-02-17T08:50:38.000Z | 2022-02-17T08:50:38.000Z | Alpha/modules/flood.py | VenujaTSB/Alpha-Zero | a61ca6cbb70651e9823a238b20b5c0a653229dab | [
"MIT"
] | null | null | null | Alpha/modules/flood.py | VenujaTSB/Alpha-Zero | a61ca6cbb70651e9823a238b20b5c0a653229dab | [
"MIT"
] | null | null | null | """
MIT License
Copyright (c) 2022 Alpha Zero
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, publish, di... | 32.670659 | 112 | 0.658724 |
2c4583de88b0eebb5a996d7be1f98fa4df5ae2bd | 13,381 | py | Python | src/pytezos/context/impl.py | kaellis/pytezos | ab88bb4138094fbe7fe6852f5a908423bf9e9d60 | [
"MIT"
] | null | null | null | src/pytezos/context/impl.py | kaellis/pytezos | ab88bb4138094fbe7fe6852f5a908423bf9e9d60 | [
"MIT"
] | null | null | null | src/pytezos/context/impl.py | kaellis/pytezos | ab88bb4138094fbe7fe6852f5a908423bf9e9d60 | [
"MIT"
] | null | null | null | from datetime import datetime
from itertools import chain
from typing import Optional, Tuple
from pytezos.context.abstract import AbstractContext, get_originated_address # type: ignore
from pytezos.crypto.encoding import base58_encode
from pytezos.crypto.key import Key
from pytezos.logging import logger
from pytezos.... | 35.120735 | 121 | 0.630446 |
9c6cb5f4e772597c74367c2fceafe7c4164e5ed4 | 744 | py | Python | basxconnect/mailer_integration/urls.py | basxsoftwareassociation/basxconnect | f7edf62ab3f61419ceb8b2b81314648bd9ef01fd | [
"BSD-3-Clause"
] | 10 | 2021-04-20T13:30:33.000Z | 2022-03-10T17:58:06.000Z | basxconnect/mailer_integration/urls.py | basxsoftwareassociation/basxconnect | f7edf62ab3f61419ceb8b2b81314648bd9ef01fd | [
"BSD-3-Clause"
] | 146 | 2020-12-20T13:52:37.000Z | 2022-03-21T06:48:08.000Z | basxconnect/mailer_integration/urls.py | basxsoftwareassociation/basxconnect | f7edf62ab3f61419ceb8b2b81314648bd9ef01fd | [
"BSD-3-Clause"
] | 6 | 2021-03-16T04:45:15.000Z | 2022-02-26T22:06:34.000Z | from bread.utils.urls import autopath, default_model_paths, model_urlname
import basxconnect.mailer_integration.views
from basxconnect.mailer_integration import models
urlpatterns = [
autopath(basxconnect.mailer_integration.views.mailer_synchronization_view),
autopath(
basxconnect.mailer_integration.v... | 33.818182 | 79 | 0.740591 |
a19d7dd0e17b47f2ecf2d2479b42c77184ec2037 | 646 | py | Python | Python-Course/Workshops/HW_lesson_7-9/postfix_test.py | cmlimm/uni-projects | b63ac71cc0b971c7f035096a6bd15b0cbb5bb9f6 | [
"MIT"
] | null | null | null | Python-Course/Workshops/HW_lesson_7-9/postfix_test.py | cmlimm/uni-projects | b63ac71cc0b971c7f035096a6bd15b0cbb5bb9f6 | [
"MIT"
] | null | null | null | Python-Course/Workshops/HW_lesson_7-9/postfix_test.py | cmlimm/uni-projects | b63ac71cc0b971c7f035096a6bd15b0cbb5bb9f6 | [
"MIT"
] | 1 | 2020-10-29T18:31:32.000Z | 2020-10-29T18:31:32.000Z | def calc(expr):
'''
>>> calc("1 2 + 4 * 3 +")
'15'
>>> calc("1 2 3 * + 2 -")
'5'
'''
stack = []
for i in expr:
if i.isdigit():
stack.append(int(i))
elif i == '+':
a = stack.pop()
b = stack.pop()
stack.append(int(b)+int(a))
... | 21.533333 | 39 | 0.388545 |
cecb3d012291bf9955abb7c90f000a31aec6e212 | 706 | py | Python | models/__init__.py | theshanky/Fingerprint-Liveness | 4a303cc5043e8aef1bea59b581cf2943b773b97f | [
"MIT"
] | 1 | 2020-07-10T08:50:23.000Z | 2020-07-10T08:50:23.000Z | models/__init__.py | theshanky/Fingerprint-Liveness | 4a303cc5043e8aef1bea59b581cf2943b773b97f | [
"MIT"
] | null | null | null | models/__init__.py | theshanky/Fingerprint-Liveness | 4a303cc5043e8aef1bea59b581cf2943b773b97f | [
"MIT"
] | null | null | null | from .BasicModule import MyVggNet11
from .BasicModule import MyVggNet13
from .BasicModule import MyVggNet16
from .BasicModule import MyVggNet19
from .BasicModule import MyresNet18
from .BasicModule import MyresNet34
from .BasicModule import MyresNet50
from .BasicModule import MyInceptionV3
from .BasicModule import Myde... | 35.3 | 43 | 0.865439 |
2f0807d1e24d4cc7c598a9fa4e52226b6b7d356a | 591 | py | Python | setup.py | fluzzi/rdp2tcp-docker | 891f79cde3dacff09c635444efd6b14ba02976ee | [
"MIT"
] | null | null | null | setup.py | fluzzi/rdp2tcp-docker | 891f79cde3dacff09c635444efd6b14ba02976ee | [
"MIT"
] | null | null | null | setup.py | fluzzi/rdp2tcp-docker | 891f79cde3dacff09c635444efd6b14ba02976ee | [
"MIT"
] | null | null | null | #!/usr/bin/python3
import subprocess
import os
class bcolors:
HEADER = '\033[95m'
OKBLUE = '\033[94m'
OKGREEN = '\033[92m'
WARNING = '\033[93m'
FAIL = '\033[91m'
ENDC = '\033[0m'
BOLD = '\033[1m'
UNDERLINE = '\033[4m'
if not os.path.exists('log'):
os.makedirs('log')
configdir ... | 22.730769 | 67 | 0.62775 |
d57b31de1720c302672a5f49720b90395feb6a7b | 6,963 | py | Python | mjmpc/control/ilqr.py | mohakbhardwaj/mjmpc | 097e8d9bdaf0b3a15afa39030b2f53b00dfa25de | [
"Apache-2.0"
] | 2 | 2021-08-15T22:23:50.000Z | 2021-12-03T13:09:13.000Z | mjmpc/control/ilqr.py | mohakbhardwaj/mjmpc | 097e8d9bdaf0b3a15afa39030b2f53b00dfa25de | [
"Apache-2.0"
] | null | null | null | mjmpc/control/ilqr.py | mohakbhardwaj/mjmpc | 097e8d9bdaf0b3a15afa39030b2f53b00dfa25de | [
"Apache-2.0"
] | 1 | 2022-02-18T10:22:49.000Z | 2022-02-18T10:22:49.000Z | """
Iterative Linear Quadratic Regulator
"""
from copy import deepcopy
import numpy as np
from .controller import Controller
from mjmpc.utils import helpers
class ILQR(Controller):
def __init__(self,
d_state,
d_obs,
d_action,
acti... | 30.674009 | 85 | 0.524917 |
ea31ea8696a8562514eb2a34ac9776c9fb6d827f | 38,078 | py | Python | fairseq/models/transformer.py | violet-zct/fairseq | 5fd9b555428f004f72d4fe89e2a9d2c863c07581 | [
"MIT"
] | 8 | 2020-04-12T20:23:17.000Z | 2022-01-18T08:28:24.000Z | fairseq/models/transformer.py | violet-zct/fairseq | 5fd9b555428f004f72d4fe89e2a9d2c863c07581 | [
"MIT"
] | null | null | null | fairseq/models/transformer.py | violet-zct/fairseq | 5fd9b555428f004f72d4fe89e2a9d2c863c07581 | [
"MIT"
] | 1 | 2020-04-13T01:21:48.000Z | 2020-04-13T01:21:48.000Z | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import math
import torch
import torch.nn as nn
import torch.nn.functional as F
from fairseq import options, utils
from fairseq.models import... | 44.640094 | 144 | 0.647329 |
15cf2f1a5fc51275d2f108b81c59d64f6175bf26 | 37,365 | py | Python | oddt/fingerprints.py | OlivierBeq/oddt | ab5326d2a487ad1a713c30fbaa98891a6bd56ad5 | [
"BSD-3-Clause"
] | null | null | null | oddt/fingerprints.py | OlivierBeq/oddt | ab5326d2a487ad1a713c30fbaa98891a6bd56ad5 | [
"BSD-3-Clause"
] | null | null | null | oddt/fingerprints.py | OlivierBeq/oddt | ab5326d2a487ad1a713c30fbaa98891a6bd56ad5 | [
"BSD-3-Clause"
] | null | null | null | """
Module checks interactions between two molecules and
creates interacion fingerprints.
"""
from __future__ import division
from itertools import chain
from collections import OrderedDict, namedtuple
import sys
from six.moves import zip_longest
import numpy as np
from scipy.sparse import csr_matrix, isspmat... | 37.105263 | 113 | 0.612819 |
0287c3eba1a6059d1508ec197b30e480af248c22 | 3,046 | py | Python | pyrus_nn/models.py | milesgranger/pyrus-nn | 4a0510f6e2e97b8257397272a6c73fa69808b529 | [
"MIT"
] | 10 | 2019-03-18T12:07:44.000Z | 2021-07-06T06:38:01.000Z | pyrus_nn/models.py | milesgranger/pyrus-nn | 4a0510f6e2e97b8257397272a6c73fa69808b529 | [
"MIT"
] | 35 | 2019-05-27T04:59:41.000Z | 2021-07-22T04:17:11.000Z | pyrus_nn/models.py | milesgranger/pyrus-nn | 4a0510f6e2e97b8257397272a6c73fa69808b529 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import json
from typing import Iterable
from pyrus_nn.rust.pyrus_nn import PyrusSequential
from pyrus_nn import layers
class Sequential:
# This is the actual Rust implementation with Python interface
_model: PyrusSequential
def __init__(self, lr: float, n_epochs: int, batch_siz... | 24.174603 | 95 | 0.534471 |
187bb2cc894ff605b588c4654627f515555a9a86 | 3,697 | py | Python | examples/moe/huggingface_bert_moe.py | reyoung/PatrickStar | 0731c6ed2065e62d0cd489813b4e162880a5ab51 | [
"BSD-3-Clause"
] | 494 | 2021-10-30T04:43:23.000Z | 2022-03-31T02:47:05.000Z | examples/moe/huggingface_bert_moe.py | reyoung/PatrickStar | 0731c6ed2065e62d0cd489813b4e162880a5ab51 | [
"BSD-3-Clause"
] | 33 | 2021-11-03T13:00:59.000Z | 2022-03-03T08:39:37.000Z | examples/moe/huggingface_bert_moe.py | reyoung/PatrickStar | 0731c6ed2065e62d0cd489813b4e162880a5ab51 | [
"BSD-3-Clause"
] | 45 | 2021-10-31T08:00:15.000Z | 2022-03-23T08:59:11.000Z | # BSD 3-Clause License
#
# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyrig... | 35.893204 | 86 | 0.70733 |
15f1d1c5eb0b03fac59363def9316b9aa3df63bb | 819 | py | Python | students/K33422/practical_works/Orlova_Lyubov/django_progect_orlova_pr/practice/urls.py | ShubhamKunal/ITMO_ICT_WebDevelopment_2020-2021 | bb91c91a56d21cec2b12ae4cc722eaa652a88420 | [
"MIT"
] | 4 | 2020-09-03T15:41:42.000Z | 2021-12-24T15:28:20.000Z | students/K33422/practical_works/Orlova_Lyubov/django_progect_orlova_pr/practice/urls.py | ShubhamKunal/ITMO_ICT_WebDevelopment_2020-2021 | bb91c91a56d21cec2b12ae4cc722eaa652a88420 | [
"MIT"
] | 48 | 2020-09-13T20:22:42.000Z | 2021-04-30T11:13:30.000Z | students/K33422/practical_works/Orlova_Lyubov/django_progect_orlova_pr/practice/urls.py | ShubhamKunal/ITMO_ICT_WebDevelopment_2020-2021 | bb91c91a56d21cec2b12ae4cc722eaa652a88420 | [
"MIT"
] | 69 | 2020-09-06T10:32:37.000Z | 2021-11-28T18:13:17.000Z | from django.urls import path
from . import views #подключение файла контроллеров,описанного в пункте 3
urlpatterns = [
path('owners_list/', views.owners_list), # Вывод всех владельцев на основе функций
path('carslist/', views.cars_list.as_view()), # Вывод всех автомобилей на основе классов
path('cars_lis... | 58.5 | 111 | 0.732601 |
5f66ef1560453a0ecbfc8d5d8affa7ee82904d10 | 7,784 | py | Python | tests/st/probability/distribution/test_categorical.py | GuoSuiming/mindspore | 48afc4cfa53d970c0b20eedfb46e039db2a133d5 | [
"Apache-2.0"
] | 3,200 | 2020-02-17T12:45:41.000Z | 2022-03-31T20:21:16.000Z | tests/st/probability/distribution/test_categorical.py | forwhat461/mindspore | 59a277756eb4faad9ac9afcc7fd526e8277d4994 | [
"Apache-2.0"
] | 176 | 2020-02-12T02:52:11.000Z | 2022-03-28T22:15:55.000Z | tests/st/probability/distribution/test_categorical.py | forwhat461/mindspore | 59a277756eb4faad9ac9afcc7fd526e8277d4994 | [
"Apache-2.0"
] | 621 | 2020-03-09T01:31:41.000Z | 2022-03-30T03:43:19.000Z | # Copyright 2019 Huawei Technologies Co., Ltd
#
# 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... | 25.190939 | 78 | 0.600206 |
35e374771c2fc630112d36defffec03ccfbefc84 | 70 | py | Python | homeassistant/components/filter/__init__.py | tbarbette/core | 8e58c3aa7bc8d2c2b09b6bd329daa1c092d52d3c | [
"Apache-2.0"
] | 11 | 2018-02-16T15:35:47.000Z | 2020-01-14T15:20:00.000Z | homeassistant/components/filter/__init__.py | jagadeeshvenkatesh/core | 1bd982668449815fee2105478569f8e4b5670add | [
"Apache-2.0"
] | 383 | 2020-03-06T13:01:14.000Z | 2022-03-11T13:14:13.000Z | homeassistant/components/filter/__init__.py | jagadeeshvenkatesh/core | 1bd982668449815fee2105478569f8e4b5670add | [
"Apache-2.0"
] | 14 | 2018-08-19T16:28:26.000Z | 2021-09-02T18:26:53.000Z | """The filter component."""
DOMAIN = "filter"
PLATFORMS = ["sensor"]
| 14 | 27 | 0.642857 |
65697d5c7e4491969a173b040fc124f075eace7e | 6,421 | py | Python | lib/modules/powershell/management/reflective_inject.py | jimshew/Empire | a7413869849b2c3c521eb50bed61e00ede107688 | [
"BSD-3-Clause"
] | 4 | 2019-03-11T02:40:13.000Z | 2021-01-29T06:45:21.000Z | lib/modules/powershell/management/reflective_inject.py | jimshew/Empire | a7413869849b2c3c521eb50bed61e00ede107688 | [
"BSD-3-Clause"
] | 20 | 2020-03-11T03:58:21.000Z | 2020-03-12T03:59:38.000Z | lib/modules/powershell/management/reflective_inject.py | jimshew/Empire | a7413869849b2c3c521eb50bed61e00ede107688 | [
"BSD-3-Clause"
] | 1 | 2021-01-30T19:58:10.000Z | 2021-01-30T19:58:10.000Z | from __future__ import print_function
from builtins import str
from builtins import range
from builtins import object
from lib.common import helpers
import base64
class Module(object):
def __init__(self, mainMenu, params=[]):
self.info = {
'Name': 'Invoke-PSInject',
... | 38.915152 | 127 | 0.504594 |
b85d0e1645e772503fdc605fdb2e55af70ea78ad | 21,642 | py | Python | xarray/core/duck_array_ops.py | jhamman/xarray-test-docs | c54123772817875678ec7ad769e6d4d6612aeb92 | [
"Apache-2.0"
] | 1 | 2022-02-18T10:14:38.000Z | 2022-02-18T10:14:38.000Z | xarray/core/duck_array_ops.py | jhamman/xarray-test-docs | c54123772817875678ec7ad769e6d4d6612aeb92 | [
"Apache-2.0"
] | 3 | 2022-03-22T20:52:33.000Z | 2022-03-22T20:52:36.000Z | xarray/core/duck_array_ops.py | jhamman/xarray-test-docs | c54123772817875678ec7ad769e6d4d6612aeb92 | [
"Apache-2.0"
] | null | null | null | """Compatibility module defining operations on duck numpy-arrays.
Currently, this means Dask or NumPy arrays. None of these functions should
accept or return xarray objects.
"""
import contextlib
import datetime
import inspect
import warnings
from functools import partial
import numpy as np
import pandas as pd
from n... | 34.028302 | 95 | 0.662647 |
e56b72e75add0c8af9a6f5a3d7c346d128ee1d76 | 1,184 | py | Python | neutron_skeleton_extension/services/skeleton_port/agent/extensions/skeleton_port_driver_base.py | davidshocks/neutron-skeleton-extension | 13c496f14b760c1c88fe846f237d981e66beb54b | [
"Apache-2.0"
] | 1 | 2016-10-27T04:17:57.000Z | 2016-10-27T04:17:57.000Z | neutron_skeleton_extension/services/skeleton_port/agent/extensions/skeleton_port_driver_base.py | davidshocks/neutron-skeleton-extension | 13c496f14b760c1c88fe846f237d981e66beb54b | [
"Apache-2.0"
] | null | null | null | neutron_skeleton_extension/services/skeleton_port/agent/extensions/skeleton_port_driver_base.py | davidshocks/neutron-skeleton-extension | 13c496f14b760c1c88fe846f237d981e66beb54b | [
"Apache-2.0"
] | null | null | null | # Copyright 2016 Intel. 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 applicab... | 28.878049 | 78 | 0.699324 |
768363083fe23d786a2ce5d619d01d5ce1c64dcb | 3,552 | py | Python | 1fichier-dl/core/download/cli_download.py | Rakibul73/1fichier-dl | 185b31388544367133429fcddddcc37637bac64c | [
"Unlicense"
] | null | null | null | 1fichier-dl/core/download/cli_download.py | Rakibul73/1fichier-dl | 185b31388544367133429fcddddcc37637bac64c | [
"Unlicense"
] | null | null | null | 1fichier-dl/core/download/cli_download.py | Rakibul73/1fichier-dl | 185b31388544367133429fcddddcc37637bac64c | [
"Unlicense"
] | null | null | null | import os
import json
import requests
import lxml
import time
from .helpers import (get_proxy, convert_size, download_speed,
PLATFORM)
def download(url, password = None, payload={'dl_no_ssl': 'on', 'dlinline': 'on'}):
if '1fichier.com/' in url:
if not 'https://' in url[0:8] ... | 39.032967 | 148 | 0.460867 |
5ff13039819e7326c86d6034bf23aa233cea0143 | 4,391 | py | Python | solo/utils/pretrain_dataloader_v1.py | TranNhiem/MVAR_SSL | 339964db4d40f06a92866675ff99ef67cd968cca | [
"MIT"
] | 1 | 2022-03-17T12:46:28.000Z | 2022-03-17T12:46:28.000Z | solo/utils/pretrain_dataloader_v1.py | TranNhiem/MV_MV_SSRL | 339964db4d40f06a92866675ff99ef67cd968cca | [
"MIT"
] | null | null | null | solo/utils/pretrain_dataloader_v1.py | TranNhiem/MV_MV_SSRL | 339964db4d40f06a92866675ff99ef67cd968cca | [
"MIT"
] | null | null | null | import os
import random
import glob
from pathlib import Path
from typing import Any, Callable, List, Optional, Sequence, Type, Union
import numpy as np
import torch
import torchvision
from PIL import Image, ImageFilter, ImageOps
from torch.utils.data import DataLoader
from torch.utils.data.dataset import Dataset
from ... | 31.364286 | 193 | 0.605557 |
ef739ffca68eb9ed3241303f01003a45274d13e2 | 10,859 | py | Python | test/terra/backends/test_parameterized_qobj.py | paulineollitrault/qiskit-aer | 7f9ad2ea93698813901b345f7ee6eee8e02ebce9 | [
"Apache-2.0"
] | null | null | null | test/terra/backends/test_parameterized_qobj.py | paulineollitrault/qiskit-aer | 7f9ad2ea93698813901b345f7ee6eee8e02ebce9 | [
"Apache-2.0"
] | null | null | null | test/terra/backends/test_parameterized_qobj.py | paulineollitrault/qiskit-aer | 7f9ad2ea93698813901b345f7ee6eee8e02ebce9 | [
"Apache-2.0"
] | null | null | null | # This code is part of Qiskit.
#
# (C) Copyright IBM 2018, 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 modifications or derivat... | 40.36803 | 115 | 0.614697 |
db08bc848cd130644236761d8a467e1fd0f00af3 | 59,012 | py | Python | wrappers/gltrace.py | moonlinux/apitrace | 764c9786b2312b656ce0918dff73001c6a85f46f | [
"MIT"
] | 1,723 | 2015-01-08T19:10:21.000Z | 2022-03-31T16:41:40.000Z | wrappers/gltrace.py | moonlinux/apitrace | 764c9786b2312b656ce0918dff73001c6a85f46f | [
"MIT"
] | 471 | 2015-01-02T15:02:34.000Z | 2022-03-26T17:54:10.000Z | wrappers/gltrace.py | moonlinux/apitrace | 764c9786b2312b656ce0918dff73001c6a85f46f | [
"MIT"
] | 380 | 2015-01-22T19:06:32.000Z | 2022-03-25T02:20:39.000Z | ##########################################################################
#
# Copyright 2008-2010 VMware, Inc.
# All Rights Reserved.
#
# 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 withou... | 46.984076 | 171 | 0.544466 |
bd75d58907f921ab8255cdb08a3f5e639f43f055 | 2,603 | py | Python | 2018/aoc/d3/main.py | lukaselmer/adventofcode | b96ffc9040b63b338bca653830ba4ff7e90a8b2a | [
"MIT"
] | 1 | 2018-12-12T22:59:44.000Z | 2018-12-12T22:59:44.000Z | 2018/aoc/d3/main.py | lukaselmer/adventofcode | b96ffc9040b63b338bca653830ba4ff7e90a8b2a | [
"MIT"
] | null | null | null | 2018/aoc/d3/main.py | lukaselmer/adventofcode | b96ffc9040b63b338bca653830ba4ff7e90a8b2a | [
"MIT"
] | null | null | null | # from collections import defaultdict
from typing import List, Set, Tuple
from dataclasses import dataclass
def multi_claimed_square_inches():
fabric = _fill_fabric()
return fabric.count_multi_claimed_square_inches()
def find_intact_claim():
fabric = _fill_fabric()
return fabric.find_intact_claim()... | 26.835052 | 102 | 0.610449 |
353e6f2084c95c52b25b10953c39c0d5d0e49ac4 | 9,169 | py | Python | polaris/polaris/tests/sep6/test_update.py | estar-app/django-polaris | 44ace404f8bb35a8c2f727d1e927998d034d68de | [
"Apache-2.0"
] | null | null | null | polaris/polaris/tests/sep6/test_update.py | estar-app/django-polaris | 44ace404f8bb35a8c2f727d1e927998d034d68de | [
"Apache-2.0"
] | null | null | null | polaris/polaris/tests/sep6/test_update.py | estar-app/django-polaris | 44ace404f8bb35a8c2f727d1e927998d034d68de | [
"Apache-2.0"
] | null | null | null | import json
import uuid
from unittest.mock import Mock, patch
import pytest
from polaris.tests.helpers import mock_check_auth_success
from polaris.models import Transaction, Asset
endpoint = "/sep6/transactions/"
@pytest.mark.django_db
@patch("polaris.sep10.utils.check_auth", mock_check_auth_success)
@patch("polar... | 36.384921 | 88 | 0.695278 |
6f9e657b72b4e5e38b9afa2b90dcce4e07e02008 | 1,167 | py | Python | zygoat/components/backend/settings/cookies.py | ambikads/zygoat | 2f549102a15c08cf1eeda1ae3847144b8ddf510f | [
"MIT"
] | null | null | null | zygoat/components/backend/settings/cookies.py | ambikads/zygoat | 2f549102a15c08cf1eeda1ae3847144b8ddf510f | [
"MIT"
] | null | null | null | zygoat/components/backend/settings/cookies.py | ambikads/zygoat | 2f549102a15c08cf1eeda1ae3847144b8ddf510f | [
"MIT"
] | null | null | null | import logging
from zygoat.components import SettingsComponent
log = logging.getLogger()
secure_cookie_string = """\
if not DEBUG:
SESSION_COOKIE_SECURE = True
CSRF_COOKIE_SECURE = True
"""
class Cookies(SettingsComponent):
def create(self):
red = self.parse()
log.info("Adding cookie ... | 23.34 | 85 | 0.514139 |
f8f0afa125c5970141744ff5ecc881b374f899e3 | 27 | py | Python | tallesttree.py | Srinivassan-Ramamurthy/python_programs | 53b390669c7e88532c67d80b758a9199d6fde8cf | [
"bzip2-1.0.6"
] | null | null | null | tallesttree.py | Srinivassan-Ramamurthy/python_programs | 53b390669c7e88532c67d80b758a9199d6fde8cf | [
"bzip2-1.0.6"
] | null | null | null | tallesttree.py | Srinivassan-Ramamurthy/python_programs | 53b390669c7e88532c67d80b758a9199d6fde8cf | [
"bzip2-1.0.6"
] | null | null | null | for i in range(1,14):
| 9 | 21 | 0.518519 |
eeb44fd39547e79e47de792365853e598a54bf2e | 6,046 | py | Python | data-efficientML/artificialCase/trainNN.py | NREL/Phase-space-sampling | b3b65ce4fad962f2204c4452c844a6b284e048ae | [
"BSD-3-Clause"
] | null | null | null | data-efficientML/artificialCase/trainNN.py | NREL/Phase-space-sampling | b3b65ce4fad962f2204c4452c844a6b284e048ae | [
"BSD-3-Clause"
] | null | null | null | data-efficientML/artificialCase/trainNN.py | NREL/Phase-space-sampling | b3b65ce4fad962f2204c4452c844a6b284e048ae | [
"BSD-3-Clause"
] | 1 | 2022-02-23T13:47:21.000Z | 2022-02-23T13:47:21.000Z | import numpy as np
from sklearn.gaussian_process import GaussianProcessRegressor
import sys
sys.path.append('util')
from plotsUtil import *
from myProgressBar import printProgressBar
# NN Stuff
import tensorflow as tf
from tensorflow import keras
from tensorflow.keras import layers
from tensorflow.keras import regular... | 38.75641 | 132 | 0.56864 |
ff12645f0fbe4c91e0d61e1d0244eed47436a2e1 | 1,071 | py | Python | adbwp/enums.py | adbpy/wire-protocol | d892b5ff51d7c9340dea5c671efb9311b5e4d957 | [
"Apache-2.0"
] | 7 | 2017-07-25T04:30:48.000Z | 2021-09-22T17:27:50.000Z | adbwp/enums.py | adbpy/wire-protocol | d892b5ff51d7c9340dea5c671efb9311b5e4d957 | [
"Apache-2.0"
] | 382 | 2017-10-18T04:34:25.000Z | 2021-08-02T05:35:37.000Z | adbwp/enums.py | adbpy/wire-protocol | d892b5ff51d7c9340dea5c671efb9311b5e4d957 | [
"Apache-2.0"
] | 1 | 2018-01-15T20:10:33.000Z | 2018-01-15T20:10:33.000Z | """
adbwp.enums
~~~~~~~~~~~
Contains enumeration types used by the protocol.
"""
import enum
class Command(enum.IntEnum):
"""
Enumeration for command types used by the ADB protocol.
"""
SYNC = 0x434e5953 # Internal only.
CNXN = 0x4e584e43
AUTH = 0x48545541
OPEN = 0x4e45504f
... | 19.833333 | 97 | 0.629318 |
6d0677da2f86bd15f6749becc17b2728bc2d913d | 648 | py | Python | MxOnline/apps/assets/adminx.py | zhangsheng166/demo | 8142abb110e3885ffe62d2fce24e18e6619c558d | [
"Apache-2.0"
] | null | null | null | MxOnline/apps/assets/adminx.py | zhangsheng166/demo | 8142abb110e3885ffe62d2fce24e18e6619c558d | [
"Apache-2.0"
] | null | null | null | MxOnline/apps/assets/adminx.py | zhangsheng166/demo | 8142abb110e3885ffe62d2fce24e18e6619c558d | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# @Time : 2018/1/18 23:52
# @Author : 暖先生!
# @FileName: adminx.py
# @Software: PyCharm
# @Blog :http://www.zstcl.com
import xadmin
from .models import Equipment
class EquipmentAdmin(object):
list_display = ['hostname', 'ip', 'information', 'OSname', 'role', 'buildtime', '... | 38.117647 | 124 | 0.626543 |
a2dc0b1c023046310408cd85ff591c2cfd49c485 | 20,877 | py | Python | skimage/future/graph/rag.py | silverneko/scikit-image | 1f8c74f69e0f9e72c59f180b2fc96d311659c609 | [
"BSD-3-Clause"
] | null | null | null | skimage/future/graph/rag.py | silverneko/scikit-image | 1f8c74f69e0f9e72c59f180b2fc96d311659c609 | [
"BSD-3-Clause"
] | 5 | 2016-05-23T22:14:40.000Z | 2022-02-25T21:10:23.000Z | skimage/future/graph/rag.py | silverneko/scikit-image | 1f8c74f69e0f9e72c59f180b2fc96d311659c609 | [
"BSD-3-Clause"
] | 2 | 2016-05-23T08:44:29.000Z | 2021-06-23T00:26:23.000Z | import networkx as nx
import numpy as np
from numpy.lib.stride_tricks import as_strided
from scipy import ndimage as ndi
from scipy import sparse
import math
from ... import measure, segmentation, util, color
def _edge_generator_from_csr(csr_matrix):
"""Yield weighted edge triples for use by NetworkX from a CSR m... | 37.147687 | 98 | 0.6146 |
3dbb6d73070004d0b757343583a974caf7b1d2fc | 577 | py | Python | ejercicios_resueltos/t03/t03ejer05.py | workready/pythonbasic | 59bd82caf99244f5e711124e1f6f4dec8de22141 | [
"MIT"
] | null | null | null | ejercicios_resueltos/t03/t03ejer05.py | workready/pythonbasic | 59bd82caf99244f5e711124e1f6f4dec8de22141 | [
"MIT"
] | null | null | null | ejercicios_resueltos/t03/t03ejer05.py | workready/pythonbasic | 59bd82caf99244f5e711124e1f6f4dec8de22141 | [
"MIT"
] | null | null | null | def sumatorio_tope(tope):
"""
Va sumando números naturales hasta llegar al tope.
Ejemplos
--------
>>> sumatorio_tope(9)
6
# 1 + 2 + 3
>>> sumatorio_tope(10)
10 # 1 + 2 + 3 + 4
>>> sumatorio_tope(12)
10 # 1 + 2 + 3 + 4
>>> sumatorio_tope(16)
1... | 18.03125 | 54 | 0.480069 |
ef676d26dc37896f20861ec600d13f7e1f38afb1 | 14,615 | py | Python | neutron/plugins/ml2/db.py | mail2nsrajesh/neutron | 352afb37afcf4952f03436b25618d0066c51f3f1 | [
"Apache-2.0"
] | null | null | null | neutron/plugins/ml2/db.py | mail2nsrajesh/neutron | 352afb37afcf4952f03436b25618d0066c51f3f1 | [
"Apache-2.0"
] | null | null | null | neutron/plugins/ml2/db.py | mail2nsrajesh/neutron | 352afb37afcf4952f03436b25618d0066c51f3f1 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2013 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless ... | 38.973333 | 79 | 0.657475 |
e7daa3c98d735009486bee727a56bed3cd646d5c | 3,660 | py | Python | shenasm/parse.py | omaskery/shenzhen.io-assembler | c09175e9fdfdad38e3b7e77a4e82192b31a4cd91 | [
"MIT"
] | 12 | 2016-10-09T21:48:35.000Z | 2021-08-13T07:15:58.000Z | shenasm/parse.py | omaskery/shenzhen.io-assembler | c09175e9fdfdad38e3b7e77a4e82192b31a4cd91 | [
"MIT"
] | 2 | 2016-11-23T22:45:38.000Z | 2018-05-11T13:58:45.000Z | shenasm/parse.py | omaskery/shenzhen.io-assembler | c09175e9fdfdad38e3b7e77a4e82192b31a4cd91 | [
"MIT"
] | 1 | 2016-12-27T19:26:56.000Z | 2016-12-27T19:26:56.000Z | import itertools
import typing
from .source import LineOfSource
class Instruction(object):
def __init__(self, source_pos, label, condition, mnemonic, args):
self._source_pos = source_pos
self._label = label
self._condition = condition
self._mnemonic = mnemonic
self._args... | 29.28 | 108 | 0.546721 |
953cac627468cd5952ee8af11378f3693dc77016 | 16,554 | py | Python | menu_quiz_3n_3d.py | marcosaamedeiros/quiz_menu_projeto2_udacity | 9d697596f2fdb7bdaab9188cafc59f2279debe61 | [
"MIT"
] | null | null | null | menu_quiz_3n_3d.py | marcosaamedeiros/quiz_menu_projeto2_udacity | 9d697596f2fdb7bdaab9188cafc59f2279debe61 | [
"MIT"
] | null | null | null | menu_quiz_3n_3d.py | marcosaamedeiros/quiz_menu_projeto2_udacity | 9d697596f2fdb7bdaab9188cafc59f2279debe61 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
#Título :QUIZ Udacity
#Descrição :Três níveis de questões de completar e cada em três dificuldades.
#autor :Marcos Antônio Alves Medeiros
#data :18/10/2018
#versão :0.1
#uso :python quiz menu Udacity: quiz_menu.py
#notes ... | 50.316109 | 401 | 0.581491 |
44fcb10354d31bceecea9074d0db9687ba98d83f | 11,636 | py | Python | applications/losses/lpips/dist_model.py | shamanDevel/fV-SRN | 966926ee678a0db0f1c67661537c4bb7eec0c56f | [
"MIT"
] | 13 | 2021-12-06T05:08:09.000Z | 2022-03-07T15:11:06.000Z | pytests/losses/lpips/dist_model.py | shamanDevel/DiffDVR | 99fbe9f114d0097daf402bde2ae35f18dade335d | [
"BSD-3-Clause"
] | 2 | 2021-11-04T14:23:30.000Z | 2022-02-28T10:30:13.000Z | applications/losses/lpips/dist_model.py | shamanDevel/fV-SRN | 966926ee678a0db0f1c67661537c4bb7eec0c56f | [
"MIT"
] | 5 | 2021-12-13T07:02:23.000Z | 2022-01-12T15:46:44.000Z |
from __future__ import absolute_import
import os
from collections import OrderedDict
import numpy as np
import torch
from scipy.ndimage import zoom
from torch.autograd import Variable
from tqdm import tqdm
from . import networks_basic as networks
from .base_model import BaseModel
from .utils import voc_ap, tensor2i... | 41.706093 | 177 | 0.620488 |
621e5626ead3d6bcc31a196c948398ef83140878 | 5,983 | py | Python | Image_basics/Core_operations.py | Charmii/Object-Detection-and-Tracking- | eb46f0c8a5c611e5d579164836d695c97b3a1904 | [
"MIT"
] | null | null | null | Image_basics/Core_operations.py | Charmii/Object-Detection-and-Tracking- | eb46f0c8a5c611e5d579164836d695c97b3a1904 | [
"MIT"
] | null | null | null | Image_basics/Core_operations.py | Charmii/Object-Detection-and-Tracking- | eb46f0c8a5c611e5d579164836d695c97b3a1904 | [
"MIT"
] | null | null | null | import cv2
import numpy as np
#Callback functions to draw on image
drawing = False # true if mouse is pressed
mode = True # if True, draw rectangle. Press 'm' to toggle to curve
ix,iy = -1,-1
drawing = False # true if mouse is pressed
mode = True # if True, draw rectangle. Press 'm' to toggle to curve
ix,iy = -1,-1
... | 29.043689 | 78 | 0.572622 |
93362cb560db0f1643ca1af3e756fdb8b1a0d323 | 1,135 | py | Python | app/__init__.py | kuya-ui/Pitches | a9507ddfdd2f4d3723371c5c6b599157c3e61307 | [
"MIT"
] | null | null | null | app/__init__.py | kuya-ui/Pitches | a9507ddfdd2f4d3723371c5c6b599157c3e61307 | [
"MIT"
] | null | null | null | app/__init__.py | kuya-ui/Pitches | a9507ddfdd2f4d3723371c5c6b599157c3e61307 | [
"MIT"
] | null | null | null | from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from config import config_options
from flask_login import LoginManager
from flask_uploads import UploadSet, configure_uploads,IMAGES
from flask_bootstrap import Bootstrap
from flask_mail import Mail
from flask_simplemde import SimpleMDE
login_manager = L... | 25.795455 | 61 | 0.777974 |
476ba9356781f3c0b0a824e1259bab08b2a704db | 2,691 | py | Python | migrations/versions/3bdda43c0ddd_.py | austitech/hotel-management-system | a82fb903d09ea86e9128c3067607a8b0e857f1fa | [
"MIT"
] | null | null | null | migrations/versions/3bdda43c0ddd_.py | austitech/hotel-management-system | a82fb903d09ea86e9128c3067607a8b0e857f1fa | [
"MIT"
] | null | null | null | migrations/versions/3bdda43c0ddd_.py | austitech/hotel-management-system | a82fb903d09ea86e9128c3067607a8b0e857f1fa | [
"MIT"
] | null | null | null | """empty message
Revision ID: 3bdda43c0ddd
Revises:
Create Date: 2020-02-23 12:43:05.380485
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '3bdda43c0ddd'
down_revision = None
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto gene... | 34.948052 | 65 | 0.662951 |
cf619bf94d3e0a6e448ccffea7da61911dd25fe2 | 1,946 | py | Python | cogs/info/__init__.py | zeroday0619/KHSClassBOT | 9b11e6af436d002576cee1f6534f1bbdb64bc266 | [
"MIT"
] | 2 | 2021-03-05T14:05:56.000Z | 2021-03-05T14:21:35.000Z | cogs/info/__init__.py | zeroday0619/KHSClassBOT | 9b11e6af436d002576cee1f6534f1bbdb64bc266 | [
"MIT"
] | 12 | 2021-04-12T07:45:14.000Z | 2021-12-06T18:04:22.000Z | cogs/info/__init__.py | zeroday0619/KHSClassBOT | 9b11e6af436d002576cee1f6534f1bbdb64bc266 | [
"MIT"
] | null | null | null | import discord
from discord.ext import commands
from discord.ext.commands import Context
from discord_slash import SlashContext, cog_ext
class INFO(commands.Cog):
"""KHSClassBOT System Information"""
def __init__(self, bot: commands.Bot):
self.bot = bot
@commands.command(name="help")
async d... | 33.551724 | 115 | 0.606372 |
1b563fd0d4f1dc00d7df6a791d21a118a95ec6cf | 360 | py | Python | hooks/tests/test_integration/test_validate_expressions_complexity/test_validate_expressions_complexity.py | micheller/pre-commit-hooks | 77ee136b009fb6a80aa17de93d692670ed9761f2 | [
"MIT"
] | 4 | 2021-07-06T12:45:55.000Z | 2021-12-22T10:18:00.000Z | hooks/tests/test_integration/test_validate_expressions_complexity/test_validate_expressions_complexity.py | micheller/pre-commit-hooks | 77ee136b009fb6a80aa17de93d692670ed9761f2 | [
"MIT"
] | 2 | 2021-04-02T13:13:09.000Z | 2021-04-07T09:09:16.000Z | hooks/tests/test_integration/test_validate_expressions_complexity/test_validate_expressions_complexity.py | micheller/pre-commit-hooks | 77ee136b009fb6a80aa17de93d692670ed9761f2 | [
"MIT"
] | 9 | 2021-03-22T13:13:37.000Z | 2021-12-21T15:08:53.000Z | from __future__ import annotations
import pathlib
from hooks.validate_expressions_complexity import get_file_errors
SAMPLE_FILE = pathlib.Path(__file__).parent / 'samples' / 'sample.py'
def test_get_file_errors():
errors = list(get_file_errors(str(SAMPLE_FILE), max_expression_complexity=1.5, ignore_django_orm_... | 25.714286 | 115 | 0.794444 |
474536195bb88505c6291ea79bbb580e1b1a3809 | 12,618 | py | Python | python/ccxt/async_support/bitlish.py | OliverNChalk/ccxt | fcf55e88f3523d2969f905cbed3b4deec1433a5e | [
"MIT"
] | 26 | 2018-12-10T07:16:35.000Z | 2022-03-15T03:15:54.000Z | python/ccxt/async_support/bitlish.py | OliverNChalk/ccxt | fcf55e88f3523d2969f905cbed3b4deec1433a5e | [
"MIT"
] | 4 | 2020-09-07T00:20:58.000Z | 2021-05-10T09:04:56.000Z | python/ccxt/async_support/bitlish.py | OliverNChalk/ccxt | fcf55e88f3523d2969f905cbed3b4deec1433a5e | [
"MIT"
] | 13 | 2019-03-13T14:54:30.000Z | 2021-10-14T10:11: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
from ccxt.base.errors import NotSupported
class bitlish (Exchange):
def descri... | 36.363112 | 126 | 0.462038 |
caf93f0b13929fc743ce3b36bd9ef7260e335cd5 | 2,983 | py | Python | statick_tool/plugins/discovery/ros_discovery_plugin.py | xydesa/statick | 22d863306bfd6fe411758e5807ae036679a309c5 | [
"CC0-1.0"
] | 1 | 2022-01-25T16:08:45.000Z | 2022-01-25T16:08:45.000Z | statick_tool/plugins/discovery/ros_discovery_plugin.py | jhdcs/statick | 121ab511f206967c587d70d88217ae23db84726d | [
"CC0-1.0"
] | 1 | 2020-12-15T16:51:35.000Z | 2020-12-15T16:51:35.000Z | statick_tool/plugins/discovery/ros_discovery_plugin.py | jhdcs/statick | 121ab511f206967c587d70d88217ae23db84726d | [
"CC0-1.0"
] | null | null | null | """Discovery plugin to find ROS packages."""
import logging
import os
from functools import reduce
from typing import Any, Dict, Optional, Union
import xmltodict
from statick_tool.discovery_plugin import DiscoveryPlugin
from statick_tool.exceptions import Exceptions
from statick_tool.package import Package
class Ro... | 36.378049 | 105 | 0.5471 |
fa60bb7fb1cd7ec1d0fad4805874a48a08f98740 | 1,102 | py | Python | flexible_reports/models/behaviors.py | mpasternak/django-flexible-reports | cdf62590efb2937b30e19952a67afbc3a3e1c192 | [
"MIT"
] | 2 | 2017-08-31T11:55:26.000Z | 2018-07-14T19:39:05.000Z | flexible_reports/models/behaviors.py | mpasternak/django-flexible-reports | cdf62590efb2937b30e19952a67afbc3a3e1c192 | [
"MIT"
] | 1 | 2017-08-24T07:04:46.000Z | 2017-09-23T14:39:06.000Z | flexible_reports/models/behaviors.py | mpasternak/django-flexible-reports | cdf62590efb2937b30e19952a67afbc3a3e1c192 | [
"MIT"
] | null | null | null | # -*- encoding: utf-8 -*-
from django.contrib.contenttypes.models import ContentType
from django.db import models
from django.utils.translation import ugettext_lazy as _
class WithBaseModel(models.Model):
base_model = models.ForeignKey(
ContentType,
verbose_name=_("Base model"),
on_delete=... | 20.792453 | 72 | 0.631579 |
7874df856b68e52d0d54a0415f6330b67dd2d857 | 2,447 | py | Python | statsfig/poisson.py | shinokada/ndfig | 214dee0f53f7feef43ebda64638bf0375125990e | [
"MIT"
] | 4 | 2020-08-17T14:14:41.000Z | 2021-06-05T17:30:40.000Z | statsfig/poisson.py | shinokada/ndfig | 214dee0f53f7feef43ebda64638bf0375125990e | [
"MIT"
] | null | null | null | statsfig/poisson.py | shinokada/ndfig | 214dee0f53f7feef43ebda64638bf0375125990e | [
"MIT"
] | null | null | null | import seaborn as sns
from scipy.stats import poisson
from matplotlib import pyplot as plt
# Poisson
def poisfig(mu=4, size=10000, fig_w=8, fig_l=8, grid=True, hist=True, color='skyblue', linewidth=10,
alpha=1, title='Poisson Distribution', xlabel='Poisson Distribution', ylabel='Frequency',
l... | 34.957143 | 101 | 0.646097 |
eae27536235e4412fda543037ed0b5919f1598ab | 1,752 | py | Python | connectboxcontrol/util/crypto.py | martindisch/Connect-Box-WiFi | da621e83208c0f3b2966a83010dfb76a0c2993d1 | [
"MIT"
] | null | null | null | connectboxcontrol/util/crypto.py | martindisch/Connect-Box-WiFi | da621e83208c0f3b2966a83010dfb76a0c2993d1 | [
"MIT"
] | null | null | null | connectboxcontrol/util/crypto.py | martindisch/Connect-Box-WiFi | da621e83208c0f3b2966a83010dfb76a0c2993d1 | [
"MIT"
] | null | null | null | import hashlib
import codecs
from Crypto.Cipher import AES
import Crypto.Random as random
PBKDF2_ITERATIONS = 1000
PBKDF2_KEYSIZE_BYTES = 16
CCM_TAGLENGTH_BYTES = 16
def hex(b):
"""Convert the given bytes to hexadecimal string representation.
Parameters
----------
b : bytes
The byte string ... | 19.466667 | 78 | 0.615297 |
49d85fcea904fead91583ff19cfdb104db3c34a1 | 509 | py | Python | mail.py | saurabhshukla01/PharmaLaravel6.0 | 25d9e26ae31ceddfa7f3c6e16c8c99ce069dab5e | [
"MIT"
] | null | null | null | mail.py | saurabhshukla01/PharmaLaravel6.0 | 25d9e26ae31ceddfa7f3c6e16c8c99ce069dab5e | [
"MIT"
] | 8 | 2020-07-19T16:34:10.000Z | 2022-02-27T08:30:55.000Z | mail.py | saurabhshukla01/PharmaLaravel6.0 | 25d9e26ae31ceddfa7f3c6e16c8c99ce069dab5e | [
"MIT"
] | null | null | null | #!/usr/bin/python
import smtplib
from smtplib import SMTPException
sender = 'saurabh.shukla053@gmail.com'
receivers = ['saurabh.shukla@prudigital.in']
message = "Hello!"
try:
session = smtplib.SMTP('smtp.gmail.com',587)
session.ehlo()
session.starttls()
session.ehlo()
session.login(sender,'passwo... | 24.238095 | 77 | 0.719057 |
342f4e417597975b6a47bc290adde19fb429c2c9 | 1,124 | py | Python | packs/rabbitmq/actions/list_exchanges.py | jonico/st2contrib | 149c9c553f24360d91a14fef7ea6146707de75fd | [
"Apache-2.0"
] | 164 | 2015-01-17T16:08:33.000Z | 2021-08-03T02:34:07.000Z | packs/rabbitmq/actions/list_exchanges.py | jonico/st2contrib | 149c9c553f24360d91a14fef7ea6146707de75fd | [
"Apache-2.0"
] | 442 | 2015-01-01T11:19:01.000Z | 2017-09-06T23:26:17.000Z | packs/rabbitmq/actions/list_exchanges.py | jonico/st2contrib | 149c9c553f24360d91a14fef7ea6146707de75fd | [
"Apache-2.0"
] | 202 | 2015-01-13T00:37:40.000Z | 2020-11-07T11:30:10.000Z | #!/usr/bin/env python
import sys
import json
from lib.shell import run_command
def list_exchanges(vhost=None):
cmd = ['rabbitmqadmin', 'list', 'exchanges']
if vhost:
cmd += ['-V', vhost]
exit_code, stdout, stderr = run_command(cmd=cmd, shell=False)
if exit_code != 0:
msg = 'Comman... | 22.938776 | 65 | 0.558719 |
ccca4b34f7ffde6540b9326692f21f51db412cef | 74 | py | Python | IRT.py | ChrisChen0429/2020AERA | ac4473414948e77d6176a5dfd1686e0fc923fc0b | [
"MIT"
] | null | null | null | IRT.py | ChrisChen0429/2020AERA | ac4473414948e77d6176a5dfd1686e0fc923fc0b | [
"MIT"
] | null | null | null | IRT.py | ChrisChen0429/2020AERA | ac4473414948e77d6176a5dfd1686e0fc923fc0b | [
"MIT"
] | null | null | null | import pandas as pd
comment = pd.read_csv('./data/vialogues_comments.csv') | 37 | 54 | 0.783784 |
b1f898a99759e6445fa8e14a9363cc1d7727a84f | 15,691 | py | Python | vcsjob/jobs/tests/cli.py | yiu31802/ave | e46fc357f9464d5beaf42568a74bb95e6b1b8037 | [
"BSD-3-Clause"
] | 17 | 2016-11-16T08:09:49.000Z | 2021-08-12T06:38:09.000Z | vcsjob/jobs/tests/cli.py | yiu31802/ave | e46fc357f9464d5beaf42568a74bb95e6b1b8037 | [
"BSD-3-Clause"
] | null | null | null | vcsjob/jobs/tests/cli.py | yiu31802/ave | e46fc357f9464d5beaf42568a74bb95e6b1b8037 | [
"BSD-3-Clause"
] | 12 | 2016-11-20T15:34:03.000Z | 2020-08-04T00:26:11.000Z | # Copyright (C) 2013 Sony Mobile Communications AB.
# All rights, including trade secret rights, reserved.
import os
import sys
import ave.cmd
from ave.workspace import Workspace
# show help and return non-zero when invoked without arguments
def t1(executable, sources):
pretty = '%s t1' % __file__
print(pre... | 28.374322 | 82 | 0.552164 |
9d326e40b90b72159fbe4d3f8a18a463e8c9446d | 1,449 | py | Python | Python3/41_First_Missing_Positive.py | yangjiahao106/LeetCode | c30ba0ef06f444951f7ab8eee495ac43613d7f4f | [
"RSA-MD"
] | 1 | 2018-04-28T09:07:11.000Z | 2018-04-28T09:07:11.000Z | Python3/41_First_Missing_Positive.py | yangjiahao106/LeetCode | c30ba0ef06f444951f7ab8eee495ac43613d7f4f | [
"RSA-MD"
] | 1 | 2018-02-24T16:26:30.000Z | 2018-02-24T16:26:44.000Z | Python3/41_First_Missing_Positive.py | yangjiahao106/LeetCode | c30ba0ef06f444951f7ab8eee495ac43613d7f4f | [
"RSA-MD"
] | null | null | null | #! python3
# __author__ = "YangJiaHao"
# date: 2018/2/20
class Solution:
def firstMissingPositive(self, nums):
"""
:type nums: List[int]
:rtype: int
O(n)
space (n)
"""
# if len(nums) == 0:
# return 1
# nums.sort()
... | 27.339623 | 76 | 0.439614 |
303529db986da94812f0a56b3661ec4ca9513d66 | 4,214 | py | Python | docs/source/conf.py | breimers/Django-Kubernetes-Manager | cb78b51e6aeabcd4037166fa8e7c565180fb7d93 | [
"MIT"
] | 13 | 2020-04-03T08:33:51.000Z | 2022-02-22T07:30:28.000Z | docs/source/conf.py | breimers/Django-Kubernetes-Manager | cb78b51e6aeabcd4037166fa8e7c565180fb7d93 | [
"MIT"
] | 27 | 2020-04-03T06:51:38.000Z | 2022-01-21T13:12:28.000Z | docs/source/conf.py | breimers/Django-Kubernetes-Manager | cb78b51e6aeabcd4037166fa8e7c565180fb7d93 | [
"MIT"
] | 6 | 2020-09-14T18:22:37.000Z | 2022-03-04T09:08:25.000Z | # Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If ex... | 39.018519 | 133 | 0.671808 |
f99cc21964fe56ebf3ea5cfee52037cec07e5524 | 2,811 | py | Python | server.py | juliscrazy/TCP-chat | e56026414f5e81612a5ad96356d6d79d66687ef9 | [
"MIT"
] | 1 | 2019-03-20T16:39:44.000Z | 2019-03-20T16:39:44.000Z | server.py | lazyjul/TCP-chat | e56026414f5e81612a5ad96356d6d79d66687ef9 | [
"MIT"
] | 1 | 2020-06-17T19:20:58.000Z | 2020-06-17T19:20:58.000Z | server.py | lazyjul/TCP-chat | e56026414f5e81612a5ad96356d6d79d66687ef9 | [
"MIT"
] | null | null | null | import socket
import _thread as thread
import json
TCP_IP = '127.0.0.1'
TCP_PORT = 5005
BUFFER_SIZE = 1024
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.bind((TCP_IP, TCP_PORT))
s.listen(20)
clientList = []
roomList = ["Room0"] #0 = general
Room0 = []
class backendCommands:
def __init__(self):
... | 28.979381 | 99 | 0.614372 |
b54aae8782e01094465ae2342dfe04d30cc7bd7f | 334 | py | Python | hash-table/Python/0242-valid-anagram-4.py | ljyljy/LeetCode-Solution-in-Good-Style | 0998211d21796868061eb22e2cbb9bcd112cedce | [
"Apache-2.0"
] | 1 | 2021-01-10T17:03:21.000Z | 2021-01-10T17:03:21.000Z | hash-table/Python/0242-valid-anagram-4.py | lemonnader/LeetCode-Solution-Well-Formed | baabdb1990fd49ab82a712e121f49c4f68b29459 | [
"Apache-2.0"
] | null | null | null | hash-table/Python/0242-valid-anagram-4.py | lemonnader/LeetCode-Solution-Well-Formed | baabdb1990fd49ab82a712e121f49c4f68b29459 | [
"Apache-2.0"
] | 1 | 2021-07-25T07:53:14.000Z | 2021-07-25T07:53:14.000Z | class Solution:
def isAnagram(self, s: str, t: str) -> bool:
return sorted(list(s)) == sorted(list(t))
if __name__ == '__main__':
s = 'a'
t = 'b'
l1 = ['a', 'b']
l2 = ['a', 'b']
print('两个列表相等,当且仅当对应元素全部相等:', l1 == l2)
solution = Solution()
result = solution.isAnagram(s, t)
... | 22.266667 | 49 | 0.532934 |
3cfd2b72b98c3c1f7d68f7117097609efc076b1c | 4,196 | py | Python | build/PureCloudPlatformClientV2/models/conversation_message_event_topic_uri_reference.py | cjohnson-ctl/platform-client-sdk-python | 38ce53bb8012b66e8a43cc8bd6ff00cf6cc99100 | [
"MIT"
] | 10 | 2019-02-22T00:27:08.000Z | 2021-09-12T23:23:44.000Z | libs/PureCloudPlatformClientV2/models/conversation_message_event_topic_uri_reference.py | rocketbot-cl/genesysCloud | dd9d9b5ebb90a82bab98c0d88b9585c22c91f333 | [
"MIT"
] | 5 | 2018-06-07T08:32:00.000Z | 2021-07-28T17:37:26.000Z | libs/PureCloudPlatformClientV2/models/conversation_message_event_topic_uri_reference.py | rocketbot-cl/genesysCloud | dd9d9b5ebb90a82bab98c0d88b9585c22c91f333 | [
"MIT"
] | 6 | 2020-04-09T17:43:07.000Z | 2022-02-17T08:48:05.000Z | # coding: utf-8
"""
Copyright 2016 SmartBear Software
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applica... | 26.726115 | 80 | 0.573165 |
b9e173d879786f4a2c88060671ed4ab5869396c8 | 3,961 | py | Python | monai/losses/focal_loss.py | murraycutforth/MONAI | ad06dff7f85711048690b2e85c99d51001612708 | [
"Apache-2.0"
] | null | null | null | monai/losses/focal_loss.py | murraycutforth/MONAI | ad06dff7f85711048690b2e85c99d51001612708 | [
"Apache-2.0"
] | null | null | null | monai/losses/focal_loss.py | murraycutforth/MONAI | ad06dff7f85711048690b2e85c99d51001612708 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 MONAI Consortium
# 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, s... | 40.010101 | 79 | 0.573845 |
4eb0e52b2a1dcd4e00fb8498a738036161611928 | 2,963 | py | Python | src/attestation/azext_attestation/vendored_sdks/azure_attestation/_attestation_client.py | Mannan2812/azure-cli-extensions | e2b34efe23795f6db9c59100534a40f0813c3d95 | [
"MIT"
] | 207 | 2017-11-29T06:59:41.000Z | 2022-03-31T10:00:53.000Z | src/attestation/azext_attestation/vendored_sdks/azure_attestation/_attestation_client.py | Mannan2812/azure-cli-extensions | e2b34efe23795f6db9c59100534a40f0813c3d95 | [
"MIT"
] | 4,061 | 2017-10-27T23:19:56.000Z | 2022-03-31T23:18:30.000Z | src/attestation/azext_attestation/vendored_sdks/azure_attestation/_attestation_client.py | Mannan2812/azure-cli-extensions | e2b34efe23795f6db9c59100534a40f0813c3d95 | [
"MIT"
] | 802 | 2017-10-11T17:36:26.000Z | 2022-03-31T22:24:32.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 ... | 45.584615 | 97 | 0.732028 |
b8955b9c56b6ce5430aa60c31da74ec7d5c65aa7 | 2,332 | py | Python | hjson/tests/test_bitsize_int_as_string.py | charbeljc/hjson-py | c2885f22465eb145f90f74e773345d2e1f326028 | [
"AFL-2.1"
] | 224 | 2020-01-02T10:46:37.000Z | 2022-03-02T13:54:08.000Z | venv/lib/python3.6/site-packages/hjson/tests/test_bitsize_int_as_string.py | mrsaicharan1/iiita-updates | a22a0157b90d29b946d0f020e5f76744f73a6bff | [
"Apache-2.0"
] | 20 | 2016-11-28T19:42:05.000Z | 2021-11-16T01:13:18.000Z | venv/lib/python3.6/site-packages/hjson/tests/test_bitsize_int_as_string.py | mrsaicharan1/iiita-updates | a22a0157b90d29b946d0f020e5f76744f73a6bff | [
"Apache-2.0"
] | 24 | 2020-03-24T13:53:50.000Z | 2022-03-22T11:55:18.000Z | from unittest import TestCase
import hjson as json
class TestBitSizeIntAsString(TestCase):
# Python 2.5, at least the one that ships on Mac OS X, calculates
# 2 ** 31 as 0! It manages to calculate 1 << 31 correctly.
values = [
(200, 200),
((1 << 31) - 1, (1 << 31) - 1),
((1 << 31)... | 31.513514 | 75 | 0.488851 |
a1c0f4986ec605cf287bd5a1b55d9871b3dd683e | 242 | py | Python | midterm3/s4108056005/restaurant/admin.py | AndyChiangSH/1102_Web-based-systems | 2ae1ff82190a060755e60ed442afda1cf28a21fb | [
"MIT"
] | null | null | null | midterm3/s4108056005/restaurant/admin.py | AndyChiangSH/1102_Web-based-systems | 2ae1ff82190a060755e60ed442afda1cf28a21fb | [
"MIT"
] | null | null | null | midterm3/s4108056005/restaurant/admin.py | AndyChiangSH/1102_Web-based-systems | 2ae1ff82190a060755e60ed442afda1cf28a21fb | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import Menu, MyUser
# Register your models here.
class MenuAdmin(admin.ModelAdmin):
list_display = ("name", "category", "price")
admin.site.register(Menu, MenuAdmin)
admin.site.register(MyUser) | 26.888889 | 45 | 0.772727 |
872a7c494448cd4845c2cc1266ec5e4a35346b04 | 4,237 | py | Python | main.py | crosstreet74/ftl-fmax-simul | 6d0c72502cc518fb74de77ed632926141e91a791 | [
"MIT"
] | null | null | null | main.py | crosstreet74/ftl-fmax-simul | 6d0c72502cc518fb74de77ed632926141e91a791 | [
"MIT"
] | null | null | null | main.py | crosstreet74/ftl-fmax-simul | 6d0c72502cc518fb74de77ed632926141e91a791 | [
"MIT"
] | null | null | null | import npyscreen
# SSD_SIZE = 1
# PACKAGE_SIZE = 1
# DIE_SIZE = 1
PLANE_SIZE = 20 # Blocks per Plane / Total Blocks
BLOCK_SIZE = 4 # Pages per Block
MAX_BLOCK_NUM = int(PLANE_SIZE / 2) # Maximun Block Number
TOTAL_PAGE = BLOCK_SIZE * PLANE_SIZE # Total Pages
MAX_PAGE_NUM = int(BLOCK_SIZE * PLANE_SIZE / 2) # Maxim... | 31.154412 | 87 | 0.570215 |
a4ed7141d9c7a44b9cbed2cdb11be3a780f507eb | 1,043 | py | Python | setup.py | DocOtak/argopy | 9dcd108e5ab166776121a98b0ddd2b1b5a082e77 | [
"Apache-2.0"
] | null | null | null | setup.py | DocOtak/argopy | 9dcd108e5ab166776121a98b0ddd2b1b5a082e77 | [
"Apache-2.0"
] | null | null | null | setup.py | DocOtak/argopy | 9dcd108e5ab166776121a98b0ddd2b1b5a082e77 | [
"Apache-2.0"
] | null | null | null | # -*coding: UTF-8 -*-
import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
with open('requirements.txt') as f:
requirements = f.read().splitlines()
setuptools.setup(
name='argopy',
version='0.1.6',
author="argopy Developers",
author_email="gmaze@ifremer.fr",
... | 31.606061 | 71 | 0.651007 |
66636b205822d905869c091c22fa8a61080bed2e | 159 | py | Python | _1327/asgi.py | julkw/1327 | 480521256670b9efc787528ab7cdaa4b3305f422 | [
"MIT"
] | null | null | null | _1327/asgi.py | julkw/1327 | 480521256670b9efc787528ab7cdaa4b3305f422 | [
"MIT"
] | null | null | null | _1327/asgi.py | julkw/1327 | 480521256670b9efc787528ab7cdaa4b3305f422 | [
"MIT"
] | null | null | null | import os
from channels.asgi import get_channel_layer
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "_1327.settings")
channel_layer = get_channel_layer()
| 19.875 | 65 | 0.823899 |
d56172948a4a503f3a8445acef307d95bb667f14 | 1,839 | py | Python | scripts/convert_docs_for_web.py | angjminer/retopoflow | dff40cb22a4bc7bab6d5f9635dbbac8e04807eba | [
"OML"
] | null | null | null | scripts/convert_docs_for_web.py | angjminer/retopoflow | dff40cb22a4bc7bab6d5f9635dbbac8e04807eba | [
"OML"
] | null | null | null | scripts/convert_docs_for_web.py | angjminer/retopoflow | dff40cb22a4bc7bab6d5f9635dbbac8e04807eba | [
"OML"
] | null | null | null | #!/usr/bin/python3
import os
import re
import sys
import codecs
re_keymap = re.compile(r'{{(?P<key>.*?)}}')
re_options = re.compile(r'{\[(?P<key>.*?)\]}')
re_table = re.compile(r'\|(?P<pre> +)(?P<dashes>--+)(?P<post> +)\|')
def read_file(filename):
try: return codecs.open(filename, encoding='utf-8').read()
e... | 24.851351 | 112 | 0.495922 |
7212e8f7b2238fdec06cca691ba82504437895e7 | 3,148 | py | Python | assignments/assignment2/model_solution.py | tbb/dlcourse_ai | d8a14d30f7174b449c9bb79f3b87d4822d4f0f4b | [
"MIT"
] | null | null | null | assignments/assignment2/model_solution.py | tbb/dlcourse_ai | d8a14d30f7174b449c9bb79f3b87d4822d4f0f4b | [
"MIT"
] | null | null | null | assignments/assignment2/model_solution.py | tbb/dlcourse_ai | d8a14d30f7174b449c9bb79f3b87d4822d4f0f4b | [
"MIT"
] | null | null | null | import numpy as np
from layers_solution import FullyConnectedLayer, ReLULayer, softmax_with_cross_entropy, l2_regularization, softmax
class TwoLayerNet:
""" Neural network with two fully connected layers """
def __init__(self, n_input, n_output, hidden_layer_size, reg):
"""
Initializes the n... | 32.453608 | 114 | 0.619123 |
a1238d138982c63e37697014b50b931925023817 | 1,460 | py | Python | Configuration/GenProduction/python/ThirteenTeV/GMSB_noSLHA/GMSB_L400TeV_Ctau1200cm_Pythia8_13TeV_cff.py | zhangzc11/cms-gmsb-sps8-configs | 838e6aac1d13251e050c0ee8c4ed26ca0c6cef7e | [
"Apache-2.0"
] | null | null | null | Configuration/GenProduction/python/ThirteenTeV/GMSB_noSLHA/GMSB_L400TeV_Ctau1200cm_Pythia8_13TeV_cff.py | zhangzc11/cms-gmsb-sps8-configs | 838e6aac1d13251e050c0ee8c4ed26ca0c6cef7e | [
"Apache-2.0"
] | null | null | null | Configuration/GenProduction/python/ThirteenTeV/GMSB_noSLHA/GMSB_L400TeV_Ctau1200cm_Pythia8_13TeV_cff.py | zhangzc11/cms-gmsb-sps8-configs | 838e6aac1d13251e050c0ee8c4ed26ca0c6cef7e | [
"Apache-2.0"
] | null | null | null | with open("/cvmfs/cms.cern.ch/phys_generator/gridpacks/slc6_amd64_gcc481/13TeV/madgraph/GMSB_SHLA/GMSB_Lambda400TeV_CTau1200cm.slha") as f:
SLHA_TABLE = f.read()
import FWCore.ParameterSet.Config as cms
from Configuration.Generator.Pythia8CommonSettings_cfi import *
from Configuration.Generator.MCTunes2017.PythiaCP... | 42.941176 | 139 | 0.632877 |
2d2cc30b5465a147c4e764decd392f787c921ab9 | 106 | py | Python | tests/__init__.py | latera/hyaml | 4dc020434d25c182f8477ddd5582398e51501274 | [
"Apache-2.0"
] | 3 | 2020-04-12T15:55:11.000Z | 2021-08-02T16:26:21.000Z | tests/__init__.py | latera/hyaml | 4dc020434d25c182f8477ddd5582398e51501274 | [
"Apache-2.0"
] | null | null | null | tests/__init__.py | latera/hyaml | 4dc020434d25c182f8477ddd5582398e51501274 | [
"Apache-2.0"
] | null | null | null | from tests.translation_case import TranslationCase
from tests.compiler_case import ExpressionCompilerCase
| 35.333333 | 54 | 0.90566 |
f825be5b259331ee680e11801f0a73eddbf0b192 | 846 | py | Python | Examples/Session05/test_random_unitest.py | Sharmila8/intropython2016 | a69aa6f6d0cd28c6a29d0b8adb9ef1ff9e2e8479 | [
"Unlicense"
] | null | null | null | Examples/Session05/test_random_unitest.py | Sharmila8/intropython2016 | a69aa6f6d0cd28c6a29d0b8adb9ef1ff9e2e8479 | [
"Unlicense"
] | null | null | null | Examples/Session05/test_random_unitest.py | Sharmila8/intropython2016 | a69aa6f6d0cd28c6a29d0b8adb9ef1ff9e2e8479 | [
"Unlicense"
] | null | null | null | import random
import unittest
class TestSequenceFunctions(unittest.TestCase):
def setUp(self):
self.seq = list(range(10))
def test_shuffle(self):
# make sure the shuffled sequence does not lose any elements
random.shuffle(self.seq)
self.seq.sort()
self.assertEqual(sel... | 27.290323 | 68 | 0.650118 |
a358319a3ae14ee7be11ce2815bdee84a5b9df44 | 384 | py | Python | el/commands/el_asset.py | deepakxyz/Edna | 825393c6ca88bb31d35cc4c369ea7042b9048fcb | [
"MIT"
] | 2 | 2021-08-31T23:23:11.000Z | 2022-03-07T03:18:01.000Z | el/commands/el_asset.py | deepakxyz/Elna | 825393c6ca88bb31d35cc4c369ea7042b9048fcb | [
"MIT"
] | null | null | null | el/commands/el_asset.py | deepakxyz/Elna | 825393c6ca88bb31d35cc4c369ea7042b9048fcb | [
"MIT"
] | null | null | null | import click
import os
from el.core.asset import Asset
from el.utils.el import el
@click.command()
@click.option('-l', '--list', is_flag=True)
@click.option('-t','--type', required=False)
@click.option('-a', '--asset', required=False)
def cli(list, type, asset):
if list:
Asset.asset_list()
elif ty... | 19.2 | 49 | 0.664063 |
f377e8d26c9102399d84e0be06a5529e10d3ce11 | 142 | py | Python | test.py | Snowbell92/funlearn | 3de8ec9cdd445fd3671ad2356b28e0c904b27b15 | [
"MIT"
] | null | null | null | test.py | Snowbell92/funlearn | 3de8ec9cdd445fd3671ad2356b28e0c904b27b15 | [
"MIT"
] | null | null | null | test.py | Snowbell92/funlearn | 3de8ec9cdd445fd3671ad2356b28e0c904b27b15 | [
"MIT"
] | null | null | null | import os
for file in os.listdir("ExpressionOutput"):
if file.endswith(".txt"):
print(file)
print(os.path.join("ExpressionOutput", file)) | 28.4 | 47 | 0.725352 |
f57f81b5c40fddf1e02de0d03c85a4f732553928 | 11,144 | py | Python | youwol/routers/environment/router.py | youwol/py-youwol | 85a8877e302c9da1aea168bf1d964d19036c1134 | [
"MIT"
] | null | null | null | youwol/routers/environment/router.py | youwol/py-youwol | 85a8877e302c9da1aea168bf1d964d19036c1134 | [
"MIT"
] | 1 | 2022-03-14T09:40:15.000Z | 2022-03-14T09:40:15.000Z | youwol/routers/environment/router.py | youwol/py-youwol | 85a8877e302c9da1aea168bf1d964d19036c1134 | [
"MIT"
] | null | null | null | import asyncio
import itertools
from typing import List, Optional, Dict, cast
from aiohttp.client_exceptions import ClientConnectorError, ContentTypeError
from fastapi import APIRouter, Depends, HTTPException
from pydantic import BaseModel
from starlette.requests import Request
from youwol.backends.treedb.models impo... | 37.904762 | 104 | 0.66556 |
2769d365cfddcec7b7b81ead840f65f2126a5f5a | 8,516 | py | Python | python/src/scheduled_task_examples.py | ChristinaSmith123/automation-center-sdk-samples | 223399f5b123084e4fd78c5a0895ecebb336b767 | [
"Apache-2.0"
] | null | null | null | python/src/scheduled_task_examples.py | ChristinaSmith123/automation-center-sdk-samples | 223399f5b123084e4fd78c5a0895ecebb336b767 | [
"Apache-2.0"
] | null | null | null | python/src/scheduled_task_examples.py | ChristinaSmith123/automation-center-sdk-samples | 223399f5b123084e4fd78c5a0895ecebb336b767 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Trend Micro.
#
# 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,... | 41.339806 | 115 | 0.74272 |
8eec756163843e6f0b008ce810a025d53c98131a | 7,018 | py | Python | bin/gff_to_bigwig_pe_v3.py | johanzi/jbplugin-methylation | 1ab88760983c1591b6f705a98c5d43c8af239504 | [
"Apache-2.0"
] | 13 | 2016-03-31T18:23:09.000Z | 2021-07-21T06:09:12.000Z | bin/gff_to_bigwig_pe_v3.py | johanzi/jbplugin-methylation | 1ab88760983c1591b6f705a98c5d43c8af239504 | [
"Apache-2.0"
] | 10 | 2016-01-28T20:42:57.000Z | 2020-02-28T10:25:52.000Z | bin/gff_to_bigwig_pe_v3.py | johanzi/jbplugin-methylation | 1ab88760983c1591b6f705a98c5d43c8af239504 | [
"Apache-2.0"
] | 3 | 2017-06-16T22:26:25.000Z | 2020-10-16T08:40:36.000Z | import sys, math, glob, multiprocessing, subprocess, os, bisect, random
# Usage: python gff_to_bigwig_pe_v3.py [-q] [-h] [-keep] [-sort] [-o=out_ids]
# [-p=num_proc] [-s=gff_search_term] <chrm_sizes> <gff_fille> [gff_file]*
NUMPROC = 1
SEARCHTERM='frac'
def processInputs( gffFileAr, chrmFileStr, keepTmp, outIdAr, se... | 30.120172 | 182 | 0.659305 |
ff5eb62c301a74a741f69c905f9dba002f8efb05 | 3,751 | py | Python | Source/Editor.py | DenisOstr/BrainBoom | 0782432728c400dc3537d333917c610e712fa1c5 | [
"MIT"
] | null | null | null | Source/Editor.py | DenisOstr/BrainBoom | 0782432728c400dc3537d333917c610e712fa1c5 | [
"MIT"
] | null | null | null | Source/Editor.py | DenisOstr/BrainBoom | 0782432728c400dc3537d333917c610e712fa1c5 | [
"MIT"
] | 2 | 2019-10-17T19:18:03.000Z | 2019-10-20T17:08:36.000Z | from core import *
#TODO: Ability to add level information (Description, picture, answer)
#TODO: Add information about level to file (level count, author)
#TODO: When the editor is open, the following information will be displayed (You logged in as Username, level count, number of level)
#TODO /SUCCESS /D: Menu of edi... | 29.535433 | 133 | 0.534524 |
34a2c0114f9bf4a1e846b765271b6fe5d4863292 | 14,969 | py | Python | nextalbums/create_sql_statements.py | seanbreckenridge/albums_old | 04ca2aa1e8b669ba4cd2579428d0ebd711737703 | [
"MIT"
] | 4 | 2020-07-09T21:40:58.000Z | 2021-04-23T01:08:08.000Z | nextalbums/create_sql_statements.py | seanbreckenridge/albums_old | 04ca2aa1e8b669ba4cd2579428d0ebd711737703 | [
"MIT"
] | 6 | 2019-01-24T18:20:12.000Z | 2022-02-10T06:09:05.000Z | nextalbums/create_sql_statements.py | seanbreckenridge/albums_old | 04ca2aa1e8b669ba4cd2579428d0ebd711737703 | [
"MIT"
] | null | null | null | import sys
import re
import os
import time
from typing import List, Dict, Any, Optional, NamedTuple
import yaml
import click
import discogs_client # type: ignore[import]
import xlrd # type: ignore[import]
from . import SETTINGS
from .common import split_comma_separated, eprint, filter_personal_reasons
def sql_da... | 36.509756 | 133 | 0.578729 |
33709b784d375c648c254961503aa151a4218406 | 12,391 | py | Python | async_sched/schedule.py | justengel/async_sched | f980722d51d15025522b2265426b0188ff368418 | [
"MIT"
] | 1 | 2020-10-19T13:36:20.000Z | 2020-10-19T13:36:20.000Z | async_sched/schedule.py | justengel/async_sched | f980722d51d15025522b2265426b0188ff368418 | [
"MIT"
] | null | null | null | async_sched/schedule.py | justengel/async_sched | f980722d51d15025522b2265426b0188ff368418 | [
"MIT"
] | null | null | null | import time
import inspect
import asyncio
import datetime
import logging
from typing import Union, Callable, Awaitable, Tuple, Optional, ClassVar
from serial_json import DataClass, field, field_property, MISSING, \
Weekdays, weekdays_property, weekdays_attr_property, \
datetime_property, time_property, timedel... | 41.166113 | 124 | 0.629408 |
9a06f41618cc6e8cd55c572196a77e38696481c3 | 36,142 | py | Python | google/cloud/aiplatform/v1/aiplatform-v1-py/google/cloud/aiplatform_v1/services/index_service/client.py | googleapis/googleapis-gen | d84824c78563d59b0e58d5664bfaa430e9ad7e7a | [
"Apache-2.0"
] | 7 | 2021-02-21T10:39:41.000Z | 2021-12-07T07:31:28.000Z | google/cloud/aiplatform/v1/aiplatform-v1-py/google/cloud/aiplatform_v1/services/index_service/client.py | googleapis/googleapis-gen | d84824c78563d59b0e58d5664bfaa430e9ad7e7a | [
"Apache-2.0"
] | 6 | 2021-02-02T23:46:11.000Z | 2021-11-15T01:46:02.000Z | google/cloud/aiplatform/v1/aiplatform-v1-py/google/cloud/aiplatform_v1/services/index_service/client.py | googleapis/googleapis-gen | d84824c78563d59b0e58d5664bfaa430e9ad7e7a | [
"Apache-2.0"
] | 4 | 2021-01-28T23:25:45.000Z | 2021-08-30T01:55:16.000Z | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 42.92399 | 180 | 0.621327 |
9e54cad9d3f9eab56accf028a23fb3c5780c5f6d | 517 | py | Python | kubernetes_typed/client/models/v1beta1_certificate_signing_request_list.py | sobolevn/kubernetes-typed | 5f0a770631c73a9831fbeaeebac188e8f4a52c54 | [
"Apache-2.0"
] | 22 | 2020-12-10T13:06:02.000Z | 2022-02-13T21:58:15.000Z | kubernetes_typed/client/models/v1beta1_certificate_signing_request_list.py | sobolevn/kubernetes-typed | 5f0a770631c73a9831fbeaeebac188e8f4a52c54 | [
"Apache-2.0"
] | 4 | 2021-03-08T07:06:12.000Z | 2022-03-29T23:41:45.000Z | kubernetes_typed/client/models/v1beta1_certificate_signing_request_list.py | sobolevn/kubernetes-typed | 5f0a770631c73a9831fbeaeebac188e8f4a52c54 | [
"Apache-2.0"
] | 2 | 2021-09-05T19:18:28.000Z | 2022-03-14T02:56:17.000Z | # Code generated by `typeddictgen`. DO NOT EDIT.
"""V1beta1CertificateSigningRequestListDict generated type."""
from typing import TypedDict, List
from kubernetes_typed.client import V1ListMetaDict, V1beta1CertificateSigningRequestDict
V1beta1CertificateSigningRequestListDict = TypedDict(
"V1beta1CertificateSigni... | 30.411765 | 88 | 0.746615 |
d3ef48aca2aaaed2ee19bb103d396955b0a290f7 | 18,768 | py | Python | pytest_splunk_addon/standard_lib/cim_tests/test_templates.py | monishshah18/pytest-splunk-addon | 1600f2c7d30ec304e9855642e63511780556b406 | [
"Apache-2.0"
] | null | null | null | pytest_splunk_addon/standard_lib/cim_tests/test_templates.py | monishshah18/pytest-splunk-addon | 1600f2c7d30ec304e9855642e63511780556b406 | [
"Apache-2.0"
] | null | null | null | pytest_splunk_addon/standard_lib/cim_tests/test_templates.py | monishshah18/pytest-splunk-addon | 1600f2c7d30ec304e9855642e63511780556b406 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Includes the test scenarios to check the CIM compatibility of an Add-on.
"""
import logging
import pytest
from .field_test_helper import FieldTestHelper
class CIMTestTemplates(object):
"""
Test scenarios to check the CIM compatibility of an Add-on
Supported Test scenarios:
... | 40.36129 | 165 | 0.521792 |
9669f03ee2064dada5bfcb9c1dff8a4126352176 | 1,213 | py | Python | wildlifecompliance/templatetags/users.py | sharpeez/ledger | 0ea05669f488336a63e2bdd6390725d00d619e9a | [
"Apache-2.0"
] | null | null | null | wildlifecompliance/templatetags/users.py | sharpeez/ledger | 0ea05669f488336a63e2bdd6390725d00d619e9a | [
"Apache-2.0"
] | 11 | 2019-03-19T02:03:11.000Z | 2019-05-31T07:20:59.000Z | wildlifecompliance/templatetags/users.py | sharpeez/ledger | 0ea05669f488336a63e2bdd6390725d00d619e9a | [
"Apache-2.0"
] | null | null | null | from django.template import Library
from wildlifecompliance import helpers as wildlifecompliance_helpers
register = Library()
@register.simple_tag(takes_context=True)
def is_customer(context):
request = context['request']
return wildlifecompliance_helpers.is_customer(request)
@register.simple_tag(takes_cont... | 35.676471 | 133 | 0.794724 |
551b21d93028c513bf49ecd69d63fa4a352ac881 | 10,431 | py | Python | modality/sysml14/activities/activities.py | bmjjr/modality | 700c608b4e8150f1413ba022938ab6a8f1f148c1 | [
"MIT"
] | 1 | 2019-01-09T07:09:36.000Z | 2019-01-09T07:09:36.000Z | modality/sysml14/activities/activities.py | bmjjr/modality | 700c608b4e8150f1413ba022938ab6a8f1f148c1 | [
"MIT"
] | null | null | null | modality/sysml14/activities/activities.py | bmjjr/modality | 700c608b4e8150f1413ba022938ab6a8f1f148c1 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Definition of meta model 'activities'."""
from functools import partial
import pyecore.ecore as Ecore
from pyecore.ecore import *
from . import activities_mixins as _user_module
name = "activities"
nsURI = "http://www.eclipse.org/papyrus/sysml/1.4/SysML/Activities"
nsPrefix = "Activities"
... | 38.069343 | 88 | 0.693893 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.