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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4a124e29d399bdce0752d2746d43fa4acbad4bb6 | 55,566 | py | Python | training/retrain.py | namtran98/Tensorflow_Research | 958cbb0d9e36c21d59d29c4cc289abdf8cf2e687 | [
"Apache-2.0"
] | null | null | null | training/retrain.py | namtran98/Tensorflow_Research | 958cbb0d9e36c21d59d29c4cc289abdf8cf2e687 | [
"Apache-2.0"
] | null | null | null | training/retrain.py | namtran98/Tensorflow_Research | 958cbb0d9e36c21d59d29c4cc289abdf8cf2e687 | [
"Apache-2.0"
] | null | null | null | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 43.615385 | 152 | 0.699241 |
4a124e93b906bfc4ef4b2ab0066fe063f200d67b | 4,049 | py | Python | neutron/conf/quota.py | 10088/neutron | 38cdfb88558887b830514b4ef390fd535c11942c | [
"Apache-2.0"
] | null | null | null | neutron/conf/quota.py | 10088/neutron | 38cdfb88558887b830514b4ef390fd535c11942c | [
"Apache-2.0"
] | null | null | null | neutron/conf/quota.py | 10088/neutron | 38cdfb88558887b830514b4ef390fd535c11942c | [
"Apache-2.0"
] | null | null | null | # Copyright 2016 Intel Corporation.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... | 38.198113 | 78 | 0.65794 |
4a124ea7ae0ae6857c7715b0d2e0a69b2ba29d50 | 6,823 | py | Python | analysis-tools/Python3/Kwik.py | RynzzZ/DCN | 0dfacca9ac984f4429c9d4b30f45b5ff44b7a4e7 | [
"MIT"
] | 1 | 2016-09-09T02:51:05.000Z | 2016-09-09T02:51:05.000Z | analysis-tools/Python3/Kwik.py | RynzzZ/DCN | 0dfacca9ac984f4429c9d4b30f45b5ff44b7a4e7 | [
"MIT"
] | null | null | null | analysis-tools/Python3/Kwik.py | RynzzZ/DCN | 0dfacca9ac984f4429c9d4b30f45b5ff44b7a4e7 | [
"MIT"
] | 1 | 2016-09-20T06:21:18.000Z | 2016-09-20T06:21:18.000Z | # -*- coding: utf-8 -*-
"""
Created on Wed Oct 8 12:05:54 2014
@author: Josh Siegle
Loads .kwd, .kwe, .kwik and .kwx files
Examples:
# load recording dataset 0
Raw = Kwik.load('experiment1_100.raw.kwd')
# load a specific dataset
Raw = Kwik.load('experiment1_100.raw.kwd', 7)
# load all ... | 32.032864 | 119 | 0.487909 |
4a124eecf58174226269caac104f0e73af6258a7 | 1,123 | py | Python | WideAndDeep/TreeUtil.py | JYLFamily/Porto_Seguro_Safe_Driver_Prediction | 13dfb8073cbd2a3c06a34f59b7dc446bc25bc937 | [
"Apache-2.0"
] | 1 | 2019-05-20T06:32:27.000Z | 2019-05-20T06:32:27.000Z | WideAndDeep/TreeUtil.py | JYLFamily/Porto_Seguro_Safe_Driver_Prediction | 13dfb8073cbd2a3c06a34f59b7dc446bc25bc937 | [
"Apache-2.0"
] | null | null | null | WideAndDeep/TreeUtil.py | JYLFamily/Porto_Seguro_Safe_Driver_Prediction | 13dfb8073cbd2a3c06a34f59b7dc446bc25bc937 | [
"Apache-2.0"
] | null | null | null | # coding:utf-8
from sklearn.model_selection import cross_val_score
from sklearn.ensemble import RandomForestClassifier
from bayes_opt import BayesianOptimization
def rf_cv(min_samples_leaf, n_estimators, feature, target):
rf = RandomForestClassifier(
min_samples_leaf=min_samples_leaf,
n_estimator... | 27.390244 | 71 | 0.651825 |
4a124fd047d294edd222b8ad6a764723dc46e169 | 1,875 | py | Python | examples/sample_usage.py | JasmineBhalla17/ml-pipeline-analyzer | 9beb94925b77ba4d50007d8f6fcde05d086bb361 | [
"MIT"
] | 5 | 2022-02-14T19:27:33.000Z | 2022-03-29T01:38:45.000Z | examples/sample_usage.py | JasmineBhalla17/ml-pipeline-analyzer | 9beb94925b77ba4d50007d8f6fcde05d086bb361 | [
"MIT"
] | null | null | null | examples/sample_usage.py | JasmineBhalla17/ml-pipeline-analyzer | 9beb94925b77ba4d50007d8f6fcde05d086bb361 | [
"MIT"
] | 3 | 2022-02-19T20:05:52.000Z | 2022-03-08T09:31:36.000Z | from sklearn.svm import SVC
from sklearn.pipeline import *
from sklearn.preprocessing import *
from sklearn.discriminant_analysis import *
from sklearn.impute import *
from sklearn.feature_selection import RFE
from sklearn.decomposition import PCA
from sklearn.ensemble import RandomForestClassifier
import numpy as np
f... | 42.613636 | 101 | 0.725333 |
4a12501bbf64d6733d18ee660bb21c7436926ea2 | 311 | py | Python | api/forms/room_form.py | huyhoang17/Word2Vec_Recommender_System | 69e3b3e438f802e405fbf6496360c152d9e3c939 | [
"MIT"
] | 8 | 2019-04-17T13:38:24.000Z | 2021-07-24T06:46:29.000Z | api/forms/room_form.py | huyhoang17/Word2Vec_Recommender_System | 69e3b3e438f802e405fbf6496360c152d9e3c939 | [
"MIT"
] | 6 | 2020-02-12T00:49:16.000Z | 2021-06-11T01:42:18.000Z | api/forms/room_form.py | huyhoang17/Word2Vec_Recommender_System | 69e3b3e438f802e405fbf6496360c152d9e3c939 | [
"MIT"
] | 3 | 2020-02-28T15:00:28.000Z | 2021-12-08T07:06:55.000Z | from django import forms
from api.forms.abstract_form import AbstractForm
class LuxstayRoomForm(AbstractForm):
custom_session_id = forms.CharField(required=False, initial=None)
ip_address = forms.CharField(required=False, initial=None)
room_id = forms.IntegerField(required=False, initial=None)
| 28.272727 | 69 | 0.794212 |
4a12505b82a3a30031591a8cfae55ddea0b1e877 | 978 | py | Python | mul_func.py | motokimura/shake_shake_chainer | 3b87193dbfcf58723586dfc34c9bc21a900da327 | [
"MIT"
] | 2 | 2018-11-26T13:51:56.000Z | 2019-08-12T00:22:20.000Z | mul_func.py | motokimura/shake_shake_chainer | 3b87193dbfcf58723586dfc34c9bc21a900da327 | [
"MIT"
] | null | null | null | mul_func.py | motokimura/shake_shake_chainer | 3b87193dbfcf58723586dfc34c9bc21a900da327 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import chainer
from chainer import cuda
from chainer import configuration
class Mul(chainer.function.Function):
def __init__(self):
return
def forward(self, inputs):
x1, x2 = inputs
xp = cuda.get_array_module(x1) # Get numpy(x=n) or c... | 26.432432 | 81 | 0.578732 |
4a1250c74cb85854f8782a2eab9ba0b33c458e05 | 724 | py | Python | tests/conftest.py | kei0822kei/twinpy | 14b47df1fa5b57a54f57d5c2120ed3fe9502a9bc | [
"MIT"
] | null | null | null | tests/conftest.py | kei0822kei/twinpy | 14b47df1fa5b57a54f57d5c2120ed3fe9502a9bc | [
"MIT"
] | 5 | 2021-01-19T13:08:28.000Z | 2021-02-20T12:03:59.000Z | tests/conftest.py | kei0822kei/twinpy | 14b47df1fa5b57a54f57d5c2120ed3fe9502a9bc | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This is for pytest fixtures.
"""
import pytest
from twinpy.properties.hexagonal import get_hcp_cell
a = 2.93
c = 4.65
symbol = 'Ti'
@pytest.fixture(autouse=True, scope='session')
def ti_cell_wyckoff_c() -> tuple:
"""
Ti hexagonal cell.
Returns:
... | 18.564103 | 65 | 0.631215 |
4a125144d66da9b8047be1c368f33878cb21a580 | 5,473 | py | Python | gaokao.py | firmianay/gaokao | 871e8d9df7ba15ecfbf1c16107e985f8ffc4d2be | [
"MIT"
] | 27 | 2017-12-06T06:12:07.000Z | 2021-12-22T10:59:20.000Z | gaokao.py | firmianay/gaokao | 871e8d9df7ba15ecfbf1c16107e985f8ffc4d2be | [
"MIT"
] | null | null | null | gaokao.py | firmianay/gaokao | 871e8d9df7ba15ecfbf1c16107e985f8ffc4d2be | [
"MIT"
] | 8 | 2017-12-06T06:12:08.000Z | 2021-10-31T03:19:55.000Z | # -*- coding: utf_8 -*-
import config
import json
from itertools import islice
class ZhiYuan():
def __init__(self, config):
self.region = config.get('region')
self.subject = config.get('subject')
self.firstLine = config.get('firstLine')
self.score = config.get('score')
self... | 34.20625 | 93 | 0.415129 |
4a1251464623aa111780c07ccf743d6cc7ae3281 | 9,205 | py | Python | examples/binary_examples/PyFstat_example_binary_mcmc_vs_grid_comparison.py | RobertRosca/PyFstat | 1c9568bb3dc87c3d33aeb41b3f572e9990665372 | [
"MIT"
] | null | null | null | examples/binary_examples/PyFstat_example_binary_mcmc_vs_grid_comparison.py | RobertRosca/PyFstat | 1c9568bb3dc87c3d33aeb41b3f572e9990665372 | [
"MIT"
] | 1 | 2021-02-11T16:16:26.000Z | 2021-02-11T16:16:26.000Z | examples/binary_examples/PyFstat_example_binary_mcmc_vs_grid_comparison.py | RobertRosca/PyFstat | 1c9568bb3dc87c3d33aeb41b3f572e9990665372 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""
Binary CW example: Comparison between MCMC and grid search
==========================================================
Comparison of the semicoherent F-statistic MCMC search algorithm
to a simple grid search accross the parameter space corresponding
to a CW source in a binary system.
"""
imp... | 30.180328 | 103 | 0.576534 |
4a1252d11d25a536d51d4fc9102311fa9ed53ab4 | 3,778 | py | Python | tests/www/www/settings.py | grantjenks/django-modelqueue | 6e46760cd6da1060d8e7a011c7c8f160f905bddc | [
"Apache-2.0"
] | 3 | 2018-03-27T01:12:03.000Z | 2021-03-07T17:06:09.000Z | tests/www/www/settings.py | grantjenks/django-modelqueue | 6e46760cd6da1060d8e7a011c7c8f160f905bddc | [
"Apache-2.0"
] | 2 | 2021-12-13T16:11:13.000Z | 2021-12-13T16:13:39.000Z | tests/www/www/settings.py | grantjenks/django-modelqueue | 6e46760cd6da1060d8e7a011c7c8f160f905bddc | [
"Apache-2.0"
] | 1 | 2020-06-13T10:02:51.000Z | 2020-06-13T10:02:51.000Z | """
Django settings for www project.
Generated by 'django-admin startproject' using Django 1.11.11.
For more information on this file, see
https://docs.djangoproject.com/en/1.11/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.11/ref/settings/
"""
import os
#... | 24.69281 | 91 | 0.644521 |
4a125476ca8aaa4222f7e6ffc370e96ef167c571 | 8,489 | py | Python | qtile_extras/resources/stravadata/sync.py | joefiorini/qtile-extras | 6ba140281b4ae52576198e1dffd969cb41b4cf7f | [
"MIT"
] | 30 | 2021-09-01T18:16:45.000Z | 2022-03-27T02:19:53.000Z | qtile_extras/resources/stravadata/sync.py | joefiorini/qtile-extras | 6ba140281b4ae52576198e1dffd969cb41b4cf7f | [
"MIT"
] | 23 | 2021-10-11T00:43:02.000Z | 2022-03-19T06:29:49.000Z | qtile_extras/resources/stravadata/sync.py | joefiorini/qtile-extras | 6ba140281b4ae52576198e1dffd969cb41b4cf7f | [
"MIT"
] | 4 | 2021-11-05T16:52:05.000Z | 2022-03-04T01:48:28.000Z | # Copyright (c) 2016-21 elParaguayo
#
# 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, dist... | 25.802432 | 85 | 0.639651 |
4a12549d687e794dcd54854411c42df74b7f245f | 1,576 | py | Python | interactive-deep-colorization/caffe_files/color_quantization.py | arthw/colorization | e7f85ec307c9d27a16a87276beaaf2dee5492292 | [
"BSD-2-Clause"
] | 2 | 2018-08-10T13:15:11.000Z | 2022-01-15T02:04:18.000Z | interactive-deep-colorization/caffe_files/color_quantization.py | arthw/colorization | e7f85ec307c9d27a16a87276beaaf2dee5492292 | [
"BSD-2-Clause"
] | null | null | null | interactive-deep-colorization/caffe_files/color_quantization.py | arthw/colorization | e7f85ec307c9d27a16a87276beaaf2dee5492292 | [
"BSD-2-Clause"
] | 1 | 2022-02-06T16:00:10.000Z | 2022-02-06T16:00:10.000Z |
import numpy as np
from IPython.core.debugger import Pdb as pdb
import sklearn.neighbors as nn
import util
import caffe
class NNEncode():
# Encode points as a linear combination of unordered points
# using NN search and RBF kernel
def __init__(self,NN,sigma,km_filepath='./data/color_bins/pts_in_hull.npy',cc=-1):
... | 30.901961 | 85 | 0.742386 |
4a125543e9c1119cc557a6f7addbaca45565ffc0 | 8,420 | py | Python | tools/plain_train_net.py | Zeinab-Haroon/detectron2 | 6a56c9cadaf392697c4bdef00325e415d07a459f | [
"Apache-2.0"
] | 5 | 2021-06-16T04:40:44.000Z | 2022-02-09T11:20:10.000Z | tools/plain_train_net.py | Zeinab-Haroon/detectron2 | 6a56c9cadaf392697c4bdef00325e415d07a459f | [
"Apache-2.0"
] | 1 | 2022-02-16T12:06:15.000Z | 2022-02-16T12:06:15.000Z | tools/plain_train_net.py | Zeinab-Haroon/detectron2 | 6a56c9cadaf392697c4bdef00325e415d07a459f | [
"Apache-2.0"
] | 3 | 2021-09-26T14:42:00.000Z | 2022-02-09T11:20:14.000Z | #!/usr/bin/env python
# Copyright (c) Facebook, Inc. and its affiliates.
"""
Detectron2 training script with a plain training loop.
This script reads a given config file and runs the training or evaluation.
It is an entry point that is able to train standard models in detectron2.
In order to let one script support tr... | 35.527426 | 99 | 0.67981 |
4a125558f73775f5099682c5f40af9d6869fc3e5 | 124 | py | Python | declare_qtquick/widgets/api/qtquick3d/effects/__init__.py | likianta/declare-qtquick | 93c2ce49d841ccdeb0272085c5f731139927f0d7 | [
"MIT"
] | 3 | 2021-11-02T03:45:27.000Z | 2022-03-27T05:33:36.000Z | declare_qtquick/widgets/api/qtquick3d/effects/__init__.py | likianta/declare-qtquick | 93c2ce49d841ccdeb0272085c5f731139927f0d7 | [
"MIT"
] | null | null | null | declare_qtquick/widgets/api/qtquick3d/effects/__init__.py | likianta/declare-qtquick | 93c2ce49d841ccdeb0272085c5f731139927f0d7 | [
"MIT"
] | null | null | null | from __declare_qtquick_internals__ import qml_imports
qml_imports.add("QtQuick3D.Effects")
from .__list__ import * # noqa
| 24.8 | 53 | 0.822581 |
4a1256b0ec9adc40e1e507862095f133af318e44 | 348 | py | Python | wesp32_light_server_socket/boot.py | ocdtrekkie/wesp32-demos | d1340c555488011db12cebfa7e110fe6f233bd75 | [
"MIT"
] | 18 | 2018-10-16T19:14:16.000Z | 2021-11-29T21:58:55.000Z | wesp32_light_server_socket/boot.py | ocdtrekkie/wesp32-demos | d1340c555488011db12cebfa7e110fe6f233bd75 | [
"MIT"
] | 4 | 2019-02-11T20:59:30.000Z | 2021-05-23T03:13:08.000Z | wesp32_light_server_socket/boot.py | ocdtrekkie/wesp32-demos | d1340c555488011db12cebfa7e110fe6f233bd75 | [
"MIT"
] | 5 | 2019-02-11T17:27:58.000Z | 2021-09-25T10:08:02.000Z | # This file is executed on every boot (including wake-boot from deepsleep)
import machine
import network
# Connect to LAN
lan = network.LAN(mdc = machine.Pin(16), mdio = machine.Pin(17),
power = None, phy_type = network.PHY_LAN8720, phy_addr=0)
lan.active(True)
# Define convenient reset function
def... | 26.769231 | 75 | 0.70977 |
4a12573725b3323dd3382e787e0e77f4c66f7f21 | 4,702 | py | Python | myapp/time_series/heavy_tailed.py | rnagumo/numpyro_example | 04820753586658e621c6537ee63a29274f8f427e | [
"MIT"
] | null | null | null | myapp/time_series/heavy_tailed.py | rnagumo/numpyro_example | 04820753586658e621c6537ee63a29274f8f427e | [
"MIT"
] | null | null | null | myapp/time_series/heavy_tailed.py | rnagumo/numpyro_example | 04820753586658e621c6537ee63a29274f8f427e | [
"MIT"
] | null | null | null | """Univariate, heavy tailed time series.
ref)
https://pyro.ai/examples/forecasting_i.html
data)
https://www.bart.gov/about/reports/ridership
"""
import pathlib
from typing import Dict, Optional, Tuple
import jax.numpy as jnp
import matplotlib.pyplot as plt
import numpy as np
import numpyro
import numpyro.distributi... | 29.3875 | 93 | 0.664185 |
4a12574eb6f303f6dd67536ead479cfd9d81faf4 | 1,171 | py | Python | videoKernelPseudoRGB/scripts/genColorMixes.py | Vortetty/AreOS | 6705561986cc3e5228303d7ff11e255ba950aff3 | [
"Apache-2.0"
] | null | null | null | videoKernelPseudoRGB/scripts/genColorMixes.py | Vortetty/AreOS | 6705561986cc3e5228303d7ff11e255ba950aff3 | [
"Apache-2.0"
] | null | null | null | videoKernelPseudoRGB/scripts/genColorMixes.py | Vortetty/AreOS | 6705561986cc3e5228303d7ff11e255ba950aff3 | [
"Apache-2.0"
] | null | null | null | from itertools import permutations, combinations
colors = [
(0, 0, 0),
(0, 0, 168),
(0, 168, 0),
(0, 168, 168),
(168, 0, 0),
(168, 0, 168),
(168, 168, 0),
(168, 168, 168),
(87, 87, 87),
(87, 87, 255),
(87, 255, 87),
(87, 255, 255),
(255, 87, 87),
(255, 87, 255),
... | 22.09434 | 131 | 0.551665 |
4a125875c5224f3a40699943dc6ef767359bf48d | 18,316 | py | Python | dash_fcast/distributions/table.py | dsbowen/dash-fcast | b589dfa370e8170f76893ba2f484bf03eaca7522 | [
"MIT"
] | null | null | null | dash_fcast/distributions/table.py | dsbowen/dash-fcast | b589dfa370e8170f76893ba2f484bf03eaca7522 | [
"MIT"
] | 1 | 2021-05-26T12:55:28.000Z | 2021-05-27T12:15:48.000Z | dash_fcast/distributions/table.py | dsbowen/dash-fcast | b589dfa370e8170f76893ba2f484bf03eaca7522 | [
"MIT"
] | null | null | null | """# Tabular distribution
Examples
--------
In `app.py`:
```python
import dash_fcast.distributions as dist
import dash
import dash_bootstrap_components as dbc
import dash_core_components as dcc
import dash_html_components as html
import plotly.graph_objects as go
from dash.dependencies import Input, Output
app = da... | 31.41681 | 80 | 0.510483 |
4a125891b82449b927cc423573d0f38e18684c79 | 959 | py | Python | sopel/util/pyexec.py | Ameenekosan/Yumiko | 16624f0b3f5c94262104b85866ce2cf7fd96f0db | [
"EFL-2.0"
] | null | null | null | sopel/util/pyexec.py | Ameenekosan/Yumiko | 16624f0b3f5c94262104b85866ce2cf7fd96f0db | [
"EFL-2.0"
] | null | null | null | sopel/util/pyexec.py | Ameenekosan/Yumiko | 16624f0b3f5c94262104b85866ce2cf7fd96f0db | [
"EFL-2.0"
] | null | null | null | import http
import web
def eval_py(code, paste_multiline=True):
attempts = 0
while True:
try:
output = http.get("http://eval.appspot.com/eval", statement=code).rstrip('\n')
# sometimes the API returns a blank string on first attempt, lets try again
# and make sure ... | 29.96875 | 94 | 0.561001 |
4a12590d9af5739763d15bc1082209a83f0165af | 10,877 | py | Python | tests/test_nhg.py | YuriiHordynskyi/sonic-swss | 17a2f93a545b8669e44a62231c340ba518272ed7 | [
"Apache-2.0"
] | null | null | null | tests/test_nhg.py | YuriiHordynskyi/sonic-swss | 17a2f93a545b8669e44a62231c340ba518272ed7 | [
"Apache-2.0"
] | null | null | null | tests/test_nhg.py | YuriiHordynskyi/sonic-swss | 17a2f93a545b8669e44a62231c340ba518272ed7 | [
"Apache-2.0"
] | 2 | 2020-06-22T11:50:22.000Z | 2021-04-13T12:40:13.000Z | import os
import re
import time
import json
import pytest
import ipaddress
from swsscommon import swsscommon
class TestNextHopGroup(object):
def test_route_nhg(self, dvs, testlog):
config_db = swsscommon.DBConnector(swsscommon.CONFIG_DB, dvs.redis_sock, 0)
intf_tbl = swsscommon.Table(config_db, "... | 34.204403 | 129 | 0.57001 |
4a125916e35c005ae3766a8dcbd3dd2ee14254a7 | 948 | py | Python | ui/About_logic.py | wendyltan/ZebraCrossDensityDetector | b69d4adca403c3404738e088934627d60d244a90 | [
"MIT"
] | 5 | 2019-03-11T11:12:31.000Z | 2020-08-04T07:33:49.000Z | ui/About_logic.py | wendyltan/ZebraCrossDensityDetector | b69d4adca403c3404738e088934627d60d244a90 | [
"MIT"
] | null | null | null | ui/About_logic.py | wendyltan/ZebraCrossDensityDetector | b69d4adca403c3404738e088934627d60d244a90 | [
"MIT"
] | 4 | 2019-03-12T15:44:45.000Z | 2020-08-04T07:33:50.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2019/3/14 15:45
# @Author : wendy
# @Usage :
# @File : About_logic.py
# @Software: PyCharm
from PyQt5 import QtWidgets, QtCore
from PyQt5.QtCore import QUrl
from PyQt5.QtWebEngineWidgets import QWebEngineView
from utils import helper as hp
from ui.About... | 29.625 | 63 | 0.681435 |
4a12598758c0b7c90685a5b7b4b440c973c98bdf | 6,690 | py | Python | unoffical_api_wrapper/database.py | DrArtemi/riot-api | a68bf94061a3c63e511418669097499c3e2c055d | [
"MIT"
] | null | null | null | unoffical_api_wrapper/database.py | DrArtemi/riot-api | a68bf94061a3c63e511418669097499c3e2c055d | [
"MIT"
] | null | null | null | unoffical_api_wrapper/database.py | DrArtemi/riot-api | a68bf94061a3c63e511418669097499c3e2c055d | [
"MIT"
] | null | null | null | from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
from models import Leagues, Matches, Players, Stages, Teams, Tournaments, create_table
import dateparser
import json
class DBUtility:
"""This class is used to store league data to database.
"""
def __init__(self, user: str, ... | 40.301205 | 110 | 0.589387 |
4a125a24e6f63898df95fb1e4a101091f1c8c356 | 227 | py | Python | tests/check_framework/urls/no_warnings_i18n.py | jpmallarino/django | 659d2421c7adbbcd205604002d521d82d6b0b465 | [
"BSD-3-Clause",
"0BSD"
] | 16 | 2019-08-10T12:24:06.000Z | 2020-05-21T09:11:14.000Z | tests/check_framework/urls/no_warnings_i18n.py | jpmallarino/django | 659d2421c7adbbcd205604002d521d82d6b0b465 | [
"BSD-3-Clause",
"0BSD"
] | 12 | 2019-08-10T11:55:29.000Z | 2020-05-21T04:46:30.000Z | tests/check_framework/urls/no_warnings_i18n.py | jpmallarino/django | 659d2421c7adbbcd205604002d521d82d6b0b465 | [
"BSD-3-Clause",
"0BSD"
] | 3 | 2019-08-20T13:29:34.000Z | 2020-01-30T22:05:10.000Z | from django.conf.urls.i18n import i18n_patterns
from django.urls import path
from django.utils.translation import gettext_lazy as _
urlpatterns = i18n_patterns(
path(_("translated/"), lambda x: x, name="i18n_prefixed"),
)
| 28.375 | 62 | 0.77533 |
4a125a56d67ed784287969d1f1d164aae8ae04d5 | 1,378 | py | Python | Superhero-Statistics/code.py | shyam8898/ga-learner-dsmp-repo | c104c9fed903aec579cdbcda7c84591a81377de3 | [
"MIT"
] | null | null | null | Superhero-Statistics/code.py | shyam8898/ga-learner-dsmp-repo | c104c9fed903aec579cdbcda7c84591a81377de3 | [
"MIT"
] | null | null | null | Superhero-Statistics/code.py | shyam8898/ga-learner-dsmp-repo | c104c9fed903aec579cdbcda7c84591a81377de3 | [
"MIT"
] | null | null | null | # --------------
#Header files
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
#path of the data file- path
data=pd.read_csv(path)
data['Gender'].replace('_','Agender',inplace=True)
gender_count=data['Gender'].value_counts()
#Code starts here
# --------------
# #Code starts her... | 21.53125 | 57 | 0.680697 |
4a125cb3f4d770b13b02397dc764d90f978b3019 | 7,116 | py | Python | simplekml/styleselector.py | unhcfreg/DROP | 80dac9dcfeb8ed16d262d78f053464a2f4f10caf | [
"MIT"
] | 40 | 2017-08-28T01:55:27.000Z | 2022-03-16T12:35:14.000Z | simplekml/styleselector.py | adamjaffeback/DROP | 80dac9dcfeb8ed16d262d78f053464a2f4f10caf | [
"MIT"
] | 2 | 2018-11-02T15:48:16.000Z | 2021-09-25T11:01:41.000Z | simplekml/styleselector.py | adamjaffeback/DROP | 80dac9dcfeb8ed16d262d78f053464a2f4f10caf | [
"MIT"
] | 21 | 2017-05-11T20:59:34.000Z | 2022-02-02T09:35:51.000Z | """
Copyright 2011-2015 Kyle Lancaster
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in ... | 33.885714 | 106 | 0.607223 |
4a125dc5f98629828682f45728f632627c91c6e9 | 9,382 | py | Python | simdkalman/primitives.py | microprediction/simdkalman | 2bf7d69d319eec465eb023d81b7aa3ff1c58da7e | [
"MIT"
] | null | null | null | simdkalman/primitives.py | microprediction/simdkalman | 2bf7d69d319eec465eb023d81b7aa3ff1c58da7e | [
"MIT"
] | null | null | null | simdkalman/primitives.py | microprediction/simdkalman | 2bf7d69d319eec465eb023d81b7aa3ff1c58da7e | [
"MIT"
] | 1 | 2021-12-19T16:22:16.000Z | 2021-12-19T16:22:16.000Z | """
Low-level Kalman filter computation steps with multi-dimensional input arrays.
Unlike with the `KalmanFilter <index.html#simdkalman.KalmanFilter>`_ class,
all inputs must be numpy arrays. However, their dimensions can flexibly vary
form 1 to 3 as long as they are reasonable from the point of view of matrix
multipli... | 32.919298 | 139 | 0.651567 |
4a126006b69c70d7780a310de46c0c2e0a0495ba | 1,976 | py | Python | mmocr/utils/model.py | yuexy/mmocr | 82488024db159266e66ea6b0d6f84a5a18e87362 | [
"Apache-2.0"
] | 2,261 | 2021-04-08T03:45:41.000Z | 2022-03-31T23:37:46.000Z | mmocr/utils/model.py | yuexy/mmocr | 82488024db159266e66ea6b0d6f84a5a18e87362 | [
"Apache-2.0"
] | 789 | 2021-04-08T05:40:13.000Z | 2022-03-31T09:42:39.000Z | mmocr/utils/model.py | yuexy/mmocr | 82488024db159266e66ea6b0d6f84a5a18e87362 | [
"Apache-2.0"
] | 432 | 2021-04-08T03:56:16.000Z | 2022-03-30T18:44:43.000Z | # Copyright (c) OpenMMLab. All rights reserved.
import torch
class _BatchNormXd(torch.nn.modules.batchnorm._BatchNorm):
"""A general BatchNorm layer without input dimension check.
Reproduced from @kapily's work:
(https://github.com/pytorch/pytorch/issues/41081#issuecomment-783961547)
The only differe... | 38 | 79 | 0.690283 |
4a12626a242a94a98adbcccc61c17949a824194b | 2,626 | py | Python | h2o-py/tests/testdir_algos/automl/pyunit_automl_params_attributes.py | JannisBush/h2o-3 | 30aa2a86e6bfa1febb5f95f3cb43811337895f7f | [
"Apache-2.0"
] | null | null | null | h2o-py/tests/testdir_algos/automl/pyunit_automl_params_attributes.py | JannisBush/h2o-3 | 30aa2a86e6bfa1febb5f95f3cb43811337895f7f | [
"Apache-2.0"
] | null | null | null | h2o-py/tests/testdir_algos/automl/pyunit_automl_params_attributes.py | JannisBush/h2o-3 | 30aa2a86e6bfa1febb5f95f3cb43811337895f7f | [
"Apache-2.0"
] | 1 | 2021-09-09T03:47:11.000Z | 2021-09-09T03:47:11.000Z | import os
import sys
sys.path.insert(1, os.path.join("..","..",".."))
import h2o
from h2o.automl import H2OAutoML
from h2o.exceptions import H2OValueError
from tests import pyunit_utils as pu
def import_dataset(seed=0):
df = h2o.import_file(path=pu.locate("smalldata/prostate/prostate.csv"))
target = "CAPSULE... | 33.666667 | 146 | 0.680503 |
4a1262f58bd2b0f5a8f5d89f03facccc8ccdc5b1 | 176 | py | Python | openiPrototype/openiPrototype/APIS/Products_and_Services/Card/admin.py | OPENi-ict/ntua_demo | 104118fbe1f54db35386ca96286317ceb64cb658 | [
"Apache-2.0"
] | null | null | null | openiPrototype/openiPrototype/APIS/Products_and_Services/Card/admin.py | OPENi-ict/ntua_demo | 104118fbe1f54db35386ca96286317ceb64cb658 | [
"Apache-2.0"
] | null | null | null | openiPrototype/openiPrototype/APIS/Products_and_Services/Card/admin.py | OPENi-ict/ntua_demo | 104118fbe1f54db35386ca96286317ceb64cb658 | [
"Apache-2.0"
] | null | null | null | __author__ = 'mpetyx'
from django.contrib import admin
from .models import OpeniCard
class CardAdmin(admin.ModelAdmin):
pass
admin.site.register(OpeniCard, CardAdmin)
| 14.666667 | 41 | 0.778409 |
4a12630acaf39d35ccbaf6b5b990dbc644982cd0 | 698 | py | Python | Demo/util.py | matthagy/rtchemstats | 4233020779b5fd98ef2bf5908cbc787bc762030b | [
"Apache-2.0"
] | 2 | 2020-08-24T19:51:18.000Z | 2020-08-24T20:18:27.000Z | Demo/util.py | matthagy/rtchemstats | 4233020779b5fd98ef2bf5908cbc787bc762030b | [
"Apache-2.0"
] | null | null | null | Demo/util.py | matthagy/rtchemstats | 4233020779b5fd98ef2bf5908cbc787bc762030b | [
"Apache-2.0"
] | null | null | null |
from pyljfluid.components import LJForceField, Config, MDSimulator
N = 1000
forcefield = LJForceField(sigma=1.0, epsilon=1.0, r_cutoff=2.5)
r_neighbor_skin = 1.0 * forcefield.sigma
mass = 48 * forcefield.epsilon * forcefield.sigma ** -2
dt = 0.032
def get_equilibrated_simulation(rho, T):
config0 = Config.create(... | 33.238095 | 88 | 0.681948 |
4a1263155473ea49f5444937843ea92ec649e264 | 806 | py | Python | excel_sheet_column_title.py | fossilet/leetcode | 4cf787c74fc339dc6aee6a0b633ca15b38ac18a1 | [
"MIT"
] | 5 | 2015-12-10T14:19:02.000Z | 2021-07-02T01:23:34.000Z | excel_sheet_column_title.py | fossilet/leetcode | 4cf787c74fc339dc6aee6a0b633ca15b38ac18a1 | [
"MIT"
] | null | null | null | excel_sheet_column_title.py | fossilet/leetcode | 4cf787c74fc339dc6aee6a0b633ca15b38ac18a1 | [
"MIT"
] | 1 | 2015-10-01T01:43:14.000Z | 2015-10-01T01:43:14.000Z | """
https://oj.leetcode.com/problems/excel-sheet-column-title/
Given a positive integer, return its corresponding column title as appear in an Excel sheet.
For example:
1 -> A
2 -> B
3 -> C
...
26 -> Z
27 -> AA
28 -> AB
"""
class Solution:
# @return a string
def convertToTitle(s... | 20.15 | 92 | 0.5 |
4a1263831d4105dfe997b5e956f58093160127cb | 3,770 | py | Python | SynthesiaKontrol-MK1.py | a1vv/KompleteKontrolLightGuide | 8b0953a1067a99d55c719a878ffc0a4e58fc334f | [
"MIT"
] | 3 | 2019-01-20T22:38:21.000Z | 2021-07-20T08:48:58.000Z | SynthesiaKontrol-MK1.py | a1vv/KompleteKontrolLightGuide | 8b0953a1067a99d55c719a878ffc0a4e58fc334f | [
"MIT"
] | null | null | null | SynthesiaKontrol-MK1.py | a1vv/KompleteKontrolLightGuide | 8b0953a1067a99d55c719a878ffc0a4e58fc334f | [
"MIT"
] | 2 | 2019-02-13T15:57:01.000Z | 2020-04-02T12:17:17.000Z | # The MIT License
# Modified to work with MK1 keyboards
import hid
import mido
from msvcrt import getch
numkeys = 88 #change this to the number of keys on your keyboard
offset = -(108-numkeys+1)
pid = 0x1410 #change this to the product id of your keyboard
def init():
"""Connect to the keyboard, swi... | 34.272727 | 109 | 0.577188 |
4a12638d1a91c76a3a86d3012fe89033695be65a | 6,784 | py | Python | src/toil/server/app.py | BD2KGenomics/slugflow | ec83920e1636fd24814688bf1569feebfae73620 | [
"Apache-2.0"
] | 516 | 2015-07-30T19:08:55.000Z | 2018-07-03T20:53:42.000Z | src/toil/server/app.py | BD2KGenomics/toil | 88d73fbfd42ec22fd692940fc1efdacaf53b1b76 | [
"Apache-2.0"
] | 1,949 | 2015-07-29T23:38:49.000Z | 2018-07-05T12:42:04.000Z | src/toil/server/app.py | BD2KGenomics/slugflow | ec83920e1636fd24814688bf1569feebfae73620 | [
"Apache-2.0"
] | 193 | 2015-07-31T18:52:57.000Z | 2018-07-05T08:54:11.000Z | # Copyright (C) 2015-2021 Regents of the University of California
#
# 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 app... | 48.457143 | 106 | 0.638267 |
4a1263cbf7666c292320f8a80580ae8c05546c8b | 6,870 | py | Python | google/cloud/asset_v1p4beta1/services/asset_service/transports/base.py | renovate-bot/python-asset | 8222f9c247e6a27dc5b74452866c01cd11f86f8c | [
"Apache-2.0"
] | 24 | 2020-04-24T04:15:30.000Z | 2022-03-23T12:24:00.000Z | google/cloud/asset_v1p4beta1/services/asset_service/transports/base.py | renovate-bot/python-asset | 8222f9c247e6a27dc5b74452866c01cd11f86f8c | [
"Apache-2.0"
] | 115 | 2020-02-07T03:12:01.000Z | 2022-03-07T16:39:29.000Z | google/cloud/asset_v1p4beta1/services/asset_service/transports/base.py | renovate-bot/python-asset | 8222f9c247e6a27dc5b74452866c01cd11f86f8c | [
"Apache-2.0"
] | 21 | 2020-02-08T04:14:50.000Z | 2022-01-29T08:07:32.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... | 37.747253 | 101 | 0.648326 |
4a1263d3b37ff62b5c8cd7f9cb7b2bc2231e0cf7 | 565 | py | Python | env/lib/python3.8/site-packages/plotly/validators/surface/contours/z/_highlightwidth.py | acrucetta/Chicago_COVI_WebApp | a37c9f492a20dcd625f8647067394617988de913 | [
"MIT",
"Unlicense"
] | 76 | 2020-07-06T14:44:05.000Z | 2022-02-14T15:30:21.000Z | env/lib/python3.8/site-packages/plotly/validators/surface/contours/z/_highlightwidth.py | acrucetta/Chicago_COVI_WebApp | a37c9f492a20dcd625f8647067394617988de913 | [
"MIT",
"Unlicense"
] | 11 | 2020-08-09T02:30:14.000Z | 2022-03-12T00:50:14.000Z | env/lib/python3.8/site-packages/plotly/validators/surface/contours/z/_highlightwidth.py | acrucetta/Chicago_COVI_WebApp | a37c9f492a20dcd625f8647067394617988de913 | [
"MIT",
"Unlicense"
] | 11 | 2020-07-12T16:18:07.000Z | 2022-02-05T16:48:35.000Z | import _plotly_utils.basevalidators
class HighlightwidthValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(
self, plotly_name="highlightwidth", parent_name="surface.contours.z", **kwargs
):
super(HighlightwidthValidator, self).__init__(
plotly_name=plotly_name,
... | 33.235294 | 86 | 0.623009 |
4a12641bc56deb2b6e58e77e3fd7bc6b81dce2f9 | 327 | py | Python | home/migrations/0034_rename_event_events1.py | ianshulx/egiportal | 3a147a4a61e58f2a6229e08a5a4c256d7b674b81 | [
"MIT"
] | 1 | 2022-02-17T10:34:21.000Z | 2022-02-17T10:34:21.000Z | home/migrations/0034_rename_event_events1.py | ianshulx/egiportal | 3a147a4a61e58f2a6229e08a5a4c256d7b674b81 | [
"MIT"
] | null | null | null | home/migrations/0034_rename_event_events1.py | ianshulx/egiportal | 3a147a4a61e58f2a6229e08a5a4c256d7b674b81 | [
"MIT"
] | null | null | null | # Generated by Django 3.2.9 on 2021-12-26 08:04
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('home', '0033_auto_20211226_1323'),
]
operations = [
migrations.RenameModel(
old_name='event',
new_name='events1',
),... | 18.166667 | 47 | 0.590214 |
4a1264d59397461ec6b3d2b85c32cf493d50f823 | 33,338 | py | Python | LightPipes/core.py | jccmak/lightpipes | 1a296fe08bdd97fc9a0e11f92bab25c85f68e57d | [
"BSD-3-Clause"
] | null | null | null | LightPipes/core.py | jccmak/lightpipes | 1a296fe08bdd97fc9a0e11f92bab25c85f68e57d | [
"BSD-3-Clause"
] | null | null | null | LightPipes/core.py | jccmak/lightpipes | 1a296fe08bdd97fc9a0e11f92bab25c85f68e57d | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
import numpy as _np
from scipy.special import hermite, genlaguerre
from scipy.interpolate import RectBivariateSpline
from .misc import backward_compatible
USE_CV2 = False
if USE_CV2:
import cv2
USE_SKIMAGE = False
if USE_SKIMAGE:
from skimage.restoration import unwrap_phase as _unwra... | 33.539235 | 148 | 0.598446 |
4a12650f398eca17ed0a9b8dd83350929ae6f12f | 752 | py | Python | WebMirror/management/rss_parser_funcs/feed_parse_extract夢見る世界.py | fake-name/ReadableWebProxy | ed5c7abe38706acc2684a1e6cd80242a03c5f010 | [
"BSD-3-Clause"
] | 193 | 2016-08-02T22:04:35.000Z | 2022-03-09T20:45:41.000Z | WebMirror/management/rss_parser_funcs/feed_parse_extract夢見る世界.py | fake-name/ReadableWebProxy | ed5c7abe38706acc2684a1e6cd80242a03c5f010 | [
"BSD-3-Clause"
] | 533 | 2016-08-23T20:48:23.000Z | 2022-03-28T15:55:13.000Z | WebMirror/management/rss_parser_funcs/feed_parse_extract夢見る世界.py | fake-name/ReadableWebProxy | ed5c7abe38706acc2684a1e6cd80242a03c5f010 | [
"BSD-3-Clause"
] | 19 | 2015-08-13T18:01:08.000Z | 2021-07-12T17:13:09.000Z | def extract夢見る世界(item):
"""
Parser for '夢見る世界'
"""
if 'Otome Games' in item['tags']:
return None
if 'Drama CDs' in item['tags']:
return None
vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title'])
if not (chp or vol) or 'preview' in item['title'].lower():
return None
tagmap = [... | 30.08 | 117 | 0.607713 |
4a1265c8a6badf0011a0a26f3bfd00c2fb78e479 | 4,366 | py | Python | extra_apps/xadmin/plugins/quickform.py | txqzzz/831net-backend | c73167124b6a10a774e873389900d31fb15a842c | [
"CC0-1.0"
] | null | null | null | extra_apps/xadmin/plugins/quickform.py | txqzzz/831net-backend | c73167124b6a10a774e873389900d31fb15a842c | [
"CC0-1.0"
] | null | null | null | extra_apps/xadmin/plugins/quickform.py | txqzzz/831net-backend | c73167124b6a10a774e873389900d31fb15a842c | [
"CC0-1.0"
] | null | null | null | import copy
from django import forms
from django.db import models
from django.forms.models import modelform_factory
from django.utils.safestring import mark_safe
from django.utils.translation import ugettext as _
from xadmin.layout import Layout
from xadmin.sites import site
from xadmin.util import get_model_from_rela... | 37.965217 | 166 | 0.649336 |
4a126626ea8013b7a7ce44f0434e182ef8128f73 | 7,120 | py | Python | src/robot/parsing/lexer/lexer.py | timgates42/robotframework | 53fa94a667317621808ee41f274580b3162a0188 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | src/robot/parsing/lexer/lexer.py | timgates42/robotframework | 53fa94a667317621808ee41f274580b3162a0188 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | src/robot/parsing/lexer/lexer.py | timgates42/robotframework | 53fa94a667317621808ee41f274580b3162a0188 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # Copyright 2008-2015 Nokia Networks
# Copyright 2016- Robot Framework Foundation
#
# 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
... | 36.512821 | 78 | 0.605197 |
4a1266799b31f6ae81fd0dd5dda1fe984a8f664a | 2,443 | py | Python | day21/day21.py | alcatrazEscapee/AdventOfCode2021 | a473b01b8931791b4a1fd03bf05b286ed0ac9f85 | [
"MIT"
] | 4 | 2021-12-07T22:25:51.000Z | 2021-12-22T18:15:25.000Z | day21/day21.py | alcatrazEscapee/AdventOfCode2021 | a473b01b8931791b4a1fd03bf05b286ed0ac9f85 | [
"MIT"
] | null | null | null | day21/day21.py | alcatrazEscapee/AdventOfCode2021 | a473b01b8931791b4a1fd03bf05b286ed0ac9f85 | [
"MIT"
] | 1 | 2021-12-17T00:47:26.000Z | 2021-12-17T00:47:26.000Z | from utils import get_input, ints, cyclic_mod
from collections import Counter
from functools import lru_cache
from typing import Tuple
def main(text: str):
p1, p2 = (ints(line)[-1] for line in text.split('\n'))
print('Part 1:', play_deterministic_dice(p1, p2))
print('Part 2:', max(play_dirac_dice(p1, p2... | 36.462687 | 123 | 0.636103 |
4a126725c5f2b18676a4abfdacd87a84ff6bdac3 | 2,146 | py | Python | resume_parser/cli.py | kailaspathi/ResumeParser | 6457100a5cbd1d5131a31c5a1b3f221b100db516 | [
"MIT"
] | 215 | 2018-12-12T05:36:27.000Z | 2022-03-12T06:33:29.000Z | resume_parser/cli.py | kailaspathi/ResumeParser | 6457100a5cbd1d5131a31c5a1b3f221b100db516 | [
"MIT"
] | 40 | 2018-12-19T01:01:36.000Z | 2022-03-25T05:32:19.000Z | resume_parser/cli.py | kailaspathi/ResumeParser | 6457100a5cbd1d5131a31c5a1b3f221b100db516 | [
"MIT"
] | 153 | 2018-12-18T22:17:24.000Z | 2022-03-25T08:11:30.000Z | # Author: Omkar Pathak
import os
import argparse
from pprint import pprint
from resume_parser.resume_parser import ResumeParser
import multiprocessing as mp
def print_cyan(text):
print("\033[96m {}\033[00m" .format(text))
class ResumeParserCli(object):
def __init__(self):
self.__parser = argpars... | 34.063492 | 116 | 0.638397 |
4a12673a2fd4282eebe72167aa51a3c3c7a807fc | 5,074 | py | Python | tools/perf/page_sets/rendering/tough_scrollbar_scrolling_cases.py | zealoussnow/chromium | fd8a8914ca0183f0add65ae55f04e287543c7d4a | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 14,668 | 2015-01-01T01:57:10.000Z | 2022-03-31T23:33:32.000Z | tools/perf/page_sets/rendering/tough_scrollbar_scrolling_cases.py | zealoussnow/chromium | fd8a8914ca0183f0add65ae55f04e287543c7d4a | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 86 | 2015-10-21T13:02:42.000Z | 2022-03-14T07:50:50.000Z | tools/perf/page_sets/rendering/tough_scrollbar_scrolling_cases.py | zealoussnow/chromium | fd8a8914ca0183f0add65ae55f04e287543c7d4a | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 5,941 | 2015-01-02T11:32:21.000Z | 2022-03-31T16:35:46.000Z | # Copyright 2021 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import time
from telemetry.internal.actions import page_action
from telemetry.page import shared_page_state
from page_sets.rendering import rendering_story
... | 39.030769 | 79 | 0.715609 |
4a1267577ff7cca44769131af60a554bb53aae75 | 2,003 | py | Python | src/merge.py | vishalmhjn/sumo_network_detectors | 4fd267f535e93c97c0aa0236a91a6c159f43654b | [
"MIT"
] | null | null | null | src/merge.py | vishalmhjn/sumo_network_detectors | 4fd267f535e93c97c0aa0236a91a6c159f43654b | [
"MIT"
] | null | null | null | src/merge.py | vishalmhjn/sumo_network_detectors | 4fd267f535e93c97c0aa0236a91a6c159f43654b | [
"MIT"
] | null | null | null | import geojson
import pandas as pd
import sys
scenario = sys.argv[1]
if scenario =="munich":
OUT_FILE="../sharedstreets/detector_sumo_mapping_munich.csv"
with open('../sharedstreets/bast_munich.matched.geojson') as f:
munich_detectors = geojson.load(f)
with open('../sharedstreets/sumo_network_mu... | 47.690476 | 132 | 0.717424 |
4a1267689e525b4856893f57c6c0b5dbb4f98936 | 3,192 | py | Python | scripts/unused/unused-whole_brain_segmentation/02_winner_map.py | ofgulban/meso-MRI | 15ef8e19aae6218833a06bf01418d3d83eafd8c7 | [
"BSD-3-Clause"
] | 1 | 2022-01-21T13:48:01.000Z | 2022-01-21T13:48:01.000Z | scripts/unused/unused-whole_brain_segmentation/02_winner_map.py | ofgulban/meso-MRI | 15ef8e19aae6218833a06bf01418d3d83eafd8c7 | [
"BSD-3-Clause"
] | null | null | null | scripts/unused/unused-whole_brain_segmentation/02_winner_map.py | ofgulban/meso-MRI | 15ef8e19aae6218833a06bf01418d3d83eafd8c7 | [
"BSD-3-Clause"
] | 1 | 2022-01-21T13:48:08.000Z | 2022-01-21T13:48:08.000Z | """Winner maps from tissue probabilities."""
import os
import subprocess
import numpy as np
import nibabel as nb
# =============================================================================
NII_NAMES = [
'/home/faruk/data/DATA_MRI_NIFTI/derived/sub-01/T1_wholebrain/01_DNN_Segmentator/sub-01_ses-T2s_MP2RAGE_uni... | 43.726027 | 180 | 0.696115 |
4a12678a79d932bf6bd6afcccefb4290c671e7b2 | 7,591 | py | Python | tests/python/relay/aot/test_cpp_aot.py | rkimball/incubator-tvm | 85e42b6af38ea3bd0c99c8208d7baed5086a8959 | [
"Apache-2.0"
] | null | null | null | tests/python/relay/aot/test_cpp_aot.py | rkimball/incubator-tvm | 85e42b6af38ea3bd0c99c8208d7baed5086a8959 | [
"Apache-2.0"
] | null | null | null | tests/python/relay/aot/test_cpp_aot.py | rkimball/incubator-tvm | 85e42b6af38ea3bd0c99c8208d7baed5086a8959 | [
"Apache-2.0"
] | null | null | null | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 36.849515 | 98 | 0.636016 |
4a126826edc9dc3afa64f70a1e40c4536771f95b | 1,588 | py | Python | src/climsoft_api/api/obsscheduleclass/schema.py | faysal-ishtiaq/climsoft-api | 46dacdeba5d935ee3b944df00731640170b87ccd | [
"MIT"
] | null | null | null | src/climsoft_api/api/obsscheduleclass/schema.py | faysal-ishtiaq/climsoft-api | 46dacdeba5d935ee3b944df00731640170b87ccd | [
"MIT"
] | 2 | 2022-01-16T15:41:27.000Z | 2022-01-30T18:37:13.000Z | src/climsoft_api/api/obsscheduleclass/schema.py | openclimateinitiative/climsoft-api | 3591d7499dd7777617b8086332dc83fab1af9588 | [
"MIT"
] | 2 | 2021-12-22T21:50:19.000Z | 2022-01-28T12:53:32.000Z | from typing import List
import climsoft_api.api.station.schema as station_schema
from climsoft_api.api.schema import BaseSchema, Response
from pydantic import constr, Field
class CreateObsScheduleClass(BaseSchema):
scheduleClass: constr(max_length=255) = Field(title="Schedule Class")
description: constr(max_... | 28.357143 | 73 | 0.700252 |
4a12689caf78c60ffcbb4584cae4fe8899871c10 | 1,646 | py | Python | tests/tests_conversations/tests_view_transactions/test_utils.py | borissimkin/moneykeeper-bot | 45f7ed92be187db71d28c5326a5b62cb587c88bf | [
"MIT"
] | 2 | 2021-08-04T08:04:31.000Z | 2022-01-21T13:00:28.000Z | tests/tests_conversations/tests_view_transactions/test_utils.py | borissimkin/moneykeeper-bot | 45f7ed92be187db71d28c5326a5b62cb587c88bf | [
"MIT"
] | 2 | 2021-06-08T21:07:54.000Z | 2021-09-08T01:46:50.000Z | tests/tests_conversations/tests_view_transactions/test_utils.py | borissimkin/moneykeeper-bot | 45f7ed92be187db71d28c5326a5b62cb587c88bf | [
"MIT"
] | null | null | null | import datetime
import unittest
from sqlalchemy.orm import sessionmaker
from bot.conversations.view_transactions.utils import make_list_transactions
from bot.models import Base, Earning, Consumption
from tests.test_models import engine
from tests.utils_models import example_user, add_example_user, add_example_categor... | 41.15 | 98 | 0.634265 |
4a1269fb7062e258a27ae185b86810b11e124880 | 375 | py | Python | script/deduplicate.py | SYSU-zhanglab/tRNA-m5C | 25f77801fecdb06449c9a4754688180fa3a23006 | [
"MIT"
] | 1 | 2021-07-14T10:01:38.000Z | 2021-07-14T10:01:38.000Z | script/deduplicate.py | SYSU-zhanglab/tRNA-m5C | 25f77801fecdb06449c9a4754688180fa3a23006 | [
"MIT"
] | null | null | null | script/deduplicate.py | SYSU-zhanglab/tRNA-m5C | 25f77801fecdb06449c9a4754688180fa3a23006 | [
"MIT"
] | 1 | 2022-03-04T04:18:56.000Z | 2022-03-04T04:18:56.000Z | from Bio import SeqIO
import sys
data = {}
for seq in SeqIO.parse(sys.argv[1],"fasta"):
# tRNA-Ala-AGC-1-1
ID = seq.id.split("-")
new_id = "-".join(ID[:-1])
if new_id not in data:
data[new_id] = str(seq.seq).upper()
else:
if data[new_id] != str(seq.seq).upper():
data[seq.id] = str(seq.seq).upper()
for key... | 22.058824 | 44 | 0.626667 |
4a126acb6b91dff87d9d5bfd94f440bf65b27b84 | 2,972 | py | Python | thejoker/tests/test_data.py | stephtdouglas/thejoker | b1f2681cd72b6c04d19b24aadf818639c5f59ad0 | [
"MIT"
] | null | null | null | thejoker/tests/test_data.py | stephtdouglas/thejoker | b1f2681cd72b6c04d19b24aadf818639c5f59ad0 | [
"MIT"
] | null | null | null | thejoker/tests/test_data.py | stephtdouglas/thejoker | b1f2681cd72b6c04d19b24aadf818639c5f59ad0 | [
"MIT"
] | null | null | null | # Third-party
import astropy.time as atime
import astropy.units as u
import numpy as np
import pytest
try:
import matplotlib.pyplot as plt
HAS_MPL = True
except:
HAS_MPL = False
# Package
from ..data import RVData
def test_rvdata():
# test various initializations
t = np.random.uniform(55555., 56... | 25.843478 | 67 | 0.60969 |
4a126c3781c64234251f71066acec5a68dee0bb3 | 1,282 | py | Python | tests/models/test_rutherford_reimer_tem.py | drix00/pyelectroncrosssections | b9090f458f3e69af80d103d3883444248715d100 | [
"Apache-2.0"
] | null | null | null | tests/models/test_rutherford_reimer_tem.py | drix00/pyelectroncrosssections | b9090f458f3e69af80d103d3883444248715d100 | [
"Apache-2.0"
] | null | null | null | tests/models/test_rutherford_reimer_tem.py | drix00/pyelectroncrosssections | b9090f458f3e69af80d103d3883444248715d100 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
.. py:currentmodule:: tests.models.test_rutherford_reimer_tem
.. moduleauthor:: Hendrix Demers <hendrix.demers@mail.mcgill.ca>
Tests for the :py:mod:`eecs.models.rutherford_reimer_tem` module.
"""
#####################################################################... | 27.869565 | 79 | 0.639626 |
4a126c5727d1712a568cdbc82ecbb856eb7fc3fb | 8,755 | py | Python | workBousaiTYO_baseline/predflowio/STDN_attention.py | deepkashiwa20/DeepCrowd | 847bcc20ca36b521eead4ededa5d11b2fd2af30a | [
"MIT"
] | 4 | 2021-09-07T09:29:43.000Z | 2022-03-28T07:18:16.000Z | workBousaiOSA_baseline/predflowio/STDN_attention.py | deepkashiwa20/DeepCrowd | 847bcc20ca36b521eead4ededa5d11b2fd2af30a | [
"MIT"
] | null | null | null | workBousaiOSA_baseline/predflowio/STDN_attention.py | deepkashiwa20/DeepCrowd | 847bcc20ca36b521eead4ededa5d11b2fd2af30a | [
"MIT"
] | 2 | 2021-06-18T01:28:16.000Z | 2021-08-10T01:24:49.000Z | from keras.layers import Layer
import keras.backend as K
class Attention(Layer):
def __init__(self, method=None, **kwargs):
self.supports_masking = True
if method != 'lba' and method !='ga' and method != 'cba' and method is not None:
raise ValueError('attention method is not supported')
... | 41.29717 | 155 | 0.552142 |
4a126d7ae31577eb871f956b17604f9c769cb135 | 3,771 | py | Python | barf/utils/utils.py | IMULMUL/barf-project | 9547ef843b8eb021c2c32c140e36173c0b4eafa3 | [
"BSD-2-Clause"
] | 1,395 | 2015-01-02T11:43:30.000Z | 2022-03-30T01:15:26.000Z | barf/utils/utils.py | IMULMUL/barf-project | 9547ef843b8eb021c2c32c140e36173c0b4eafa3 | [
"BSD-2-Clause"
] | 54 | 2015-02-11T05:18:05.000Z | 2021-12-10T08:45:39.000Z | barf/utils/utils.py | IMULMUL/barf-project | 9547ef843b8eb021c2c32c140e36173c0b4eafa3 | [
"BSD-2-Clause"
] | 207 | 2015-01-05T09:47:54.000Z | 2022-03-30T01:15:29.000Z | # Copyright (c) 2014, Fundacion Dr. Manuel Sadosky
# All rights reserved.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# 1. Redistributions of source code must retain the above copyright notice, this
# list of condit... | 30.41129 | 80 | 0.679661 |
4a126d9b80820403a87e6fa9374a27438d68d55b | 5,316 | py | Python | GPyOpt/acquisitions/LCB_oneq.py | FredericSauv/GPyOpt | ce59d70e890c95c65ab6b8c1d803d364fc825df5 | [
"BSD-3-Clause"
] | 1 | 2020-04-02T21:05:51.000Z | 2020-04-02T21:05:51.000Z | GPyOpt/acquisitions/LCB_oneq.py | FredericSauv/GPyOpt | ce59d70e890c95c65ab6b8c1d803d364fc825df5 | [
"BSD-3-Clause"
] | null | null | null | GPyOpt/acquisitions/LCB_oneq.py | FredericSauv/GPyOpt | ce59d70e890c95c65ab6b8c1d803d364fc825df5 | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2016, the GPyOpt Authors
# Licensed under the BSD 3-clause license (see LICENSE.txt)
from .base import AcquisitionBase
from ..util.general import change_of_var_Phi,change_of_var_Phi_withGradients
from ..models import gpmodel
import numpy as np
class AcquisitionLCB_oneq(AcquisitionBase):
"""
G... | 45.435897 | 141 | 0.617381 |
4a126d9cd660685dd476a374006967a14f1596e4 | 905 | py | Python | sunscraper/ecb/tasks.py | dekoza/demo_scraper | bd7eb97def49e8d284e0db05c89a86b8523843de | [
"MIT"
] | null | null | null | sunscraper/ecb/tasks.py | dekoza/demo_scraper | bd7eb97def49e8d284e0db05c89a86b8523843de | [
"MIT"
] | null | null | null | sunscraper/ecb/tasks.py | dekoza/demo_scraper | bd7eb97def49e8d284e0db05c89a86b8523843de | [
"MIT"
] | null | null | null | from decimal import Decimal
import feedparser
import pendulum
import logging
from sunscraper.taskapp.celery import app
from . import models
logger = logging.getLogger('celery')
@app.task(bind=True)
def scrape_currency_rsses():
# TODO: parallelize
for currency in models.Currency.objects.all():
feed ... | 33.518519 | 112 | 0.668508 |
4a126dde619afedf37c5a3aebecdab9ccbadf55f | 102 | py | Python | geral/livro_python_eficaz/src/capitulo1/item6_strider.py | flaviogf/Cursos | 2b120dbcd24a907121f58482fdcdfa01b164872c | [
"MIT"
] | 2 | 2021-02-20T23:50:07.000Z | 2021-08-15T03:04:35.000Z | geral/livro_python_eficaz/src/capitulo1/item6_strider.py | flaviogf/Cursos | 2b120dbcd24a907121f58482fdcdfa01b164872c | [
"MIT"
] | 18 | 2019-08-07T02:33:00.000Z | 2021-03-18T22:52:38.000Z | geral/livro_python_eficaz/src/capitulo1/item6_strider.py | flaviogf/Cursos | 2b120dbcd24a907121f58482fdcdfa01b164872c | [
"MIT"
] | 2 | 2020-09-28T13:00:09.000Z | 2021-12-30T12:21:08.000Z | a = ['red', 'blue', 'yellow', 'green']
print(a[::2])
print(a[1::2])
b = b'mongoose'
print(b[::-1])
| 11.333333 | 38 | 0.5 |
4a126e9d7ad426d4e9e6072e2c98f57eeaa9db74 | 60,591 | py | Python | tensorflow/python/ops/resource_variable_ops.py | hsm207/tensorflow | 8ab4678ba216c3ec8fa32f417cb667b056689939 | [
"Apache-2.0"
] | 4 | 2021-06-15T17:26:07.000Z | 2021-11-17T10:58:08.000Z | tensorflow/python/ops/resource_variable_ops.py | hsm207/tensorflow | 8ab4678ba216c3ec8fa32f417cb667b056689939 | [
"Apache-2.0"
] | 4 | 2020-09-26T00:55:50.000Z | 2022-02-10T01:53:06.000Z | tensorflow/python/ops/resource_variable_ops.py | hsm207/tensorflow | 8ab4678ba216c3ec8fa32f417cb667b056689939 | [
"Apache-2.0"
] | 6 | 2018-12-20T01:35:20.000Z | 2020-07-10T17:29:57.000Z | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 40.046927 | 108 | 0.683666 |
4a126f9fe21db0e65d3c7cd22f2f0b69968b34df | 987 | py | Python | Rekursif/liveCoding/2-rekursive-format-duration.py | SyamsulAlterra/Alta | 13e8c185e91414e3f46e5d20f39370f8e58e7cd0 | [
"MIT"
] | null | null | null | Rekursif/liveCoding/2-rekursive-format-duration.py | SyamsulAlterra/Alta | 13e8c185e91414e3f46e5d20f39370f8e58e7cd0 | [
"MIT"
] | 6 | 2021-09-02T18:50:40.000Z | 2022-02-27T11:06:31.000Z | Rekursif/liveCoding/2-rekursive-format-duration.py | SyamsulAlterra/Alta | 13e8c185e91414e3f46e5d20f39370f8e58e7cd0 | [
"MIT"
] | null | null | null | def hour(num): #rekursif jam
if num<3600:
return 0
num=num-3600
return 1+hour(num)
def minutes(num): #rekursif menit
if num<60:
return 0
num=num-60
return 1+minutes(num)
def recursiveFormatDuration(num):
if num<1 or num>86400:
return "angka diluar ketentua... | 21.456522 | 72 | 0.624113 |
4a126fca36b9e4c630d98f8ddae0589cb8f29e5d | 12,743 | py | Python | saas/backend/apps/role/serializers.py | Canway-shiisa/bk-iam-saas | 73c3770d9647c9cc8d515427cd1d053d8af9d071 | [
"MIT"
] | null | null | null | saas/backend/apps/role/serializers.py | Canway-shiisa/bk-iam-saas | 73c3770d9647c9cc8d515427cd1d053d8af9d071 | [
"MIT"
] | null | null | null | saas/backend/apps/role/serializers.py | Canway-shiisa/bk-iam-saas | 73c3770d9647c9cc8d515427cd1d053d8af9d071 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
TencentBlueKing is pleased to support the open source community by making 蓝鲸智云-权限中心(BlueKing-IAM) available.
Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved.
Licensed under the MIT License (the "License"); you may not use this file except in compliance with th... | 37.260234 | 117 | 0.710351 |
4a126fe6048e0559a34f1c911cbe7a43c808754c | 12,617 | py | Python | models/pix2pix_tm2_mc_reg_in2_multi_model.py | tkuri/pytorch-CycleGAN-and-pix2pix | b00b3f0bcebfb12d3f026c2a61c98ff63175a583 | [
"BSD-3-Clause"
] | null | null | null | models/pix2pix_tm2_mc_reg_in2_multi_model.py | tkuri/pytorch-CycleGAN-and-pix2pix | b00b3f0bcebfb12d3f026c2a61c98ff63175a583 | [
"BSD-3-Clause"
] | null | null | null | models/pix2pix_tm2_mc_reg_in2_multi_model.py | tkuri/pytorch-CycleGAN-and-pix2pix | b00b3f0bcebfb12d3f026c2a61c98ff63175a583 | [
"BSD-3-Clause"
] | null | null | null | import torch
from .base_model import BaseModel
from . import networks
from torch.nn import functional as F
class Pix2PixTm2McRegIn2MultiModel(BaseModel):
""" This class implements the pix2pix model, for learning a mapping from input images to output images given paired data.
The model training requires '--dat... | 58.957944 | 195 | 0.6389 |
4a1271051f59cc429d7e9a430cccaa6dc41dff23 | 668 | py | Python | lib/model/nms_poly/nms_poly_wrapper.py | VDIGPKU/SReN_MM | aeb95305d489d0c4ea18bbf15b3f39387b73738d | [
"MIT"
] | 1 | 2021-11-05T03:29:28.000Z | 2021-11-05T03:29:28.000Z | lib/model/nms_poly/nms_poly_wrapper.py | VDIGPKU/SReN_MM | aeb95305d489d0c4ea18bbf15b3f39387b73738d | [
"MIT"
] | null | null | null | lib/model/nms_poly/nms_poly_wrapper.py | VDIGPKU/SReN_MM | aeb95305d489d0c4ea18bbf15b3f39387b73738d | [
"MIT"
] | null | null | null | # --------------------------------------------------------
# Fast R-CNN
# Copyright (c) 2015 Microsoft
# Licensed under The MIT License [see LICENSE for details]
# Written by Ross Girshick
# --------------------------------------------------------
import torch
from lib.model.utils.config import cfg
from lib.model.nms_p... | 35.157895 | 66 | 0.583832 |
4a1271f036e10e95cf781747d5f3a517fd97dc81 | 1,673 | py | Python | client/osx/objc_test.py | nahidupa/grr | 100a9d85ef2abb234e12e3ac2623caffb4116be7 | [
"Apache-2.0"
] | 6 | 2015-04-03T02:25:28.000Z | 2021-11-17T21:42:59.000Z | client/osx/objc_test.py | nahidupa/grr | 100a9d85ef2abb234e12e3ac2623caffb4116be7 | [
"Apache-2.0"
] | 3 | 2020-02-11T22:29:15.000Z | 2021-06-10T17:44:31.000Z | client/osx/objc_test.py | nahidupa/grr | 100a9d85ef2abb234e12e3ac2623caffb4116be7 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# Copyright 2012 Google Inc. All Rights Reserved.
"""Tests for grr.client.lib.osx.objc.
These tests don't have OS X dependencies and will run on linux.
"""
import ctypes
import mox
from grr.client.osx import objc
from grr.lib import flags
from grr.lib import test_lib
class ObjcTest(test_li... | 26.983871 | 70 | 0.706515 |
4a12734401fea3206ce88dcf9ebb5adc9b10539e | 16,675 | py | Python | research/object_detection/model_lib_test.py | luk1684tw/models | 7e7776e1ce0db64cdf22d6de9f1a9848e5a71b2c | [
"Apache-2.0"
] | 51 | 2018-06-06T06:58:12.000Z | 2021-09-29T18:43:03.000Z | research/object_detection/model_lib_test.py | luk1684tw/models | 7e7776e1ce0db64cdf22d6de9f1a9848e5a71b2c | [
"Apache-2.0"
] | 3 | 2018-07-17T12:53:05.000Z | 2019-03-29T04:43:37.000Z | research/object_detection/model_lib_test.py | luk1684tw/models | 7e7776e1ce0db64cdf22d6de9f1a9848e5a71b2c | [
"Apache-2.0"
] | 39 | 2018-06-06T04:49:05.000Z | 2021-03-25T12:25:14.000Z | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 41.583541 | 80 | 0.7209 |
4a1273d9d3c5b67e034f194e0b599a4eeef2fffd | 3,354 | py | Python | OfficeCloudToolsX/settings.py | thomsbe/OfficeCloudToolsX | ffb1c69216cc960d5cee99051666d184c0117705 | [
"Apache-2.0"
] | null | null | null | OfficeCloudToolsX/settings.py | thomsbe/OfficeCloudToolsX | ffb1c69216cc960d5cee99051666d184c0117705 | [
"Apache-2.0"
] | null | null | null | OfficeCloudToolsX/settings.py | thomsbe/OfficeCloudToolsX | ffb1c69216cc960d5cee99051666d184c0117705 | [
"Apache-2.0"
] | null | null | null | """
Django settings for OfficeCloudToolsX project.
Generated by 'django-admin startproject' using Django 1.9.4.
For more information on this file, see
https://docs.djangoproject.com/en/1.9/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.9/ref/settings/
"""
im... | 26.203125 | 91 | 0.695886 |
4a1274b6436b9cb5f165ba22a069aab5b047c1b6 | 1,267 | py | Python | demo/link_arm_control/camera.py | shigeyukioba/matchernet | 5aec7abd3b157846ca406e3c5103e3a1bebc711e | [
"Apache-2.0"
] | 1 | 2020-02-26T13:34:23.000Z | 2020-02-26T13:34:23.000Z | demo/link_arm_control/camera.py | shigeyukioba/matchernet | 5aec7abd3b157846ca406e3c5103e3a1bebc711e | [
"Apache-2.0"
] | 39 | 2019-11-28T07:48:48.000Z | 2020-05-23T14:13:38.000Z | demo/link_arm_control/camera.py | shigeyukioba/matchernet | 5aec7abd3b157846ca406e3c5103e3a1bebc711e | [
"Apache-2.0"
] | 1 | 2020-05-22T05:11:14.000Z | 2020-05-22T05:11:14.000Z | # -*- coding: utf-8 -*-
import sys
import numpy as np
from geom import Matrix4
class Camera(object):
""" 3D camera class. """
def __init__(self, eye_from, eye_to):
up = np.array([0.0, 1.0, 0.0], dtype=np.float32)
self.m = self.get_lookat_mat(eye_from, eye_to, up)
self.m_inv = self.m.i... | 23.90566 | 58 | 0.502762 |
4a1274e9f74c433a18cd0d371cb7f9b673e990d4 | 1,404 | py | Python | test/test_pricing_component_value_request.py | billforward/bf-python | d2b812329ca3ed1fd94364d7f46f69ad74665596 | [
"Apache-2.0"
] | 2 | 2016-11-23T17:32:37.000Z | 2022-02-24T05:13:20.000Z | test/test_pricing_component_value_request.py | billforward/bf-python | d2b812329ca3ed1fd94364d7f46f69ad74665596 | [
"Apache-2.0"
] | null | null | null | test/test_pricing_component_value_request.py | billforward/bf-python | d2b812329ca3ed1fd94364d7f46f69ad74665596 | [
"Apache-2.0"
] | 1 | 2016-12-30T20:02:48.000Z | 2016-12-30T20:02:48.000Z | # coding: utf-8
"""
BillForward REST API
OpenAPI spec version: 1.0.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
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... | 26.490566 | 97 | 0.736467 |
4a1274fc8241a5176fd2a90cae5b96b284d10fef | 3,513 | py | Python | apps/rois.py | skd862/streamlit-geospatial | 1e618c87e9138b60a84155cb6af20bbce7d77d3c | [
"MIT"
] | null | null | null | apps/rois.py | skd862/streamlit-geospatial | 1e618c87e9138b60a84155cb6af20bbce7d77d3c | [
"MIT"
] | null | null | null | apps/rois.py | skd862/streamlit-geospatial | 1e618c87e9138b60a84155cb6af20bbce7d77d3c | [
"MIT"
] | null | null | null | """ A module for storing some sample ROIs for creating Landsat/GOES timelapse.
"""
from shapely.geometry import Polygon
goes_rois = {
"Creek Fire, CA (2020-09-05)": {
"region": Polygon(
[
[-121.003418, 36.848857],
[-121.003418, 39.049052],
[-117.... | 25.092857 | 78 | 0.418446 |
4a12772db03419281268bc22f7fee068ef438262 | 425 | py | Python | BackEnd(Django)/playlistBackend/categories/urls.py | Maxyee/Julhas_Playlist_Angular7_Django | e2ed7ec34ab2317f5bf8202bb122b1f42ade771f | [
"MIT"
] | 2 | 2019-05-17T17:36:41.000Z | 2019-07-03T05:51:38.000Z | BackEnd(Django)/playlistBackend/categories/urls.py | Maxyee/Julhas_Playlist_Angular7_Django | e2ed7ec34ab2317f5bf8202bb122b1f42ade771f | [
"MIT"
] | 8 | 2019-07-07T10:39:27.000Z | 2022-02-10T11:05:45.000Z | BackEnd(Django)/playlistBackend/categories/urls.py | Maxyee/Julhas_Playlist_Angular7_Django | e2ed7ec34ab2317f5bf8202bb122b1f42ade771f | [
"MIT"
] | 2 | 2019-05-22T08:44:18.000Z | 2021-04-02T13:08:31.000Z | from django.urls import include, path, re_path
from . import views
urlpatterns = [
re_path(r'^api/v1/categories/(?P<pk>[0-9]+)$', # Url to get update or delete a movie
views.GetDeleteUpdateCategories.as_view(),
name='get_delete_update_movie'
),
path('api/v1/categories/', # urls list ... | 28.333333 | 89 | 0.651765 |
4a12776c9c0df652ff2b6562b6020882282064e2 | 223 | py | Python | scripts/update_flair.py | erxclau/rare-houseplants-bst-bot | 562b872359df6faa98c7f0c54ff702b9deac0e6a | [
"MIT"
] | 1 | 2020-09-04T16:30:57.000Z | 2020-09-04T16:30:57.000Z | scripts/update_flair.py | erxclau/rare-houseplants-bst-bot | 562b872359df6faa98c7f0c54ff702b9deac0e6a | [
"MIT"
] | 7 | 2020-07-26T02:46:21.000Z | 2020-09-11T19:21:36.000Z | scripts/update_flair.py | erxclau/rare-houseplants-bst-bot | 562b872359df6faa98c7f0c54ff702b9deac0e6a | [
"MIT"
] | null | null | null | from utl import utility
config = utility.get_json("config.json")
flair_tiers = config["USER_FLAIRS"]
reddit, subreddit = utility.get_reddit(config)
subreddit.flair.set(
"USERNAME", flair_template_id=flair_tiers[0]
)
| 20.272727 | 48 | 0.766816 |
4a1278ca6049da13c665c281d28ea93a1961c18a | 255,440 | py | Python | swig/python/osgeo/ogr.py | VisualAwarenessTech/gdal-2.3.1 | a3a57f5e651596d453d2b380c337bce5505b13c8 | [
"Apache-2.0"
] | 62 | 2018-01-25T10:46:13.000Z | 2022-03-20T23:49:57.000Z | swig/python/osgeo/ogr.py | VisualAwarenessTech/gdal-2.3.1 | a3a57f5e651596d453d2b380c337bce5505b13c8 | [
"Apache-2.0"
] | 45 | 2018-07-10T10:37:19.000Z | 2022-02-17T14:41:06.000Z | swig/python/osgeo/ogr.py | VisualAwarenessTech/gdal-2.3.1 | a3a57f5e651596d453d2b380c337bce5505b13c8 | [
"Apache-2.0"
] | 18 | 2018-02-09T08:57:30.000Z | 2022-03-31T16:57:05.000Z | # This file was automatically generated by SWIG (http://www.swig.org).
# Version 3.0.8
#
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.
from sys import version_info
if version_info >= (2, 6, 0):
def swig_import_helper():
from os.path imp... | 31.854346 | 231 | 0.659247 |
4a12798cc100290651e895dc3a34b951f10f6977 | 424 | py | Python | accounts/forms.py | aleattene/django-for-beginners | e9277d38c274e9b3d4ef1f852f9f5cf9228a165d | [
"MIT"
] | null | null | null | accounts/forms.py | aleattene/django-for-beginners | e9277d38c274e9b3d4ef1f852f9f5cf9228a165d | [
"MIT"
] | null | null | null | accounts/forms.py | aleattene/django-for-beginners | e9277d38c274e9b3d4ef1f852f9f5cf9228a165d | [
"MIT"
] | null | null | null | from django import forms
from django.contrib.auth.forms import UserCreationForm, UserChangeForm
from .models import CustomUser
class CustomUserCreationForm(UserCreationForm):
class Meta(UserCreationForm):
model = CustomUser
fields = ('username', 'email', 'age',)
class CustomUserChangeForm(UserC... | 22.315789 | 70 | 0.705189 |
4a127af21e5c8cb8ed6fe6670486ce5fefb0334e | 192 | py | Python | src/kgmk/dsa/algebra/modular/inverse/fermat/jit.py | kagemeka/python | 486ce39d97360b61029527bacf00a87fdbcf552c | [
"MIT"
] | null | null | null | src/kgmk/dsa/algebra/modular/inverse/fermat/jit.py | kagemeka/python | 486ce39d97360b61029527bacf00a87fdbcf552c | [
"MIT"
] | null | null | null | src/kgmk/dsa/algebra/modular/inverse/fermat/jit.py | kagemeka/python | 486ce39d97360b61029527bacf00a87fdbcf552c | [
"MIT"
] | null | null | null | from kgmk.dsa.algebra.modular.pow.bottomup.jit import (
mod_pow,
)
# TODO cut below
import numba as nb
@nb.njit
def mod_inverse(n: int, p: int) -> int:
return mod_pow(n, p - 2, p)
| 14.769231 | 55 | 0.661458 |
4a127d141a8ec9a743ce78688a79a137347f935d | 1,036 | py | Python | Alerts-Analysis.py | michaelduong/yolocapital | 399a78cdfe1e2d2bad80547830947d364eec0e9c | [
"MIT"
] | null | null | null | Alerts-Analysis.py | michaelduong/yolocapital | 399a78cdfe1e2d2bad80547830947d364eec0e9c | [
"MIT"
] | null | null | null | Alerts-Analysis.py | michaelduong/yolocapital | 399a78cdfe1e2d2bad80547830947d364eec0e9c | [
"MIT"
] | null | null | null | from pathlib import Path, PureWindowsPath
import pandas as pd
import numpy as np
# Path for either OXS or Windows
data_folder = Path.cwd() / "Options Alerts Dump" / "Options Alerts"
path_on_windows = PureWindowsPath(data_folder)
# Iterate through directory to get all the Excel files
excel_files = [file for file in da... | 33.419355 | 91 | 0.750965 |
4a127d2fe570c9917efe679bf0a9c1370f59fee1 | 1,523 | py | Python | medium/17-Letter Combinations of a Phone Number.py | Davidxswang/leetcode | d554b7f5228f14c646f726ddb91014a612673e06 | [
"Apache-2.0"
] | 2 | 2020-05-08T02:17:17.000Z | 2020-05-17T04:55:56.000Z | medium/17-Letter Combinations of a Phone Number.py | Davidxswang/leetcode | d554b7f5228f14c646f726ddb91014a612673e06 | [
"Apache-2.0"
] | null | null | null | medium/17-Letter Combinations of a Phone Number.py | Davidxswang/leetcode | d554b7f5228f14c646f726ddb91014a612673e06 | [
"Apache-2.0"
] | null | null | null | """
https://leetcode.com/problems/letter-combinations-of-a-phone-number/
Given a string containing digits from 2-9 inclusive, return all possible letter combinations that the number could represent.
A mapping of digit to letters (just like on the telephone buttons) is given below. Note that 1 does not map to any lette... | 32.404255 | 133 | 0.502298 |
4a127dfab94c04e33eefe11b57a9f7f7f30bb59b | 14,429 | py | Python | application.py | jasonelijah/itemcatalog | ce271510bb576f6891a88223f97c7671e0034519 | [
"MIT"
] | null | null | null | application.py | jasonelijah/itemcatalog | ce271510bb576f6891a88223f97c7671e0034519 | [
"MIT"
] | null | null | null | application.py | jasonelijah/itemcatalog | ce271510bb576f6891a88223f97c7671e0034519 | [
"MIT"
] | null | null | null | import flask
import sqlalchemy
import database_setup
import random
import string
import json
import httplib2
import requests
import flow_from_clientsecrets
import FlowExchangeError
from flask import Flask, render_template, url_for, request,
redirect, jsonify, make_response, flash
from sqlalchemy import create_engine
f... | 32.064444 | 141 | 0.67101 |
4a127e0b46a38e04c889ea4273a740aa27cafbcc | 4,510 | py | Python | videodet/pair_retinaMV2/retinaMV2_256_mxmx.py | ktw361/mmdetection_impl | d09f5320290699cdae0817c9f6a52e8e07c1e098 | [
"Apache-2.0"
] | 2 | 2021-05-09T15:49:35.000Z | 2021-05-22T02:16:14.000Z | videodet/pair_retinaMV2/retinaMV2_256_mxmx.py | ktw361/mmdetection_impl | d09f5320290699cdae0817c9f6a52e8e07c1e098 | [
"Apache-2.0"
] | null | null | null | videodet/pair_retinaMV2/retinaMV2_256_mxmx.py | ktw361/mmdetection_impl | d09f5320290699cdae0817c9f6a52e8e07c1e098 | [
"Apache-2.0"
] | 1 | 2021-05-09T15:49:43.000Z | 2021-05-09T15:49:43.000Z | # model settings
model = dict(
type='PairRetinaNet',
pretrained='zoo/mobilenet_v2.pth.tar',
backbone=dict(
type='SSDMobileNetV2',
input_size=-1,
frozen_stages=3,
out_layers=('layer4', 'layer7', 'layer14', 'layer19'),
with_extra=False,
norm_eval=True,
)... | 30.472973 | 87 | 0.608426 |
4a127ef4a3800e87ea951b8539416ff5f37cce06 | 14,354 | py | Python | webscan_backend/plugins/portscan/portscan.py | imfiver/Sec-Tools | a828e31c2e371c37f1256f0a574707a24776530d | [
"Apache-2.0"
] | 144 | 2021-11-05T10:45:05.000Z | 2022-03-31T03:17:19.000Z | webscan_backend/plugins/portscan/portscan.py | imfiver/Sec-Tools | a828e31c2e371c37f1256f0a574707a24776530d | [
"Apache-2.0"
] | 6 | 2021-11-07T02:47:41.000Z | 2022-03-06T05:50:15.000Z | webscan_backend/plugins/portscan/portscan.py | imfiver/Sec-Tools | a828e31c2e371c37f1256f0a574707a24776530d | [
"Apache-2.0"
] | 41 | 2021-11-07T13:35:02.000Z | 2022-03-29T00:09:36.000Z | # -*- coding:utf-8 -*-
# Reference: https://github.com/AnthraX1/InsightScan/blob/master/scanner.py
import socket
import re
import concurrent.futures
import sys
import os
from urllib import parse
sys.path.append(os.getcwd())
THREADNUM = 64 # 线程数
SIGNS = (
# 协议 | 版本 | 关键字
b'smb|smb|^\0\0\0.\xffSMBr\0\0\0\0.... | 38.482574 | 118 | 0.542218 |
4a1280128e555449666aa4264ca5afdbdc5e1cfe | 4,827 | py | Python | truecaser/Truecaser.py | jtbr/tv-news-quality | 0aa57a67ff3f3207e5cdf4129d58ea967e698e90 | [
"MIT"
] | null | null | null | truecaser/Truecaser.py | jtbr/tv-news-quality | 0aa57a67ff3f3207e5cdf4129d58ea967e698e90 | [
"MIT"
] | null | null | null | truecaser/Truecaser.py | jtbr/tv-news-quality | 0aa57a67ff3f3207e5cdf4129d58ea967e698e90 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import string
import math
from unidecode import unidecode
try:
# Python 2
range = xrange
except NameError:
# Python 3
pass
"""
This file contains the functions to truecase a sentence.
"""
def getScore(prevToken, possibleToken, nextToken, wordCasingLookup, uniDist, backwardBiDi... | 40.563025 | 148 | 0.616739 |
4a128115ec592b25a01ee1c21bc22d950d217716 | 3,384 | py | Python | tpdatasrc/tpgamefiles/rules/d20_ai/d20_ai_utils.py | anatoliy-savchak/TemplePlus | 50922bb14cc2d7dcf8fceeccf45c3b905c1b512f | [
"MIT"
] | 2 | 2019-02-25T21:06:18.000Z | 2019-02-25T21:06:18.000Z | tpdatasrc/tpgamefiles/rules/d20_ai/d20_ai_utils.py | anatoliy-savchak/TemplePlus | 50922bb14cc2d7dcf8fceeccf45c3b905c1b512f | [
"MIT"
] | null | null | null | tpdatasrc/tpgamefiles/rules/d20_ai/d20_ai_utils.py | anatoliy-savchak/TemplePlus | 50922bb14cc2d7dcf8fceeccf45c3b905c1b512f | [
"MIT"
] | null | null | null | from toee import *
# Not exactly sure of the purpose of this check, but it's
# used in considerTarget.
def isBusted(obj):
flags = obj.obj_get_int(obj_f_flags)
if not (flags & OF_DESTROYED):
typ = obj.obj_get_int(obj_f_type)
if typ == obj_t_portal:
return obj.obj_get_int(obj_f_portal_flags) & OPF_BUSTED
eli... | 25.066667 | 74 | 0.765662 |
4a1282a67c3772aea6fc03a0633fb891cefc1242 | 44,650 | py | Python | python_modules/dagster/dagster/core/definitions/repository_definition.py | petehunt/dagster | 1df8496851a7a50a19053759fdac32753cc087a1 | [
"Apache-2.0"
] | null | null | null | python_modules/dagster/dagster/core/definitions/repository_definition.py | petehunt/dagster | 1df8496851a7a50a19053759fdac32753cc087a1 | [
"Apache-2.0"
] | null | null | null | python_modules/dagster/dagster/core/definitions/repository_definition.py | petehunt/dagster | 1df8496851a7a50a19053759fdac32753cc087a1 | [
"Apache-2.0"
] | null | null | null | from abc import ABC, abstractmethod
from types import FunctionType
from typing import (
TYPE_CHECKING,
Any,
Callable,
Dict,
Generic,
List,
Mapping,
Optional,
Type,
TypeVar,
Union,
cast,
)
from dagster import check
from dagster.core.asset_defs.source_asset import SourceAs... | 38.359107 | 160 | 0.629698 |
4a1283491dc5a6c3005a47f97eb0962ad069b0b7 | 53,476 | py | Python | website/routes.py | alexschiller/osf.io | 4122d4be152c6189142c2ebb19cfdee09c77035d | [
"Apache-2.0"
] | null | null | null | website/routes.py | alexschiller/osf.io | 4122d4be152c6189142c2ebb19cfdee09c77035d | [
"Apache-2.0"
] | null | null | null | website/routes.py | alexschiller/osf.io | 4122d4be152c6189142c2ebb19cfdee09c77035d | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import absolute_import
import os
import httplib as http
from flask import request
from flask import send_from_directory
from geoip import geolite2
from framework import status
from framework import sentry
from framework.auth import cas
from framework.routing import Rule
from f... | 31.235981 | 169 | 0.527564 |
4a12841b62264b7d1849fd506b5338945bb7767e | 446 | py | Python | setup.py | emre/safran | 990e8b56400e291177f0b7b0348ca9c30a31b218 | [
"MIT"
] | 3 | 2015-11-04T09:29:42.000Z | 2021-05-07T13:56:36.000Z | setup.py | emre/safran | 990e8b56400e291177f0b7b0348ca9c30a31b218 | [
"MIT"
] | null | null | null | setup.py | emre/safran | 990e8b56400e291177f0b7b0348ca9c30a31b218 | [
"MIT"
] | 2 | 2016-05-28T07:33:21.000Z | 2018-01-08T05:12:13.000Z | from setuptools import setup
setup(
name='safran',
version='0.1',
packages=['safran'],
url='http://github.com/emre/safran',
license='MIT',
author='Emre Yilmaz',
author_email='mail@emreyilmaz.me',
description='safran.io CLI reader',
entry_points={
'console_scripts': [
... | 21.238095 | 44 | 0.567265 |
4a1284edd8b3063f0f8b7c2a623f8e677fceea23 | 487 | py | Python | collage-master/collage/wsgi.py | iyerikuzwe/The-moringa-tribune | a234f4db9b0eb74deb278ab98b068b8392e18735 | [
"Unlicense"
] | null | null | null | collage-master/collage/wsgi.py | iyerikuzwe/The-moringa-tribune | a234f4db9b0eb74deb278ab98b068b8392e18735 | [
"Unlicense"
] | null | null | null | collage-master/collage/wsgi.py | iyerikuzwe/The-moringa-tribune | a234f4db9b0eb74deb278ab98b068b8392e18735 | [
"Unlicense"
] | null | null | null | """
WSGI config for collage project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.11/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
# from whitenoise.django import Dja... | 25.631579 | 78 | 0.796715 |
4a1285369230a6fee1ad8d1398ad5dff28c717c8 | 33 | py | Python | addons14/storage_media/tests/__init__.py | odoochain/addons_oca | 55d456d798aebe16e49b4a6070765f206a8885ca | [
"MIT"
] | 1 | 2021-06-10T14:59:13.000Z | 2021-06-10T14:59:13.000Z | addons14/storage_media/tests/__init__.py | odoochain/addons_oca | 55d456d798aebe16e49b4a6070765f206a8885ca | [
"MIT"
] | null | null | null | addons14/storage_media/tests/__init__.py | odoochain/addons_oca | 55d456d798aebe16e49b4a6070765f206a8885ca | [
"MIT"
] | 1 | 2021-04-09T09:44:44.000Z | 2021-04-09T09:44:44.000Z | from . import test_storage_media
| 16.5 | 32 | 0.848485 |
4a12853f7aacc331c8ffeb94f37a4377133ca8e4 | 6,058 | py | Python | python-src/resources/storm.py | AuthEceSoftEng/cenote-vital-write | 160923d946b84e1195f8875ff7bfdc311a00aa08 | [
"MIT"
] | null | null | null | python-src/resources/storm.py | AuthEceSoftEng/cenote-vital-write | 160923d946b84e1195f8875ff7bfdc311a00aa08 | [
"MIT"
] | 2 | 2020-04-01T13:22:03.000Z | 2020-04-10T14:39:12.000Z | python-src/resources/storm.py | AuthEceSoftEng/cenote-write | 1e68a30a33c43d7c6362836e676a3da3df7cb7ca | [
"MIT"
] | null | null | null | import os
import sys
import traceback
from collections import deque
try:
import simplejson as json
except ImportError:
import json
json_encode = lambda x: json.dumps(x)
json_decode = lambda x: json.loads(x)
# reads lines and reconstructs newlines appropriately
def readMsg():
msg = ""
while True:
... | 22.272059 | 92 | 0.554308 |
4a12857e637c1158ff83b367c5aa88b6306ee4f7 | 1,143 | py | Python | test/bridge/testpyscf.py | chemistry-scripts/cclib | e8e0ea9b3e9b7091f8dfc4dd52d5e5e84a1cc258 | [
"BSD-3-Clause"
] | null | null | null | test/bridge/testpyscf.py | chemistry-scripts/cclib | e8e0ea9b3e9b7091f8dfc4dd52d5e5e84a1cc258 | [
"BSD-3-Clause"
] | null | null | null | test/bridge/testpyscf.py | chemistry-scripts/cclib | e8e0ea9b3e9b7091f8dfc4dd52d5e5e84a1cc258 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright (c) 2020, the cclib development team
#
# This file is part of cclib (http://cclib.github.io) and is distributed under
# the terms of the BSD 3-Clause License.
import unittest
import numpy as np
from cclib.bridge import cclib2pyscf
from cclib.parser.utils import find_package
cl... | 25.977273 | 78 | 0.613298 |
4a1285a6bae933977b9b5572b02c6d9e4ac42d28 | 5,691 | py | Python | lib/fama/diamond_parser/diamond_hit_list.py | aekazakov/FamaProfiling | d9db15ea217e3be2aab65c356564a6d345b4f410 | [
"MIT"
] | null | null | null | lib/fama/diamond_parser/diamond_hit_list.py | aekazakov/FamaProfiling | d9db15ea217e3be2aab65c356564a6d345b4f410 | [
"MIT"
] | null | null | null | lib/fama/diamond_parser/diamond_hit_list.py | aekazakov/FamaProfiling | d9db15ea217e3be2aab65c356564a6d345b4f410 | [
"MIT"
] | null | null | null | """Describes DiamondHitList class"""
import fama.diamond_parser.hit_utils as hit_utils
class DiamondHitList(object):
"""DiamondHitList stores a set of DiamondHit objects for one
query sequence (usually, query is a sequence read or a protein)
"""
def __init__(self, query_id=None):
""" Args:
... | 34.283133 | 96 | 0.604287 |
4a1285d3e474bc18c566bf409eb4b513b76d650b | 1,025 | py | Python | nemo/collections/nlp/nm/trainables/__init__.py | ParikhKadam/NeMo | ee11f7c4666d410d91f9da33c61f4819ea625013 | [
"Apache-2.0"
] | 1 | 2020-11-05T09:39:59.000Z | 2020-11-05T09:39:59.000Z | nemo/collections/nlp/nm/trainables/__init__.py | ParikhKadam/NeMo | ee11f7c4666d410d91f9da33c61f4819ea625013 | [
"Apache-2.0"
] | 1 | 2020-06-11T00:54:42.000Z | 2020-06-11T00:54:42.000Z | nemo/collections/nlp/nm/trainables/__init__.py | ParikhKadam/NeMo | ee11f7c4666d410d91f9da33c61f4819ea625013 | [
"Apache-2.0"
] | 3 | 2020-03-10T05:10:07.000Z | 2020-12-08T01:33:35.000Z | # =============================================================================
# Copyright 2020 NVIDIA. 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://ww... | 48.809524 | 79 | 0.667317 |
4a12869b9c02fdc59cfcf6d91a9e271402c227d1 | 10,016 | py | Python | dataset/augmentation.py | LightTwist/RobustVideoMatting | 79eb143fef3a4c58b4857c1a5a927a318f528093 | [
"Apache-2.0"
] | 11 | 2021-08-31T06:20:17.000Z | 2021-11-08T13:14:29.000Z | dataset/augmentation.py | umit-ml/RobustVideoMatting | 03096f23de1831b8181dadd5e165561c2759f9eb | [
"Apache-2.0"
] | 1 | 2021-09-15T10:45:48.000Z | 2021-09-15T10:45:48.000Z | dataset/augmentation.py | umit-ml/RobustVideoMatting | 03096f23de1831b8181dadd5e165561c2759f9eb | [
"Apache-2.0"
] | 21 | 2021-08-31T00:55:25.000Z | 2021-09-16T09:17:31.000Z | import easing_functions as ef
import random
import torch
from torchvision import transforms
from torchvision.transforms import functional as F
class MotionAugmentation:
def __init__(self,
size,
prob_fgr_affine,
prob_bgr_affine,
prob_noise,
... | 38.375479 | 121 | 0.568191 |
4a12879c018e7249cb520206be3cdc8ea829c46c | 11,471 | py | Python | API/app.py | TitanLi/Stock-lab | fd0e0c2e1d89ff5019a5b17ca2e1665d840703bc | [
"MIT"
] | null | null | null | API/app.py | TitanLi/Stock-lab | fd0e0c2e1d89ff5019a5b17ca2e1665d840703bc | [
"MIT"
] | null | null | null | API/app.py | TitanLi/Stock-lab | fd0e0c2e1d89ff5019a5b17ca2e1665d840703bc | [
"MIT"
] | null | null | null | from unicodedata import name
from flask import Flask, request, render_template
import subprocess
import json
import twstock
from datetime import datetime
import requests
import time
app = Flask(__name__)
def Average(lst):
return sum(lst) / len(lst)
finmindtradeToken = ''
mongoToken = ''
stockMapping = {}
with ope... | 38.364548 | 193 | 0.590969 |
4a1287a9a1f303ec5d31e95b0e60f623296e2e49 | 1,281 | py | Python | portfolio/app/models.py | tarasivashchuk/portfolio | 74939e175c77e2e5b3e428eda6319fe016e0ddf4 | [
"Unlicense",
"MIT"
] | null | null | null | portfolio/app/models.py | tarasivashchuk/portfolio | 74939e175c77e2e5b3e428eda6319fe016e0ddf4 | [
"Unlicense",
"MIT"
] | null | null | null | portfolio/app/models.py | tarasivashchuk/portfolio | 74939e175c77e2e5b3e428eda6319fe016e0ddf4 | [
"Unlicense",
"MIT"
] | null | null | null | from flask_appbuilder import Model
from sqlalchemy import Column, Integer, String, ForeignKey
from sqlalchemy.orm import relationship
"""
You can use the extra Flask-AppBuilder fields and Mixin's
... | 1.25835 | 70 | 0.173302 |
4a12890ca44f8317931504dc2d628b22fb6e3fe8 | 723 | py | Python | code/python/echomesh/util/string/UniqueName_test.py | rec/echomesh | be668971a687b141660fd2e5635d2fd598992a01 | [
"MIT"
] | 30 | 2015-02-18T14:07:00.000Z | 2021-12-11T15:19:01.000Z | code/python/echomesh/util/string/UniqueName_test.py | rec/echomesh | be668971a687b141660fd2e5635d2fd598992a01 | [
"MIT"
] | 16 | 2015-01-01T23:17:24.000Z | 2015-04-18T23:49:27.000Z | code/python/echomesh/util/string/UniqueName_test.py | rec/echomesh | be668971a687b141660fd2e5635d2fd598992a01 | [
"MIT"
] | 31 | 2015-03-11T20:04:07.000Z | 2020-11-02T13:56:59.000Z | from __future__ import absolute_import, division, print_function, unicode_literals
from echomesh.util.string.UniqueName import unique_name
from echomesh.util.TestCase import TestCase
class UniqueNameTest(TestCase):
def test_empty(self):
self.assertEqual(unique_name('', []), '')
def test_missing(self)... | 32.863636 | 82 | 0.651452 |
4a1289405ad66c99eeff299030c8f6f8f72d16e2 | 3,178 | py | Python | sensor.py | jcsogo/daikin_madoka | 47d012330c4a7bdc061db66b8399c85ae9c502b7 | [
"MIT"
] | null | null | null | sensor.py | jcsogo/daikin_madoka | 47d012330c4a7bdc061db66b8399c85ae9c502b7 | [
"MIT"
] | null | null | null | sensor.py | jcsogo/daikin_madoka | 47d012330c4a7bdc061db66b8399c85ae9c502b7 | [
"MIT"
] | null | null | null | """Support for Daikin AC sensors."""
import logging
from homeassistant.const import (
CONF_DEVICE_CLASS,
CONF_ICON,
CONF_NAME,
CONF_TYPE,
CONF_UNIT_OF_MEASUREMENT,
TEMP_CELSIUS,
DEVICE_CLASS_TEMPERATURE,
)
from homeassistant.helpers.entity import Entity
from . import DOMAIN
from .const imp... | 28.375 | 133 | 0.672435 |
4a1289a21c581f45cc0e856ca1fffe610ea4ae19 | 10,093 | py | Python | supports/pyload/src/pyload/webui/app/blueprints/json_blueprint.py | LuckyNicky/pycrawler | 4b3fe2f6e8e51f236d95a64a89a44199e4e97743 | [
"Apache-2.0"
] | 1 | 2020-04-02T17:03:39.000Z | 2020-04-02T17:03:39.000Z | supports/pyload/src/pyload/webui/app/blueprints/json_blueprint.py | LuckyNicky/pycrawler | 4b3fe2f6e8e51f236d95a64a89a44199e4e97743 | [
"Apache-2.0"
] | null | null | null | supports/pyload/src/pyload/webui/app/blueprints/json_blueprint.py | LuckyNicky/pycrawler | 4b3fe2f6e8e51f236d95a64a89a44199e4e97743 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# AUTHOR: vuolter
import os
import flask
from flask.json import jsonify
from ....core.utils import format
from ..helpers import login_required, render_template
bp = flask.Blueprint("json", __name__, url_prefix="/json")
def format_time(seconds):
seconds = int(seconds)
hours, second... | 27.576503 | 85 | 0.608243 |
4a128a0d56eb266874b0bd72356ea4b906e79155 | 1,000 | py | Python | test/test_modify_group.py | galarina1880/python_training | f8fefdd484f4409cb6f43be1d791b50306e5bb2d | [
"Apache-2.0"
] | null | null | null | test/test_modify_group.py | galarina1880/python_training | f8fefdd484f4409cb6f43be1d791b50306e5bb2d | [
"Apache-2.0"
] | null | null | null | test/test_modify_group.py | galarina1880/python_training | f8fefdd484f4409cb6f43be1d791b50306e5bb2d | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from model.group import Group
from random import randrange
def test_modify_group_name(app):
if app.group.count() == 0:
app.group.create(Group(name="test", header="headr", footer="footr"))
old_groups = app.group.get_group_list()
index = randrange(len(old_groups))
group =... | 37.037037 | 93 | 0.689 |
4a128a8d46ad0708a1ef68416c98d1202833b405 | 10,749 | py | Python | pyscf/x2c/sfx2c1e.py | QuESt-Calculator/pyscf | 0ed03633b699505c7278f1eb501342667d0aa910 | [
"Apache-2.0"
] | 501 | 2018-12-06T23:48:17.000Z | 2022-03-31T11:53:18.000Z | pyscf/x2c/sfx2c1e.py | QuESt-Calculator/pyscf | 0ed03633b699505c7278f1eb501342667d0aa910 | [
"Apache-2.0"
] | 710 | 2018-11-26T22:04:52.000Z | 2022-03-30T03:53:12.000Z | pyscf/x2c/sfx2c1e.py | QuESt-Calculator/pyscf | 0ed03633b699505c7278f1eb501342667d0aa910 | [
"Apache-2.0"
] | 273 | 2018-11-26T10:10:24.000Z | 2022-03-30T12:25:28.000Z | #!/usr/bin/env python
# Copyright 2014-2019 The PySCF Developers. 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
#
# U... | 34.562701 | 88 | 0.557726 |
4a128b8f72ed2a6d3767b2d8de330e4c7647352c | 462 | py | Python | omdbapi-python-tool/MISC Python scripts/produce_failed_imdb_id_list.py | know-airl/Vote-Goat-Data | d523d45107b5994b9135577db5e0269eb6d4c613 | [
"MIT"
] | 1 | 2020-06-12T16:58:19.000Z | 2020-06-12T16:58:19.000Z | omdbapi-python-tool/MISC Python scripts/produce_failed_imdb_id_list.py | know-airl/Vote-Goat-Data | d523d45107b5994b9135577db5e0269eb6d4c613 | [
"MIT"
] | 2 | 2018-07-04T11:19:13.000Z | 2018-07-12T11:46:16.000Z | omdbapi-python-tool/MISC Python scripts/produce_failed_imdb_id_list.py | know-airl/Vote-Goat-Data | d523d45107b5994b9135577db5e0269eb6d4c613 | [
"MIT"
] | null | null | null | import json
import csv
with open('imdb_movies.json') as json_data:
data = json.load(json_data)
count = 0
imdb_ids = []
for entry in data:
if entry['Response'] == "False":
imdb_ids.append(entry['imdb_id'])
with open("failed_imdb_ids.csv", "w") as csv_file:
check = 0
for id in imdb... | 21 | 50 | 0.554113 |
4a128bcb5318e9b4e561aad6934933b8089d933b | 2,399 | py | Python | A_Web_Crawler_With_asyncio_Coroutines/simple_coroutine.py | czs0x55aa/500lines_homework | a67a144181afadae387e2889f5ae29565e76cdad | [
"MIT"
] | null | null | null | A_Web_Crawler_With_asyncio_Coroutines/simple_coroutine.py | czs0x55aa/500lines_homework | a67a144181afadae387e2889f5ae29565e76cdad | [
"MIT"
] | null | null | null | A_Web_Crawler_With_asyncio_Coroutines/simple_coroutine.py | czs0x55aa/500lines_homework | a67a144181afadae387e2889f5ae29565e76cdad | [
"MIT"
] | null | null | null | # coding=utf8
import socket
from selectors2 import DefaultSelector, EVENT_READ, EVENT_WRITE
import time
url = 'xkcd.com'
selector = DefaultSelector()
stopped = False
res = []
def log_time(func):
def wrapper(*args, **kw):
start_time = time.time()
func(*args, **kw)
print(time.time() - start... | 24.232323 | 78 | 0.55273 |
4a128bd1ad0c8239dd660d3f266bb58695c775cc | 1,519 | py | Python | test-servo.py | jweisz/tjlamp-client | 2d5b39b88d12bb93f6c2abecc212a901b38e997e | [
"MIT"
] | null | null | null | test-servo.py | jweisz/tjlamp-client | 2d5b39b88d12bb93f6c2abecc212a901b38e997e | [
"MIT"
] | null | null | null | test-servo.py | jweisz/tjlamp-client | 2d5b39b88d12bb93f6c2abecc212a901b38e997e | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import argparse
import wiringpi
import asyncio
from Servo import ServoPigpio
def armBack(pin):
wiringpi.pwmWrite(pin, 60)
def armUp(pin):
wiringpi.pwmWrite(pin, 140)
def armDown(pin):
wiringpi.pwmWrite(pin, 240)
async def main(pin):
# use 'GPIO naming'
wiringpi.wiringPiS... | 23.734375 | 102 | 0.637261 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.