hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 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 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | 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 972 | max_forks_repo_name stringlengths 6 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 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3f9c6dc1e2e10c35b26d5b375a5efdcdb4d468b0 | 3,336 | py | Python | rls/algorithms/single/sql.py | StepNeverStop/RLs | 25cc97c96cbb19fe859c9387b7547cbada2c89f2 | [
"Apache-2.0"
] | 371 | 2019-04-26T00:37:33.000Z | 2022-03-31T07:33:12.000Z | rls/algorithms/single/sql.py | BlueFisher/RLs | 25cc97c96cbb19fe859c9387b7547cbada2c89f2 | [
"Apache-2.0"
] | 47 | 2019-07-21T11:51:57.000Z | 2021-08-31T08:45:22.000Z | rls/algorithms/single/sql.py | BlueFisher/RLs | 25cc97c96cbb19fe859c9387b7547cbada2c89f2 | [
"Apache-2.0"
] | 102 | 2019-06-29T13:11:15.000Z | 2022-03-28T13:51:04.000Z | #!/usr/bin/env python3
# encoding: utf-8
import torch.distributions as td
from rls.algorithms.base.sarl_off_policy import SarlOffPolicy
from rls.common.data import Data
from rls.common.decorator import iton
from rls.nn.models import CriticQvalueAll
from rls.nn.modules.wrappers import TargetTwin
from rls.nn.... | 39.714286 | 105 | 0.539568 |
639b9d983887bc032b974c1738d06b4a4c916d3f | 383 | py | Python | src/numdifftools/__init__.py | rparini/numdifftools | 2c88878df732c9c6629febea56e7a91fd898398d | [
"BSD-3-Clause"
] | null | null | null | src/numdifftools/__init__.py | rparini/numdifftools | 2c88878df732c9c6629febea56e7a91fd898398d | [
"BSD-3-Clause"
] | 1 | 2018-03-27T19:12:14.000Z | 2018-03-27T19:12:14.000Z | src/numdifftools/__init__.py | rparini/numdifftools | 2c88878df732c9c6629febea56e7a91fd898398d | [
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import
import pkg_resources
from .info import __doc__
from .core import *
from . import extrapolation, limits, step_generators
from numpy.testing import Tester
try:
__version__ = pkg_resources.get_distribution(__name__).version
except pkg_resources.DistributionNotFound:
__versio... | 25.533333 | 66 | 0.81201 |
36c2a8e25d355eec8fee149d5352d78c7e740a90 | 868 | py | Python | ComRISB/pyglib/pyglib/iface/test/test_ef_lda.py | comscope/comsuite | d51c43cad0d15dc3b4d1f45e7df777cdddaa9d6c | [
"BSD-3-Clause"
] | 18 | 2019-06-15T18:08:21.000Z | 2022-01-30T05:01:29.000Z | ComRISB/pyglib/pyglib/iface/test/test_ef_lda.py | comscope/Comsuite | b80ca9f34c519757d337487c489fb655f7598cc2 | [
"BSD-3-Clause"
] | null | null | null | ComRISB/pyglib/pyglib/iface/test/test_ef_lda.py | comscope/Comsuite | b80ca9f34c519757d337487c489fb655f7598cc2 | [
"BSD-3-Clause"
] | 11 | 2019-06-05T02:57:55.000Z | 2021-12-29T02:54:25.000Z | import h5py
from mpi4py import MPI
from pyglib.iface.ifwannier import get_wannier_dat
from pyglib.estructure.fermi import get_fermi_level
from pyglib.estructure.gwannier import get_gmodel, mpiget_bndev
kpts, wfwannier_list, bnd_es = get_wannier_dat(path="../wannier")
with h5py.File("GPARAMBANDS.h5", "r") as f:
nu... | 28.933333 | 65 | 0.693548 |
673c97755cc7547fe565803b79461dfb158a55ef | 10,233 | py | Python | src/data_process.py | Du-Jia/model-getting-started | 49a84e4cb0e7f283d287a2a6b1c86913ae6827f6 | [
"Apache-2.0"
] | null | null | null | src/data_process.py | Du-Jia/model-getting-started | 49a84e4cb0e7f283d287a2a6b1c86913ae6827f6 | [
"Apache-2.0"
] | null | null | null | src/data_process.py | Du-Jia/model-getting-started | 49a84e4cb0e7f283d287a2a6b1c86913ae6827f6 | [
"Apache-2.0"
] | 1 | 2021-05-11T14:44:45.000Z | 2021-05-11T14:44:45.000Z | """data process tools"""
from __future__ import annotations
import csv
import os
import pickle
from typing import List, Dict
# from typing import Literal
import torch
from src.schema import InputExample
from src.schema import InputFeatures
class DataProcessor(object):
"""Base class for data converters for seque... | 36.41637 | 105 | 0.604319 |
f68fff850628d0b4353aeec266fcf3f5aa0ef4c2 | 161 | py | Python | abfahrt/testutils/test_simulator/__main__.py | Team-Zugig-zum-Erfolg/InformatiCup | 788076ac38bf6d8f462465b7fb96db14d13bed30 | [
"MIT"
] | 1 | 2022-01-30T14:30:02.000Z | 2022-01-30T14:30:02.000Z | abfahrt/testutils/test_simulator/__main__.py | Team-Zugig-zum-Erfolg/InformatiCup | 788076ac38bf6d8f462465b7fb96db14d13bed30 | [
"MIT"
] | null | null | null | abfahrt/testutils/test_simulator/__main__.py | Team-Zugig-zum-Erfolg/InformatiCup | 788076ac38bf6d8f462465b7fb96db14d13bed30 | [
"MIT"
] | null | null | null | from abfahrt.testutils.test_simulator.test_simulator import test_simulator
if __name__ == '__main__':
ts = test_simulator("abfahrt/testfiles")
ts.run()
| 26.833333 | 74 | 0.763975 |
a9b291a64074284d6b52edda2902b1b509f69732 | 1,726 | py | Python | create_tables.py | Karenzhang7717/postgres_data_modelling | 6d81550269d1f0ed28e0f324717515c3f32a0456 | [
"Apache-2.0"
] | null | null | null | create_tables.py | Karenzhang7717/postgres_data_modelling | 6d81550269d1f0ed28e0f324717515c3f32a0456 | [
"Apache-2.0"
] | null | null | null | create_tables.py | Karenzhang7717/postgres_data_modelling | 6d81550269d1f0ed28e0f324717515c3f32a0456 | [
"Apache-2.0"
] | null | null | null | import psycopg2
from sql_queries import create_table_queries, drop_table_queries
def create_database():
"""
- Creates and connects to the sparkifydb
- Returns the connection and cursor to sparkifydb
"""
# connect to default database
conn = psycopg2.connect("host=127.0.0.1 dbname=studentdb... | 24.309859 | 93 | 0.658749 |
784c77505bbf5b47d3cae90b072a9d1b11f902f6 | 228 | py | Python | test/wxhello.py | bopopescu/Lauecollect | 60ae2b05ea8596ba0decf426e37aeaca0bc8b6be | [
"MIT"
] | null | null | null | test/wxhello.py | bopopescu/Lauecollect | 60ae2b05ea8596ba0decf426e37aeaca0bc8b6be | [
"MIT"
] | 1 | 2019-10-22T21:28:31.000Z | 2019-10-22T21:39:12.000Z | test/wxhello.py | bopopescu/Lauecollect | 60ae2b05ea8596ba0decf426e37aeaca0bc8b6be | [
"MIT"
] | 2 | 2019-06-06T15:06:46.000Z | 2020-07-20T02:03:22.000Z | import wx
app = wx.App()
window = wx.Frame(None, title = "wxPython Frame", size = (300,200))
panel = wx.Panel(window)
label = wx.StaticText(panel, label = "Hello World", pos = (100,50))
window.Show(True)
app.MainLoop()
| 22.8 | 68 | 0.653509 |
075ee27bc50650b498f73fa563272ec750442237 | 777 | py | Python | src/challenges/7-8-20.py | rupol/Algorithms-Lecture | 2114857af719511038c9cb85ba7e57a547a6e515 | [
"MIT"
] | null | null | null | src/challenges/7-8-20.py | rupol/Algorithms-Lecture | 2114857af719511038c9cb85ba7e57a547a6e515 | [
"MIT"
] | null | null | null | src/challenges/7-8-20.py | rupol/Algorithms-Lecture | 2114857af719511038c9cb85ba7e57a547a6e515 | [
"MIT"
] | null | null | null | # Add up and print the sum of the all of the minimum elements of each inner array:
# [[8, 4], [90, -1, 3], [9, 62], [-7, -1, -56, -6], [201], [76, 18]]
# The expected output is given by:
# 4 + -1 + 9 + -56 + 201 + 18 = 175
# You may use whatever programming language you'd like.
# Verbalize your thought process as much ... | 38.85 | 166 | 0.642214 |
92c9945d63e911b67f6425917b47adb5a1bf63fa | 854 | py | Python | mirage/generate/url_template.py | fossabot/django-mirage | 814b3f2486af31f9dca42ef4bb0215655fe0aea6 | [
"Apache-2.0"
] | 4 | 2019-05-16T09:26:21.000Z | 2022-02-14T06:21:40.000Z | mirage/generate/url_template.py | fossabot/django-mirage | 814b3f2486af31f9dca42ef4bb0215655fe0aea6 | [
"Apache-2.0"
] | 77 | 2019-05-10T22:24:54.000Z | 2021-07-02T03:11:01.000Z | mirage/generate/url_template.py | fossabot/django-mirage | 814b3f2486af31f9dca42ef4bb0215655fe0aea6 | [
"Apache-2.0"
] | 1 | 2018-12-08T09:57:54.000Z | 2018-12-08T09:57:54.000Z | # -*- coding: utf-8 -*-
"""
Copyright 2017-2018 Shota Shimazu.
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 appl... | 27.548387 | 84 | 0.716628 |
9617755217e037a5f5305d4400a7869af5dbd47f | 3,683 | py | Python | czsc/utils/ta.py | fnsoxt/czsc | ae908ca807251eefb1c23c1a3bfa20f36977ba4b | [
"Apache-2.0"
] | 206 | 2021-11-16T03:08:58.000Z | 2022-03-30T04:21:47.000Z | czsc/utils/ta.py | fnsoxt/czsc | ae908ca807251eefb1c23c1a3bfa20f36977ba4b | [
"Apache-2.0"
] | 20 | 2021-11-18T09:26:02.000Z | 2022-03-19T11:59:34.000Z | czsc/utils/ta.py | fnsoxt/czsc | ae908ca807251eefb1c23c1a3bfa20f36977ba4b | [
"Apache-2.0"
] | 124 | 2021-11-16T08:45:11.000Z | 2022-03-30T08:55:27.000Z | # -*- coding: utf-8 -*-
"""
author: zengbin93
email: zeng_bin8888@163.com
create_dt: 2022/1/24 15:01
describe: 常用技术分析指标
"""
import numpy as np
def SMA(close: np.array, timeperiod=5):
"""简单移动平均
https://baike.baidu.com/item/%E7%A7%BB%E5%8A%A8%E5%B9%B3%E5%9D%87%E7%BA%BF/217887
:param close: np.array
... | 25.054422 | 116 | 0.526201 |
e726d46f373ee5e79001d3d50ba8e9553474d344 | 103 | py | Python | fullstack_application/frontend/views.py | bhardwajRahul/fullstack-Django-React-Redux | 10bebe1b130fe73c1550d5919020a43bc2ca9c02 | [
"MIT"
] | 2 | 2020-05-30T03:25:07.000Z | 2021-03-31T22:23:48.000Z | fullstack_application/frontend/views.py | bhardwajRahul/fullstack-Django-React-Redux | 10bebe1b130fe73c1550d5919020a43bc2ca9c02 | [
"MIT"
] | 8 | 2020-05-30T08:19:57.000Z | 2021-09-22T19:12:16.000Z | fullstack_application/frontend/views.py | Combinativ/fullstack-Django-React-Redux | 10bebe1b130fe73c1550d5919020a43bc2ca9c02 | [
"MIT"
] | 2 | 2020-05-31T07:11:52.000Z | 2020-10-19T15:20:50.000Z | from django.shortcuts import render
def index(request):
return render(request,'frontend/index.html')
| 20.6 | 45 | 0.796117 |
d2bc2ed82dbe3dd73db7c77893717ae49ea31719 | 28,933 | py | Python | calwebb_spec2_pytests/auxiliary_code/compare_wcs_mos.py | jhunkeler/nirspec_pipe_testing_tool | 04d247e905e6003f51834c8aff024c211b82eb8a | [
"BSD-3-Clause"
] | null | null | null | calwebb_spec2_pytests/auxiliary_code/compare_wcs_mos.py | jhunkeler/nirspec_pipe_testing_tool | 04d247e905e6003f51834c8aff024c211b82eb8a | [
"BSD-3-Clause"
] | null | null | null | calwebb_spec2_pytests/auxiliary_code/compare_wcs_mos.py | jhunkeler/nirspec_pipe_testing_tool | 04d247e905e6003f51834c8aff024c211b82eb8a | [
"BSD-3-Clause"
] | null | null | null | import numpy as np
import os
import subprocess
from collections import OrderedDict
from astropy.io import fits
from astropy import wcs
from jwst.assign_wcs import nirspec
from jwst import datamodels
from . import auxiliary_functions as auxfunc
"""
This script compares pipeline WCS info with ESA results for Multi-Ob... | 50.230903 | 173 | 0.619742 |
41a0950a501af2dd2742997c05b201570aacb74a | 350 | py | Python | experiments/jacobi-2d/tmp_files/4888.py | LoopTilingBenchmark/benchmark | 52a3d2e70216552a498fd91de02a2fa9cb62122c | [
"BSD-2-Clause"
] | null | null | null | experiments/jacobi-2d/tmp_files/4888.py | LoopTilingBenchmark/benchmark | 52a3d2e70216552a498fd91de02a2fa9cb62122c | [
"BSD-2-Clause"
] | null | null | null | experiments/jacobi-2d/tmp_files/4888.py | LoopTilingBenchmark/benchmark | 52a3d2e70216552a498fd91de02a2fa9cb62122c | [
"BSD-2-Clause"
] | null | null | null | from chill import *
source('/uufs/chpc.utah.edu/common/home/u1142914/lib/ytopt_vinu/polybench/polybench-code/stencils/jacobi-2d/kernel.c')
destination('/uufs/chpc.utah.edu/common/home/u1142914/lib/ytopt_vinu/experiments/jacobi-2d/tmp_files/4888.c')
procedure('kernel_jacobi_2d')
loop(0)
tile(0,2,16,2)
tile(0,4,16,4)
t... | 26.923077 | 118 | 0.765714 |
9fa5f8f83bd237a1edb8f4adcfd56d9e25b8172f | 971 | py | Python | setup.py | Nandan-unni/Nano | fa7c85c85cfa6cc31ff0d98679aafe5be179e8d1 | [
"MIT"
] | 2 | 2021-01-31T17:27:50.000Z | 2021-02-12T17:52:43.000Z | setup.py | Nandan-unni/Nano | fa7c85c85cfa6cc31ff0d98679aafe5be179e8d1 | [
"MIT"
] | 4 | 2021-02-10T10:25:26.000Z | 2021-02-12T15:36:08.000Z | setup.py | Nandan-unni/Nano | fa7c85c85cfa6cc31ff0d98679aafe5be179e8d1 | [
"MIT"
] | null | null | null | from setuptools import setup, find_packages
with open("README.md", "r") as README:
long_description = README.read()
setup(
name="nanoAPI",
version="0.5.0",
author="Nandanunni A S",
author_email="asnqln@gmail.com",
description="A nano web framework",
long_description=long_description,
... | 26.972222 | 81 | 0.647786 |
e22756cc722a109a0693f1e3349a4a59402225e8 | 506 | py | Python | send.py | CarlColglazier/libre-rytm-sds | a76ba95ea1d4db847985ef6b51e53ca7e2a6c966 | [
"BSD-3-Clause"
] | 3 | 2019-10-28T09:52:35.000Z | 2020-09-13T15:26:49.000Z | send.py | CarlColglazier/libre-rytm-sds | a76ba95ea1d4db847985ef6b51e53ca7e2a6c966 | [
"BSD-3-Clause"
] | null | null | null | send.py | CarlColglazier/libre-rytm-sds | a76ba95ea1d4db847985ef6b51e53ca7e2a6c966 | [
"BSD-3-Clause"
] | null | null | null | import sys
import glob
import os
from pathlib import Path
from time import sleep
import subprocess
hw = sys.argv[1]
script_path=os.path.dirname(os.path.realpath(__file__))
bin_path = script_path + "/send-sds/send-sds"
for i, f in enumerate(glob.glob("*.sds")):
run = [f'{bin_path}', f'{hw}', "0", f'{i}', f'{f}']
r... | 20.24 | 55 | 0.673913 |
e777fdb08cf9fdf4548efc214b1f23164e2e8657 | 6,878 | py | Python | train_ocr_crnn.py | nhh1501/E2E_MLT_VN | dabbc1f7e12b45fbaef965200217cca41793dbc3 | [
"MIT"
] | null | null | null | train_ocr_crnn.py | nhh1501/E2E_MLT_VN | dabbc1f7e12b45fbaef965200217cca41793dbc3 | [
"MIT"
] | null | null | null | train_ocr_crnn.py | nhh1501/E2E_MLT_VN | dabbc1f7e12b45fbaef965200217cca41793dbc3 | [
"MIT"
] | null | null | null | '''
Created on Sep 29, 2017
@author: Michal.Busta at gmail.com
'''
import numpy as np
import torch.nn.functional as F
import os
import torch
import net_utils
import argparse
import time
import ocr_gen
import torch.nn as nn
from models_crnn import ModelResNetSep_crnn
from ocr_test_utils import print_seq_ext
from utils ... | 35.822917 | 150 | 0.660076 |
eb23ffcaadf958e04cdbb2ea6e022c211d79ffc7 | 47,319 | py | Python | spyder/plugins/tours/widgets.py | Earthman100/spyder | 949ce0f9100a69504c70a5678e8589a05aee7d38 | [
"MIT"
] | 7,956 | 2015-02-17T01:19:09.000Z | 2022-03-31T21:52:15.000Z | spyder/plugins/tours/widgets.py | Earthman100/spyder | 949ce0f9100a69504c70a5678e8589a05aee7d38 | [
"MIT"
] | 16,326 | 2015-02-16T23:15:21.000Z | 2022-03-31T23:34:34.000Z | spyder/plugins/tours/widgets.py | Earthman100/spyder | 949ce0f9100a69504c70a5678e8589a05aee7d38 | [
"MIT"
] | 1,918 | 2015-02-20T19:26:26.000Z | 2022-03-31T19:03:25.000Z | # -*- coding: utf-8 -*-
#
# Copyright © Spyder Project Contributors
# Licensed under the terms of the MIT License
# (see spyder/__init__.py for details)
"""Spyder interactive tours"""
# pylint: disable=C0103
# pylint: disable=R0903
# pylint: disable=R0911
# pylint: disable=R0201
# Standard library impor... | 36.7669 | 82 | 0.577802 |
03bbe6bdb6dc170c5a0156d97f2f14be20bbe753 | 8,236 | py | Python | make_tfrecord.py | ndaidong/tf-ssd-mobilenet | 3d6082178b018d9e02c6044d562ef05ca2021899 | [
"MIT"
] | null | null | null | make_tfrecord.py | ndaidong/tf-ssd-mobilenet | 3d6082178b018d9e02c6044d562ef05ca2021899 | [
"MIT"
] | null | null | null | make_tfrecord.py | ndaidong/tf-ssd-mobilenet | 3d6082178b018d9e02c6044d562ef05ca2021899 | [
"MIT"
] | 1 | 2018-04-18T03:41:09.000Z | 2018-04-18T03:41:09.000Z | #!/usr/bin/env python3
import glob
import argparse
import sys
import hashlib
import io
from os import path, mkdir, remove
from shutil import rmtree
from random import shuffle
from lxml import etree
from funcy import compose
from tqdm import tqdm
from PIL import Image
import tensorflow as tf
from tflib.object_detec... | 28.898246 | 78 | 0.567508 |
2a1e34f8713434f98e713ea1c4334ac404f9037c | 3,625 | py | Python | Input.py | JuanCab/ChromaStarPy | b4401a32c607e89375ffb6d8e6e4b3de3340ef24 | [
"MIT"
] | null | null | null | Input.py | JuanCab/ChromaStarPy | b4401a32c607e89375ffb6d8e6e4b3de3340ef24 | [
"MIT"
] | null | null | null | Input.py | JuanCab/ChromaStarPy | b4401a32c607e89375ffb6d8e6e4b3de3340ef24 | [
"MIT"
] | null | null | null | #
#
#Custom filename tags to distinguish from other runs
project = "Project"
runVers = "Run"
#Default plot
#Select ONE only:
#makePlot = "none"
#makePlot = "structure"
#makePlot = "sed"
#makePlot = "spectrum"
#makePlot = "ldc"
#makePlot = "ft"
#makePlot = "tlaLine"
###The following two plot variables ... | 32.657658 | 117 | 0.606069 |
a8147d7fb267e0842336f49dbc69560959499038 | 146 | py | Python | output/models/saxon_data/cta/cta0025_xsd/__init__.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | 1 | 2021-08-14T17:59:21.000Z | 2021-08-14T17:59:21.000Z | output/models/saxon_data/cta/cta0025_xsd/__init__.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | 4 | 2020-02-12T21:30:44.000Z | 2020-04-15T20:06:46.000Z | output/models/saxon_data/cta/cta0025_xsd/__init__.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | null | null | null | from output.models.saxon_data.cta.cta0025_xsd.cta0025 import (
Doc,
Event,
When,
)
__all__ = [
"Doc",
"Event",
"When",
]
| 12.166667 | 62 | 0.575342 |
6e3546106e60f708dadbe72cb2162aff1ae23582 | 308 | py | Python | pinax/projects/basic_project/__init__.py | skabber/pinax | 6fdee6b7bbbb597074d45122badf3a6dd75e0b92 | [
"MIT"
] | 2 | 2015-12-27T23:07:51.000Z | 2016-05-09T08:57:28.000Z | pinax/projects/private_beta_project/__init__.py | SMiGL/pinax | d08b2655fe661566bd13c5c170b1a4cad9e67a1d | [
"MIT"
] | null | null | null | pinax/projects/private_beta_project/__init__.py | SMiGL/pinax | d08b2655fe661566bd13c5c170b1a4cad9e67a1d | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
__about__ = """
This project comes with the bare minimum set of applications and templates to
get you started. It includes no extra tabs–only the profile and notices tabs are
included by default. From here you can add any extra functionality and
applications that you would like.
""" | 38.5 | 80 | 0.762987 |
e9239bd4b40490f4163d3b428fa6c8af233c46a4 | 219 | py | Python | analyzer/staticinfo_exceptions.py | JayveeHe/senz.app.staticinfo.inferrence | 98748506adcbb28b074337e261fe79b2141f31a5 | [
"MIT"
] | null | null | null | analyzer/staticinfo_exceptions.py | JayveeHe/senz.app.staticinfo.inferrence | 98748506adcbb28b074337e261fe79b2141f31a5 | [
"MIT"
] | null | null | null | analyzer/staticinfo_exceptions.py | JayveeHe/senz.app.staticinfo.inferrence | 98748506adcbb28b074337e261fe79b2141f31a5 | [
"MIT"
] | null | null | null | __author__ = 'Jayvee'
class MsgException(Exception):
def __init__(self, msg):
self.message = msg
def __str__(self):
return self.message
def __unicode__(self):
return self.message
| 16.846154 | 30 | 0.639269 |
58b6503a102c4277bb31bb1fc2a3b23a7b32857d | 7,698 | py | Python | nobos_commons/tools/decorators/cache_decorator.py | noboevbo/nobos_commons | 471e52e10fd2228c106777c72d8439e58b047003 | [
"MIT"
] | 2 | 2020-06-03T16:28:44.000Z | 2020-10-10T03:07:23.000Z | nobos_commons/tools/decorators/cache_decorator.py | noboevbo/nobos_commons | 471e52e10fd2228c106777c72d8439e58b047003 | [
"MIT"
] | null | null | null | nobos_commons/tools/decorators/cache_decorator.py | noboevbo/nobos_commons | 471e52e10fd2228c106777c72d8439e58b047003 | [
"MIT"
] | 4 | 2020-10-10T03:07:25.000Z | 2021-09-30T01:11:02.000Z | import collections
import hashlib
import inspect
import json
import os
import pickle
import re
import shutil
import sys
from typing import Callable, List, Any
from nobos_commons.data_structures.configs.cache_config import CacheConfig
from nobos_commons.tools.decorators.timing_decorator import stopwatch
from nobos_comm... | 45.821429 | 127 | 0.643154 |
4a2e53158e1a1c7f219fcd1dcbc35e955c922a1e | 194 | py | Python | processes/gather_exception.py | kinoreel/kino-gather | defc0d6b311651f985467b5bfcfdbf77d73c10ae | [
"MIT"
] | null | null | null | processes/gather_exception.py | kinoreel/kino-gather | defc0d6b311651f985467b5bfcfdbf77d73c10ae | [
"MIT"
] | 3 | 2017-06-03T16:50:56.000Z | 2017-10-01T09:24:37.000Z | processes/gather_exception.py | kinoreel/kino-gather | defc0d6b311651f985467b5bfcfdbf77d73c10ae | [
"MIT"
] | null | null | null | class GatherException(Exception):
def __init__(self, imdb_id, message):
self.message = message
self.imdb_id = imdb_id
super(GatherException, self).__init__(message)
| 27.714286 | 54 | 0.685567 |
a3d5e7e48e0b7fece416ee290ee2b05d34c4bfd1 | 916 | py | Python | get_imgs.py | Zhang-Qi7/Cat-vs-Dog-on-web | 7a6aff3ec7d3bec01294de0e86fd456a5bba65d2 | [
"MIT"
] | 2 | 2020-08-25T02:47:51.000Z | 2020-08-25T15:13:43.000Z | get_imgs.py | Zhang-Qi7/Cat-vs-Dog-on-web | 7a6aff3ec7d3bec01294de0e86fd456a5bba65d2 | [
"MIT"
] | 1 | 2020-08-25T10:23:47.000Z | 2020-08-26T07:16:17.000Z | get_imgs.py | Zhang-Qi7/Cat-vs-Dog-on-web | 7a6aff3ec7d3bec01294de0e86fd456a5bba65d2 | [
"MIT"
] | 1 | 2020-08-25T09:09:06.000Z | 2020-08-25T09:09:06.000Z | import os
import re
import requests
def download_baidu(word):
url = 'https://image.baidu.com/search/flip?tn=baiduimage&ie=utf-8&word=' + word + '&ct=201326592&v=flip'
pic_url = re.findall('"objURL":"(.*?)",', requests.get(url).text, re.S)
i = 0
for each in pic_url:
print(pic_url)
... | 26.941176 | 109 | 0.505459 |
64b5a2cb8929ad161a1ee1dc4b0d356c36e7cf8d | 2,930 | py | Python | distributed_dp/dme_utils.py | AbdulmoneamAli/federated | c54a9f5053d6316f81aa6f6d1eba61068927a33d | [
"Apache-2.0"
] | 1 | 2021-07-29T16:35:21.000Z | 2021-07-29T16:35:21.000Z | distributed_dp/dme_utils.py | AbdulmoneamAli/federated | c54a9f5053d6316f81aa6f6d1eba61068927a33d | [
"Apache-2.0"
] | null | null | null | distributed_dp/dme_utils.py | AbdulmoneamAli/federated | c54a9f5053d6316f81aa6f6d1eba61068927a33d | [
"Apache-2.0"
] | null | null | null | # Copyright 2021, Google LLC. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 37.088608 | 74 | 0.743686 |
c353c983370f88cd2d93c3297aa089ed064600b5 | 1,421 | py | Python | specpogoda.py | SpecPogoda/PrzewidywaniePogody | 6216da176d618e538bfbc8008e35ebdfd1d48713 | [
"MIT"
] | null | null | null | specpogoda.py | SpecPogoda/PrzewidywaniePogody | 6216da176d618e538bfbc8008e35ebdfd1d48713 | [
"MIT"
] | null | null | null | specpogoda.py | SpecPogoda/PrzewidywaniePogody | 6216da176d618e538bfbc8008e35ebdfd1d48713 | [
"MIT"
] | null | null | null |
"""
https://colab.research.google.com/drive/1-OdCF3H_XB6XPItV68Lzy1I8fyTzzSz8
"""
import tensorflow_probability as tfp
import tensorflow as tf
import numpy as np
weather = [18.3, 21., 13.6, 9.8, 13.5, 12.99, 16., 16.5, 14.3]
weatherMean = np.mean(weather)
warmDay= []
coldDay= []
for i in weather:
... | 27.862745 | 90 | 0.65095 |
f5fed3179bdec8fafbc8257b6f1de1bfd46c5fbb | 383 | py | Python | ws/Demos/Demo008_PolicyGradient_PPO_Discrete/lunarlander/test.py | dattaray-basab/RLGames | b12263fe7a4a246be02fc20ed20cfb9fda40d29b | [
"MIT"
] | null | null | null | ws/Demos/Demo008_PolicyGradient_PPO_Discrete/lunarlander/test.py | dattaray-basab/RLGames | b12263fe7a4a246be02fc20ed20cfb9fda40d29b | [
"MIT"
] | null | null | null | ws/Demos/Demo008_PolicyGradient_PPO_Discrete/lunarlander/test.py | dattaray-basab/RLGames | b12263fe7a4a246be02fc20ed20cfb9fda40d29b | [
"MIT"
] | null | null | null | from ws.RLUtils.setup.agent_dispatcher import agent_dispatcher
def fn_execute():
agent_mgr = agent_dispatcher(__file__)
agent_mgr. \
fn_change_args(
{
'TEST_MODE': True,
}
). \
fn_run_train()
return agent_mgr.APP_INFO.ERROR_MESSAG... | 20.157895 | 63 | 0.574413 |
8a71fed39007646ad139ad820b48c198051a41fb | 37,473 | py | Python | pantulipy/core.py | virtualfunction/pantulipy | e4f5008dfc0b72a0a30154d74e934359ca0bb60d | [
"Unlicense"
] | 13 | 2018-06-07T19:19:10.000Z | 2021-12-19T22:26:49.000Z | pantulipy/core.py | kodiakcrypto/pantulipy | cceb042bc5725a1b1cb9c7245bedf06ca0238964 | [
"Unlicense"
] | 2 | 2018-11-15T07:38:41.000Z | 2020-04-12T00:20:47.000Z | pantulipy/core.py | kodiakcrypto/pantulipy | cceb042bc5725a1b1cb9c7245bedf06ca0238964 | [
"Unlicense"
] | 7 | 2018-09-11T00:34:08.000Z | 2021-06-05T08:47:35.000Z | # -*- coding:utf-8 -*-
import inspect as insp
import numpy as np
import pandas as pd
import tulipy
_OHLCV = ['open', 'high', 'low', 'close', 'volume']
_FUNCS = sorted([f for f in dir(tulipy) if f[0].islower() and 'lib' not in f])
_FUNCTIONS_REFERENCES = {fn: n for n, fn in enumerate(_FUNCS)}
# Added so you can loop ... | 36.594727 | 194 | 0.679102 |
c65c6f27288f5250bd86d83e8c00b5883d180a0b | 12,211 | py | Python | experiments/lidc/train_classification.py | xiaosayin/RibFrac_npz_version | f094d60421c0609558799e24949840e233543415 | [
"Apache-2.0"
] | null | null | null | experiments/lidc/train_classification.py | xiaosayin/RibFrac_npz_version | f094d60421c0609558799e24949840e233543415 | [
"Apache-2.0"
] | null | null | null | experiments/lidc/train_classification.py | xiaosayin/RibFrac_npz_version | f094d60421c0609558799e24949840e233543415 | [
"Apache-2.0"
] | null | null | null | # encoding: utf-8
import _init_paths
import fire
import time
import sys
import pandas as pd
import os
import shutil
import numpy as np
import torch
import torch.nn as nn
import torch.backends.cudnn as cudnn
import torchvision
import torch.nn.functional as F
from tqdm import tqdm
from collections import OrderedDict
f... | 39.263666 | 170 | 0.614692 |
48abafd7357e824d6afec6c2f307895ec7ac750d | 41 | py | Python | neuralnet/__init__.py | forumulator/BTP | 34af5c349f658480549aaeb3a3c24f672fff2c96 | [
"MIT"
] | null | null | null | neuralnet/__init__.py | forumulator/BTP | 34af5c349f658480549aaeb3a3c24f672fff2c96 | [
"MIT"
] | null | null | null | neuralnet/__init__.py | forumulator/BTP | 34af5c349f658480549aaeb3a3c24f672fff2c96 | [
"MIT"
] | null | null | null | from neuralnet.run import NeuralNetRunner | 41 | 41 | 0.902439 |
6878a5c5b5c2aadc39a734c589fca850df2fa056 | 3,884 | py | Python | venv/Lib/site-packages/botocore/__init__.py | ishatserka/MachineLearningAndDataAnalysisCoursera | e82e772df2f4aec162cb34ac6127df10d14a625a | [
"MIT"
] | null | null | null | venv/Lib/site-packages/botocore/__init__.py | ishatserka/MachineLearningAndDataAnalysisCoursera | e82e772df2f4aec162cb34ac6127df10d14a625a | [
"MIT"
] | null | null | null | venv/Lib/site-packages/botocore/__init__.py | ishatserka/MachineLearningAndDataAnalysisCoursera | e82e772df2f4aec162cb34ac6127df10d14a625a | [
"MIT"
] | null | null | null | # Copyright (c) 2012-2013 Mitch Garnaat http://garnaat.org/
# Copyright 2012-2014 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"). You
# may not use this file except in compliance with the License. A copy of
# the License is located at
#
# http... | 36.990476 | 78 | 0.689753 |
5812cdee61d0f267c6852548a0469fb6db5453a5 | 1,047 | py | Python | epsagon/modules/aiohttp.py | clericeon/epsagon-python | 387b785708d5b6ac0e8a9f8562c52f56d0825cdf | [
"MIT"
] | null | null | null | epsagon/modules/aiohttp.py | clericeon/epsagon-python | 387b785708d5b6ac0e8a9f8562c52f56d0825cdf | [
"MIT"
] | null | null | null | epsagon/modules/aiohttp.py | clericeon/epsagon-python | 387b785708d5b6ac0e8a9f8562c52f56d0825cdf | [
"MIT"
] | null | null | null | """
aiohttp patcher module.
"""
from __future__ import absolute_import
import wrapt
from ..wrappers.aiohttp import AiohttpMiddleware
from ..utils import print_debug, is_lambda_env
def _wrapper(wrapped, _instance, args, kwargs):
"""
Adds `AiohttpMiddleware` into aiohttp app.
:param wrapped: wrapt's wrappe... | 24.348837 | 79 | 0.657116 |
c66e76825b6d77875c5b7190f29bae12d2c2b700 | 57 | py | Python | chapter-04/exercise007.py | krastin/pp-cs3.0 | 502be9aac2d84215db176864e443c219e5e26591 | [
"MIT"
] | null | null | null | chapter-04/exercise007.py | krastin/pp-cs3.0 | 502be9aac2d84215db176864e443c219e5e26591 | [
"MIT"
] | null | null | null | chapter-04/exercise007.py | krastin/pp-cs3.0 | 502be9aac2d84215db176864e443c219e5e26591 | [
"MIT"
] | null | null | null | num = float(input("Please enter a number: "))
print(num)
| 19 | 45 | 0.684211 |
3e54ff10c2538d495a80fa9e9a0bd496f0a63988 | 88,031 | py | Python | env/lib/python3.8/site-packages/numpy/lib/npyio.py | acrucetta/Chicago_COVI_WebApp | a37c9f492a20dcd625f8647067394617988de913 | [
"MIT",
"Unlicense"
] | 1,738 | 2017-09-21T10:59:12.000Z | 2022-03-31T21:05:46.000Z | env/lib/python3.8/site-packages/numpy/lib/npyio.py | acrucetta/Chicago_COVI_WebApp | a37c9f492a20dcd625f8647067394617988de913 | [
"MIT",
"Unlicense"
] | 427 | 2017-09-29T22:54:36.000Z | 2022-02-15T19:26:50.000Z | env/lib/python3.8/site-packages/numpy/lib/npyio.py | acrucetta/Chicago_COVI_WebApp | a37c9f492a20dcd625f8647067394617988de913 | [
"MIT",
"Unlicense"
] | 671 | 2017-09-21T08:04:01.000Z | 2022-03-29T14:30:07.000Z | from __future__ import division, absolute_import, print_function
import sys
import os
import re
import functools
import itertools
import warnings
import weakref
import contextlib
from operator import itemgetter, index as opindex
import numpy as np
from . import format
from ._datasource import DataSource
from numpy.co... | 36.972281 | 95 | 0.571526 |
c8ae14678d57aaa23c0636e9b2440a92851d7583 | 4,428 | py | Python | homeassistant/components/accuweather/__init__.py | erogleva/core | 994ae09f69afe772150a698953c0d7386a745de2 | [
"Apache-2.0"
] | 6 | 2016-11-25T06:36:27.000Z | 2021-11-16T11:20:23.000Z | homeassistant/components/accuweather/__init__.py | erogleva/core | 994ae09f69afe772150a698953c0d7386a745de2 | [
"Apache-2.0"
] | 56 | 2020-08-03T07:30:54.000Z | 2022-03-31T06:02:04.000Z | homeassistant/components/accuweather/__init__.py | erogleva/core | 994ae09f69afe772150a698953c0d7386a745de2 | [
"Apache-2.0"
] | 14 | 2018-08-19T16:28:26.000Z | 2021-09-02T18:26:53.000Z | """The AccuWeather component."""
import asyncio
from datetime import timedelta
import logging
from accuweather import AccuWeather, ApiError, InvalidApiKeyError, RequestsExceededError
from aiohttp.client_exceptions import ClientConnectorError
from async_timeout import timeout
from homeassistant.const import CONF_API_K... | 33.293233 | 88 | 0.696251 |
5d9e140e704cc64204329e6714b499c462049667 | 2,314 | py | Python | src/pdc2/scripts/mafft_wrapper.py | jlanga/smsk_selection | 08070c6d4a6fbd9320265e1e698c95ba80f81123 | [
"MIT"
] | 4 | 2021-07-18T05:20:20.000Z | 2022-01-03T10:22:33.000Z | src/pdc2/scripts/mafft_wrapper.py | jlanga/smsk_selection | 08070c6d4a6fbd9320265e1e698c95ba80f81123 | [
"MIT"
] | 1 | 2017-08-21T07:26:13.000Z | 2018-11-08T13:59:48.000Z | src/pdc2/scripts/mafft_wrapper.py | jlanga/smsk_orthofinder | 08070c6d4a6fbd9320265e1e698c95ba80f81123 | [
"MIT"
] | 2 | 2021-07-18T05:20:26.000Z | 2022-03-31T18:23:31.000Z | """
Takes a directory of fasta files
If there are >= 1000 sequences in the direction, use --auto
For fasta files with less than 1000 sequences, use the slower but much
more accurate algorithm
Uncomment the com += "--anysymbol " line if there are "U" or any other unusual
charactors in the sequences
"""
import os,sys... | 29.291139 | 78 | 0.668539 |
d8eff340c7e48deb7dc1cb09031160e715720f21 | 1,219 | py | Python | manga_py/providers/zeroscans_com.py | Abijithkrishna/manga-py | 03b142ecb944ef37a36e5095ffa580209021e3b0 | [
"MIT"
] | 337 | 2019-08-27T16:14:50.000Z | 2022-03-29T09:58:22.000Z | manga_py/providers/zeroscans_com.py | Abijithkrishna/manga-py | 03b142ecb944ef37a36e5095ffa580209021e3b0 | [
"MIT"
] | 225 | 2019-08-25T15:02:01.000Z | 2022-03-31T06:36:09.000Z | manga_py/providers/zeroscans_com.py | Abijithkrishna/manga-py | 03b142ecb944ef37a36e5095ffa580209021e3b0 | [
"MIT"
] | 41 | 2019-10-04T13:28:02.000Z | 2022-03-19T08:18:34.000Z | from manga_py.provider import Provider
from .helpers.std import Std
class ZeroScansCom(Provider, Std):
_key = '/comics/'
def get_chapter_index(self) -> str:
return self.re.search(
r'%s[^/]+/(\d+/\d+)' % self._key,
self.chapter
).group(1).replace('/', '-')
def get_... | 25.395833 | 62 | 0.545529 |
47ae4beca724e65a952dd74bc388fc9df9c0aeda | 7,269 | py | Python | docs/conf.py | crrobinson14/django-jsonit | 3c4b10c844b4e45759bac28a5a6dd201f60c6c1d | [
"BSD-3-Clause"
] | 3 | 2015-01-22T19:02:55.000Z | 2015-11-08T16:10:08.000Z | docs/conf.py | crrobinson14/django-jsonit | 3c4b10c844b4e45759bac28a5a6dd201f60c6c1d | [
"BSD-3-Clause"
] | 1 | 2015-06-06T11:49:32.000Z | 2015-06-06T11:49:32.000Z | docs/conf.py | crrobinson14/django-jsonit | 3c4b10c844b4e45759bac28a5a6dd201f60c6c1d | [
"BSD-3-Clause"
] | 1 | 2020-05-12T16:41:54.000Z | 2020-05-12T16:41:54.000Z | # -*- coding: utf-8 -*-
#
# django-jsonit documentation build configuration file, created by
# sphinx-quickstart on Thu Sep 29 15:20:35 2011.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#... | 32.450893 | 84 | 0.724859 |
a76a8379223b78d04e7f6fca2c0afc196019ccbc | 18,205 | py | Python | Code/bst.py | colo6299/CS-1.3-Core-Data-Structures | 2d2b5406029477d0dcfae07fb06cc4be4ff227cd | [
"MIT"
] | null | null | null | Code/bst.py | colo6299/CS-1.3-Core-Data-Structures | 2d2b5406029477d0dcfae07fb06cc4be4ff227cd | [
"MIT"
] | 5 | 2020-02-15T17:24:36.000Z | 2020-03-09T22:12:56.000Z | Code/bst.py | colo6299/CS-1.3-Core-Data-Structures | 2d2b5406029477d0dcfae07fb06cc4be4ff227cd | [
"MIT"
] | null | null | null | from q import ArrayQ
from ihop import IHOP_Array as stack
class BinaryNode:
# NOTE: all of the big O stuff is on the tree class :)
def __init__(self, data, left=None, right=None):
self.data = data
self.left = left
self.right = right
def __repr__(self):
"""Return a string re... | 31.013629 | 106 | 0.561384 |
91df38f9659868f86dde86a8d85541eb873602ed | 5,917 | py | Python | mainGame.py | ProNilabh/PythonShootGame. | 1bb9552d9165d842fc1fbffc3634ae1998159f2a | [
"DOC"
] | 318 | 2015-01-12T02:56:45.000Z | 2022-03-22T20:30:12.000Z | mainGame.py | ProNilabh/PythonShootGame. | 1bb9552d9165d842fc1fbffc3634ae1998159f2a | [
"DOC"
] | 4 | 2016-02-16T07:30:54.000Z | 2020-02-15T11:20:10.000Z | mainGame.py | ProNilabh/PythonShootGame. | 1bb9552d9165d842fc1fbffc3634ae1998159f2a | [
"DOC"
] | 303 | 2015-01-21T09:30:57.000Z | 2022-03-26T21:04:43.000Z | # -*- coding: utf-8 -*-
"""
Created on Wed Sep 11 11:05:00 2013
@author: Leo
"""
import pygame
from sys import exit
from pygame.locals import *
from gameRole import *
import random
# 初始化游戏
pygame.init()
screen = pygame.display.set_mode((SCREEN_WIDTH, SCREEN_HEIGHT))
pygame.display.set_caption('飞机大战... | 29.883838 | 87 | 0.648471 |
f886732c96a6d91ddbe61c7da1f1b3464530a11c | 1,098 | py | Python | eyantra_provider/provider/urls.py | Andreaf2395/OpenID-Provider | cdedd42cc49e6f03e3b2570c03fb1f4a2c83be34 | [
"MIT"
] | null | null | null | eyantra_provider/provider/urls.py | Andreaf2395/OpenID-Provider | cdedd42cc49e6f03e3b2570c03fb1f4a2c83be34 | [
"MIT"
] | 4 | 2021-03-19T08:17:59.000Z | 2021-06-10T19:34:36.000Z | eyantra_provider/provider/urls.py | Andreaf2395/OpenID-Provider | cdedd42cc49e6f03e3b2570c03fb1f4a2c83be34 | [
"MIT"
] | null | null | null | """oidc_provider URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.0/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class... | 40.666667 | 77 | 0.715847 |
38e836339819dab9ee46a414709ad2f93484da55 | 2,856 | py | Python | art/art_T1049-3.py | blackbotinc/artic2-atomics | 83f6ae1269c23f29b361a974455011df80c61945 | [
"Apache-2.0"
] | null | null | null | art/art_T1049-3.py | blackbotinc/artic2-atomics | 83f6ae1269c23f29b361a974455011df80c61945 | [
"Apache-2.0"
] | null | null | null | art/art_T1049-3.py | blackbotinc/artic2-atomics | 83f6ae1269c23f29b361a974455011df80c61945 | [
"Apache-2.0"
] | 1 | 2022-03-31T11:07:56.000Z | 2022-03-31T11:07:56.000Z | from blackbot.core.utils import get_path_in_package
from blackbot.core.wss.atomic import Atomic
from terminaltables import SingleTable
import os
import json
class Atomic(Atomic):
def __init__(self):
self.name = 'Discovery/T1049-3'
self.controller_type = ''
self.external_id = 'T1049'
... | 37.090909 | 104 | 0.507703 |
96a35873558e7e20ad49f9b61a0e2daf9d268f55 | 26,427 | py | Python | test/test_comment_sidecar.py | avrona/comment-sidecar | 9a148ddb9ffe89d55ca4a481852b87bbbae0d305 | [
"MIT"
] | 39 | 2017-07-10T14:03:35.000Z | 2021-12-26T02:52:05.000Z | test/test_comment_sidecar.py | avrona/comment-sidecar | 9a148ddb9ffe89d55ca4a481852b87bbbae0d305 | [
"MIT"
] | 3 | 2020-06-09T15:42:51.000Z | 2021-02-24T20:37:26.000Z | test/test_comment_sidecar.py | avrona/comment-sidecar | 9a148ddb9ffe89d55ca4a481852b87bbbae0d305 | [
"MIT"
] | 8 | 2018-01-07T11:57:54.000Z | 2021-08-08T07:53:07.000Z | #!/usr/bin/env python3
import re
import pytest
import requests
from mysql.connector import connect
from requests.models import Response
import unittest
import hashlib
import time
from path import Path
from assertpy import assert_that, fail
UNSUBSCRIBE_SUCCESS_MSG = "unsubscribed successfully"
UNSUBSCRIBE_ERROR_MSG = ... | 42.900974 | 194 | 0.722784 |
40c68c13ec8f64e1c2bc0bb66cc69cae7ccd75d2 | 4,947 | py | Python | gen_best_json.py | crwhite14/nasbench | ddd6f7840a7650f700565c8ec86e791a3cdecca4 | [
"Apache-2.0"
] | 1 | 2020-07-06T10:40:13.000Z | 2020-07-06T10:40:13.000Z | gen_best_json.py | crwhite14/nasbench | ddd6f7840a7650f700565c8ec86e791a3cdecca4 | [
"Apache-2.0"
] | null | null | null | gen_best_json.py | crwhite14/nasbench | ddd6f7840a7650f700565c8ec86e791a3cdecca4 | [
"Apache-2.0"
] | 1 | 2021-04-02T00:01:20.000Z | 2021-04-02T00:01:20.000Z | from nasbench import api
from random import randint
import json
import numpy as np
import os
from collections import OrderedDict
# Replace this string with the path to the downloaded nasbench.tfrecord before
# executing.
NASBENCH_TFRECORD = 'data/nasbench_only108.tfrecord'
INPUT = 'input'
OUTPUT = 'output'
CONV1X1 = ... | 38.053846 | 130 | 0.63776 |
dc608e4d2a76a9b592bf02f9b504a7146958169e | 2,602 | py | Python | core/api.py | ans2human/silver-octo-waddle | c3fd566d8f2932966eb3f35ed5a19099fad4b3cb | [
"MIT"
] | 484 | 2018-02-19T00:38:28.000Z | 2022-03-26T16:13:51.000Z | core/api.py | 30kaltekar/django-channels-chat | 827559a7d309bfe07f77f108fb34b7cae4c55779 | [
"MIT"
] | 17 | 2019-01-16T19:05:24.000Z | 2022-02-08T15:22:48.000Z | core/api.py | 30kaltekar/django-channels-chat | 827559a7d309bfe07f77f108fb34b7cae4c55779 | [
"MIT"
] | 159 | 2018-02-19T01:36:14.000Z | 2022-03-26T12:03:33.000Z | from django.db.models import Q
from django.shortcuts import get_object_or_404
from django.contrib.auth.models import User
from rest_framework.pagination import PageNumberPagination
from rest_framework.response import Response
from rest_framework.viewsets import ModelViewSet
from rest_framework.authentication import Ses... | 38.264706 | 78 | 0.697925 |
eb71f518d0e6e1212af1b1ff5fc1e9ca22733669 | 1,747 | py | Python | setup.py | tohanss/repobee-feedback | 76a2333b5bc359675c69a495d8050843f2394a5a | [
"MIT"
] | null | null | null | setup.py | tohanss/repobee-feedback | 76a2333b5bc359675c69a495d8050843f2394a5a | [
"MIT"
] | null | null | null | setup.py | tohanss/repobee-feedback | 76a2333b5bc359675c69a495d8050843f2394a5a | [
"MIT"
] | null | null | null | import re
from setuptools import setup, find_packages
with open("README.md", mode="r", encoding="utf-8") as f:
readme = f.read()
# parse the version instead of importing it to avoid dependency-related crashes
with open("repobee_feedback/__version.py", mode="r", encoding="utf-8") as f:
line = f.readline()
... | 35.653061 | 79 | 0.650258 |
737f9c05959cf8f64c320b6cb5cfb447c8dc570b | 17,739 | py | Python | google/cloud/dialogflow_v2beta1/types/audio_config.py | rogers140/python-dialogflow | d9ce91f8590947736560727624fbc0846601ce1c | [
"Apache-2.0"
] | null | null | null | google/cloud/dialogflow_v2beta1/types/audio_config.py | rogers140/python-dialogflow | d9ce91f8590947736560727624fbc0846601ce1c | [
"Apache-2.0"
] | null | null | null | google/cloud/dialogflow_v2beta1/types/audio_config.py | rogers140/python-dialogflow | d9ce91f8590947736560727624fbc0846601ce1c | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 42.539568 | 121 | 0.671797 |
c5cf5fe2b4c21f10e306a9a3f119e125e3cd5822 | 1,261 | py | Python | myCatkin/src/joystick_drivers/wiimote/src/wiimote/wiimoteExceptions.py | sbow/scratch | 8ac5cd772c8f6c3def6d25ad0402c3f973af2fae | [
"MIT"
] | 3 | 2021-01-10T10:52:14.000Z | 2021-12-31T10:19:25.000Z | src/joystick_drivers/wiimote/src/wiimote/wiimoteExceptions.py | EveVengerov/Gesture-Controlling-Drone | 8fe38dbfdc496472e13e76bcdb55b471f51b42ea | [
"MIT"
] | null | null | null | src/joystick_drivers/wiimote/src/wiimote/wiimoteExceptions.py | EveVengerov/Gesture-Controlling-Drone | 8fe38dbfdc496472e13e76bcdb55b471f51b42ea | [
"MIT"
] | 1 | 2021-02-04T04:59:32.000Z | 2021-02-04T04:59:32.000Z | # ###############################################################################
#
# File: wiimoteExceptions.py
# RCS: $Header: $
# Description: Exception Classes for Wiimote Controller
# Author: Andreas Paepcke
# Created: Thu Aug 13 09:01:17 2009
# Modified: Mon Aug 17 11:27:02 2009 (... | 27.413043 | 87 | 0.601903 |
47af7eb1f277ec6dec1a39b84afb2cf584ab144d | 3,517 | py | Python | clinical_concept_extraction/model.py | sdoerstling/clinical_concept_extraction | cf6dcde864856462c0e3f9d0c0fc133792b51f6c | [
"MIT"
] | null | null | null | clinical_concept_extraction/model.py | sdoerstling/clinical_concept_extraction | cf6dcde864856462c0e3f9d0c0fc133792b51f6c | [
"MIT"
] | null | null | null | clinical_concept_extraction/model.py | sdoerstling/clinical_concept_extraction | cf6dcde864856462c0e3f9d0c0fc133792b51f6c | [
"MIT"
] | null | null | null | import os
import tensorflow as tf
flags = tf.app.flags
FLAGS = flags.FLAGS
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'
flags.DEFINE_float('dropout_rate', 0.5, 'the dropout rate of the CNN or RNN')
flags.DEFINE_string('rnn_cell_type', 'lstm', 'Type of RNN cell used')
flags.DEFINE_integer('hidden_state', 256, 'Number of ... | 35.887755 | 98 | 0.667899 |
2195686ee9c7f6b0a7d1121fa8efe33cf3d6cf31 | 4,982 | py | Python | pandas/tests/groupby/test_bin_groupby.py | mtrbean/pandas | c0ff67a22df9c18da1172766e313732ed2ab6c30 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 1 | 2019-02-18T00:47:14.000Z | 2019-02-18T00:47:14.000Z | pandas/tests/groupby/test_bin_groupby.py | mtrbean/pandas | c0ff67a22df9c18da1172766e313732ed2ab6c30 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 1 | 2019-08-18T16:00:45.000Z | 2019-08-18T16:00:45.000Z | pandas/tests/groupby/test_bin_groupby.py | mtrbean/pandas | c0ff67a22df9c18da1172766e313732ed2ab6c30 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 1 | 2020-11-17T10:02:40.000Z | 2020-11-17T10:02:40.000Z | import numpy as np
from numpy import nan
import pytest
from pandas._libs import groupby, lib, reduction
from pandas.core.dtypes.common import ensure_int64
from pandas import Index, Series, isna
from pandas.core.groupby.ops import generate_bins_generic
import pandas.util.testing as tm
from pandas.util.testing import ... | 32.993377 | 85 | 0.613408 |
21cac8447a322467c292896d4a9a422c8ac6de7b | 72 | py | Python | setup.py | MathOnco/valis | 1ec9a88f21930d82fa5e823276ff78ff8b4f3a5a | [
"MIT"
] | 4 | 2022-03-14T12:55:42.000Z | 2022-03-17T10:06:29.000Z | setup.py | MathOnco/valis | 1ec9a88f21930d82fa5e823276ff78ff8b4f3a5a | [
"MIT"
] | null | null | null | setup.py | MathOnco/valis | 1ec9a88f21930d82fa5e823276ff78ff8b4f3a5a | [
"MIT"
] | null | null | null |
if __name__ == "__main__":
from setuptools import setup
setup() | 18 | 32 | 0.666667 |
8a75a115eba7099b7a82ed4713f501a6da6ee15d | 1,734 | py | Python | doc/source/EXAMPLES/mu_labelsspatial.py | kapteyn-astro/kapteyn | f12332cfd567c7c0da40628dcfc7b297971ee636 | [
"BSD-3-Clause"
] | 3 | 2016-04-28T08:55:33.000Z | 2018-07-23T18:35:58.000Z | doc/source/EXAMPLES/mu_labelsspatial.py | kapteyn-astro/kapteyn | f12332cfd567c7c0da40628dcfc7b297971ee636 | [
"BSD-3-Clause"
] | 2 | 2020-07-23T12:28:37.000Z | 2021-07-13T18:26:06.000Z | doc/source/EXAMPLES/mu_labelsspatial.py | kapteyn-astro/kapteyn | f12332cfd567c7c0da40628dcfc7b297971ee636 | [
"BSD-3-Clause"
] | 3 | 2017-05-03T14:01:08.000Z | 2020-07-23T12:23:28.000Z | from kapteyn import maputils
from matplotlib import pylab as plt
header = { 'NAXIS' : 3,
'BUNIT' : 'w.u.',
'CDELT1' : -1.200000000000E-03,
'CDELT2' : 1.497160000000E-03, 'CDELT3' : 97647.745732,
'CRPIX1' : 5, 'CRPIX2' : 6, 'CRPIX3' : 32,
'CRVAL1' : 1.7877920000... | 36.125 | 80 | 0.630911 |
4a29261557a3c4928a0e1cc07159b183139e6a53 | 12,542 | py | Python | napalm_yang/models/openconfig/network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_link/tlvs/tlv/unknown_tlv/__init__.py | ckishimo/napalm-yang | 8f2bd907bd3afcde3c2f8e985192de74748baf6c | [
"Apache-2.0"
] | 64 | 2016-10-20T15:47:18.000Z | 2021-11-11T11:57:32.000Z | napalm_yang/models/openconfig/network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_link/tlvs/tlv/unknown_tlv/__init__.py | ckishimo/napalm-yang | 8f2bd907bd3afcde3c2f8e985192de74748baf6c | [
"Apache-2.0"
] | 126 | 2016-10-05T10:36:14.000Z | 2019-05-15T08:43:23.000Z | napalm_yang/models/openconfig/network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_link/tlvs/tlv/unknown_tlv/__init__.py | ckishimo/napalm-yang | 8f2bd907bd3afcde3c2f8e985192de74748baf6c | [
"Apache-2.0"
] | 63 | 2016-11-07T15:23:08.000Z | 2021-09-22T14:41:16.000Z | # -*- coding: utf-8 -*-
from operator import attrgetter
from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType
from pyangbind.lib.yangtypes import RestrictedClassType
from pyangbind.lib.yangtypes import TypedListType
from pyangbind.lib.yangtypes import YANGBool
from pyangbind.lib.yangtypes import YANGListTy... | 37.550898 | 375 | 0.593047 |
28db7498ebb18daf5a716b9191f39edfcf1144fa | 67 | py | Python | tests/components_tests/__init__.py | seblee97/student_teacher_catastrophic | 9baaaf2850025ba9cf33d61c42386bc4c3b2dad2 | [
"MIT"
] | 2 | 2021-09-13T01:44:09.000Z | 2021-12-11T11:56:49.000Z | tests/components_tests/__init__.py | seblee97/student_teacher_catastrophic | 9baaaf2850025ba9cf33d61c42386bc4c3b2dad2 | [
"MIT"
] | 8 | 2020-11-13T18:37:30.000Z | 2022-02-15T15:11:51.000Z | tests/components_tests/__init__.py | seblee97/student_teacher_catastrophic | 9baaaf2850025ba9cf33d61c42386bc4c3b2dad2 | [
"MIT"
] | null | null | null | from . import data_modules_tests
__all__ = ["data_modules_tests"]
| 16.75 | 32 | 0.791045 |
a2171b216369ecb933adefa23b5760cfffdc415c | 3,312 | py | Python | server/url.py | microsoft/OneLabeler | 316175e98a1cba72d651567d9fac08fc6c7bdf4f | [
"MIT"
] | 8 | 2022-03-26T17:45:01.000Z | 2022-03-30T14:12:20.000Z | server/url.py | microsoft/OneLabeler | 316175e98a1cba72d651567d9fac08fc6c7bdf4f | [
"MIT"
] | null | null | null | server/url.py | microsoft/OneLabeler | 316175e98a1cba72d651567d9fac08fc6c7bdf4f | [
"MIT"
] | 1 | 2022-03-27T06:11:24.000Z | 2022-03-27T06:11:24.000Z | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
from tornado.web import RequestHandler
from handlers import (CompileHandler,
ModelTrainingHandler,
ImageProcessingHandler)
# Data object selection handlers:
from handlers.data_object_selection.cluster_... | 43.578947 | 91 | 0.780193 |
9287e6e71705c10f85d0c94440f66390e77140e7 | 28,857 | py | Python | kopf/reactor/registries.py | tinyzimmer/kopf | 74c42a2acdf2a72446d290fa1f27b53ec5d43218 | [
"MIT"
] | null | null | null | kopf/reactor/registries.py | tinyzimmer/kopf | 74c42a2acdf2a72446d290fa1f27b53ec5d43218 | [
"MIT"
] | null | null | null | kopf/reactor/registries.py | tinyzimmer/kopf | 74c42a2acdf2a72446d290fa1f27b53ec5d43218 | [
"MIT"
] | null | null | null | """
A registry of the handlers, attached to the resources or events.
The global registry is populated by the `kopf.on` decorators, and is used
to register the resources being watched and handled, and to attach
the handlers to the specific causes (create/update/delete/field-change).
The simple registry is part of the ... | 39.802759 | 124 | 0.634231 |
d7d853d375f9d48e5632cdd4ea5ba622990a0ff0 | 16,379 | py | Python | torch_utils/ops/upfirdn2d.py | maua-maua-maua/nvGAN | edea24c58646780c9fb8ea942e49708ce9d62421 | [
"MIT"
] | null | null | null | torch_utils/ops/upfirdn2d.py | maua-maua-maua/nvGAN | edea24c58646780c9fb8ea942e49708ce9d62421 | [
"MIT"
] | null | null | null | torch_utils/ops/upfirdn2d.py | maua-maua-maua/nvGAN | edea24c58646780c9fb8ea942e49708ce9d62421 | [
"MIT"
] | null | null | null | # Copyright (c) 2021, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# NVIDIA CORPORATION and its licensors retain all intellectual property
# and proprietary rights in and to this software, related documentation
# and any modifications thereto. Any use, reproduction, disclosure or
# distribution of this sof... | 41.997436 | 120 | 0.574516 |
7965bd0b87d6fd669ab45392353033b7589d5c6b | 7,470 | py | Python | src/virtualenv/create/creator.py | jezdez/virtualenv | 5c9b6246a4107e5e613a23c42b805d0373672400 | [
"MIT"
] | 1 | 2022-02-21T02:01:37.000Z | 2022-02-21T02:01:37.000Z | src/virtualenv/create/creator.py | jezdez/virtualenv | 5c9b6246a4107e5e613a23c42b805d0373672400 | [
"MIT"
] | null | null | null | src/virtualenv/create/creator.py | jezdez/virtualenv | 5c9b6246a4107e5e613a23c42b805d0373672400 | [
"MIT"
] | null | null | null | from __future__ import absolute_import, print_function, unicode_literals
import json
import logging
import os
import shutil
import sys
from abc import ABCMeta, abstractmethod
from argparse import ArgumentTypeError
from ast import literal_eval
from collections import OrderedDict
from stat import S_IWUSR
import six
fro... | 35.913462 | 113 | 0.610442 |
46eb3c5d97324a790dc225612496bb48e9d64b4f | 1,136 | py | Python | main1.py | 17jrb17/E01b-Smiles | 2f4a65c9907cc28e40cf17253fb19a22c7bc4e0a | [
"MIT"
] | null | null | null | main1.py | 17jrb17/E01b-Smiles | 2f4a65c9907cc28e40cf17253fb19a22c7bc4e0a | [
"MIT"
] | null | null | null | main1.py | 17jrb17/E01b-Smiles | 2f4a65c9907cc28e40cf17253fb19a22c7bc4e0a | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import utils, open_color, arcade
utils.check_version((3,7))
# Open the window. Set the window title and dimensions (width and height)
arcade.open_window(800, 600, "Smiley Face Example")
arcade.set_background_color(open_color.white)
# Start the render process. This must be done before any drawi... | 30.702703 | 74 | 0.791373 |
658d77211e8a9102588343a4361271b22eb85e9c | 903 | py | Python | doc/conf.py | inducer/courseflow | 0f9786e3616dbedf08365d81a731f672b97ba9f5 | [
"Unlicense"
] | null | null | null | doc/conf.py | inducer/courseflow | 0f9786e3616dbedf08365d81a731f672b97ba9f5 | [
"Unlicense"
] | null | null | null | doc/conf.py | inducer/courseflow | 0f9786e3616dbedf08365d81a731f672b97ba9f5 | [
"Unlicense"
] | null | null | null | import sys
import os
from urllib.request import urlopen
_conf_url = \
"https://raw.githubusercontent.com/inducer/sphinxconfig/main/sphinxconfig.py"
with urlopen(_conf_url) as _inf:
exec(compile(_inf.read(), _conf_url, "exec"), globals())
sys.path.insert(0, os.path.abspath(".."))
os.environ["DJANGO_SETTIN... | 25.083333 | 85 | 0.673311 |
4f52ddcab581f20f2a261df602a888032bc94723 | 771 | py | Python | pyPseudo/lexer/Token.py | johnyob/Pseudo | 02e637e93872e786201538f719cd19676a03c170 | [
"MIT"
] | 1 | 2019-03-10T21:25:47.000Z | 2019-03-10T21:25:47.000Z | pyPseudo/lexer/Token.py | johnyob/Pseudo | 02e637e93872e786201538f719cd19676a03c170 | [
"MIT"
] | null | null | null | pyPseudo/lexer/Token.py | johnyob/Pseudo | 02e637e93872e786201538f719cd19676a03c170 | [
"MIT"
] | null | null | null | class Token:
def __init__(self, type, lexeme, literal, path, line):
self._type = type
self._lexeme = lexeme
self._literal = literal
self._path = path
self._line = line
def getType(self):
return self._type
def getLexeme(self):
return self._lexeme
... | 23.363636 | 62 | 0.566796 |
dafb65ce6808a2837be117e62bb2f7c4e7da3e49 | 8,501 | py | Python | lib/datasets/cityscapes.py | Zealoe/HRNet-Semantic-Segmentation | e5082879d6a46f1eb1127429e9948c80c0e15418 | [
"MIT"
] | 2 | 2020-11-02T11:38:59.000Z | 2021-03-23T09:54:14.000Z | lib/datasets/cityscapes.py | Zealoe/HRNet-Semantic-Segmentation | e5082879d6a46f1eb1127429e9948c80c0e15418 | [
"MIT"
] | null | null | null | lib/datasets/cityscapes.py | Zealoe/HRNet-Semantic-Segmentation | e5082879d6a46f1eb1127429e9948c80c0e15418 | [
"MIT"
] | null | null | null | # ------------------------------------------------------------------------------
# Copyright (c) Microsoft
# Licensed under the MIT License.
# Written by Ke Sun (sunk@mail.ustc.edu.cn)
# ------------------------------------------------------------------------------
import os
import cv2
import numpy as np
fr... | 41.468293 | 81 | 0.438184 |
7824ba1ab873fbb3d210465967ec3442310287be | 21,360 | py | Python | kaolin/ops/spc/spc.py | mcx/kaolin | abe006921b5d522ecd0f7c5e30abe760a4459dc7 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | kaolin/ops/spc/spc.py | mcx/kaolin | abe006921b5d522ecd0f7c5e30abe760a4459dc7 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | kaolin/ops/spc/spc.py | mcx/kaolin | abe006921b5d522ecd0f7c5e30abe760a4459dc7 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # Copyright (c) 2021,22 NVIDIA CORPORATION & AFFILIATES.
# All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless r... | 45.83691 | 123 | 0.63633 |
e64d4d809b549dc749581acd1377b80c3137299a | 480 | py | Python | CTFd/utils/security/signing.py | amanbansal2709/ctfd | 941335a5e205ca818ce1758076858b628e4fa05b | [
"Apache-2.0"
] | null | null | null | CTFd/utils/security/signing.py | amanbansal2709/ctfd | 941335a5e205ca818ce1758076858b628e4fa05b | [
"Apache-2.0"
] | null | null | null | CTFd/utils/security/signing.py | amanbansal2709/ctfd | 941335a5e205ca818ce1758076858b628e4fa05b | [
"Apache-2.0"
] | 1 | 2021-12-23T14:11:15.000Z | 2021-12-23T14:11:15.000Z | from flask import current_app
from itsdangerous.url_safe import URLSafeTimedSerializer
from itsdangerous.exc import BadTimeSignature, SignatureExpired, BadSignature # noqa: F401
def serialize(data):
secret = current_app.config['SECRET_KEY']
s = URLSafeTimedSerializer(secret)
return s.dumps(data)
def un... | 30 | 91 | 0.775 |
2ffd66ed59875c79c3bb3e39e1ffe23d6eaaf3e1 | 4,670 | py | Python | parlai/tasks/vqa_v2/agents.py | lifelongeek/KBKAIST_Chatbot | 4766e6ee61a10e3719b7608c5777430ddfd277f9 | [
"BSD-3-Clause"
] | 2 | 2017-10-06T09:56:49.000Z | 2017-10-06T09:57:03.000Z | parlai/tasks/vqa_v2/agents.py | gmkim90/KBKAIST_Chatbot | 4766e6ee61a10e3719b7608c5777430ddfd277f9 | [
"BSD-3-Clause"
] | null | null | null | parlai/tasks/vqa_v2/agents.py | gmkim90/KBKAIST_Chatbot | 4766e6ee61a10e3719b7608c5777430ddfd277f9 | [
"BSD-3-Clause"
] | 2 | 2017-10-06T09:57:04.000Z | 2018-11-08T13:45:47.000Z | # Copyright (c) 2017-present, Facebook, Inc.
# All rights reserved.
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree. An additional grant
# of patent rights can be found in the PATENTS file in the same directory.
from parlai.core.agents im... | 33.357143 | 78 | 0.618844 |
5c309e1d54a770dc1b8e90c70ab330f354215006 | 35,348 | py | Python | src/sage/modules/vector_space_morphism.py | saraedum/sage-renamed | d2da67b14da2ad766a5906425d60d43a3b3e1270 | [
"BSL-1.0"
] | 1 | 2016-11-04T16:31:48.000Z | 2016-11-04T16:31:48.000Z | src/sage/modules/vector_space_morphism.py | rwst/sage | a9d274b9338e6ee24bf35ea8d25875507e51e455 | [
"BSL-1.0"
] | null | null | null | src/sage/modules/vector_space_morphism.py | rwst/sage | a9d274b9338e6ee24bf35ea8d25875507e51e455 | [
"BSL-1.0"
] | null | null | null | r"""
Vector Space Morphisms (aka Linear Transformations)
AUTHOR:
- Rob Beezer: (2011-06-29)
A vector space morphism is a homomorphism between vector spaces, better known
as a linear transformation. These are a specialization of Sage's free module
homomorphisms. (A free module is like a vector space, but with s... | 36.782518 | 120 | 0.592509 |
24a454e24ab3529630e7740c14743aa06f0b813f | 6,918 | py | Python | python/friesian/example/ncf/ncf_train.py | DirkFi/BigDL | 7493209165c046116470b9a1e1c8f527915d6f1e | [
"Apache-2.0"
] | null | null | null | python/friesian/example/ncf/ncf_train.py | DirkFi/BigDL | 7493209165c046116470b9a1e1c8f527915d6f1e | [
"Apache-2.0"
] | null | null | null | python/friesian/example/ncf/ncf_train.py | DirkFi/BigDL | 7493209165c046116470b9a1e1c8f527915d6f1e | [
"Apache-2.0"
] | null | null | null | #
# Copyright 2016 The BigDL Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 46.42953 | 98 | 0.630818 |
4cbf15b5e82e0334a02e7a2b33ef321f8a872fb0 | 3,572 | py | Python | application/api/nurse.py | MickeyPa/soen344 | a9632dc36d23a4eba5bb9c943c9ae75ecc4811bd | [
"MIT"
] | null | null | null | application/api/nurse.py | MickeyPa/soen344 | a9632dc36d23a4eba5bb9c943c9ae75ecc4811bd | [
"MIT"
] | null | null | null | application/api/nurse.py | MickeyPa/soen344 | a9632dc36d23a4eba5bb9c943c9ae75ecc4811bd | [
"MIT"
] | 2 | 2019-06-04T20:09:14.000Z | 2019-06-04T20:15:32.000Z | '''
This file documents the api routes for nurse related events
'''
from flask import Flask, Blueprint, redirect, render_template, url_for, session, request, logging
from index import app
from application.services import NurseService, DoctorService, DoctorScheduleService
from application.util import *
from passlib.ha... | 33.074074 | 133 | 0.716405 |
c5693c183b6e1a0044c109f7e1cf1f98743e2a1f | 1,618 | py | Python | event_pubsub/handlers/event_producer_handlers.py | DhivakharVenkatachalam/snet-marketplace-service | 6aee606bc9b00d418caeae26c64deae03792e0ce | [
"MIT"
] | null | null | null | event_pubsub/handlers/event_producer_handlers.py | DhivakharVenkatachalam/snet-marketplace-service | 6aee606bc9b00d418caeae26c64deae03792e0ce | [
"MIT"
] | null | null | null | event_pubsub/handlers/event_producer_handlers.py | DhivakharVenkatachalam/snet-marketplace-service | 6aee606bc9b00d418caeae26c64deae03792e0ce | [
"MIT"
] | 1 | 2021-01-15T11:10:36.000Z | 2021-01-15T11:10:36.000Z | from common.logger import get_logger
from common.utils import handle_exception_with_slack_notification
from common.exception_handler import exception_handler
from event_pubsub.config import NETWORKS, NETWORK_ID, SLACK_HOOK, WS_PROVIDER
from event_pubsub.producers.blockchain_event_producer import MPEEventProducer, RFAIE... | 34.425532 | 122 | 0.811496 |
0e4092e54c63059897455494b68b05cebcd5e62d | 482 | py | Python | data/scripts/templates/object/draft_schematic/furniture/bestine/shared_painting_bestine_rainbow_berry_bush.py | obi-two/GameServer | 7d37024e2291a97d49522610cd8f1dbe5666afc2 | [
"MIT"
] | 20 | 2015-02-23T15:11:56.000Z | 2022-03-18T20:56:48.000Z | data/scripts/templates/object/draft_schematic/furniture/bestine/shared_painting_bestine_rainbow_berry_bush.py | apathyboy/swganh | 665128efe9154611dec4cb5efc61d246dd095984 | [
"MIT"
] | null | null | null | data/scripts/templates/object/draft_schematic/furniture/bestine/shared_painting_bestine_rainbow_berry_bush.py | apathyboy/swganh | 665128efe9154611dec4cb5efc61d246dd095984 | [
"MIT"
] | 20 | 2015-04-04T16:35:59.000Z | 2022-03-24T14:54:37.000Z | #### NOTICE: THIS FILE IS AUTOGENERATED
#### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY
#### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES
from swgpy.object import *
def create(kernel):
result = Intangible()
result.template = "object/draft_schematic/furniture/bestine/shared_painting_bestine_rainbow_berry_bus... | 28.352941 | 108 | 0.744813 |
d63dd0d2f3cebbcf45849b4454e606c5428ff210 | 53,761 | py | Python | thelper/train/utils.py | sfoucher/thelper | 235406f3166f03ba6eb77f4a7289188aebc9b2c4 | [
"Apache-2.0"
] | null | null | null | thelper/train/utils.py | sfoucher/thelper | 235406f3166f03ba6eb77f4a7289188aebc9b2c4 | [
"Apache-2.0"
] | null | null | null | thelper/train/utils.py | sfoucher/thelper | 235406f3166f03ba6eb77f4a7289188aebc9b2c4 | [
"Apache-2.0"
] | null | null | null | """Training/evaluation utilities module.
This module contains utilities and tools used to instantiate training sessions. It also contains
the prediction consumer interface used by metrics and loggers to receive iteration data during
training. See :mod:`thelper.optim.metrics` for more information on metrics.
"""
impor... | 53.440358 | 120 | 0.62523 |
555a3d5eb5e2004469fdc862e835d15907fcd406 | 4,047 | py | Python | tests/python/source_file.py | rtajan/eirballoon | 0eded8f86174a9e5ed38297fa26c7f5a53b5ea53 | [
"MIT"
] | null | null | null | tests/python/source_file.py | rtajan/eirballoon | 0eded8f86174a9e5ed38297fa26c7f5a53b5ea53 | [
"MIT"
] | null | null | null | tests/python/source_file.py | rtajan/eirballoon | 0eded8f86174a9e5ed38297fa26c7f5a53b5ea53 | [
"MIT"
] | null | null | null | import sys
sys.path.insert(0, '../../build/lib')
sys.path.insert(0, '../../py_aff3ct/build/lib')
sys.path.insert(0, '../../src/python')
from py_aff3ct.module.py_module import Py_Module
import py_aff3ct
import numpy as np
import os
from bitstring import BitArray
class source_file(Py_Module):
def int2binseq(self... | 37.472222 | 211 | 0.595503 |
121ae563308c695a0a76fcf383eb6e6bb7f43011 | 3,386 | py | Python | paddlex/cv/datasets/easydata_cls.py | Channingss/PaddleX | 06fe9552472f0379ff1a16c339c9784c973b5a04 | [
"Apache-2.0"
] | 3 | 2020-05-12T03:09:13.000Z | 2020-06-18T02:50:34.000Z | paddlex/cv/datasets/easydata_cls.py | wyc880622/PaddleX | f001960b7359f3a88b7dd96e1f34500b90566ceb | [
"Apache-2.0"
] | null | null | null | paddlex/cv/datasets/easydata_cls.py | wyc880622/PaddleX | f001960b7359f3a88b7dd96e1f34500b90566ceb | [
"Apache-2.0"
] | 1 | 2020-05-18T07:06:28.000Z | 2020-05-18T07:06:28.000Z | # copyright (c) 2020 PaddlePaddle Authors. All Rights Reserve.
#
# 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... | 39.372093 | 77 | 0.611636 |
b824f49d75035c8f806988afdbb7ef0d78682c9b | 1,285 | tac | Python | docker/buildbot_worker.tac | ScalABLE40/buildbot-ros | f1badded81fa8bdfcef5bcbe596fc96dcbcba557 | [
"Apache-2.0"
] | 1 | 2020-01-23T13:42:51.000Z | 2020-01-23T13:42:51.000Z | docker/buildbot_worker.tac | ScalABLE40/buildbot-ros | f1badded81fa8bdfcef5bcbe596fc96dcbcba557 | [
"Apache-2.0"
] | 7 | 2020-01-09T10:10:15.000Z | 2020-03-04T13:56:59.000Z | docker/buildbot_worker.tac | ScalABLE40/buildbot-ros | f1badded81fa8bdfcef5bcbe596fc96dcbcba557 | [
"Apache-2.0"
] | null | null | null | import fnmatch
import os
import sys
from twisted.application import service
from twisted.python.log import FileLogObserver
from twisted.python.log import ILogObserver
from buildbot_worker.bot import Worker
# setup worker
basedir = os.environ.get("BUILDBOT_BASEDIR",
os.path.abspath(os.path.dirname(__file__)))
app... | 31.341463 | 80 | 0.761868 |
7a0759036732f18d179a2c94c1d0765e26d12ca6 | 1,896 | py | Python | tensorflow/python/autograph/converters/list_comprehensions_test.py | yage99/tensorflow | c7fa71b32a3635eb25596ae80d007b41007769c4 | [
"Apache-2.0"
] | 74 | 2020-07-06T17:11:39.000Z | 2022-01-28T06:31:28.000Z | tensorflow/python/autograph/converters/list_comprehensions_test.py | sseung0703/tensorflow | be084bd7a4dd241eb781fc704f57bcacc5c9b6dd | [
"Apache-2.0"
] | 1,056 | 2019-12-15T01:20:31.000Z | 2022-02-10T02:06:28.000Z | tensorflow/python/autograph/converters/list_comprehensions_test.py | sseung0703/tensorflow | be084bd7a4dd241eb781fc704f57bcacc5c9b6dd | [
"Apache-2.0"
] | 12 | 2020-07-08T07:27:17.000Z | 2021-12-27T08:54:27.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... | 30.580645 | 93 | 0.694093 |
196921d8902ae707653dadfa383687e15f16e224 | 4,928 | py | Python | aiocoap/util/__init__.py | miri64/aiocoap | 93e699280b644465213fc8ba29bae556475fb6fc | [
"MIT"
] | 229 | 2015-02-11T19:35:48.000Z | 2022-03-22T08:20:14.000Z | aiocoap/util/__init__.py | miri64/aiocoap | 93e699280b644465213fc8ba29bae556475fb6fc | [
"MIT"
] | 258 | 2015-01-30T13:29:36.000Z | 2022-03-20T16:05:07.000Z | aiocoap/util/__init__.py | miri64/aiocoap | 93e699280b644465213fc8ba29bae556475fb6fc | [
"MIT"
] | 124 | 2015-02-14T12:02:44.000Z | 2022-03-16T12:15:51.000Z | # This file is part of the Python aiocoap library project.
#
# Copyright (c) 2012-2014 Maciej Wasilak <http://sixpinetrees.blogspot.com/>,
# 2013-2014 Christian Amsüss <c.amsuess@energyharvesting.at>
#
# aiocoap is free software, this file is published under the MIT license as
# described in the accompany... | 35.710145 | 106 | 0.654221 |
b84612b4ced42d92787d6a3e1fc3cf38bf608f4c | 4,337 | py | Python | linear-algebra-python/src/tests.py | niroshajayasundara/Python | ed113841165717d135a001307d06f4282ad16870 | [
"MIT"
] | 5 | 2018-04-02T08:06:54.000Z | 2018-08-02T03:01:27.000Z | linear_algebra_python/src/tests.py | tlhcelik/Python | 3bab59ae06f79698ab579ba52d2bc4ea6402154c | [
"MIT"
] | 1 | 2019-02-03T07:45:29.000Z | 2019-02-03T07:45:29.000Z | linear_algebra_python/src/tests.py | tlhcelik/Python | 3bab59ae06f79698ab579ba52d2bc4ea6402154c | [
"MIT"
] | 8 | 2019-10-03T13:37:51.000Z | 2019-10-25T20:33:10.000Z | # -*- coding: utf-8 -*-
"""
Created on Mon Feb 26 15:40:07 2018
@author: Christian Bender
@license: MIT-license
This file contains the test-suite for the linear algebra library.
"""
import unittest
from lib import *
class Test(unittest.TestCase):
def test_component(self):
"""
test for method... | 32.609023 | 78 | 0.509108 |
3c93989b8fef29b737de0d8334b0c9526e064848 | 493 | py | Python | azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/version.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 1 | 2018-07-23T08:59:24.000Z | 2018-07-23T08:59:24.000Z | azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/version.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 1 | 2018-11-29T14:46:42.000Z | 2018-11-29T14:46:42.000Z | azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/version.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 1 | 2018-08-28T14:36:47.000Z | 2018-08-28T14:36:47.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 ... | 35.214286 | 76 | 0.51927 |
124792b6da390139e7284c552b075a180b039dfd | 760 | py | Python | test/test_baidu.py | xudongchou/WebAutoTest | f65e57e65fb00033d05e7ddaa0247c408abf4f8a | [
"MIT"
] | null | null | null | test/test_baidu.py | xudongchou/WebAutoTest | f65e57e65fb00033d05e7ddaa0247c408abf4f8a | [
"MIT"
] | null | null | null | test/test_baidu.py | xudongchou/WebAutoTest | f65e57e65fb00033d05e7ddaa0247c408abf4f8a | [
"MIT"
] | null | null | null | """
@project:code
@author:lenovo
@file:test_baidu.py
@ide:PyCharm
@time:2020/8/26 16:12
@month:八月
"""
from uimethod.driverselect import SelectDriver
from uimethod.uiauto import WebUiMethod
from uimethod.helpers import Logger
import unittest
class Test_baidu(unittest.TestCase):
def test_1(self):
"""
... | 22.352941 | 53 | 0.6 |
993cbd00287348a84e55d7d8eaf05054c4d9f984 | 505 | py | Python | Searching/LinearSearch.py | imkp1/Data-Structures-Algorithms | 71375599d4a4a02fb53f64c498fb238595f504f9 | [
"MIT"
] | 199 | 2017-10-10T18:12:45.000Z | 2022-02-16T23:21:22.000Z | Searching/LinearSearch.py | imkp1/Data-Structures-Algorithms | 71375599d4a4a02fb53f64c498fb238595f504f9 | [
"MIT"
] | 120 | 2017-10-10T18:01:59.000Z | 2021-10-01T09:53:07.000Z | Searching/LinearSearch.py | imkp1/Data-Structures-Algorithms | 71375599d4a4a02fb53f64c498fb238595f504f9 | [
"MIT"
] | 262 | 2017-10-10T18:12:46.000Z | 2021-12-30T08:52:10.000Z | def linearSearch(list, targetValue):
for i in range(len(list)):
if (targetValue == list[i]):
return i
return "Not Found"
def main():
# Example
exampleList = [1, 2, 3, 4, 5, 6, 7, 8, 9]
exampleTarget = 5
result = linearSearch(exampleList, exampleTarget)
if ... | 25.25 | 78 | 0.572277 |
7c74e603000f2e0d2c987732dc544e5b98d4657e | 3,016 | py | Python | baselines/her/rollout.py | knowledgetechnologyuhh/goal_conditioned_RL_baselines | 915fc875fd8cc75accd0804d99373916756f726e | [
"MIT"
] | 15 | 2020-07-01T16:16:09.000Z | 2021-12-20T21:56:33.000Z | baselines/her/rollout.py | knowledgetechnologyuhh/goal_conditioned_RL_baselines | 915fc875fd8cc75accd0804d99373916756f726e | [
"MIT"
] | 14 | 2020-09-25T22:41:20.000Z | 2022-03-12T00:38:44.000Z | baselines/her/rollout.py | knowledgetechnologyuhh/goal_conditioned_RL_baselines | 915fc875fd8cc75accd0804d99373916756f726e | [
"MIT"
] | 2 | 2020-07-01T16:19:08.000Z | 2020-11-28T10:45:59.000Z | import numpy as np
import time
from baselines.template.util import store_args, logger
from baselines.template.rollout import Rollout
from tqdm import tqdm
import sys
class RolloutWorker(Rollout):
@store_args
def __init__(self, make_env, policy, dims, logger, T, rollout_batch_size=1,
exploit=... | 44.352941 | 154 | 0.648541 |
80b6a47e5b90481ee33114fac96d16eb883f63e4 | 21,946 | py | Python | utils/shared/summary_core.py | Imperas/force-riscv | c15bc18e4d70e6c2f50bad1e9176e13575de6081 | [
"Apache-2.0"
] | null | null | null | utils/shared/summary_core.py | Imperas/force-riscv | c15bc18e4d70e6c2f50bad1e9176e13575de6081 | [
"Apache-2.0"
] | null | null | null | utils/shared/summary_core.py | Imperas/force-riscv | c15bc18e4d70e6c2f50bad1e9176e13575de6081 | [
"Apache-2.0"
] | null | null | null | #
# Copyright (C) [2020] Futurewei Technologies, Inc.
#
# FORCE-RISCV is 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
#
# THIS SOFTWARE IS PRO... | 39.542342 | 157 | 0.558735 |
731666da3a7c850e4d35fa43ce3832fc3e183d5c | 2,578 | py | Python | setup.py | langdoc/pyannote-db-ikdp | d0f61cc0b03efc27a3a68917a2a7e62a096bea55 | [
"MIT"
] | 1 | 2017-07-15T09:51:02.000Z | 2017-07-15T09:51:02.000Z | setup.py | langdoc/pyannote-db-ikdp | d0f61cc0b03efc27a3a68917a2a7e62a096bea55 | [
"MIT"
] | null | null | null | setup.py | langdoc/pyannote-db-ikdp | d0f61cc0b03efc27a3a68917a2a7e62a096bea55 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# encoding: utf-8
# The MIT License (MIT)
#
# Copyright (c) 2017 CNRS
#
# 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 limitatio... | 33.480519 | 79 | 0.688906 |
d0eba3db245b425a53e7f8b4e866da716890c02a | 828 | py | Python | setup.py | vasusen-code/mediafire-dl | 23102dc6bf90394bb5f5cd1d2509f5985ec4042c | [
"MIT"
] | 2 | 2022-01-17T13:08:27.000Z | 2022-01-20T05:33:34.000Z | setup.py | vasusen-code/mediafire-dl | 23102dc6bf90394bb5f5cd1d2509f5985ec4042c | [
"MIT"
] | null | null | null | setup.py | vasusen-code/mediafire-dl | 23102dc6bf90394bb5f5cd1d2509f5985ec4042c | [
"MIT"
] | null | null | null | from setuptools import setup, find_packages
setup(
name="mediafire-dl",
version="1",
description="Simple command-line script to download files from mediafire based on gdown",
url="https://github.com/vasusen-code/mediafire-dl",
author="Juvenal Yescas",
author_email="juvenal@mail.com",
classi... | 29.571429 | 93 | 0.614734 |
69466ab4cfe4606c533dc648cb050596a7e2a195 | 542 | py | Python | tools/genhooks/recipe_idbhooks.py | sfinktah/src | 7eea22820ff9915660aba20b726495cf6c618728 | [
"BSD-3-Clause"
] | null | null | null | tools/genhooks/recipe_idbhooks.py | sfinktah/src | 7eea22820ff9915660aba20b726495cf6c618728 | [
"BSD-3-Clause"
] | null | null | null | tools/genhooks/recipe_idbhooks.py | sfinktah/src | 7eea22820ff9915660aba20b726495cf6c618728 | [
"BSD-3-Clause"
] | null | null | null |
recipe = {
"enum_const_created" : {
"method_name" : "enum_member_created",
"add_params" : [
{ "name" : "id", "type" : "enum_t" },
{ "name" : "cid", "type" : "const_t" },
],
},
"enum_const_deleted" : {
"method_name" : "enum_member_deleted",
... | 25.809524 | 51 | 0.433579 |
97695a3538e1e86ae9bb42092d6267836a880567 | 1,151 | py | Python | google/ads/googleads/v10/services/services/conversion_goal_campaign_config_service/transports/__init__.py | JakobSteixner/google-ads-python | df2b802cc7e78295a4ece21cc7ef3787cd35dab0 | [
"Apache-2.0"
] | null | null | null | google/ads/googleads/v10/services/services/conversion_goal_campaign_config_service/transports/__init__.py | JakobSteixner/google-ads-python | df2b802cc7e78295a4ece21cc7ef3787cd35dab0 | [
"Apache-2.0"
] | null | null | null | google/ads/googleads/v10/services/services/conversion_goal_campaign_config_service/transports/__init__.py | JakobSteixner/google-ads-python | df2b802cc7e78295a4ece21cc7ef3787cd35dab0 | [
"Apache-2.0"
] | null | null | null | # -*- 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... | 35.96875 | 78 | 0.791486 |
33e7efaea652a3e523e6994d7ff9941f20fcd059 | 118,652 | py | Python | src/transformers/pipelines.py | hhaoyan/transformers | 0911b6bd86b39d55ddeae42fbecef75a1244ea85 | [
"Apache-2.0"
] | null | null | null | src/transformers/pipelines.py | hhaoyan/transformers | 0911b6bd86b39d55ddeae42fbecef75a1244ea85 | [
"Apache-2.0"
] | null | null | null | src/transformers/pipelines.py | hhaoyan/transformers | 0911b6bd86b39d55ddeae42fbecef75a1244ea85 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2018 The HuggingFace Inc. 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... | 42.588658 | 183 | 0.610845 |
43a6003f411f1e57656ad93237ecc98e411f3d0d | 5,103 | py | Python | tools/swig/test/testFarray.py | deepyaman/numpy | b7e75442b03153c7d94fc99e8026d1f09ec17f7f | [
"BSD-3-Clause"
] | 5 | 2018-04-24T13:32:59.000Z | 2019-07-09T07:31:58.000Z | tools/swig/test/testFarray.py | Kshitish555/numpy | 12c6000601c7665e52502ab4a67a54d290498266 | [
"BSD-3-Clause"
] | 169 | 2020-12-25T07:10:57.000Z | 2022-03-29T22:12:31.000Z | tools/swig/test/testFarray.py | Kshitish555/numpy | 12c6000601c7665e52502ab4a67a54d290498266 | [
"BSD-3-Clause"
] | 4 | 2021-06-25T08:40:39.000Z | 2021-08-08T09:52:42.000Z | #!/usr/bin/env python3
# System imports
from distutils.util import get_platform
import os
import sys
import unittest
# Import NumPy
import numpy as np
major, minor = [ int(d) for d in np.__version__.split(".")[:2] ]
if major == 0: BadListError = TypeError
else: BadListError = ValueError
# Add the distutils... | 32.297468 | 83 | 0.59612 |
4e6fa6dc622d6b4bf0d2d48dd76c6b9995c59374 | 2,929 | py | Python | pc/level_06.py | au9ustine/org.au9ustine.puzzles.pythonchallenge | 12cb9092645283c17e0f7e6f922b3c798bb085cc | [
"MIT"
] | null | null | null | pc/level_06.py | au9ustine/org.au9ustine.puzzles.pythonchallenge | 12cb9092645283c17e0f7e6f922b3c798bb085cc | [
"MIT"
] | 6 | 2021-03-18T20:14:01.000Z | 2022-03-11T23:12:47.000Z | pc/level_06.py | au9ustine/org.au9ustine.puzzles.pythonchallenge | 12cb9092645283c17e0f7e6f922b3c798bb085cc | [
"MIT"
] | null | null | null | import unittest
import requests
import logging
import re
import zipfile
import urllib
import os
import os.path
# Default is warning, it's to suppress requests INFO log
logging.basicConfig(format='%(message)s')
def solution():
url = "http://www.pythonchallenge.com/pc/def/channel.zip"
urllib.urlretrieve(url, ... | 35.289157 | 86 | 0.480027 |
5f68713d33fc7082057063e783f0167672a450bb | 4,014 | py | Python | python/deepFashion/get_category10_informations.py | luolongqiang/caffe-luolongqiang | 5ee132e4451a538d97b62039a62a59a69dc43bb9 | [
"BSD-2-Clause"
] | 2 | 2017-03-23T04:19:31.000Z | 2019-07-05T02:31:04.000Z | python/deepFashion/get_category10_informations.py | luolongqiang/caffe-luolongqiang | 5ee132e4451a538d97b62039a62a59a69dc43bb9 | [
"BSD-2-Clause"
] | null | null | null | python/deepFashion/get_category10_informations.py | luolongqiang/caffe-luolongqiang | 5ee132e4451a538d97b62039a62a59a69dc43bb9 | [
"BSD-2-Clause"
] | 1 | 2018-10-11T06:07:19.000Z | 2018-10-11T06:07:19.000Z | import random
import numpy as np
from numpy import array
import matplotlib.pyplot as plt
from collections import Counter
from pandas import DataFrame
import os, sys, time, argparse
def get_category_label_num_dict(input_txt):
label_list = []
with open(input_txt, 'r') as fi:
for line in list(fi)[2:]... | 38.228571 | 85 | 0.692078 |
aba8bddeec88a79b30bc619aad06f44222347ee4 | 718 | py | Python | fake_testing.py | amangit007/Fake-News-Detector | e8cae21d66007bc07560471d63b875803efc2466 | [
"MIT"
] | 4 | 2018-11-24T21:10:25.000Z | 2018-12-07T17:37:51.000Z | fake_testing.py | amangit007/Fake-News-Detector | e8cae21d66007bc07560471d63b875803efc2466 | [
"MIT"
] | 23 | 2018-11-27T18:01:30.000Z | 2019-01-06T17:30:28.000Z | fake_testing.py | amangit007/Fake-News-Detector | e8cae21d66007bc07560471d63b875803efc2466 | [
"MIT"
] | 11 | 2018-11-22T18:50:41.000Z | 2018-12-12T13:51:28.000Z | import pandas as pd
import numpy as np
import sys
try:
news_clean_encoded = np.loadtxt('test_news_encoding.gz')
except:
print ("Please first encode the data!!")
sys.exit(0)
try:
model_file = open('clf_architecture.json', 'r')
except:
print ("Save the trained model before testing!!")
sys.exit(0... | 23.933333 | 61 | 0.747911 |
a1df876fc1e1738b6e597dd8051db892757f9fe0 | 150 | py | Python | tests/skl_datasets/BinaryClass_10/skl_dataset_BinaryClass_10_GaussianNB_6_code_gen.py | antoinecarme/sklearn_model_explanation | feeeb75576931f4a05a786d936babc0a664eef46 | [
"BSD-3-Clause"
] | 13 | 2017-12-22T09:12:51.000Z | 2021-07-26T06:31:54.000Z | tests/skl_datasets/BinaryClass_10/skl_dataset_BinaryClass_10_GaussianNB_6_code_gen.py | antoinecarme/sklearn_model_explanation | feeeb75576931f4a05a786d936babc0a664eef46 | [
"BSD-3-Clause"
] | 11 | 2017-09-19T20:00:35.000Z | 2018-02-05T07:59:06.000Z | tests/skl_datasets/BinaryClass_10/skl_dataset_BinaryClass_10_GaussianNB_6_code_gen.py | antoinecarme/sklearn_model_explanation | feeeb75576931f4a05a786d936babc0a664eef46 | [
"BSD-3-Clause"
] | 4 | 2017-12-11T12:33:32.000Z | 2020-02-09T15:08:56.000Z | from sklearn_explain.tests.skl_datasets import skl_datasets_test as skltest
skltest.test_class_dataset_and_model("BinaryClass_10" , "GaussianNB_6")
| 30 | 75 | 0.86 |
a2dd56622219d801d3c86d24d58b0915afa51ef1 | 635 | py | Python | users/urls.py | B-Paluch/rentalP2021 | 5ec0075162150aefc1331f3468b511377eb38f28 | [
"MIT"
] | null | null | null | users/urls.py | B-Paluch/rentalP2021 | 5ec0075162150aefc1331f3468b511377eb38f28 | [
"MIT"
] | null | null | null | users/urls.py | B-Paluch/rentalP2021 | 5ec0075162150aefc1331f3468b511377eb38f28 | [
"MIT"
] | null | null | null | from django.urls import path
from . import views
urlpatterns = [
path('', views.login, name='login'),
path('logout', views.logout, name='logout'),
path('login', views.login, name='login'),
path('index', views.index, name='index'),
path('lenditems', views.lenditems, name='lenditems'),
path('addi... | 37.352941 | 71 | 0.675591 |
a5d8ddb0ee7838a4a3dcfa0774bc9fa57c4c3dde | 23,293 | py | Python | notebook/slim_people_classification/deployment/model_deploy.py | rucka/NeuralNetworkPlayground | b1c9398ee3b0831de4982fdfef34892faa04440d | [
"Apache-2.0"
] | null | null | null | notebook/slim_people_classification/deployment/model_deploy.py | rucka/NeuralNetworkPlayground | b1c9398ee3b0831de4982fdfef34892faa04440d | [
"Apache-2.0"
] | null | null | null | notebook/slim_people_classification/deployment/model_deploy.py | rucka/NeuralNetworkPlayground | b1c9398ee3b0831de4982fdfef34892faa04440d | [
"Apache-2.0"
] | null | null | null | # 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 applicable ... | 35.13273 | 80 | 0.672777 |
eeb3d27a7a11411b477a6fdacf5b46793c5a4d34 | 14,283 | py | Python | ffeatools/modules/FFEA_trajectory.py | zzalscv2/FFEA | da8a09dadb1b3978a3d230dc79d9b163d7889242 | [
"Apache-2.0"
] | null | null | null | ffeatools/modules/FFEA_trajectory.py | zzalscv2/FFEA | da8a09dadb1b3978a3d230dc79d9b163d7889242 | [
"Apache-2.0"
] | null | null | null | ffeatools/modules/FFEA_trajectory.py | zzalscv2/FFEA | da8a09dadb1b3978a3d230dc79d9b163d7889242 | [
"Apache-2.0"
] | 1 | 2021-04-03T16:08:21.000Z | 2021-04-03T16:08:21.000Z | #
# This file is part of the FFEA simulation package
#
# Copyright (c) by the Theory and Development FFEA teams,
# as they appear in the README.md file.
#
# FFEA 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 ... | 26.747191 | 198 | 0.659315 |
b09826588ec2712467f42f2a16f33ee30c732cef | 13,067 | py | Python | kubernetes_asyncio/client/models/v1_node_status.py | dineshsonachalam/kubernetes_asyncio | d57e9e9be11f6789e1ce8d5b161acb64d29acf35 | [
"Apache-2.0"
] | 1 | 2021-02-25T04:36:18.000Z | 2021-02-25T04:36:18.000Z | kubernetes_asyncio/client/models/v1_node_status.py | hubo1016/kubernetes_asyncio | d57e9e9be11f6789e1ce8d5b161acb64d29acf35 | [
"Apache-2.0"
] | null | null | null | kubernetes_asyncio/client/models/v1_node_status.py | hubo1016/kubernetes_asyncio | d57e9e9be11f6789e1ce8d5b161acb64d29acf35 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
OpenAPI spec version: v1.12.4
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import si... | 32.997475 | 224 | 0.625622 |
97b96e6614964c688a78de62a6317f843343a32d | 3,416 | py | Python | PyRAI2MD/Dynamics/Propagators/tsh_helper.py | lopez-lab/PyRAI2MD | 43e27fbc9bc5b6ab6a8f170791951f316fcd0964 | [
"MIT"
] | 12 | 2021-10-20T23:41:34.000Z | 2022-03-29T23:29:21.000Z | PyRAI2MD/Dynamics/Propagators/tsh_helper.py | lijingbai2009/PyRAI2MD | f672960aff4d9e25f4dff11683e9231b120a1b68 | [
"MIT"
] | null | null | null | PyRAI2MD/Dynamics/Propagators/tsh_helper.py | lijingbai2009/PyRAI2MD | f672960aff4d9e25f4dff11683e9231b120a1b68 | [
"MIT"
] | 4 | 2021-02-06T04:27:01.000Z | 2022-03-29T23:29:28.000Z | ######################################################
#
# PyRAI2MD 2 module for trajectory surface hopping helper
#
# Author Jingbai Li
# Sep 7 2021
#
######################################################
import numpy as np
def AvoidSingularity(energy_i, energy_j, state_i, state_j):
""" Fixing singularity of st... | 29.196581 | 75 | 0.483021 |
feaf727a5a9fbe5116aa5027da6669d166d99a99 | 1,036 | py | Python | NETISCE_local/bin/kmeans.py | laurenpmarazzi/Netisce | 2f4550a326b16e579f0fc5948b674cfbc994b100 | [
"MIT"
] | null | null | null | NETISCE_local/bin/kmeans.py | laurenpmarazzi/Netisce | 2f4550a326b16e579f0fc5948b674cfbc994b100 | [
"MIT"
] | null | null | null | NETISCE_local/bin/kmeans.py | laurenpmarazzi/Netisce | 2f4550a326b16e579f0fc5948b674cfbc994b100 | [
"MIT"
] | 1 | 2021-11-30T14:24:23.000Z | 2021-11-30T14:24:23.000Z | #!/usr/bin/env python3
import pandas as pd
from scipy import stats
import matplotlib as mpl
mpl.use('Agg')
import matplotlib.pyplot as plt
from sklearn.decomposition import PCA
import numpy as np
from sklearn.datasets import make_blobs
from sklearn.metrics import pairwise_distances
from sklearn.cluster import KMeans
fr... | 28 | 99 | 0.705598 |
2f2e901d7b95708385eca28f31826f2014e0bc61 | 4,355 | py | Python | api/base.py | itdxer/pythonUSPS | 74d75dc95ed010d3ffffc36e99b96609d4c16ef2 | [
"MIT"
] | 1 | 2015-02-07T10:14:47.000Z | 2015-02-07T10:14:47.000Z | api/base.py | itdxer/pythonUSPS | 74d75dc95ed010d3ffffc36e99b96609d4c16ef2 | [
"MIT"
] | null | null | null | api/base.py | itdxer/pythonUSPS | 74d75dc95ed010d3ffffc36e99b96609d4c16ef2 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import urllib
import urllib2
from xml.etree import ElementTree
from xml.dom.minidom import *
from default.errors import USPSXMLError, XMLTagNameError
class USPSServiceSender(object):
service_types = ("ExpressMail",
"PriorityMail",
"Returns",
... | 32.022059 | 83 | 0.601378 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.