hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 239 | max_forks_repo_name stringlengths 5 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
794140981b4b53fb9fa8f39ffcf08faa359aa893 | 516 | py | Python | riboraptor/snakemake/wrappers/uniq_mapping_wrapper.py | saketkc/riboraptor | cc17e82b11da743e88ec9b4126a8909705e83c4b | [
"BSD-3-Clause"
] | 10 | 2018-04-23T03:50:32.000Z | 2021-10-08T00:44:09.000Z | riboraptor/snakemake/wrappers/uniq_mapping_wrapper.py | saketkc/riboraptor | cc17e82b11da743e88ec9b4126a8909705e83c4b | [
"BSD-3-Clause"
] | 5 | 2018-05-28T06:37:00.000Z | 2021-03-13T15:45:25.000Z | riboraptor/snakemake/wrappers/uniq_mapping_wrapper.py | saketkc/riboraptor | cc17e82b11da743e88ec9b4126a8909705e83c4b | [
"BSD-3-Clause"
] | 3 | 2018-04-27T22:28:21.000Z | 2022-01-29T18:28:41.000Z | import tempfile
from snakemake.shell import shell
with tempfile.TemporaryDirectory(dir=snakemake.params.tmp_dir) as temp_dir:
shell(
r"""samtools view -b -q 255 \
{snakemake.input} -o {snakemake.output}.temp \
&& samtools sort -@ {snakemake.threads} \
{snakemake.output}.temp -... | 34.4 | 75 | 0.614341 |
794141a49c4075075062bc83e5bf0a2ecffa2747 | 38,753 | py | Python | skbuild/setuptools_wrap.py | abravalheri/scikit-build | e02c9b391d54dedd7cf1a5c4177bc15436ab4a28 | [
"MIT"
] | null | null | null | skbuild/setuptools_wrap.py | abravalheri/scikit-build | e02c9b391d54dedd7cf1a5c4177bc15436ab4a28 | [
"MIT"
] | null | null | null | skbuild/setuptools_wrap.py | abravalheri/scikit-build | e02c9b391d54dedd7cf1a5c4177bc15436ab4a28 | [
"MIT"
] | null | null | null | """This module provides functionality for wrapping key infrastructure components
from distutils and setuptools.
"""
from __future__ import print_function
import argparse
import copy
import json
import os
import os.path
import platform
import stat
import sys
import warnings
from contextlib import contextmanager
# pyl... | 38.521869 | 124 | 0.655949 |
794141e9fea50d267c030e401fcf94d7135ebe0d | 3,004 | py | Python | money.py | Dannyaffleck/stock | 9c6c62b798e4e3306a7bf4a185a0b4fca37cdd33 | [
"Apache-2.0"
] | null | null | null | money.py | Dannyaffleck/stock | 9c6c62b798e4e3306a7bf4a185a0b4fca37cdd33 | [
"Apache-2.0"
] | null | null | null | money.py | Dannyaffleck/stock | 9c6c62b798e4e3306a7bf4a185a0b4fca37cdd33 | [
"Apache-2.0"
] | 1 | 2020-07-08T19:59:38.000Z | 2020-07-08T19:59:38.000Z | import math
from scipy import stats
import numpy as np
listy=[1.58,1.57,1.54,1.51,1.51,1.51,1.5099,1.5,1.48,1.44,1.44,1.43,1.44,1.46,1.46,1.46,1.46,1.46,1.46,1.46,1.46,1.46,1.455,1.445,1.44,1.44,1.43,1.46,1.46,1.46,1.45,1.45,1.45,1.45,1.45,1.45,1.45,1.45,1.45,1.45,1.45,1.45,1.45,1.45,1.45,1.45,1.45,1.45,1.44,1.44,1.44,... | 61.306122 | 1,947 | 0.614181 |
794142836652ce39830eb0247e3e51ba9ee4e104 | 2,557 | py | Python | doc/source/reference/random/performance.py | iam-abbas/numpy | 2fb5e969fded3cd468f2ca01d5b954c953545dd9 | [
"BSD-3-Clause"
] | 20,453 | 2015-01-02T09:00:47.000Z | 2022-03-31T23:35:56.000Z | doc/source/reference/random/performance.py | iam-abbas/numpy | 2fb5e969fded3cd468f2ca01d5b954c953545dd9 | [
"BSD-3-Clause"
] | 14,862 | 2015-01-01T01:28:34.000Z | 2022-03-31T23:48:52.000Z | doc/source/reference/random/performance.py | iam-abbas/numpy | 2fb5e969fded3cd468f2ca01d5b954c953545dd9 | [
"BSD-3-Clause"
] | 9,362 | 2015-01-01T15:49:43.000Z | 2022-03-31T21:26:51.000Z | from timeit import repeat
import pandas as pd
import numpy as np
from numpy.random import MT19937, PCG64, PCG64DXSM, Philox, SFC64
PRNGS = [MT19937, PCG64, PCG64DXSM, Philox, SFC64]
funcs = {}
integers = 'integers(0, 2**{bits},size=1000000, dtype="uint{bits}")'
funcs['32-bit Unsigned Ints'] = integers.format(bits=3... | 29.390805 | 90 | 0.663277 |
794142d46c5bb29cfd5258b33769bbcda530f78d | 5,419 | py | Python | qiskit/providers/builtinsimulators/statevector_simulator.py | ismaila-at-za-ibm/qiskit-terra | 08303ec98ac7b33fde55266dc3a74466fbdcae95 | [
"Apache-2.0"
] | 1 | 2020-09-03T12:28:44.000Z | 2020-09-03T12:28:44.000Z | qiskit/providers/builtinsimulators/statevector_simulator.py | ismaila-at-za-ibm/qiskit-terra | 08303ec98ac7b33fde55266dc3a74466fbdcae95 | [
"Apache-2.0"
] | null | null | null | qiskit/providers/builtinsimulators/statevector_simulator.py | ismaila-at-za-ibm/qiskit-terra | 08303ec98ac7b33fde55266dc3a74466fbdcae95 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2017, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# pylint: disable=invalid-name
# pylint: disable=arguments-differ
"""Contains a (slow) python statevector simulator.
It sim... | 35.887417 | 100 | 0.556745 |
7941443e530fa56a6f98d1d552a1199973f0d62d | 1,108 | py | Python | kubernetes/test/test_v1alpha1_policy_rule.py | amanagarwal33/python | e31693557f75950805fb4dc5af4cb7434a470e26 | [
"Apache-2.0"
] | null | null | null | kubernetes/test/test_v1alpha1_policy_rule.py | amanagarwal33/python | e31693557f75950805fb4dc5af4cb7434a470e26 | [
"Apache-2.0"
] | null | null | null | kubernetes/test/test_v1alpha1_policy_rule.py | amanagarwal33/python | e31693557f75950805fb4dc5af4cb7434a470e26 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Kubernetes
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
<<<<<<< HEAD
OpenAPI spec version: v1.15.6
Generated by: https://openapi-generator.tech
=======
OpenAPI spec version: v1.5.3
Generated b... | 24.086957 | 124 | 0.705776 |
79414746c5cda8018cfd20a9e19b525b782170aa | 41,797 | py | Python | supervised/tuner/mljar_tuner.py | brianWeng0223/mljar-supervised | d7c6a969792c6efbff264c8743a645b098e24dd2 | [
"MIT"
] | null | null | null | supervised/tuner/mljar_tuner.py | brianWeng0223/mljar-supervised | d7c6a969792c6efbff264c8743a645b098e24dd2 | [
"MIT"
] | null | null | null | supervised/tuner/mljar_tuner.py | brianWeng0223/mljar-supervised | d7c6a969792c6efbff264c8743a645b098e24dd2 | [
"MIT"
] | null | null | null | import os
import copy
import json
import numpy as np
import pandas as pd
from sklearn.preprocessing import OneHotEncoder
from supervised.tuner.random_parameters import RandomParameters
from supervised.algorithms.registry import AlgorithmsRegistry
from supervised.preprocessing.preprocessing_categorical import Preproce... | 38.310724 | 137 | 0.566548 |
794148f576b9e215c3c6963e73dffe98204b7717 | 1,258 | py | Python | configs/_base_/models/ccnet_r50-d8.py | weiyx16/mmsegmentation | 6d35d76195f173fbc6b119a7d7815e67d78024c6 | [
"Apache-2.0"
] | 903 | 2021-06-13T04:45:03.000Z | 2022-03-31T13:21:50.000Z | configs/_base_/models/ccnet_r50-d8.py | weiyx16/mmsegmentation | 6d35d76195f173fbc6b119a7d7815e67d78024c6 | [
"Apache-2.0"
] | 72 | 2021-06-13T13:01:49.000Z | 2022-03-30T09:19:34.000Z | configs/_base_/models/ccnet_r50-d8.py | weiyx16/mmsegmentation | 6d35d76195f173fbc6b119a7d7815e67d78024c6 | [
"Apache-2.0"
] | 159 | 2021-04-13T01:23:15.000Z | 2022-03-31T18:56:09.000Z | # model settings
norm_cfg = dict(type='SyncBN', requires_grad=True)
model = dict(
type='EncoderDecoder',
pretrained='open-mmlab://resnet50_v1c',
backbone=dict(
type='ResNetV1c',
depth=50,
num_stages=4,
out_indices=(0, 1, 2, 3),
dilations=(1, 1, 2, 4),
strides=... | 27.955556 | 74 | 0.583466 |
794148f716c4bab5f1ad55cd869525233a9a0d14 | 2,571 | py | Python | Prova-b1 (1700414).py | ithammar/prova-b1 | b30e5a0a74d2440ed8426ab2e40b0795c3348255 | [
"Apache-2.0"
] | null | null | null | Prova-b1 (1700414).py | ithammar/prova-b1 | b30e5a0a74d2440ed8426ab2e40b0795c3348255 | [
"Apache-2.0"
] | null | null | null | Prova-b1 (1700414).py | ithammar/prova-b1 | b30e5a0a74d2440ed8426ab2e40b0795c3348255 | [
"Apache-2.0"
] | null | null | null | ip = ['192.168.1.0'
,'0.168.1.31'
,'192.168.1.32'
,'192.168.1.63'
,'-123.168.1.64'
,'-192.168.1.95'
,'192.168.1.127'
,'192.168.1.159'
,'192.168.1.192'
,'192.168.1.223'
,'008.168.1.255'
,'192.168.1.1'
,'192.168.1.33'
,'192.168.1.65'
,'192.168.1.97'
... | 16.914474 | 31 | 0.434461 |
79414a87b94aa3dd9554ef49c289928d6a01cf94 | 827 | py | Python | lab1/src/generators/optimization_task_generator.py | pavponn/optimization-methods | 00db08c1b28a1ffad781fb918869247a4f2ab329 | [
"MIT"
] | null | null | null | lab1/src/generators/optimization_task_generator.py | pavponn/optimization-methods | 00db08c1b28a1ffad781fb918869247a4f2ab329 | [
"MIT"
] | null | null | null | lab1/src/generators/optimization_task_generator.py | pavponn/optimization-methods | 00db08c1b28a1ffad781fb918869247a4f2ab329 | [
"MIT"
] | null | null | null | import numpy as np
from functools import partial
from lab1.src.generators.quadratic_form_generator import generate_matrix_with_condition_number
def generate_function_by_quadratic_matrix(m):
def foo(x):
return sum(m[i][j] * x[i] * x[j] for i in range(len(m)) for j in range(len(m)))
return foo
def g... | 28.517241 | 94 | 0.709794 |
79414b40b2160d6b8e22e510bd52a09a4873a083 | 1,564 | py | Python | samples/aws_lambda/aws_lambda_oauth.py | misscoded/bolt-python | ed26ea039c37cbd00551e25deac0fb1871c03aed | [
"MIT"
] | 1 | 2020-11-11T19:19:20.000Z | 2020-11-11T19:19:20.000Z | samples/aws_lambda/aws_lambda_oauth.py | misscoded/bolt-python | ed26ea039c37cbd00551e25deac0fb1871c03aed | [
"MIT"
] | null | null | null | samples/aws_lambda/aws_lambda_oauth.py | misscoded/bolt-python | ed26ea039c37cbd00551e25deac0fb1871c03aed | [
"MIT"
] | null | null | null | # ------------------------------------------------
# instead of slack_bolt in requirements.txt
import sys
sys.path.insert(1, "vendor")
# ------------------------------------------------
import logging
from slack_bolt import App
from slack_bolt.adapter.aws_lambda import SlackRequestHandler
from slack_bolt.adapter.aws... | 29.509434 | 96 | 0.7289 |
79414c4e59a44c50aec463ae1d835c67925ad598 | 17,546 | py | Python | dvc/repo/__init__.py | shizacat/dvc | 11e56dbdf921c6eacf603bcdcc2e7a46ac7a3b88 | [
"Apache-2.0"
] | null | null | null | dvc/repo/__init__.py | shizacat/dvc | 11e56dbdf921c6eacf603bcdcc2e7a46ac7a3b88 | [
"Apache-2.0"
] | null | null | null | dvc/repo/__init__.py | shizacat/dvc | 11e56dbdf921c6eacf603bcdcc2e7a46ac7a3b88 | [
"Apache-2.0"
] | null | null | null | import os
from contextlib import contextmanager
from functools import wraps
from dvc.ignore import CleanTree
from dvc.compat import fspath_py35
from funcy import cached_property, cat, first
from dvc.config import Config
from dvc.exceptions import (
FileMissingError,
IsADirectoryError,
NotDvcRepoError,
... | 33.043315 | 79 | 0.588567 |
79414c9971f15f961f615dee33bc4718f3428a07 | 1,997 | py | Python | core_dev/_tkinter/configs.py | alexzanderr/_core-dev | 831f69dad524e450c4243b1dd88f26de80e1d444 | [
"MIT"
] | null | null | null | core_dev/_tkinter/configs.py | alexzanderr/_core-dev | 831f69dad524e450c4243b1dd88f26de80e1d444 | [
"MIT"
] | null | null | null | core_dev/_tkinter/configs.py | alexzanderr/_core-dev | 831f69dad524e450c4243b1dd88f26de80e1d444 | [
"MIT"
] | null | null | null |
"""
core/gui/configs.py
configurations 4 tkinter objects
helpful in dev of guis
author: @alexzander
"""
# python
from tkinter import *
# consolas
consolas_10_bold = ('Consolas', 10, 'bold')
consolas_20_bold = ('Consolas', 20, 'bold')
consolas_30_bold = ('Consolas', 30, 'bold')
... | 23.494118 | 70 | 0.656485 |
79414ca844b67bc8e27acaa1ab67c650bcc07143 | 2,209 | py | Python | CPD.py | roosevelt/bayes | e85ef972620124e40c8198dbb979af96a4417568 | [
"MIT"
] | null | null | null | CPD.py | roosevelt/bayes | e85ef972620124e40c8198dbb979af96a4417568 | [
"MIT"
] | null | null | null | CPD.py | roosevelt/bayes | e85ef972620124e40c8198dbb979af96a4417568 | [
"MIT"
] | null | null | null | # A conditional probability distribution table to be associated to a node
from Table import Table
class CPD():
# variables is a list of variables of type Variable
# parameters is a list of
def __init__(self, variable, condition_variables=[]):
if len(condition_variables)>0:
condition_va... | 42.480769 | 164 | 0.629697 |
79414d533a95079ded3138fcace04a738721313e | 28,451 | py | Python | retro_star/packages/rdchiral/rdchiral/backup/main.py | wangxr0526/retro_star | 4ac696278e565a46a9839a0aef65526fe0a705b5 | [
"MIT"
] | 65 | 2020-06-27T04:28:21.000Z | 2022-03-30T11:18:22.000Z | retro_star/packages/rdchiral/rdchiral/backup/main.py | gmh14/data_efficient_grammar | 7a25cecddc9510deeac7fd816715fd7b69103d85 | [
"MIT"
] | 15 | 2020-07-07T13:17:05.000Z | 2022-03-22T12:52:29.000Z | retro_star/packages/rdchiral/rdchiral/backup/main.py | wangxr0526/retro_star | 4ac696278e565a46a9839a0aef65526fe0a705b5 | [
"MIT"
] | 14 | 2020-06-30T09:22:13.000Z | 2022-03-30T11:18:28.000Z | from __future__ import print_function
import sys
import os
import re
import copy
import rdkit.Chem as Chem
import rdkit.Chem.AllChem as AllChem
from rdkit.Chem.rdchem import ChiralType, BondType, BondDir
from rdchiral.utils import vprint, PLEVEL, atoms_are_different
from rdchiral.initialization import rdchiralReacti... | 53.88447 | 332 | 0.570876 |
79414e44f59b0a269e7d908655dfd6f531b1f763 | 43,860 | py | Python | pystarboundmap/data.py | apocalyptech/pystarboundmap | 2f96cd88c67a1896c85ea20fbeb9b7027c05dacc | [
"BSD-3-Clause"
] | 6 | 2019-01-21T15:54:37.000Z | 2021-03-01T04:28:23.000Z | pystarboundmap/data.py | apocalyptech/pystarboundmap | 2f96cd88c67a1896c85ea20fbeb9b7027c05dacc | [
"BSD-3-Clause"
] | 4 | 2019-04-09T01:05:37.000Z | 2021-06-24T23:29:42.000Z | pystarboundmap/data.py | apocalyptech/pystarboundmap | 2f96cd88c67a1896c85ea20fbeb9b7027c05dacc | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
# vim: set expandtab tabstop=4 shiftwidth=4:
#
# Python Starbound Mapper (pystarboundmap)
# Copyright (C) 2018 CJ Kucera
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions o... | 41.494797 | 131 | 0.549293 |
79414ebd68dd088d446ed8c2e069ffb1ac55e433 | 1,078 | py | Python | tests/models/convert_deeplab.py | juanCastrillo/gluon2pytorch | dc73055f0c74dbc45a70f21057fa161123826d86 | [
"MIT"
] | 73 | 2018-11-01T03:07:11.000Z | 2021-03-03T01:48:58.000Z | tests/models/convert_deeplab.py | juanCastrillo/gluon2pytorch | dc73055f0c74dbc45a70f21057fa161123826d86 | [
"MIT"
] | 5 | 2018-11-02T06:45:33.000Z | 2019-09-24T06:54:59.000Z | tests/models/convert_deeplab.py | juanCastrillo/gluon2pytorch | dc73055f0c74dbc45a70f21057fa161123826d86 | [
"MIT"
] | 5 | 2019-01-29T00:03:24.000Z | 2021-01-12T14:18:59.000Z | import torch
import mxnet as mx
import numpy as np
import gluoncv
from gluon2pytorch import gluon2pytorch
def check_error(gluon_output, pytorch_output, epsilon=1e-4):
if not isinstance(pytorch_output, tuple):
pytorch_output = [pytorch_output]
gluon_output = [gluon_output]
for p, g in zip(pyto... | 27.641026 | 112 | 0.688312 |
79414edadfcaf8acac04abcaa8d6abc98fef06ee | 1,827 | py | Python | methods/crout.py | eechava6/NumericalAnalysis | 1b44349fe4c5e24413c3d5faeca7d227272814ec | [
"MIT"
] | null | null | null | methods/crout.py | eechava6/NumericalAnalysis | 1b44349fe4c5e24413c3d5faeca7d227272814ec | [
"MIT"
] | null | null | null | methods/crout.py | eechava6/NumericalAnalysis | 1b44349fe4c5e24413c3d5faeca7d227272814ec | [
"MIT"
] | null | null | null | import ast
import json
import numpy as np
from methods.utils import progressiveSustitution, regresiveSustitutions, isSquared
def crout(A,b):
A = ast.literal_eval(A)
b = ast.literal_eval(b)
A = np.array(A).astype(float)
b = np.array(b).astype(float)
pivots = []
res = {}
A = n... | 26.478261 | 97 | 0.517241 |
79414fca6d0fe84b4d185e39963d8601049c65a2 | 1,176 | py | Python | satchless/payment/migrations/0001_initial.py | styleseat/satchless | 884d0256c6af9b1de596d3875ee12dc02ecfaf8a | [
"BSD-4-Clause"
] | 1 | 2017-11-26T18:53:40.000Z | 2017-11-26T18:53:40.000Z | satchless/payment/migrations/0001_initial.py | styleseat/satchless | 884d0256c6af9b1de596d3875ee12dc02ecfaf8a | [
"BSD-4-Clause"
] | 13 | 2015-01-22T23:47:52.000Z | 2022-01-13T20:22:34.000Z | satchless/payment/migrations/0001_initial.py | styleseat/satchless | 884d0256c6af9b1de596d3875ee12dc02ecfaf8a | [
"BSD-4-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from __future__ import absolute_import
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('order', '__first__'),
]
operations = [
migrations.CreateModel(
name='Paym... | 36.75 | 114 | 0.597789 |
794150c90dc32247a1c99ca8125acec906964a86 | 489 | py | Python | test/sample.py | vibhatha/PythonMPI | e01bb0d4a53059c2bd77f74494db6d2d29844aea | [
"Apache-2.0"
] | null | null | null | test/sample.py | vibhatha/PythonMPI | e01bb0d4a53059c2bd77f74494db6d2d29844aea | [
"Apache-2.0"
] | null | null | null | test/sample.py | vibhatha/PythonMPI | e01bb0d4a53059c2bd77f74494db6d2d29844aea | [
"Apache-2.0"
] | null | null | null | from mpi4py import MPI
class Initial:
comm = []
rank = 0
def __init__(self):
comm = MPI.COMM_WORLD
rank = comm.Get_rank()
if rank == 0:
data = {'a': 7, 'b': 3.14}
comm.isend(data, dest=1, tag=11)
print("Sending : " + str(data) + ": Rank " + str... | 22.227273 | 69 | 0.480573 |
7941518cf181e7c3d5b3a0ec477f26ee70fc8fd0 | 3,943 | py | Python | code/pretty_print.py | RahulSChand/Multi-Granularity-Hierarchical-Attention-Fusion-Networks-for-Question-Answering---TensorFlow | 0febc6e982026248be3759753b8be404311b5673 | [
"Apache-2.0"
] | 8 | 2019-05-03T15:33:28.000Z | 2021-12-27T17:31:30.000Z | code/pretty_print.py | xuwd11/QANet | 209915452cb924f73ae451f50b366a291dafaf63 | [
"MIT"
] | null | null | null | code/pretty_print.py | xuwd11/QANet | 209915452cb924f73ae451f50b366a291dafaf63 | [
"MIT"
] | 3 | 2019-05-29T07:39:15.000Z | 2022-02-28T14:20:13.000Z | # Copyright 2018 Stanford University
#
# 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... | 39.43 | 242 | 0.699721 |
7941525edbc411712852dc8e10229f9d1a9b098f | 7,946 | py | Python | inference.py | NeerajAI/PICK-pytorch | 61deb7c1e11df30c8f03726c061a2866234ac770 | [
"MIT"
] | null | null | null | inference.py | NeerajAI/PICK-pytorch | 61deb7c1e11df30c8f03726c061a2866234ac770 | [
"MIT"
] | null | null | null | inference.py | NeerajAI/PICK-pytorch | 61deb7c1e11df30c8f03726c061a2866234ac770 | [
"MIT"
] | null | null | null | import os
import os
print(os.getcwd())
# os.path.dirname(os.path.abspath("__file__"))
path = '/Volumes/Extreme SSD/MLWork/DocAI/PICK-pytorch'
os.chdir(path)
# os.chdir('../')
# path = '/Users/neerajyadav/Documents/pycv/PICK-pytorch/'
"""Convert files of a selected directory in jpg format"""
import converter
# !pip ins... | 38.386473 | 322 | 0.654669 |
7941528580afb67fafdad4a8aea90e41a7f98e63 | 1,563 | py | Python | examples/example.py | harlev/jsonbox-python | 09ce4334b7167084cc814080995178c737016ef1 | [
"MIT"
] | 13 | 2019-09-17T01:13:52.000Z | 2020-08-03T13:07:38.000Z | examples/example.py | harlev/jsonbox-python | 09ce4334b7167084cc814080995178c737016ef1 | [
"MIT"
] | null | null | null | examples/example.py | harlev/jsonbox-python | 09ce4334b7167084cc814080995178c737016ef1 | [
"MIT"
] | 2 | 2019-09-19T15:20:34.000Z | 2020-04-27T11:40:43.000Z | from jsonbox import JsonBox
# generate unique box id
MY_BOX_ID = JsonBox.get_new_box_id()
# create instance
jb = JsonBox()
data = [{"name": "first", "age": 25}, {"name": "second", "age": 19}]
# write data
result = jb.write(data, MY_BOX_ID)
# get record id of written data
record_ids = jb.get_record_id(result)
# re... | 24.046154 | 77 | 0.733845 |
794153040273ea8af84655d60f568285136bcd95 | 31,395 | py | Python | pandas/tests/frame/indexing/test_where.py | bamford/pandas | a474af5b4526dc333f62260587a1d8ef494df57c | [
"BSD-3-Clause"
] | 1 | 2022-01-26T19:37:10.000Z | 2022-01-26T19:37:10.000Z | pandas/tests/frame/indexing/test_where.py | bamford/pandas | a474af5b4526dc333f62260587a1d8ef494df57c | [
"BSD-3-Clause"
] | 1 | 2021-12-01T03:10:17.000Z | 2021-12-23T20:27:21.000Z | pandas/tests/frame/indexing/test_where.py | bamford/pandas | a474af5b4526dc333f62260587a1d8ef494df57c | [
"BSD-3-Clause"
] | null | null | null | from datetime import datetime
from hypothesis import (
given,
settings,
)
import numpy as np
import pytest
from pandas.compat import np_version_under1p19
from pandas.core.dtypes.common import is_scalar
import pandas as pd
from pandas import (
DataFrame,
DatetimeIndex,
Series,
StringDtype,
... | 33.794403 | 86 | 0.561777 |
794153a6dae8319d1477085dab64349fd63be00b | 488 | py | Python | 4_factory/factory_method/chicago_style_veggie_pizza.py | hypersport/Head-First-Design-Patterns-Python | 0c8b831ae89ebbbef8b203b96508deb7e3063590 | [
"MIT"
] | null | null | null | 4_factory/factory_method/chicago_style_veggie_pizza.py | hypersport/Head-First-Design-Patterns-Python | 0c8b831ae89ebbbef8b203b96508deb7e3063590 | [
"MIT"
] | null | null | null | 4_factory/factory_method/chicago_style_veggie_pizza.py | hypersport/Head-First-Design-Patterns-Python | 0c8b831ae89ebbbef8b203b96508deb7e3063590 | [
"MIT"
] | null | null | null | from pizza import Pizza
class ChicagoStyleVeggiePizza(Pizza):
def __init__(self):
self.name = 'Chicago Deep Dish Veggie Pizza'
self.dough = 'Extra Thick Crust Dough'
self.sauce = 'Plum Tomato Sauce'
self.toppings.append('Shredded Mozzarella Cheese')
self.toppings.append('Bl... | 30.5 | 58 | 0.661885 |
794154f50a1146dc3da93628f68025f25ca71000 | 2,322 | py | Python | examples/classfiler.py | ParanoiaSYT/Qulab-backup | 09ec5457145b3789d4c1ac02c43dd3e6dfafc96f | [
"MIT"
] | null | null | null | examples/classfiler.py | ParanoiaSYT/Qulab-backup | 09ec5457145b3789d4c1ac02c43dd3e6dfafc96f | [
"MIT"
] | null | null | null | examples/classfiler.py | ParanoiaSYT/Qulab-backup | 09ec5457145b3789d4c1ac02c43dd3e6dfafc96f | [
"MIT"
] | null | null | null | """
Classfiler
Aquire state of qubits by support vector classification.
"""
import asyncio
from sklearn import svm
from qulab.sugar import getDHT, mount
from qulab.utils import ShutdownBlocker
class Classfiler:
def __init__(self, N=100):
self.clfs = [[svm.SVC(kernel='linear'), 0] for i i... | 26.386364 | 78 | 0.502584 |
7941564b740bcf755a18a016b1c654423a1ddaf8 | 875 | py | Python | app/core/migrations/0006_auto_20200509_1055.py | FullCycleRoid/poll_app | cf53823e02cc67f6722f785d99ef227d341a6eb4 | [
"MIT"
] | null | null | null | app/core/migrations/0006_auto_20200509_1055.py | FullCycleRoid/poll_app | cf53823e02cc67f6722f785d99ef227d341a6eb4 | [
"MIT"
] | null | null | null | app/core/migrations/0006_auto_20200509_1055.py | FullCycleRoid/poll_app | cf53823e02cc67f6722f785d99ef227d341a6eb4 | [
"MIT"
] | null | null | null | # Generated by Django 2.1.15 on 2020-05-09 10:55
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('core', '0005_auto_20200508_1842'),
]
operations = [
migrations.RenameModel(
old_name='Vote',
new_name='Choice',
... | 26.515152 | 153 | 0.545143 |
794157847fcd8df463598493706175785cbfb4f3 | 89 | py | Python | business_house/game/urls.py | vikasgoyal09/flp_07_2021 | f255091f131b93a727ba8f4bd2cee6f65ce47bad | [
"Apache-2.0"
] | null | null | null | business_house/game/urls.py | vikasgoyal09/flp_07_2021 | f255091f131b93a727ba8f4bd2cee6f65ce47bad | [
"Apache-2.0"
] | null | null | null | business_house/game/urls.py | vikasgoyal09/flp_07_2021 | f255091f131b93a727ba8f4bd2cee6f65ce47bad | [
"Apache-2.0"
] | null | null | null | from django.urls import path
from . import views
urlpatterns = [
#Enter url paths
] | 12.714286 | 28 | 0.707865 |
7941579de60caf0bdcc0a4821f2a6fd2646c3ee3 | 2,606 | py | Python | tests/srcga/main.py | chriscoombs/faropt | 46e3037959f0e3163567db2438ab700844dbebfe | [
"MIT-0"
] | 14 | 2020-08-24T21:34:35.000Z | 2022-03-01T06:21:22.000Z | tests/srcga/main.py | chriscoombs/faropt | 46e3037959f0e3163567db2438ab700844dbebfe | [
"MIT-0"
] | 1 | 2021-04-03T09:57:04.000Z | 2022-02-23T15:29:14.000Z | tests/srcga/main.py | chriscoombs/faropt | 46e3037959f0e3163567db2438ab700844dbebfe | [
"MIT-0"
] | 3 | 2021-02-16T23:23:00.000Z | 2022-03-12T21:39:33.000Z |
# This file is part of DEAP.
#
# DEAP is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
# published by the Free Software Foundation, either version 3 of
# the License, or (at your option) any later version.
#
# DEAP is distributed... | 32.575 | 86 | 0.711435 |
794158787b27c79aa5b47b70eb9057e31bda0337 | 12,905 | py | Python | sdk/python/pulumi_aws_native/codepipeline/custom_action_type.py | AaronFriel/pulumi-aws-native | 5621690373ac44accdbd20b11bae3be1baf022d1 | [
"Apache-2.0"
] | 29 | 2021-09-30T19:32:07.000Z | 2022-03-22T21:06:08.000Z | sdk/python/pulumi_aws_native/codepipeline/custom_action_type.py | AaronFriel/pulumi-aws-native | 5621690373ac44accdbd20b11bae3be1baf022d1 | [
"Apache-2.0"
] | 232 | 2021-09-30T19:26:26.000Z | 2022-03-31T23:22:06.000Z | sdk/python/pulumi_aws_native/codepipeline/custom_action_type.py | AaronFriel/pulumi-aws-native | 5621690373ac44accdbd20b11bae3be1baf022d1 | [
"Apache-2.0"
] | 4 | 2021-11-10T19:42:01.000Z | 2022-02-05T10:15:49.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
from... | 47.09854 | 202 | 0.682294 |
79415895cb81db5ee25a0aef3b0ace8d97d7b060 | 910 | py | Python | creational/singleton/singleton_1.py | samuelsoaress/design-patterns-python | a8737d205f3dc78b48e847d98fb702668c187a6f | [
"MIT"
] | 16 | 2020-06-29T17:32:11.000Z | 2022-03-29T20:22:01.000Z | creational/singleton/singleton_1.py | samuelsoaress/design-patterns-python | a8737d205f3dc78b48e847d98fb702668c187a6f | [
"MIT"
] | null | null | null | creational/singleton/singleton_1.py | samuelsoaress/design-patterns-python | a8737d205f3dc78b48e847d98fb702668c187a6f | [
"MIT"
] | 14 | 2020-07-21T14:31:24.000Z | 2022-03-04T20:26:33.000Z | """
O Singleton tem a intenção de garantir que uma classe tenha somente
uma instância e fornece um ponto global de acesso para a mesma.
When discussing which patterns to drop, we found
that we still love them all.
(Not really—I'm in favor of dropping Singleton.
Its use is almost always a design smell.)
- Erich Gamma, ... | 26 | 67 | 0.665934 |
7941597e40e7b431b13c35e58a88b00b669f1c2b | 464 | py | Python | elasticsearch_django/signals.py | octoenergy/elasticsearch-django | 4b24fb8bb5729d950c8d56740f8be0acb336de1c | [
"MIT"
] | 87 | 2016-09-04T06:24:04.000Z | 2022-02-01T01:43:47.000Z | elasticsearch_django/signals.py | octoenergy/elasticsearch-django | 4b24fb8bb5729d950c8d56740f8be0acb336de1c | [
"MIT"
] | 28 | 2016-12-09T22:48:29.000Z | 2021-04-07T11:01:34.000Z | elasticsearch_django/signals.py | octoenergy/elasticsearch-django | 4b24fb8bb5729d950c8d56740f8be0acb336de1c | [
"MIT"
] | 31 | 2017-01-30T12:31:47.000Z | 2022-02-03T17:22:03.000Z | import django.dispatch
# signal fired just before calling model.index_search_document
# providing_args=["instance", "index"]
pre_index = django.dispatch.Signal()
# signal fired just before calling model.update_search_document
# providing_args=["instance", "index", "update_fields"]
pre_update = django.dispatch.Signal(... | 33.142857 | 63 | 0.790948 |
794159b0d458f8020b3593d2b82e9c6557a1ab21 | 8,518 | py | Python | GasBotty/models/googlenet.py | GreenCUBIC/GasBotty | 158f5991201c80bf4cbbbb9deabc9954ff19bbb1 | [
"MIT"
] | null | null | null | GasBotty/models/googlenet.py | GreenCUBIC/GasBotty | 158f5991201c80bf4cbbbb9deabc9954ff19bbb1 | [
"MIT"
] | null | null | null | GasBotty/models/googlenet.py | GreenCUBIC/GasBotty | 158f5991201c80bf4cbbbb9deabc9954ff19bbb1 | [
"MIT"
] | null | null | null | import warnings
from collections import namedtuple
import torch
import torch.nn as nn
import torch.nn.functional as F
from .utils import load_state_dict_from_url
__all__ = ['GoogLeNet', 'googlenet']
model_urls = {
# GoogLeNet ported from TensorFlow
'googlenet': 'https://download.pytorch.org/models/... | 36.401709 | 102 | 0.570439 |
79415a90ab516f79360812d00d703d26f2b66c3f | 2,024 | py | Python | openstack_dashboard/dashboards/project/access_and_security/api_access/tests.py | ameoba/horizon | ff9e367c98a8bb79f10914abffaaa04b0a461819 | [
"Apache-2.0"
] | 2 | 2019-12-29T09:20:13.000Z | 2020-01-01T13:12:34.000Z | openstack_dashboard/dashboards/project/access_and_security/api_access/tests.py | yongquanf/horizon | 9aad7fd6f66588fed7c27b720642e47a4a12854b | [
"Apache-2.0"
] | 1 | 2015-03-12T01:03:44.000Z | 2015-03-12T01:03:44.000Z | openstack_dashboard/dashboards/project/access_and_security/api_access/tests.py | yongquanf/horizon | 9aad7fd6f66588fed7c27b720642e47a4a12854b | [
"Apache-2.0"
] | 4 | 2015-05-05T08:17:28.000Z | 2020-02-05T10:47:06.000Z | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 Nebula 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
#
# ... | 38.923077 | 78 | 0.685771 |
79415bcf24662c2027f8821ada37e500c3b6dc7c | 3,389 | py | Python | bridge/bridge_vxlan.py | ZirakZaheer/ZeroTrust-Ebpf | b0f1968e5c9fa307a84b62a76f02847845a458db | [
"Apache-2.0"
] | 2 | 2018-11-17T08:16:47.000Z | 2022-01-21T16:45:46.000Z | bridge/bridge_vxlan.py | ZirakZaheer/ZeroTrust-Ebpf | b0f1968e5c9fa307a84b62a76f02847845a458db | [
"Apache-2.0"
] | null | null | null | bridge/bridge_vxlan.py | ZirakZaheer/ZeroTrust-Ebpf | b0f1968e5c9fa307a84b62a76f02847845a458db | [
"Apache-2.0"
] | null | null | null | from bcc import BPF
from builtins import input
from ctypes import c_int
from pyroute2 import IPRoute, IPDB
from simulation import Simulation
from netaddr import IPAddress
ipr = IPRoute()
ipdb = IPDB(nl=ipr)
num_hosts = 2
null = open("/dev/null", "w")
class BridgeSimulation(Simulation):
def __init__(self, ipdb):
... | 41.329268 | 159 | 0.65152 |
79415c4c07b97469f459af099f04cba937832ddf | 304 | py | Python | setup.py | EberhardtRafael/Group-Theory-Calculations | 1c466720c26be1f311f0b2aa737bbd4acfa9b401 | [
"MIT"
] | null | null | null | setup.py | EberhardtRafael/Group-Theory-Calculations | 1c466720c26be1f311f0b2aa737bbd4acfa9b401 | [
"MIT"
] | null | null | null | setup.py | EberhardtRafael/Group-Theory-Calculations | 1c466720c26be1f311f0b2aa737bbd4acfa9b401 | [
"MIT"
] | null | null | null | from distutils.core import setup, Extension
setup(name = "YoungTab",
version = "1.0",
long_description = "blablabla",
url = "",
author = "blabla",
author_email = "bla@bla",
license = "",
ext_modules = [Extension("YoungTab", sources=["YoungTableauxBib.c"])],
)
| 25.333333 | 76 | 0.592105 |
79415d46f26cd43d82213d66eb092b74e3586753 | 6,655 | py | Python | test/functional/p2p_invalid_tx.py | aentan/ain | 1d6db33159de1c8c7930d29a0ab0902f42b728c1 | [
"MIT"
] | null | null | null | test/functional/p2p_invalid_tx.py | aentan/ain | 1d6db33159de1c8c7930d29a0ab0902f42b728c1 | [
"MIT"
] | null | null | null | test/functional/p2p_invalid_tx.py | aentan/ain | 1d6db33159de1c8c7930d29a0ab0902f42b728c1 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2015-2018 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test node responses to invalid transactions.
In this test we connect to one node over p2p, and test tx... | 43.214286 | 109 | 0.675733 |
79415e4a9b3906a41e2f172a12f58ca3d40110ab | 142 | py | Python | Myapi/apps.py | jyothiprakashpanaik/codeforces_api | a339253123770b89ba79e1d6fbcd9ca4f020716d | [
"MIT"
] | null | null | null | Myapi/apps.py | jyothiprakashpanaik/codeforces_api | a339253123770b89ba79e1d6fbcd9ca4f020716d | [
"MIT"
] | null | null | null | Myapi/apps.py | jyothiprakashpanaik/codeforces_api | a339253123770b89ba79e1d6fbcd9ca4f020716d | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class MyapiConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'Myapi'
| 20.285714 | 56 | 0.753521 |
79415ebbd25bc49636c071b5ff06512570ae468e | 467 | py | Python | python-dsa/combination-1.py | abhishek-parashar/Right-From-Scratch | e596344b0db95cfdeba876676885f062ef5f7c23 | [
"Apache-2.0"
] | null | null | null | python-dsa/combination-1.py | abhishek-parashar/Right-From-Scratch | e596344b0db95cfdeba876676885f062ef5f7c23 | [
"Apache-2.0"
] | null | null | null | python-dsa/combination-1.py | abhishek-parashar/Right-From-Scratch | e596344b0db95cfdeba876676885f062ef5f7c23 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Tue Sep 29 15:51:01 2020
@author: Abhishek Parashar
"""
def subsetutil(arr, subset, index,k,ans):
if len(subset)==k:
ans.append(subset[:])
return
for i in range(index,len(arr)):
subset.append(arr[i])
subsetutil(arr,subset,i+1,... | 18.68 | 42 | 0.56531 |
79416032d3e7ec70faef8bd7533eb6c7a6cc3a1b | 2,527 | py | Python | ensysmod/schemas/energy_commodity.py | NOWUM/EnSysMod | 18c8a2198db3510e667c1f0298d00a3dfcb0aab7 | [
"MIT"
] | 1 | 2021-12-10T19:41:01.000Z | 2021-12-10T19:41:01.000Z | ensysmod/schemas/energy_commodity.py | NOWUM/EnSysMod | 18c8a2198db3510e667c1f0298d00a3dfcb0aab7 | [
"MIT"
] | 83 | 2021-10-20T22:54:28.000Z | 2022-03-24T19:07:06.000Z | ensysmod/schemas/energy_commodity.py | NOWUM/EnSysMod | 18c8a2198db3510e667c1f0298d00a3dfcb0aab7 | [
"MIT"
] | null | null | null | from typing import Optional
from pydantic import BaseModel, Field, validator
from ensysmod.schemas import Dataset
from ensysmod.util import validators
class EnergyCommodityBase(BaseModel):
"""
Shared attributes for an energy commodity. Used as a base class for all schemas.
"""
name: str = Field(...,... | 41.42623 | 114 | 0.636723 |
7941605a1a1e82821bd20707ec476e001624d51c | 10,595 | py | Python | tests/unit_tests/test_binance.py | Vashiru/pycryptobot | a4cf67cbb7467acc1d4aa7aab17cd65e8dbb80fe | [
"Apache-2.0"
] | 1 | 2021-06-14T18:21:49.000Z | 2021-06-14T18:21:49.000Z | tests/unit_tests/test_binance.py | Vashiru/pycryptobot | a4cf67cbb7467acc1d4aa7aab17cd65e8dbb80fe | [
"Apache-2.0"
] | 1 | 2021-04-29T20:44:33.000Z | 2021-04-29T20:44:33.000Z | tests/unit_tests/test_binance.py | Vashiru/pycryptobot | a4cf67cbb7467acc1d4aa7aab17cd65e8dbb80fe | [
"Apache-2.0"
] | null | null | null | import json
import os
import sys
import pandas
import pytest
import urllib3
BINANCE_CONFIG_JSON = 'binance_config.json'
MOCK_MARKET = 'BTCEUR'
# disable insecure ssl warning
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
sys.path.append('.')
# pylint: disable=import-error
from models.exchange.b... | 38.111511 | 117 | 0.645871 |
7941608be729fd6cab62c09df4392d9a490bb339 | 1,646 | py | Python | legacy/enums.py | ParikhKadam/zenml | 867e4d4c982a50447bd182b30af37f2141dac5a4 | [
"Apache-2.0"
] | 1,275 | 2020-11-19T14:18:25.000Z | 2021-08-13T07:31:39.000Z | legacy/enums.py | ParikhKadam/zenml | 867e4d4c982a50447bd182b30af37f2141dac5a4 | [
"Apache-2.0"
] | 62 | 2020-11-30T16:06:14.000Z | 2021-08-10T08:34:52.000Z | legacy/enums.py | ParikhKadam/zenml | 867e4d4c982a50447bd182b30af37f2141dac5a4 | [
"Apache-2.0"
] | 75 | 2020-12-22T19:15:08.000Z | 2021-08-13T03:07:50.000Z | # Copyright (c) ZenML GmbH 2020. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 20.320988 | 70 | 0.658566 |
79416092bdc4240a1dc60355635e39c726530136 | 434 | py | Python | rackattack/virtual/sh.py | shlomimatichin/rackattack-virtual | c800646c6f07dd04493dc313a3770f192a542d4c | [
"Apache-2.0"
] | null | null | null | rackattack/virtual/sh.py | shlomimatichin/rackattack-virtual | c800646c6f07dd04493dc313a3770f192a542d4c | [
"Apache-2.0"
] | null | null | null | rackattack/virtual/sh.py | shlomimatichin/rackattack-virtual | c800646c6f07dd04493dc313a3770f192a542d4c | [
"Apache-2.0"
] | 1 | 2020-01-29T08:05:00.000Z | 2020-01-29T08:05:00.000Z | import subprocess
import logging
_LOGGER = logging.getLogger("sh")
def run(* args, ** kwargs):
try:
return subprocess.check_output(
* args, stderr=subprocess.STDOUT, close_fds=True, ** kwargs)
except subprocess.CalledProcessError as e:
_LOGGER.exception(
"Return code:%... | 27.125 | 72 | 0.645161 |
794160d7ee1d9d5a8b568991b34cc7af4cb0069b | 397 | py | Python | h/migrations/versions/f48100c9af86_add_authority_column_to_user_table.py | tgiardina/rpp-h | fece590f901b052a59c19a24acfeba52cee33c84 | [
"BSD-2-Clause"
] | 1 | 2020-06-19T01:49:39.000Z | 2020-06-19T01:49:39.000Z | h/migrations/versions/f48100c9af86_add_authority_column_to_user_table.py | tgiardina/rpp-h | fece590f901b052a59c19a24acfeba52cee33c84 | [
"BSD-2-Clause"
] | 5 | 2019-10-31T14:23:18.000Z | 2019-11-15T19:24:27.000Z | h/migrations/versions/f48100c9af86_add_authority_column_to_user_table.py | tgiardina/rpp-h | fece590f901b052a59c19a24acfeba52cee33c84 | [
"BSD-2-Clause"
] | null | null | null | """
Add authority column to user table
Revision ID: f48100c9af86
Revises: 64cf31f9f721
Create Date: 2016-08-15 18:10:23.511861
"""
import sqlalchemy as sa
from alembic import op
revision = "f48100c9af86"
down_revision = "64cf31f9f721"
def upgrade():
op.add_column("user", sa.Column("authority", sa.UnicodeText()... | 18.045455 | 82 | 0.730479 |
794161645fabe5c593ccf4e7b7ed6d58bf879753 | 1,504 | py | Python | NucleationModel/gridifier.py | MFrassek/CommittorEAE | 88a467e4500bc9ab69834209f4eaec9f2d0d7a61 | [
"MIT"
] | null | null | null | NucleationModel/gridifier.py | MFrassek/CommittorEAE | 88a467e4500bc9ab69834209f4eaec9f2d0d7a61 | [
"MIT"
] | null | null | null | NucleationModel/gridifier.py | MFrassek/CommittorEAE | 88a467e4500bc9ab69834209f4eaec9f2d0d7a61 | [
"MIT"
] | null | null | null | import numpy as np
class Gridifier():
def __init__(self, base_snapshots, resolution):
self._minima = np.amin(base_snapshots, axis=0)
self._maxima = np.amax(base_snapshots, axis=0)
self._spans = np.array(
[span if span != 0 else 1 for span in self._maxima - self._minima])
... | 32 | 79 | 0.664229 |
794161c33ac87b1919a09ea01235202bbbdac8c8 | 648 | py | Python | ansible/roles/db/molecule/default/tests/test_default.py | Otus-DevOps-2020-11/AndreyAgafonov_infra | 19e3d20479c0a713678d6ca7e346d689bf8e9ac9 | [
"MIT"
] | null | null | null | ansible/roles/db/molecule/default/tests/test_default.py | Otus-DevOps-2020-11/AndreyAgafonov_infra | 19e3d20479c0a713678d6ca7e346d689bf8e9ac9 | [
"MIT"
] | 2 | 2020-12-16T13:42:37.000Z | 2021-02-14T14:41:31.000Z | ansible/roles/db/molecule/default/tests/test_default.py | barmank32/barmank32_infra | 062b1c5cceb4991d53b3c71dd2a787255f87b23b | [
"MIT"
] | 1 | 2021-01-29T14:50:38.000Z | 2021-01-29T14:50:38.000Z | import os
import testinfra.utils.ansible_runner
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
# check if MongoDB is enabled and running
def test_mongo_running_and_enabled(host):
mongo = host.service("mongod")
assert mongo.is_runnin... | 29.454545 | 63 | 0.763889 |
794163ea82060bd7617b43b1f61cb53f04bd20ea | 14,862 | py | Python | lib/nibLib/ui/glyphs.py | jenskutilek/nibLib | 7d0880828f46c05dd2512463c02e8f9728c13027 | [
"MIT"
] | 11 | 2020-01-21T13:18:07.000Z | 2020-12-13T20:57:28.000Z | lib/nibLib/ui/glyphs.py | jenskutilek/nibLib | 7d0880828f46c05dd2512463c02e8f9728c13027 | [
"MIT"
] | 1 | 2020-01-21T14:40:46.000Z | 2020-01-21T17:13:54.000Z | lib/nibLib/ui/glyphs.py | jenskutilek/nibLib | 7d0880828f46c05dd2512463c02e8f9728c13027 | [
"MIT"
] | null | null | null | from __future__ import division, print_function
from math import degrees, pi, radians
import vanilla
from defconAppKit.windows.baseWindow import BaseWindowController
from nibLib import DEBUG, def_angle_key, def_width_key, def_height_key, \
def_local_key, def_guide_key, def_super_key, def_model_key, \
rf_guid... | 31.487288 | 79 | 0.56049 |
794165a498c6030defd2735f36215372dc324cb6 | 1,340 | py | Python | 2020/day9.py | tangarts/advent-of-code | 5879fbec1a5377d1288666a357b029f6345d4a5d | [
"MIT"
] | null | null | null | 2020/day9.py | tangarts/advent-of-code | 5879fbec1a5377d1288666a357b029f6345d4a5d | [
"MIT"
] | null | null | null | 2020/day9.py | tangarts/advent-of-code | 5879fbec1a5377d1288666a357b029f6345d4a5d | [
"MIT"
] | null | null | null | #%%
from advent_of_code.core import parse_input
raw = """35
20
15
25
47
40
62
55
65
95
102
117
150
182
127
219
299
277
309
576"""
def two_sum(array: list, t: int) -> int:
cache = {}
for i in range(len(array)):
if array[i] not in cache:
cache[t - array[i]] = array[i]
else:
... | 16.962025 | 71 | 0.580597 |
794165fe60812838e9973f27330464f674f0cab1 | 8,973 | py | Python | pytorch_lightning/callbacks/gpu_stats_monitor.py | GabrielePicco/pytorch-lightning | 0d6dfd42d8965347a258e3d20e83bddd344e718f | [
"Apache-2.0"
] | 4 | 2021-07-27T14:39:02.000Z | 2022-03-07T10:57:13.000Z | pytorch_lightning/callbacks/gpu_stats_monitor.py | GabrielePicco/pytorch-lightning | 0d6dfd42d8965347a258e3d20e83bddd344e718f | [
"Apache-2.0"
] | 2 | 2021-07-03T07:07:32.000Z | 2022-03-10T16:07:20.000Z | pytorch_lightning/callbacks/gpu_stats_monitor.py | GabrielePicco/pytorch-lightning | 0d6dfd42d8965347a258e3d20e83bddd344e718f | [
"Apache-2.0"
] | 1 | 2022-01-08T14:06:27.000Z | 2022-01-08T14:06:27.000Z | # Copyright The PyTorch Lightning team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to i... | 41.734884 | 116 | 0.657751 |
794166af9acc4f3af2f9facaed68d01ec46e1839 | 67,033 | py | Python | packages/vaex-core/vaex/expression.py | maartenbreddels/vaex | 633970528cb5091ef376dbca2e4721cd42525419 | [
"MIT"
] | 337 | 2016-02-11T07:36:35.000Z | 2018-12-10T07:17:35.000Z | packages/vaex-core/vaex/expression.py | maartenbreddels/vaex | 633970528cb5091ef376dbca2e4721cd42525419 | [
"MIT"
] | 127 | 2016-07-06T15:43:14.000Z | 2018-12-11T18:46:27.000Z | packages/vaex-core/vaex/expression.py | maartenbreddels/vaex | 633970528cb5091ef376dbca2e4721cd42525419 | [
"MIT"
] | 29 | 2016-10-05T14:15:28.000Z | 2018-11-29T10:17:00.000Z | import ast
import copy
import os
import base64
import datetime
from pydoc import doc
import time
import cloudpickle as pickle
import functools
import operator
import six
import collections
import weakref
from future.utils import with_metaclass
import numpy as np
import pandas as pd
import tabulate
import pyarrow as pa... | 38.725014 | 217 | 0.576805 |
794166feeabd53072d01d246c1a370e85cb50400 | 58 | py | Python | cuticulus/core/datasets/types/__init__.py | ngngardner/cuticulus | 592e799ec9ae09ee12b12565a638ff9e448fbc21 | [
"MIT"
] | null | null | null | cuticulus/core/datasets/types/__init__.py | ngngardner/cuticulus | 592e799ec9ae09ee12b12565a638ff9e448fbc21 | [
"MIT"
] | null | null | null | cuticulus/core/datasets/types/__init__.py | ngngardner/cuticulus | 592e799ec9ae09ee12b12565a638ff9e448fbc21 | [
"MIT"
] | null | null | null | """Store specific dataset types to use in experiments."""
| 29 | 57 | 0.741379 |
7941697ad2ada06b81be3c94db78a47f55b80f85 | 1,890 | py | Python | UPSNet/upsnet/operators/build_mod_deform_conv.py | raviteja-kvns/cycada_release | 74fb4170f85f017796fea98a230dc6ed624211a7 | [
"BSD-2-Clause"
] | null | null | null | UPSNet/upsnet/operators/build_mod_deform_conv.py | raviteja-kvns/cycada_release | 74fb4170f85f017796fea98a230dc6ed624211a7 | [
"BSD-2-Clause"
] | null | null | null | UPSNet/upsnet/operators/build_mod_deform_conv.py | raviteja-kvns/cycada_release | 74fb4170f85f017796fea98a230dc6ed624211a7 | [
"BSD-2-Clause"
] | null | null | null | # ---------------------------------------------------------------------------
# Unified Panoptic Segmentation Network
#
# Copyright (c) 2018-2019 Uber Technologies, Inc.
#
# Licensed under the Uber Non-Commercial License (the "License");
# you may not use this file except in compliance with the License.
# You may obtai... | 32.586207 | 78 | 0.639153 |
794169ccb575a21eac75486dff0e6dc33e09ec6e | 18,209 | py | Python | DICOM_RT/DicomPatient.py | mghro/MIRDCalculation | aa2435d0f77a01c81c519a6f828f508cacf55830 | [
"MIT"
] | null | null | null | DICOM_RT/DicomPatient.py | mghro/MIRDCalculation | aa2435d0f77a01c81c519a6f828f508cacf55830 | [
"MIT"
] | null | null | null | DICOM_RT/DicomPatient.py | mghro/MIRDCalculation | aa2435d0f77a01c81c519a6f828f508cacf55830 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu May 27 16:09:19 2021
@author: alejandrobertolet
"""
from os import listdir
import numpy as np
import pydicom
from rt_utils import RTStructBuilder
import matplotlib.pylab as plt
from datetime import datetime
class DicomPatient:
def __init__(self,... | 45.866499 | 123 | 0.550277 |
79416b47987d7d57c3e7e0f990eace9492b7a481 | 9,672 | py | Python | scripts/preprocess/clean_tok_mono_corpus.py | liuzh91/gluon-nlp | 189bbdcc56d8e58aa908963949687b99ff9a3cff | [
"Apache-2.0"
] | 1 | 2020-08-19T09:31:04.000Z | 2020-08-19T09:31:04.000Z | scripts/preprocess/clean_tok_mono_corpus.py | liuzh91/gluon-nlp | 189bbdcc56d8e58aa908963949687b99ff9a3cff | [
"Apache-2.0"
] | null | null | null | scripts/preprocess/clean_tok_mono_corpus.py | liuzh91/gluon-nlp | 189bbdcc56d8e58aa908963949687b99ff9a3cff | [
"Apache-2.0"
] | null | null | null | import argparse
import os
import multiprocessing
import time
import numpy as np
import warnings
import re
from gluonnlp.data.filtering import MosesNormalizer
from gluonnlp.data.tokenizers import MosesTokenizer, BaseTokenizer,\
WhitespaceTokenizer, JiebaTokenizer
from typing import L... | 38.229249 | 99 | 0.564413 |
79416b85e409b19b7fe907e18127347c1c7dfbda | 4,635 | py | Python | scripts/map_destination_flow.py | zarajfr/Visualising_Syrian_flow | 8e7eae5e8b44ca0e50b237d98b4a5e0ecaa57efe | [
"MIT"
] | null | null | null | scripts/map_destination_flow.py | zarajfr/Visualising_Syrian_flow | 8e7eae5e8b44ca0e50b237d98b4a5e0ecaa57efe | [
"MIT"
] | null | null | null | scripts/map_destination_flow.py | zarajfr/Visualising_Syrian_flow | 8e7eae5e8b44ca0e50b237d98b4a5e0ecaa57efe | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
import random
from random import shuffle
import seaborn as sns
import math
from pprint import pprint
import matplotlib
from matplotlib.cm import cool
import csv
import matplotlib.gridspec as gridspec
import matplotlib.colors as colors
import geopandas as gpd
import pan... | 38.94958 | 299 | 0.631068 |
79416c1dc80c46b3608beeaf871ddde00b88074d | 1,467 | py | Python | userbot/plugins/dictionary.py | SH4DOWV/X-tra-Telegram | 73634556989ac274c44a0a2cc9ff4322e7a52158 | [
"MIT"
] | null | null | null | userbot/plugins/dictionary.py | SH4DOWV/X-tra-Telegram | 73634556989ac274c44a0a2cc9ff4322e7a52158 | [
"MIT"
] | null | null | null | userbot/plugins/dictionary.py | SH4DOWV/X-tra-Telegram | 73634556989ac274c44a0a2cc9ff4322e7a52158 | [
"MIT"
] | null | null | null | """Dictionary Plugin for @UniBorg
Syntax: .meaning <word>"""
import requests
from telethon import events
from uniborg.util import admin_cmd
@borg.on(admin_cmd("meaning (.*)"))
async def _(event):
if event.fwd_from:
return
input_str = event.pattern_match.group(1)
input_url = "https://bots.shrimadh... | 32.6 | 90 | 0.6394 |
79416caa3a50059700bc54b7d17fb4cca1798635 | 809 | py | Python | Lib/corpuscrawler/crawl_nii.py | cash/corpuscrawler | 8913fe1fb2b6bfdfbf2ba01d2ce88057b3b5ba3d | [
"Apache-2.0"
] | 95 | 2019-06-13T23:34:21.000Z | 2022-03-12T05:22:49.000Z | Lib/corpuscrawler/crawl_nii.py | sahwar/corpuscrawler | 8913fe1fb2b6bfdfbf2ba01d2ce88057b3b5ba3d | [
"Apache-2.0"
] | 31 | 2019-06-02T18:56:53.000Z | 2021-08-10T20:16:02.000Z | Lib/corpuscrawler/crawl_nii.py | sahwar/corpuscrawler | 8913fe1fb2b6bfdfbf2ba01d2ce88057b3b5ba3d | [
"Apache-2.0"
] | 35 | 2019-06-18T08:26:24.000Z | 2022-01-11T13:59:40.000Z | # Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 36.772727 | 74 | 0.770087 |
79416d8c617ab9c2b14196dd07b0c1fe73226aa3 | 39 | py | Python | async_iter/__init__.py | weidwonder/async-iter | de971fa34ca753ee85abe09da08b19d886879a69 | [
"MIT"
] | null | null | null | async_iter/__init__.py | weidwonder/async-iter | de971fa34ca753ee85abe09da08b19d886879a69 | [
"MIT"
] | null | null | null | async_iter/__init__.py | weidwonder/async-iter | de971fa34ca753ee85abe09da08b19d886879a69 | [
"MIT"
] | null | null | null | from async_iter import AsyncIterHandler | 39 | 39 | 0.923077 |
79416dc7798ee8a37d674ee32ce35182c05a8a79 | 5,742 | py | Python | analyzer/codechecker_analyzer/analyzers/clangsa/ctu_autodetection.py | LebedevRI/codechecker | f4548444851e19c8cc7b8fd621f3dcdf987d7140 | [
"Apache-2.0"
] | null | null | null | analyzer/codechecker_analyzer/analyzers/clangsa/ctu_autodetection.py | LebedevRI/codechecker | f4548444851e19c8cc7b8fd621f3dcdf987d7140 | [
"Apache-2.0"
] | null | null | null | analyzer/codechecker_analyzer/analyzers/clangsa/ctu_autodetection.py | LebedevRI/codechecker | f4548444851e19c8cc7b8fd621f3dcdf987d7140 | [
"Apache-2.0"
] | null | null | null | # -------------------------------------------------------------------------
#
# Part of the CodeChecker project, under the Apache License v2.0 with
# LLVM Exceptions. See LICENSE for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
#
# ---------------------------------------------------... | 30.221053 | 78 | 0.620515 |
79416de3e1548ac303c9d23a648cf0745c5dadc3 | 143 | py | Python | _individual_1_.py | 126alexander/LAB_13 | 404e9f07a26be2204cd682940da29944366aa214 | [
"MIT"
] | null | null | null | _individual_1_.py | 126alexander/LAB_13 | 404e9f07a26be2204cd682940da29944366aa214 | [
"MIT"
] | null | null | null | _individual_1_.py | 126alexander/LAB_13 | 404e9f07a26be2204cd682940da29944366aa214 | [
"MIT"
] | null | null | null | from _individual_1_1 import *
a = [1, 2, 3, 4, 5, 65, 6, ]
max_func = func_1()
min_func = func_1('min')
print(max_func(a))
print(min_func(a)) | 17.875 | 29 | 0.65035 |
79416f0493734d2a6403034a2f591bd478ba5a26 | 13,193 | py | Python | test/functional/rpc_blockchain.py | Phonemetra/TurboCoin | 041f807a3f68bb4b6d9b6c39235e71f1598153d9 | [
"MIT"
] | null | null | null | test/functional/rpc_blockchain.py | Phonemetra/TurboCoin | 041f807a3f68bb4b6d9b6c39235e71f1598153d9 | [
"MIT"
] | null | null | null | test/functional/rpc_blockchain.py | Phonemetra/TurboCoin | 041f807a3f68bb4b6d9b6c39235e71f1598153d9 | [
"MIT"
] | 3 | 2021-04-03T09:11:50.000Z | 2021-04-03T09:12:31.000Z | #!/usr/bin/env python3
# Copyright (c) 2014-2019 TurboCoin
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test RPCs related to blockchainstate.
Test the following RPCs:
- getblockchaininfo
- gettxoutsetinfo
- getdi... | 42.15016 | 257 | 0.673691 |
79416fef605b37d504e6604efb47df014e319cb7 | 2,350 | py | Python | solutions/bs_gc.py | ikumen/rosalind | 1a265f44eef201dc82d73e9d4f97064302079cd9 | [
"MIT"
] | null | null | null | solutions/bs_gc.py | ikumen/rosalind | 1a265f44eef201dc82d73e9d4f97064302079cd9 | [
"MIT"
] | null | null | null | solutions/bs_gc.py | ikumen/rosalind | 1a265f44eef201dc82d73e9d4f97064302079cd9 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
'''
bs_gc.py: Computing GC Content (http://rosalind.info/problems/gc/)
Given: At most 10 DNA strings in FASTA format (of length at most 1 kbp each).
Return: The ID of the string having the highest GC-content, followed by the
GC-content of that string. Rosalind allows for a default error of 0.00... | 28.313253 | 120 | 0.758298 |
7941701d6be9f1438b480304259410b52a2fef4f | 21,029 | py | Python | pymodbus/server/sync.py | khanhngd24/modbus | a5ca5d578a823a431b95fdde76b074407b38e867 | [
"W3C"
] | null | null | null | pymodbus/server/sync.py | khanhngd24/modbus | a5ca5d578a823a431b95fdde76b074407b38e867 | [
"W3C"
] | null | null | null | pymodbus/server/sync.py | khanhngd24/modbus | a5ca5d578a823a431b95fdde76b074407b38e867 | [
"W3C"
] | null | null | null | '''
Implementation of a Threaded Modbus Server
------------------------------------------
'''
from binascii import b2a_hex
import serial
import socket
import traceback
from pymodbus.constants import Defaults
from pymodbus.factory import ServerDecoder
from pymodbus.datastore import ModbusServerContext
from pymodbus.de... | 39.602637 | 103 | 0.616339 |
7941704fbd630e404c5fc72fc723e423a6120bd4 | 300 | py | Python | src/web/modules/post/controllers/workflow/control.py | unkyulee/elastic-cms | 3ccf4476c3523d4fefc0d8d9dee0196815b81489 | [
"MIT"
] | 2 | 2017-04-30T07:29:23.000Z | 2017-04-30T07:36:27.000Z | src/web/modules/post/controllers/workflow/control.py | unkyulee/elastic-cms | 3ccf4476c3523d4fefc0d8d9dee0196815b81489 | [
"MIT"
] | null | null | null | src/web/modules/post/controllers/workflow/control.py | unkyulee/elastic-cms | 3ccf4476c3523d4fefc0d8d9dee0196815b81489 | [
"MIT"
] | null | null | null | import importlib
def get(p):
p['mode'] = 'default'
if len(p['nav']) > 3: p['mode'] = p['nav'][3]
if not p['operation']: p['operation'] = 'post'
path = "web.modules.post.controllers.workflow.{}".format(p['mode'])
control = importlib.import_module(path)
return control.get(p)
| 27.272727 | 71 | 0.603333 |
7941710cc1370550f23ccea5fb150c1c9656fa87 | 1,364 | py | Python | route.py | Develkone/AdvancedEAST-with-Baidu-OCR | 0a22d34448cbb0f3e8d924ce3321649c29ea1d3a | [
"MIT"
] | null | null | null | route.py | Develkone/AdvancedEAST-with-Baidu-OCR | 0a22d34448cbb0f3e8d924ce3321649c29ea1d3a | [
"MIT"
] | null | null | null | route.py | Develkone/AdvancedEAST-with-Baidu-OCR | 0a22d34448cbb0f3e8d924ce3321649c29ea1d3a | [
"MIT"
] | null | null | null | from flask import request, jsonify, Flask
from flask_cors import CORS
import os
import time
import predict
import common
from baidu_api import textGO
import shutil
app = Flask(__name__)
CORS(app, resources=r'/*')
@app.route("/", methods=["GET"])
def html():
return app.send_static_file("index.html")
@app.route("/... | 31.72093 | 96 | 0.605572 |
79417120aa4ffd7640d2379de2b37f7be354a6cf | 409 | py | Python | backend/black_disk_31503/wsgi.py | crowdbotics-apps/black-disk-31503 | 3f6febbf243f3d0cb508b776eda4633d37a23121 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/black_disk_31503/wsgi.py | crowdbotics-apps/black-disk-31503 | 3f6febbf243f3d0cb508b776eda4633d37a23121 | [
"FTL",
"AML",
"RSA-MD"
] | 6 | 2021-10-18T00:26:48.000Z | 2021-10-18T00:26:52.000Z | backend/black_disk_31503/wsgi.py | crowdbotics-apps/black-disk-31503 | 3f6febbf243f3d0cb508b776eda4633d37a23121 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | """
WSGI config for black_disk_31503 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/2.2/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJA... | 24.058824 | 78 | 0.794621 |
7941713c0b01c4da7197f8635bff26f1a569422c | 414 | py | Python | students/k3340/practical_works/Dobryakov_David/simple_django_app/django_project_dobryakov/simple_django_app/urls.py | TonikX/ITMO_ICT_-WebProgramming_2020 | ba566c1b3ab04585665c69860b713741906935a0 | [
"MIT"
] | 10 | 2020-03-20T09:06:12.000Z | 2021-07-27T13:06:02.000Z | students/k3340/practical_works/Dobryakov_David/simple_django_app/django_project_dobryakov/simple_django_app/urls.py | TonikX/ITMO_ICT_-WebProgramming_2020 | ba566c1b3ab04585665c69860b713741906935a0 | [
"MIT"
] | 134 | 2020-03-23T09:47:48.000Z | 2022-03-12T01:05:19.000Z | students/k3340/practical_works/Dobryakov_David/simple_django_app/django_project_dobryakov/simple_django_app/urls.py | TonikX/ITMO_ICT_-WebProgramming_2020 | ba566c1b3ab04585665c69860b713741906935a0 | [
"MIT"
] | 71 | 2020-03-20T12:45:56.000Z | 2021-10-31T19:22:25.000Z | from django.contrib import admin
from django.urls import path, include
from . import views
urlpatterns = [
path('auto', views.AutoView.as_view()),
path('owner/<int:owner_id>', views.show_owner),
path('owners', views.show_owners),
path('add_auto', views.AddAuto.as_view(success_url='thank... | 31.846154 | 70 | 0.664251 |
7941713f6a896dff775a8e2d8b895fcb4dd6d5db | 2,247 | py | Python | src/engine/public_components/scene.py | gabdube/panic-panda | ecbda506eeafe3dbdf932cdb20b938646502f892 | [
"MIT"
] | 67 | 2019-01-06T13:01:46.000Z | 2022-01-04T17:50:58.000Z | src/engine/public_components/scene.py | gabdube/panic-panda | ecbda506eeafe3dbdf932cdb20b938646502f892 | [
"MIT"
] | 2 | 2019-01-07T18:25:00.000Z | 2021-05-10T09:32:17.000Z | src/engine/public_components/scene.py | gabdube/panic-panda | ecbda506eeafe3dbdf932cdb20b938646502f892 | [
"MIT"
] | 6 | 2019-07-31T08:16:26.000Z | 2020-12-26T04:34:52.000Z | from . import Shader, Mesh, GameObject, Image, Sampler, Compute
from ..base_types import Id
class Scene(object):
def __init__(self):
self._id = Id()
self.shaders = ComponentArray(Shader)
self.computes = ComponentArray(Compute)
self.meshes = ComponentArray(Mesh)
self.object... | 29.181818 | 113 | 0.635514 |
794172a9872bbd43c522338005c6577a55326279 | 667 | py | Python | ovs/lib/__init__.py | mflu/openvstorage_centos | 280a98d3e5d212d58297e0ffcecd325dfecef0f8 | [
"Apache-2.0"
] | 1 | 2015-08-29T16:36:40.000Z | 2015-08-29T16:36:40.000Z | ovs/lib/__init__.py | rootfs-analytics/openvstorage | 6184822340faea1d2927643330a7aaa781d92d36 | [
"Apache-2.0"
] | null | null | null | ovs/lib/__init__.py | rootfs-analytics/openvstorage | 6184822340faea1d2927643330a7aaa781d92d36 | [
"Apache-2.0"
] | null | null | null | # Copyright 2014 CloudFounders NV
#
# 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 writ... | 33.35 | 74 | 0.758621 |
79417356ac96c7610c1d9c42917c0da7b6f65472 | 2,820 | py | Python | selfdrive/manager/process_config.py | sunnyc-op/jc01rho_BoltEV_EON | 48067cd344e01346037600f768912c3cd97ac5bf | [
"MIT"
] | null | null | null | selfdrive/manager/process_config.py | sunnyc-op/jc01rho_BoltEV_EON | 48067cd344e01346037600f768912c3cd97ac5bf | [
"MIT"
] | null | null | null | selfdrive/manager/process_config.py | sunnyc-op/jc01rho_BoltEV_EON | 48067cd344e01346037600f768912c3cd97ac5bf | [
"MIT"
] | null | null | null | import os
from selfdrive.manager.process import PythonProcess, NativeProcess, DaemonProcess
from selfdrive.hardware import EON, TICI, PC
WEBCAM = os.getenv("USE_WEBCAM") is not None
procs = [
# DaemonProcess("manage_athenad", "selfdrive.athena.manage_athenad", "AthenadPid"),
# due to qualcomm kernel bugs SIGKILL... | 61.304348 | 127 | 0.73617 |
794173600fbbbdbbcc3b051a208ac6f59f4d9338 | 8,856 | py | Python | pyatv/mrp/srp.py | ckeehan/pyatv | a3c0d572c60cf6fa562939a232165ed839cdc592 | [
"MIT"
] | null | null | null | pyatv/mrp/srp.py | ckeehan/pyatv | a3c0d572c60cf6fa562939a232165ed839cdc592 | [
"MIT"
] | null | null | null | pyatv/mrp/srp.py | ckeehan/pyatv | a3c0d572c60cf6fa562939a232165ed839cdc592 | [
"MIT"
] | null | null | null | """Prototype code for MRP."""
import os
import uuid
import binascii
import hashlib
import logging
from srptools import SRPContext, SRPClientSession, constants
from cryptography.exceptions import InvalidSignature
from cryptography.hazmat.primitives import hashes, serialization
from cryptography.hazmat.primitives.kdf.... | 34.325581 | 88 | 0.649729 |
7941740f130012b8fa85bb99db85cde619b8a773 | 732 | py | Python | src/train_toynetv1.py | JamzumSum/yNet | 78506738e64321cfd26f0af70a62dd2119948e39 | [
"MIT"
] | 5 | 2021-06-09T02:11:19.000Z | 2021-10-04T09:00:31.000Z | src/train_toynetv1.py | JamzumSum/yNet | 78506738e64321cfd26f0af70a62dd2119948e39 | [
"MIT"
] | null | null | null | src/train_toynetv1.py | JamzumSum/yNet | 78506738e64321cfd26f0af70a62dd2119948e39 | [
"MIT"
] | null | null | null | import os
from common.trainer import getTrainComponents
from spectrainer import ToyNetTrainer
from toynet.toynetv1 import ToyNetV1
def post_script(post):
if post and os.path.exists(post):
with open(post) as f:
# use exec here since
# 1. `import` will excute the script at once
... | 24.4 | 56 | 0.654372 |
79417477f3cf95c7879250f354aa67b01cd55b43 | 3,679 | py | Python | sysdescrparser/linux.py | rlaneyjr/sysdescrparser | 4ebe35a41f26da6ff3b9aaa69ba5a99cbbb4d33f | [
"MIT"
] | null | null | null | sysdescrparser/linux.py | rlaneyjr/sysdescrparser | 4ebe35a41f26da6ff3b9aaa69ba5a99cbbb4d33f | [
"MIT"
] | null | null | null | sysdescrparser/linux.py | rlaneyjr/sysdescrparser | 4ebe35a41f26da6ff3b9aaa69ba5a99cbbb4d33f | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""sysdescrparser.linux."""
import re
from sysdescrparser.sysdescr import SysDescr
from sysdescrparser.utils import os_version_names_regex, extract_version_number
# pylint: disable=no-name-in-module
# pylint: disable=no-member
class Linux(SysDescr):
"""Class Linux.
This class is on... | 30.658333 | 104 | 0.480837 |
7941755da32f42a1ca6f81054b51931c683a0784 | 4,510 | py | Python | sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_07_01/operations/_service_tags_operations.py | LianwMS/azure-sdk-for-python | 612d7bca9de86ee1bd1fa59291d7bf897ba9213f | [
"MIT"
] | 2 | 2019-05-17T21:24:53.000Z | 2020-02-12T11:13:42.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_07_01/operations/_service_tags_operations.py | LianwMS/azure-sdk-for-python | 612d7bca9de86ee1bd1fa59291d7bf897ba9213f | [
"MIT"
] | 15 | 2019-07-12T18:18:04.000Z | 2019-07-25T20:55:51.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_07_01/operations/_service_tags_operations.py | LianwMS/azure-sdk-for-python | 612d7bca9de86ee1bd1fa59291d7bf897ba9213f | [
"MIT"
] | 2 | 2020-05-21T22:51:22.000Z | 2020-05-26T20:53:01.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 44.653465 | 139 | 0.68071 |
7941758530fc6ab5e11883f90e945e9f3109c57e | 23,808 | py | Python | tests/integration/states/test_pip_state.py | menglong81/salt | aeeb047f18bd41c31e6f184fbf2f4620f565aae7 | [
"Apache-2.0"
] | 1 | 2019-01-07T08:32:12.000Z | 2019-01-07T08:32:12.000Z | tests/integration/states/test_pip_state.py | menglong81/salt | aeeb047f18bd41c31e6f184fbf2f4620f565aae7 | [
"Apache-2.0"
] | null | null | null | tests/integration/states/test_pip_state.py | menglong81/salt | aeeb047f18bd41c31e6f184fbf2f4620f565aae7 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
'''
:codeauthor: Pedro Algarvio (pedro@algarvio.me)
tests.integration.states.pip_state
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'''
# Import python libs
from __future__ import absolute_import, print_function, unicode_literals
import errno
import os
import glob
import shutil
import sys
try:
... | 39.417219 | 107 | 0.573589 |
7941775e22304f77986be7519e8dcfc38f796526 | 1,072 | py | Python | mg/main/learn.py | matomatical/memograph | 0560e246cc9485c0d1792836d4a52db65a3354ad | [
"MIT"
] | 13 | 2020-11-26T07:23:16.000Z | 2022-02-20T05:46:34.000Z | mg/main/learn.py | matomatical/memograph | 0560e246cc9485c0d1792836d4a52db65a3354ad | [
"MIT"
] | null | null | null | mg/main/learn.py | matomatical/memograph | 0560e246cc9485c0d1792836d4a52db65a3354ad | [
"MIT"
] | 1 | 2021-02-19T08:49:24.000Z | 2021-02-19T08:49:24.000Z | import random
from mg.io import print, input
def run_learn(graph, options):
# decide which links to introduce
print("introduce some new links...")
hand = graph.query(
number=options.num_cards,
topics=options.topics,
new=True
)
n = len(hand)
if n == 0:
print("no... | 28.210526 | 63 | 0.521455 |
7941779784a4d23501bab7749349c2ede4e3febd | 89,939 | py | Python | tests/pipeline/test_blaze.py | leonarduschen/zipline | 5e6c9fce7e0f812bd181024ad192ca2976d49667 | [
"Apache-2.0"
] | 14,525 | 2015-01-01T02:57:52.000Z | 2022-03-31T18:16:35.000Z | tests/pipeline/test_blaze.py | leonarduschen/zipline | 5e6c9fce7e0f812bd181024ad192ca2976d49667 | [
"Apache-2.0"
] | 2,146 | 2015-01-01T13:03:44.000Z | 2022-02-22T03:25:28.000Z | tests/pipeline/test_blaze.py | leonarduschen/zipline | 5e6c9fce7e0f812bd181024ad192ca2976d49667 | [
"Apache-2.0"
] | 4,517 | 2015-01-01T14:26:47.000Z | 2022-03-31T14:38:05.000Z | """
Tests for the blaze interface to the pipeline api.
"""
from __future__ import division
from collections import OrderedDict
from datetime import timedelta, time
from functools import partial
from itertools import product, chain
from unittest import skipIf
import warnings
import blaze as bz
from datashape import ds... | 36.33899 | 79 | 0.478402 |
7941784a19471bc45c490a8e6fa0789a2132837c | 1,904 | py | Python | geometry/point_group.py | Zylphrex/csc420-project | 71fbacb9dbf4331946d50176d97d65edabc208dc | [
"MIT"
] | null | null | null | geometry/point_group.py | Zylphrex/csc420-project | 71fbacb9dbf4331946d50176d97d65edabc208dc | [
"MIT"
] | 6 | 2020-03-31T09:35:50.000Z | 2022-03-12T00:04:13.000Z | geometry/point_group.py | Zylphrex/csc420-project | 71fbacb9dbf4331946d50176d97d65edabc208dc | [
"MIT"
] | null | null | null | import numpy as np
import geometry
class PointGroup(object):
def __init__(self, threshold=geometry.deg_to_rad(15)):
self.points = []
self.cache = {}
self.top = None
self.bottom = None
self.left = None
self.right = None
def add(self, point):
self.point... | 23.506173 | 58 | 0.543067 |
794179859fd8aa89761fe80b82af930c5d8595e7 | 17,057 | py | Python | image/docker/schema2/list.py | jakedt/quay | 424c1a19d744be444ed27aa1718fd74af311d863 | [
"Apache-2.0"
] | 1 | 2020-10-16T19:30:41.000Z | 2020-10-16T19:30:41.000Z | image/docker/schema2/list.py | jakedt/quay | 424c1a19d744be444ed27aa1718fd74af311d863 | [
"Apache-2.0"
] | 15 | 2020-06-18T15:32:06.000Z | 2022-03-03T23:06:24.000Z | image/docker/schema2/list.py | jakedt/quay | 424c1a19d744be444ed27aa1718fd74af311d863 | [
"Apache-2.0"
] | null | null | null | import logging
import json
from cachetools.func import lru_cache
from jsonschema import validate as validate_schema, ValidationError
from digest import digest_tools
from image.docker import ManifestException
from image.docker.interfaces import ManifestInterface
from image.docker.schema1 import DOCKER_SCHEMA1_MANIFEST... | 38.678005 | 116 | 0.594008 |
79417a06d672ff34d6c118e2301feec472c2c8f7 | 820 | py | Python | analog_tests/models.py | Oksamies/django-analog | 1b977efd6553e043f2f1ad399d810ab8c5b51dcb | [
"MIT"
] | 4 | 2016-06-06T06:11:53.000Z | 2017-09-07T01:50:01.000Z | analog_tests/models.py | Oksamies/django-analog | 1b977efd6553e043f2f1ad399d810ab8c5b51dcb | [
"MIT"
] | 17 | 2016-07-01T10:31:23.000Z | 2021-09-22T19:37:25.000Z | analog_tests/models.py | Oksamies/django-analog | 1b977efd6553e043f2f1ad399d810ab8c5b51dcb | [
"MIT"
] | 4 | 2016-11-04T22:38:04.000Z | 2019-12-10T14:11:14.000Z | from django.db import models
from analog.define import define_log_model
from analog.models import BaseLogEntry
class LoggedModel(models.Model):
pass
class PrivateLogEntry(BaseLogEntry):
private = models.BooleanField(default=False, db_index=True)
class Meta:
abstract = True
LoggedModelLogEntr... | 19.069767 | 79 | 0.784146 |
79417a07df748ac4d3bc86f1fc4566c65c437d0d | 1,180 | py | Python | bancodedados_teste/exercicio-teste.py | r-luis/Py4e-Projects | 9f3398b231934e1a3982f23167535295402ebca1 | [
"MIT"
] | null | null | null | bancodedados_teste/exercicio-teste.py | r-luis/Py4e-Projects | 9f3398b231934e1a3982f23167535295402ebca1 | [
"MIT"
] | null | null | null | bancodedados_teste/exercicio-teste.py | r-luis/Py4e-Projects | 9f3398b231934e1a3982f23167535295402ebca1 | [
"MIT"
] | null | null | null | import sqlite3
conn = sqlite3.connect('emaildb.sqlite')
cur = conn.cursor()
cur.execute('''
DROP TABLE IF EXISTS Counts''')
cur.execute('''
CREATE TABLE Counts (email TEXT, count INTEGER)''')
fname = raw_input('Enter file name: ')
if ( len(fname) < 1 ) : fname = 'mbox-short.txt'
fh = open(fname)
for line in fh:
... | 28.095238 | 71 | 0.64322 |
79417c20a94ecf8dff1bebefb9dec9a056f27a81 | 1,078 | py | Python | graph4nlp/pytorch/modules/graph_construction/utils.py | cminusQAQ/graph4nlp | d980e897131f1b9d3766750c06316d94749904fa | [
"Apache-2.0"
] | 1,269 | 2021-06-06T03:27:41.000Z | 2022-03-30T06:33:53.000Z | graph4nlp/pytorch/modules/graph_construction/utils.py | cminusQAQ/graph4nlp | d980e897131f1b9d3766750c06316d94749904fa | [
"Apache-2.0"
] | 106 | 2021-06-07T05:24:01.000Z | 2022-03-31T19:18:48.000Z | graph4nlp/pytorch/modules/graph_construction/utils.py | cminusQAQ/graph4nlp | d980e897131f1b9d3766750c06316d94749904fa | [
"Apache-2.0"
] | 160 | 2021-06-06T15:09:17.000Z | 2022-03-23T02:06:33.000Z | import torch
CORENLP_TIMEOUT_SIGNATURE = "CoreNLP request timed out. Your document may be too long."
def convert_adj_to_graph(graph, adj, reverse_adj, mask_off_val):
slides = (adj != mask_off_val).nonzero(as_tuple=False)
batch_nodes_tensor = torch.Tensor([0] + graph._batch_num_nodes).to(slides.device)
b... | 39.925926 | 98 | 0.702226 |
79417c5cdfe89ed2e5068d11c63139c802f63bff | 1,140 | py | Python | venv/Lib/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_trace_api.py | ajayiagbebaku/NFL-Model | afcc67a85ca7138c58c3334d45988ada2da158ed | [
"MIT"
] | 7 | 2022-01-16T12:28:16.000Z | 2022-03-04T15:31:45.000Z | venv/Lib/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_trace_api.py | ajayiagbebaku/NFL-Model | afcc67a85ca7138c58c3334d45988ada2da158ed | [
"MIT"
] | 8 | 2021-09-22T12:47:32.000Z | 2022-01-14T21:30:38.000Z | venv/Lib/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_trace_api.py | ajayiagbebaku/NFL-Model | afcc67a85ca7138c58c3334d45988ada2da158ed | [
"MIT"
] | 1 | 2022-03-28T09:19:34.000Z | 2022-03-28T09:19:34.000Z | def add_line_breakpoint(plugin, pydb, type, canonical_normalized_filename, line, condition, expression, func_name):
return None
def add_exception_breakpoint(plugin, pydb, type, exception):
return False
def remove_exception_breakpoint(plugin, pydb, type, exception):
return False
def remove_all_exceptio... | 19.322034 | 115 | 0.739474 |
79417c8e025f5eb6893a3dfa21343aab012173ab | 360 | py | Python | helloworld/greet/urls.py | jimmcslim/example-django | 0c05f9e7d4968e79f912d44cdc0b5a1ada29eeb3 | [
"Apache-2.0"
] | 8 | 2021-08-01T10:29:21.000Z | 2022-02-21T18:28:48.000Z | helloworld/greet/urls.py | g-cassie/example-django | b5957fa847b5ba29e9becf601e65db02ec6f2712 | [
"Apache-2.0"
] | 13 | 2021-05-13T14:54:04.000Z | 2022-03-29T17:45:44.000Z | helloworld/greet/urls.py | g-cassie/example-django | b5957fa847b5ba29e9becf601e65db02ec6f2712 | [
"Apache-2.0"
] | 6 | 2021-05-13T06:53:41.000Z | 2022-03-29T07:15:03.000Z | # Copyright 2021 Pants project contributors.
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from django.urls import path, re_path
from helloworld.greet import views
urlpatterns = [
re_path(
r"^tod/(?P<time_of_day>\d\d:\d\d:\d\d)/$", views.for_time_of_day, name="tod"
),
path("<str... | 25.714286 | 84 | 0.675 |
79417d1d3fd157c6d19255116d42f8480df87fdb | 2,485 | py | Python | sdk/python/pulumi_azure_native/devtestlab/list_lab_vhds.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/devtestlab/list_lab_vhds.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/devtestlab/list_lab_vhds.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from .. import _utilities, _tables
from ... | 30.679012 | 124 | 0.657143 |
79417d683324217f3340465a0c627c473a011ce3 | 1,502 | py | Python | src/BearSki/case/TestSuitSet.py | Sirius1942/BearSki | bdc75d6f06946896e2128f1c095b9baf9863b124 | [
"MIT"
] | 13 | 2019-12-10T09:07:45.000Z | 2021-09-08T01:24:22.000Z | src/BearSki/case/TestSuitSet.py | Sirius1942/BearSki | bdc75d6f06946896e2128f1c095b9baf9863b124 | [
"MIT"
] | 1 | 2020-05-06T01:43:50.000Z | 2020-05-06T01:44:46.000Z | build/lib/BearSki/case/TestSuitSet.py | Sirius1942/BearSki | bdc75d6f06946896e2128f1c095b9baf9863b124 | [
"MIT"
] | 6 | 2020-01-07T07:07:42.000Z | 2021-06-04T03:38:19.000Z | from abc import ABCMeta, abstractmethod
import threading
import random
class TestSuit(metaclass=ABCMeta):
def __init__(self,caselist):
self.testcaselist = []
self.createSuit(caselist)
@ abstractmethod
def createSuit(self):
pass
def getCaselist(self):
return self.testcase... | 30.04 | 59 | 0.649134 |
79417d94309fe519862c5903d0d2c58159ff95e0 | 168 | py | Python | comportamentais/strategy/impostos.py | jgabriellima/design-patterns-python | e955d570265c154863fbfc65564dd4781f549042 | [
"Apache-2.0"
] | 363 | 2018-07-30T18:52:55.000Z | 2022-03-29T23:04:26.000Z | comportamentais/strategy/impostos.py | sou-rafael/design-patterns-python | e955d570265c154863fbfc65564dd4781f549042 | [
"Apache-2.0"
] | 7 | 2018-07-14T20:19:23.000Z | 2020-04-17T00:24:30.000Z | comportamentais/strategy/impostos.py | sou-rafael/design-patterns-python | e955d570265c154863fbfc65564dd4781f549042 | [
"Apache-2.0"
] | 99 | 2018-09-06T18:11:43.000Z | 2022-03-27T13:32:45.000Z | class ISS:
def calcula(self, orcamento):
return orcamento.valor * 0.1
class ICMS:
def calcula(self, orcamento):
return orcamento.valor * 0.06
| 18.666667 | 37 | 0.642857 |
7941804888d5be9dd1b2d110c75a0c5a7d1d86e4 | 2,975 | py | Python | redash/query_runner/sqlite.py | xu-bin-bin/redash | 551007d82a5c8a7eaa27ca4f4cf55cef1b140886 | [
"BSD-2-Clause"
] | 2 | 2019-01-24T09:17:57.000Z | 2019-06-18T11:10:51.000Z | redash/query_runner/sqlite.py | xu-bin-bin/redash | 551007d82a5c8a7eaa27ca4f4cf55cef1b140886 | [
"BSD-2-Clause"
] | 1 | 2018-09-28T06:12:48.000Z | 2018-09-28T06:12:48.000Z | redash/query_runner/sqlite.py | xu-bin-bin/redash | 551007d82a5c8a7eaa27ca4f4cf55cef1b140886 | [
"BSD-2-Clause"
] | 1 | 2018-10-29T01:11:50.000Z | 2018-10-29T01:11:50.000Z | import logging
import sqlite3
import sys
from six import reraise
from redash.query_runner import BaseSQLQueryRunner, register
from redash.utils import json_dumps, json_loads
from redash.query_runner.i18n_dataSource import zh
logger = logging.getLogger(__name__)
class Sqlite(BaseSQLQueryRunner):
noop_query = "p... | 30.989583 | 88 | 0.581849 |
794180a2f24594ccaa627757d7e5d833364c0053 | 775 | py | Python | project/parsers/products_parser.py | Anton7177/product_optimizer | 1b1ceb32ac4881adda5f0902748b20159090fe0e | [
"MIT"
] | null | null | null | project/parsers/products_parser.py | Anton7177/product_optimizer | 1b1ceb32ac4881adda5f0902748b20159090fe0e | [
"MIT"
] | null | null | null | project/parsers/products_parser.py | Anton7177/product_optimizer | 1b1ceb32ac4881adda5f0902748b20159090fe0e | [
"MIT"
] | null | null | null | import logging
import httpx
from bs4 import BeautifulSoup
from project.parsers.link_list import get_links
from project.parsers.price import get_price
def run_parser():
"""Entrypoint."""
logging.info('Start parser')
link_list = get_links()
# Открываем сессию на запрос страниц
with httpx.Client(ti... | 27.678571 | 59 | 0.593548 |
794180a4fc0c645d62290699668db35fd95365d4 | 800 | py | Python | pycnal_toolbox/pycnal_toolbox/plot_coast_line_from_mask.py | ESMG/PyCNAL_legacy | a4f6547bce872068a5bb5751231017bc3e4a4503 | [
"BSD-3-Clause"
] | null | null | null | pycnal_toolbox/pycnal_toolbox/plot_coast_line_from_mask.py | ESMG/PyCNAL_legacy | a4f6547bce872068a5bb5751231017bc3e4a4503 | [
"BSD-3-Clause"
] | 3 | 2018-01-23T23:23:24.000Z | 2018-02-07T22:37:28.000Z | pycnal_toolbox/pycnal_toolbox/plot_coast_line_from_mask.py | ESMG/PyCNAL_legacy | a4f6547bce872068a5bb5751231017bc3e4a4503 | [
"BSD-3-Clause"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
import matplotlib.collections as collections
from pycnal_toolbox import get_coast_line_from_mask
def plot_coast_line_from_mask(msk, lon, lat, proj=None):
'''
plot_coast_line_from_mask(msk, {proj})
plot the coastline from msk.
proj=map (optional) is ... | 22.857143 | 59 | 0.64375 |
794180c67f0da318b2e8541d23c18dedc8efe5b4 | 3,810 | py | Python | bokeh/server/views/autoload_js_handler.py | Suicoleiro/bokeh | a212acdf091a7a4df639fa9d443be6ade0018039 | [
"BSD-3-Clause"
] | 15,193 | 2015-01-01T05:11:45.000Z | 2022-03-31T19:30:20.000Z | bokeh/server/views/autoload_js_handler.py | Suicoleiro/bokeh | a212acdf091a7a4df639fa9d443be6ade0018039 | [
"BSD-3-Clause"
] | 9,554 | 2015-01-01T03:16:54.000Z | 2022-03-31T22:59:39.000Z | bokeh/server/views/autoload_js_handler.py | Suicoleiro/bokeh | a212acdf091a7a4df639fa9d443be6ade0018039 | [
"BSD-3-Clause"
] | 4,829 | 2015-01-02T03:35:32.000Z | 2022-03-30T16:40:26.000Z | #-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2021, Anaconda, Inc., and Bokeh Contributors.
# All rights reserved.
#
# The full license is in the file LICENSE.txt, distributed with this software.
#-------------------------------------------------------------------... | 38.484848 | 115 | 0.475066 |
79418125cc1b144ebfa7854cdc9f46f90f1acb76 | 614 | py | Python | la/__init__.py | fhal/la | 5f537345ec7fd627fa4bf16cab3a3f4d5a72800c | [
"BSD-2-Clause"
] | 1 | 2015-01-30T19:49:19.000Z | 2015-01-30T19:49:19.000Z | la/__init__.py | fhal/la | 5f537345ec7fd627fa4bf16cab3a3f4d5a72800c | [
"BSD-2-Clause"
] | null | null | null | la/__init__.py | fhal/la | 5f537345ec7fd627fa4bf16cab3a3f4d5a72800c | [
"BSD-2-Clause"
] | null | null | null | "la init"
# Classes
from la.deflarry import larry
try:
from la.io import IO
from la.io import *
except:
# Cannot import h5py; no archiving available.
pass
from numpy import nan, inf
from la.flarry import *
from la.util.report import info
from la.version import __version__
from la.util impor... | 19.1875 | 67 | 0.688925 |
79418143b47bdfc5e09720589bd70a80bbc19bec | 738 | py | Python | Source/Services/RPSLS.PythonPlayer.Api/app/pick/strategies.py | ivan-b-ivanov/RockPaperScissorsLizardSpock | 9167bcbe5ad2937e834408475c2ec66cf92fef84 | [
"MIT"
] | null | null | null | Source/Services/RPSLS.PythonPlayer.Api/app/pick/strategies.py | ivan-b-ivanov/RockPaperScissorsLizardSpock | 9167bcbe5ad2937e834408475c2ec66cf92fef84 | [
"MIT"
] | null | null | null | Source/Services/RPSLS.PythonPlayer.Api/app/pick/strategies.py | ivan-b-ivanov/RockPaperScissorsLizardSpock | 9167bcbe5ad2937e834408475c2ec66cf92fef84 | [
"MIT"
] | null | null | null | import random
from flask import jsonify
from .rpsls import RPSLS
# Fixed pick Game Strategy
def fixed_strategy(pick_value):
pick_RPSLS=pick_value
def pick():
return pick_RPSLS
return pick
# Random pick Game Strategy
def random_strategy():
def pick():
pick_RPSLS = random... | 21.705882 | 49 | 0.643631 |
794183283b831395d2457adf4f1490a740b5a308 | 1,035 | py | Python | src/cache/commands/static_fetch.py | alvarosg/covid-19-open-data | b252b0c78ac8712618fa53785441c7428230e759 | [
"Apache-2.0"
] | null | null | null | src/cache/commands/static_fetch.py | alvarosg/covid-19-open-data | b252b0c78ac8712618fa53785441c7428230e759 | [
"Apache-2.0"
] | 1 | 2022-03-02T14:54:27.000Z | 2022-03-02T14:54:27.000Z | src/cache/commands/static_fetch.py | alvarosg/covid-19-open-data | b252b0c78ac8712618fa53785441c7428230e759 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# 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 ... | 31.363636 | 74 | 0.755556 |
7941832950c5d1798bd8e43eb9d8fdcb007e56b7 | 2,146 | py | Python | schedule/main/department/department_table.py | DSD-ESDC-EDSC/dynamic-org-chart-scripts | a2247ac85ddadc5b33256a501be16bf787b395b6 | [
"MIT"
] | null | null | null | schedule/main/department/department_table.py | DSD-ESDC-EDSC/dynamic-org-chart-scripts | a2247ac85ddadc5b33256a501be16bf787b395b6 | [
"MIT"
] | null | null | null | schedule/main/department/department_table.py | DSD-ESDC-EDSC/dynamic-org-chart-scripts | a2247ac85ddadc5b33256a501be16bf787b395b6 | [
"MIT"
] | null | null | null | import json
from sqlalchemy import create_engine
from sqlalchemy.types import Integer, Text
from schedule.config import SQLAlchemyConfig
from schedule.main.utils.db_utils import assemble_sqlalchemy_url
def create_department_table(df, org_chart_en, org_chart_fr):
'''
Creates the department table in the databa... | 37 | 98 | 0.67521 |
7941836c1c549aa4f0b4f833094066dafa7249f6 | 445 | py | Python | pyxel/examples/01_hello_pyxel.py | jamad/pyxel | c14534f5fcdcb53d583b00dacc0d1531b2c022e2 | [
"MIT"
] | null | null | null | pyxel/examples/01_hello_pyxel.py | jamad/pyxel | c14534f5fcdcb53d583b00dacc0d1531b2c022e2 | [
"MIT"
] | null | null | null | pyxel/examples/01_hello_pyxel.py | jamad/pyxel | c14534f5fcdcb53d583b00dacc0d1531b2c022e2 | [
"MIT"
] | null | null | null | import pyxel as P
from pyxel import init,image,run,cls,text,blt,btnp
class App:
def __init__(self):
init(160, 120, caption="Hello Pyxel",scale=1)
image(0).load(0, 0, "assets/pyxel_logo_38x16.png")
run(self.update, self.draw)
def update(self):
if btnp(P.KEY_Q):quit()
def dra... | 26.176471 | 58 | 0.588764 |
7941839a9da80a7ef98caa0456465c3a9b8e91b8 | 485 | py | Python | clipper-parm/util/get_volume_for_instance_id.py | mukkachaitanya/parity-models | 9f336a67798934d29592aca471dff6ad047473f6 | [
"Apache-2.0"
] | 32 | 2019-09-11T16:49:58.000Z | 2022-01-26T15:40:40.000Z | clipper-parm/util/get_volume_for_instance_id.py | mukkachaitanya/parity-models | 9f336a67798934d29592aca471dff6ad047473f6 | [
"Apache-2.0"
] | 5 | 2019-11-10T16:13:40.000Z | 2022-01-13T01:31:51.000Z | clipper-parm/util/get_volume_for_instance_id.py | mukkachaitanya/parity-models | 9f336a67798934d29592aca471dff6ad047473f6 | [
"Apache-2.0"
] | 9 | 2019-09-03T14:05:26.000Z | 2021-12-22T07:17:27.000Z | import argparse
import boto3
import pdb
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument("instance_id", type=str, help="ID of instance to query")
args = parser.parse_args()
client = boto3.client('ec2')
volumes = client.describe_volumes(Filters=[{
"Name... | 26.944444 | 80 | 0.647423 |
794183efe89dd288ceed0279046dd9325a5cdd4f | 686 | py | Python | oelint_adv/rule_base/rule_var_insaneskip.py | gstroz/oelint-adv | 089b43492df0b2ca78e17df26c215e5e19ed90cc | [
"BSD-2-Clause"
] | null | null | null | oelint_adv/rule_base/rule_var_insaneskip.py | gstroz/oelint-adv | 089b43492df0b2ca78e17df26c215e5e19ed90cc | [
"BSD-2-Clause"
] | null | null | null | oelint_adv/rule_base/rule_var_insaneskip.py | gstroz/oelint-adv | 089b43492df0b2ca78e17df26c215e5e19ed90cc | [
"BSD-2-Clause"
] | null | null | null | from oelint_adv.cls_item import Variable
from oelint_adv.cls_rule import Rule
class VarInsaneSkip(Rule):
def __init__(self):
super().__init__(id="oelint.vars.insaneskip",
severity="error",
message="INSANE_SKIP should be avoided at any cost")
def check... | 38.111111 | 106 | 0.610787 |
7941848d0646dbdfb0a010e2071ce148fad381dd | 6,514 | py | Python | tests/cfngin/hooks/test_utils.py | animaxcg/runway | dfe38107126b61a7f297874f235f68a045a5ca09 | [
"Apache-2.0"
] | null | null | null | tests/cfngin/hooks/test_utils.py | animaxcg/runway | dfe38107126b61a7f297874f235f68a045a5ca09 | [
"Apache-2.0"
] | null | null | null | tests/cfngin/hooks/test_utils.py | animaxcg/runway | dfe38107126b61a7f297874f235f68a045a5ca09 | [
"Apache-2.0"
] | null | null | null | """Tests for runway.cfngin.hooks.utils."""
# pylint: disable=unused-argument
import queue
import unittest
from runway.cfngin.config import Hook
from runway.cfngin.hooks.utils import handle_hooks
from ..factories import mock_context, mock_provider
HOOK_QUEUE = queue.Queue()
class TestHooks(unittest.TestCase):
"... | 34.104712 | 79 | 0.593951 |
7941855687e4130840a00aee4b150f6a4014d59d | 8,378 | py | Python | idcmanager_sdk/model/next_builder/storyboard_node_pb2.py | easyopsapis/easyops-api-python | adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0 | [
"Apache-2.0"
] | 5 | 2019-07-31T04:11:05.000Z | 2021-01-07T03:23:20.000Z | idcmanager_sdk/model/next_builder/storyboard_node_pb2.py | easyopsapis/easyops-api-python | adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0 | [
"Apache-2.0"
] | null | null | null | idcmanager_sdk/model/next_builder/storyboard_node_pb2.py | easyopsapis/easyops-api-python | adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: storyboard_node.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.prot... | 53.025316 | 986 | 0.775364 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.