hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
86621e7877ad8e069d19eee404c355d8f81c460c | 3,479 | py | Python | zhaquirks/ikea/symfonisk.py | sanyatuning/zha-device-handlers | 4bb2055ebde069063c62f16ab8e994dd522556f8 | [
"Apache-2.0"
] | 1 | 2020-08-10T16:44:47.000Z | 2020-08-10T16:44:47.000Z | zhaquirks/ikea/symfonisk.py | sanyatuning/zha-device-handlers | 4bb2055ebde069063c62f16ab8e994dd522556f8 | [
"Apache-2.0"
] | null | null | null | zhaquirks/ikea/symfonisk.py | sanyatuning/zha-device-handlers | 4bb2055ebde069063c62f16ab8e994dd522556f8 | [
"Apache-2.0"
] | 1 | 2020-11-18T13:14:35.000Z | 2020-11-18T13:14:35.000Z | """Device handler for IKEA of Sweden TRADFRI SYMFONISK remote control."""
from zigpy.profiles import zha
from zigpy.quirks import CustomDevice
from zigpy.zcl.clusters.general import (
Basic,
Groups,
Identify,
LevelControl,
OnOff,
Ota,
PollControl,
PowerConfiguration,
)
from zigpy.zcl.clu... | 26.761538 | 75 | 0.505892 |
197561c8eb38f415868e896f2c5a32710a99ad00 | 20,498 | py | Python | netman/adapters/switches/juniper/mx.py | internap/netman | 8760f168cf056ce4428d239610514969e5f9bf56 | [
"Apache-2.0"
] | 38 | 2015-11-30T10:11:42.000Z | 2022-02-10T18:31:44.000Z | netman/adapters/switches/juniper/mx.py | internap/netman | 8760f168cf056ce4428d239610514969e5f9bf56 | [
"Apache-2.0"
] | 143 | 2015-12-10T19:00:42.000Z | 2020-08-20T13:51:42.000Z | netman/adapters/switches/juniper/mx.py | internap/netman | 8760f168cf056ce4428d239610514969e5f9bf56 | [
"Apache-2.0"
] | 15 | 2015-12-14T23:03:30.000Z | 2019-01-15T19:35:45.000Z | # Copyright 2018 Internap.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, so... | 37.201452 | 143 | 0.619621 |
5f0f20c34d9a7a9e69ffdc0461c8e3f3b8834038 | 5,810 | py | Python | Global/test.py | delldu/PhotoRefresh | 495181febc936c79ff96d4c6399891593a8b69f7 | [
"MIT"
] | null | null | null | Global/test.py | delldu/PhotoRefresh | 495181febc936c79ff96d4c6399891593a8b69f7 | [
"MIT"
] | null | null | null | Global/test.py | delldu/PhotoRefresh | 495181febc936c79ff96d4c6399891593a8b69f7 | [
"MIT"
] | null | null | null | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
import os
from collections import OrderedDict
from torch.autograd import Variable
from options.test_options import TestOptions
from models.models import create_model
from models.mapping_model import Pix2PixHDModel_Mapping
import util.util as util... | 30.103627 | 87 | 0.605852 |
3d7664a14a205cad58500147d8766ded7c25e232 | 1,538 | py | Python | samples/snippets/create_dataset_image_sample_test.py | ivanmkc/python-aiplatform | 151ed11f6da8e3e0bee5749d360d9a4b135ad988 | [
"Apache-2.0"
] | null | null | null | samples/snippets/create_dataset_image_sample_test.py | ivanmkc/python-aiplatform | 151ed11f6da8e3e0bee5749d360d9a4b135ad988 | [
"Apache-2.0"
] | null | null | null | samples/snippets/create_dataset_image_sample_test.py | ivanmkc/python-aiplatform | 151ed11f6da8e3e0bee5749d360d9a4b135ad988 | [
"Apache-2.0"
] | null | null | null | # 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 agreed to in writing, s... | 27.963636 | 84 | 0.761378 |
a22b2e26bdaf240ef7f6fea82f8423dde91dfff9 | 3,559 | py | Python | fuzzers/ECP5/133-ddrdll/fuzzer.py | Keno/prjtrellis | 3311e6d814e0001c8785d6d77a4c93e327875b6d | [
"ISC"
] | 256 | 2018-03-05T00:28:46.000Z | 2022-03-04T22:33:29.000Z | fuzzers/ECP5/133-ddrdll/fuzzer.py | Keno/prjtrellis | 3311e6d814e0001c8785d6d77a4c93e327875b6d | [
"ISC"
] | 70 | 2018-03-12T21:55:02.000Z | 2020-06-22T12:06:08.000Z | fuzzers/ECP5/133-ddrdll/fuzzer.py | Keno/prjtrellis | 3311e6d814e0001c8785d6d77a4c93e327875b6d | [
"ISC"
] | 68 | 2018-03-12T21:05:01.000Z | 2021-03-14T21:08:33.000Z | from fuzzconfig import FuzzConfig
import nonrouting
import pytrellis
import fuzzloops
import interconnect
jobs = [(FuzzConfig(job="DDRDLL_TL", family="ECP5", device="LFE5U-45F", ncl="empty.ncl",
tiles=["MIB_R10C2:DDRDLL_UL"]),
"DDRDLL_TL", "R0C0"
),
(FuzzConfig(job="DDRDLL... | 37.072917 | 113 | 0.530486 |
a84a8311d95670556d3304f97a12adcf11e70091 | 913 | py | Python | lib/core/launcher.py | hipnusleo/Laserjet | f53e0b740f48f2feb0c0bb285ec6728b313b4ccc | [
"Apache-2.0"
] | null | null | null | lib/core/launcher.py | hipnusleo/Laserjet | f53e0b740f48f2feb0c0bb285ec6728b313b4ccc | [
"Apache-2.0"
] | null | null | null | lib/core/launcher.py | hipnusleo/Laserjet | f53e0b740f48f2feb0c0bb285ec6728b313b4ccc | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
#-*- coding: utf-8 -*-
from terminals import MTerminal
from sys import argv
"""Summary of module 'launcher' here.
This is a entry of entire laserjet program
class Launcher launches 'Batch' task or 'Play' task depends on options.
- Batch options (e.g.:'-exec', '-sync', '-fetch', '-in... | 21.738095 | 79 | 0.661555 |
4302eba48ccc89448ab21ca30e74100150eae396 | 4,300 | py | Python | lib/googlecloudsdk/command_lib/compute/backend_buckets/flags.py | google-cloud-sdk-unofficial/google-cloud-sdk | 2a48a04df14be46c8745050f98768e30474a1aac | [
"Apache-2.0"
] | 2 | 2019-11-10T09:17:07.000Z | 2019-12-18T13:44:08.000Z | lib/googlecloudsdk/command_lib/compute/backend_buckets/flags.py | google-cloud-sdk-unofficial/google-cloud-sdk | 2a48a04df14be46c8745050f98768e30474a1aac | [
"Apache-2.0"
] | null | null | null | lib/googlecloudsdk/command_lib/compute/backend_buckets/flags.py | google-cloud-sdk-unofficial/google-cloud-sdk | 2a48a04df14be46c8745050f98768e30474a1aac | [
"Apache-2.0"
] | 1 | 2020-07-25T01:40:19.000Z | 2020-07-25T01:40:19.000Z | # -*- coding: utf-8 -*- #
# Copyright 2016 Google LLC. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... | 33.59375 | 86 | 0.734651 |
ad72ffea3c71258772f27dd54d5dc805d57a39f9 | 8,400 | py | Python | neurokernel/LPU/NDComponents/MembraneModels/MorrisLecar.py | MangoHaha/neurodriver | 9f5be070f1ebece8b807c96ff149cb12f49a0a49 | [
"BSD-3-Clause"
] | null | null | null | neurokernel/LPU/NDComponents/MembraneModels/MorrisLecar.py | MangoHaha/neurodriver | 9f5be070f1ebece8b807c96ff149cb12f49a0a49 | [
"BSD-3-Clause"
] | null | null | null | neurokernel/LPU/NDComponents/MembraneModels/MorrisLecar.py | MangoHaha/neurodriver | 9f5be070f1ebece8b807c96ff149cb12f49a0a49 | [
"BSD-3-Clause"
] | null | null | null |
from collections import OrderedDict
import numpy as np
import pycuda.gpuarray as garray
from pycuda.tools import dtype_to_ctype
import pycuda.driver as cuda
from pycuda.compiler import SourceModule
from BaseMembraneModel import BaseMembraneModel
class MorrisLecar(BaseMembraneModel):
params = ['V1', 'V2', 'V3',... | 34.710744 | 103 | 0.541667 |
4cfe3cca8c927d6257d1f75962b6289a43384c7d | 2,838 | py | Python | 61.rotate-list.py | SYSU-TomJx/vscode-leetcode | 53670e9d6655d9cf8e1f2148b49b9b28dd446cf1 | [
"MIT"
] | null | null | null | 61.rotate-list.py | SYSU-TomJx/vscode-leetcode | 53670e9d6655d9cf8e1f2148b49b9b28dd446cf1 | [
"MIT"
] | null | null | null | 61.rotate-list.py | SYSU-TomJx/vscode-leetcode | 53670e9d6655d9cf8e1f2148b49b9b28dd446cf1 | [
"MIT"
] | null | null | null | #
# @lc app=leetcode id=61 lang=python
#
# [61] Rotate List
#
# https://leetcode.com/problems/rotate-list/description/
#
# algorithms
# Medium (26.53%)
# Total Accepted: 180.6K
# Total Submissions: 678.2K
# Testcase Example: '[1,2,3,4,5]\n2'
#
# Given a linked list, rotate the list to the right by k places, where k... | 24.678261 | 75 | 0.540521 |
c5122257986100755ca8cda25ab51a918cca9b76 | 949 | py | Python | change_static_paths.py | IraPS/Ru-RST-corpus | eb5812384ca3be4ebffed57b5a7227c93489857e | [
"MIT"
] | null | null | null | change_static_paths.py | IraPS/Ru-RST-corpus | eb5812384ca3be4ebffed57b5a7227c93489857e | [
"MIT"
] | null | null | null | change_static_paths.py | IraPS/Ru-RST-corpus | eb5812384ca3be4ebffed57b5a7227c93489857e | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import os
import re
for html in os.listdir('./backend/templates/'):
if html.endswith('.html'):
print(html)
html_file = open('./backend/templates/' + html, 'r', encoding='utf-8')
html_text = html_file.read()
html_file.close()
html_static_links_href ... | 33.892857 | 92 | 0.546891 |
754277f7cf43558f7454a032cc2fee73d3bfa743 | 6,651 | py | Python | env/lib/python3.8/site-packages/openid/oidutil.py | avdhari/enigma | b7e965a91ca5f0e929c4c719d695f15ccb8b5a2c | [
"MIT"
] | 12 | 2019-08-02T07:58:16.000Z | 2022-01-31T23:45:08.000Z | env/lib/python3.8/site-packages/openid/oidutil.py | avdhari/enigma | b7e965a91ca5f0e929c4c719d695f15ccb8b5a2c | [
"MIT"
] | 23 | 2019-01-19T08:54:48.000Z | 2022-03-11T23:39:37.000Z | env/lib/python3.8/site-packages/openid/oidutil.py | avdhari/enigma | b7e965a91ca5f0e929c4c719d695f15ccb8b5a2c | [
"MIT"
] | 11 | 2019-07-31T16:23:36.000Z | 2022-01-29T08:30:07.000Z | """This module contains general utility code that is used throughout
the library.
For users of this library, the C{L{log}} function is probably the most
interesting.
"""
__all__ = [
'log', 'appendArgs', 'toBase64', 'fromBase64', 'autoSubmitHTML',
'toUnicode'
]
import binascii
import logging
# import urllib.... | 28.063291 | 76 | 0.630732 |
5a4fc71de7b946e780585ebc41078e267978ab94 | 4,029 | py | Python | tensorflow/python/keras/layers/preprocessing/benchmarks/category_crossing_benchmark.py | TL-Rubick/tensorflow | 6cf1ccf6060a95aad3ccc84544d0aa166990ec72 | [
"Apache-2.0"
] | 11 | 2018-01-03T15:11:09.000Z | 2021-04-13T05:47:27.000Z | tensorflow/python/keras/layers/preprocessing/benchmarks/category_crossing_benchmark.py | TL-Rubick/tensorflow | 6cf1ccf6060a95aad3ccc84544d0aa166990ec72 | [
"Apache-2.0"
] | 88 | 2020-11-24T08:18:10.000Z | 2022-03-25T20:28:30.000Z | tensorflow/python/keras/layers/preprocessing/benchmarks/category_crossing_benchmark.py | TL-Rubick/tensorflow | 6cf1ccf6060a95aad3ccc84544d0aa166990ec72 | [
"Apache-2.0"
] | 10 | 2018-07-31T10:56:21.000Z | 2019-10-07T08:05:21.000Z | # Copyright 2020 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... | 35.342105 | 80 | 0.690742 |
eb6283a6c64dee8a700d9fe4b25f0e52e6b7bf39 | 987 | py | Python | camera_yolo.py | julianweng/object-detection | 756196a09fa40df8a236310548a4bdcba76a29a7 | [
"MIT"
] | null | null | null | camera_yolo.py | julianweng/object-detection | 756196a09fa40df8a236310548a4bdcba76a29a7 | [
"MIT"
] | null | null | null | camera_yolo.py | julianweng/object-detection | 756196a09fa40df8a236310548a4bdcba76a29a7 | [
"MIT"
] | null | null | null | import numpy as np
import cv2
import yolo
# Load weights using OpenCV
# Create a list of colors for the labels
labels = open('model/coco.names').read().strip().split('\n')
colors = np.random.randint(0, 255, size=(len(labels), 3), dtype='uint8')
net = cv2.dnn.readNetFromDarknet('model/yolov3.cfg', 'model/yolov3.weights... | 34.034483 | 104 | 0.693009 |
86c00cd9f5c0fe31d73d5ac0264ba33427eaac94 | 6,530 | py | Python | models/pix2pix_model.py | erezposner/pytorch-CycleGAN-and-pix2pix | 842873a541dbc945f050515a3f39bc9029cf7701 | [
"BSD-3-Clause"
] | 1 | 2020-08-06T15:08:47.000Z | 2020-08-06T15:08:47.000Z | models/pix2pix_model.py | erezposner/pytorch-CycleGAN-and-pix2pix | 842873a541dbc945f050515a3f39bc9029cf7701 | [
"BSD-3-Clause"
] | null | null | null | models/pix2pix_model.py | erezposner/pytorch-CycleGAN-and-pix2pix | 842873a541dbc945f050515a3f39bc9029cf7701 | [
"BSD-3-Clause"
] | null | null | null | import torch
from .base_model import BaseModel
from . import networks
class Pix2PixModel(BaseModel):
""" This class implements the pix2pix model, for learning a mapping from input images to output images given paired data.
The model training requires '--dataset_mode aligned' dataset.
By default, it uses ... | 49.097744 | 162 | 0.651455 |
08098d9e6328376979a2e22ca76ced8cf19dbfb2 | 341 | py | Python | NO2_SW_VR/list3.py | ESPuPy/ESP32-MicroPython-Samples | dd7143dadf10807cdab46b93d8837953df3a5f17 | [
"MIT"
] | null | null | null | NO2_SW_VR/list3.py | ESPuPy/ESP32-MicroPython-Samples | dd7143dadf10807cdab46b93d8837953df3a5f17 | [
"MIT"
] | null | null | null | NO2_SW_VR/list3.py | ESPuPy/ESP32-MicroPython-Samples | dd7143dadf10807cdab46b93d8837953df3a5f17 | [
"MIT"
] | null | null | null | #
# list3
# sample program for ADC
#
from machine import Pin
from machine import ADC
import utime
# Available Pins: 32-39
adc = ADC(Pin(36))
adc.read()
adc.atten(ADC.ATTN_11DB) # maximum input voltage of approximately 3.6v
adc.width(ADC.WIDTH_10BIT) # 0-1023
print(adc.read())
while True:
print(adc.read())
... | 17.947368 | 72 | 0.71261 |
cb3d23ddcb9ae7e171b1b83fc29435d63da77296 | 24,952 | py | Python | hooks/webkitpy/layout_tests/layout_package/json_results_generator.py | nizovn/luna-sysmgr | 48b7e2546e81d6ad1604353f2e5ab797a7d1667c | [
"Apache-2.0"
] | 3 | 2018-11-16T14:51:17.000Z | 2019-11-21T10:55:24.000Z | hooks/webkitpy/layout_tests/layout_package/json_results_generator.py | nizovn/luna-sysmgr | 48b7e2546e81d6ad1604353f2e5ab797a7d1667c | [
"Apache-2.0"
] | 1 | 2021-02-20T13:12:15.000Z | 2021-02-20T13:12:15.000Z | hooks/webkitpy/layout_tests/layout_package/json_results_generator.py | ericblade/luna-sysmgr | 82d5d7ced4ba21d3802eb2c8ae063236b6562331 | [
"Apache-2.0"
] | null | null | null | # Copyright (C) 2010 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the ... | 38.036585 | 110 | 0.65089 |
17c780a02b6d347a8e8738aeca27a98f503a417f | 2,207 | py | Python | ietf/secr/utils/ams_utils.py | hassanakbar4/ietfdb | cabee059092ae776015410640226064331c293b7 | [
"BSD-3-Clause"
] | 25 | 2022-03-05T08:26:52.000Z | 2022-03-30T15:45:42.000Z | ietf/secr/utils/ams_utils.py | hassanakbar4/ietfdb | cabee059092ae776015410640226064331c293b7 | [
"BSD-3-Clause"
] | 219 | 2022-03-04T17:29:12.000Z | 2022-03-31T21:16:14.000Z | ietf/secr/utils/ams_utils.py | hassanakbar4/ietfdb | cabee059092ae776015410640226064331c293b7 | [
"BSD-3-Clause"
] | 22 | 2022-03-04T15:34:34.000Z | 2022-03-28T13:30:59.000Z | # Copyright The IETF Trust 2013-2020, All Rights Reserved
# -*- coding: utf-8 -*-
from django.conf import settings
from ietf.person.models import Person
import glob
import os
import re
def get_base(name):
"""
Takes a draft filename and returns the basename, with file extension
and revision number strip... | 29.824324 | 95 | 0.655188 |
3768282abc5a68548b60776c93592ba6b49e47a0 | 2,084 | py | Python | py4web/utils/auth_plugins/oauth2server.py | AvdN/py4web | 1230b7508989cc093e5f33a61d4c8d9c903e7650 | [
"BSD-3-Clause"
] | null | null | null | py4web/utils/auth_plugins/oauth2server.py | AvdN/py4web | 1230b7508989cc093e5f33a61d4c8d9c903e7650 | [
"BSD-3-Clause"
] | null | null | null | py4web/utils/auth_plugins/oauth2server.py | AvdN/py4web | 1230b7508989cc093e5f33a61d4c8d9c903e7650 | [
"BSD-3-Clause"
] | null | null | null | import hashlib
import uuid
import jwt
from py4web.core import DAL, HTTP, Field, request
class OAuthServer(object):
algorithms = ["HS256", "RS256"]
def __init__(self, auth, secret):
self.secret = secret
self.auth = auth
self.define_tables()
def define_tables(self):
db =... | 34.163934 | 84 | 0.577735 |
a95865085af7e84b3901471327f9137aea9c448a | 200 | py | Python | ComputerConfigurator/users/forms.py | AndreasBuc/Computer-Configurator | e771176dd118d5820fe69d3b534f59ced264295e | [
"MIT"
] | null | null | null | ComputerConfigurator/users/forms.py | AndreasBuc/Computer-Configurator | e771176dd118d5820fe69d3b534f59ced264295e | [
"MIT"
] | 9 | 2021-10-30T19:15:15.000Z | 2021-12-03T00:33:45.000Z | backend/users/forms.py | AISVisioner/cameraDetector | 33938c287806aadf9c83f7bb93bd2438d89ba02b | [
"MIT"
] | null | null | null | from django_registration.forms import RegistrationForm
from users.models import CustomUser
class CustomUserForm(RegistrationForm):
class Meta(RegistrationForm.Meta):
model = CustomUser
| 22.222222 | 54 | 0.8 |
ab5dafa941f89566dc71f830e0d384be44d9230e | 507 | py | Python | streamlit_parameters/demos/__init__.py | sachit-tri/streamlit_parameters | ead9885de39a7f8944f70d92956764b9f16fb478 | [
"BSD-3-Clause"
] | null | null | null | streamlit_parameters/demos/__init__.py | sachit-tri/streamlit_parameters | ead9885de39a7f8944f70d92956764b9f16fb478 | [
"BSD-3-Clause"
] | 1 | 2021-11-30T19:23:01.000Z | 2021-11-30T20:42:55.000Z | streamlit_parameters/demos/__init__.py | sachit-tri/streamlit_parameters | ead9885de39a7f8944f70d92956764b9f16fb478 | [
"BSD-3-Clause"
] | 1 | 2021-11-30T00:55:27.000Z | 2021-11-30T00:55:27.000Z | #
# License: BSD
# https://raw.githubusercontent.com/stonier/streamlit_parameters/devel/LICENSE
#
##############################################################################
# Documentation
##############################################################################
"""Exemplar applications."""
###############... | 31.6875 | 80 | 0.278107 |
f1163ef1459136c4a3f7b9c54cdcbe0bb4e0d282 | 1,775 | py | Python | sp/taco_own_swin.py | crepuscularlight/SemesterProject | acfb219ca315d912b76bb581b932aaf48090fa94 | [
"MIT"
] | null | null | null | sp/taco_own_swin.py | crepuscularlight/SemesterProject | acfb219ca315d912b76bb581b932aaf48090fa94 | [
"MIT"
] | null | null | null | sp/taco_own_swin.py | crepuscularlight/SemesterProject | acfb219ca315d912b76bb581b932aaf48090fa94 | [
"MIT"
] | null | null | null | _base_='../swin/mask_rcnn_swin-t-p4-w7_fpn_1x_coco.py'
dataset_type='CocoDataset'
# prefix='../coco-annotator/datasets/test/'
prefix='./data/taco/'
classes=('Aluminium foil', 'Can', 'Carton', 'Cup', 'Glass bottle', 'Metal bottle cap', 'Other', 'Paper', 'Plastic bottle', 'Plastic bottle cap', 'Plastic container', 'Plast... | 33.490566 | 246 | 0.566761 |
a86e5e44e21b37789d525ce0bb3597b82b089baa | 4,415 | py | Python | GenerativeNetworks/SimpleCPPN.py | shekkizh/TensorflowProjects | 5bd5563a5310df0b87725d989e84d49da0ea8c00 | [
"MIT"
] | 204 | 2016-04-05T03:29:43.000Z | 2022-03-07T11:44:54.000Z | GenerativeNetworks/SimpleCPPN.py | aseftajwargithub/TensorflowProjects | 5bd5563a5310df0b87725d989e84d49da0ea8c00 | [
"MIT"
] | 4 | 2016-08-24T03:52:14.000Z | 2018-03-22T09:44:20.000Z | GenerativeNetworks/SimpleCPPN.py | aseftajwargithub/TensorflowProjects | 5bd5563a5310df0b87725d989e84d49da0ea8c00 | [
"MIT"
] | 74 | 2016-06-30T14:18:47.000Z | 2021-05-08T20:14:57.000Z | __author__ = 'Charlie'
# Implementation draws details from https://github.com/hardmaru/cppn-tensorflow
import numpy as np
import tensorflow as tf
import os, sys, inspect
# import scipy.misc as misc
import matplotlib.pyplot as plt
utils_folder = os.path.abspath(
os.path.realpath(os.path.join(os.path.split(inspect.g... | 36.188525 | 117 | 0.658437 |
f00bbc5871eb15638566e74d33b907074e833961 | 17,202 | py | Python | jina/peapods/peas/__init__.py | Akshat-unt/jina | b0b058f99f3ee4dcbcbbf2acbf04c5d7e7e9c717 | [
"Apache-2.0"
] | 1 | 2021-12-18T06:54:49.000Z | 2021-12-18T06:54:49.000Z | jina/peapods/peas/__init__.py | Akshat-unt/jina | b0b058f99f3ee4dcbcbbf2acbf04c5d7e7e9c717 | [
"Apache-2.0"
] | 2 | 2021-12-17T15:22:12.000Z | 2021-12-18T07:19:06.000Z | jina/peapods/peas/__init__.py | Akshat-unt/jina | b0b058f99f3ee4dcbcbbf2acbf04c5d7e7e9c717 | [
"Apache-2.0"
] | null | null | null | import argparse
import multiprocessing
import os
import threading
import time
from typing import Any, Tuple, Union, Dict, Optional
from ...jaml import JAML
from .helper import _get_event, ConditionalEvent
from ... import __stop_msg__, __ready_msg__
from ...enums import PeaRoleType, RuntimeBackendType, SocketType
from ... | 38.569507 | 280 | 0.608243 |
11977745184d58c6cbff71f320d3a88d63f00348 | 6,836 | py | Python | python/ray/rllib/evaluation/episode.py | cumttang/ray | eb1e5fa2cf26233701ccbda3eb8a301ecd418d8c | [
"Apache-2.0"
] | 2 | 2019-10-08T13:31:08.000Z | 2019-10-22T18:34:52.000Z | python/ray/rllib/evaluation/episode.py | cumttang/ray | eb1e5fa2cf26233701ccbda3eb8a301ecd418d8c | [
"Apache-2.0"
] | 1 | 2018-12-26T01:09:50.000Z | 2018-12-26T01:09:50.000Z | python/ray/rllib/evaluation/episode.py | cumttang/ray | eb1e5fa2cf26233701ccbda3eb8a301ecd418d8c | [
"Apache-2.0"
] | 6 | 2019-03-12T05:37:35.000Z | 2020-03-09T12:25:17.000Z | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from collections import defaultdict
import random
import numpy as np
from ray.rllib.env.async_vector_env import _DUMMY_AGENT_ID
class MultiAgentEpisode(object):
"""Tracks the current state of a (possibl... | 39.514451 | 79 | 0.677004 |
ea4daaccc41091df6bb2d9eccef63688e9d8bd26 | 48,324 | py | Python | holoviews/tests/test_streams.py | TheoMathurin/holoviews | 0defcef994d6dd6d2054f75a0e332d02d121f8b0 | [
"BSD-3-Clause"
] | 1 | 2017-03-01T07:08:23.000Z | 2017-03-01T07:08:23.000Z | holoviews/tests/test_streams.py | chrinide/holoviews | e1234a60ae0809ac561c204b1998dff0452b2bf0 | [
"BSD-3-Clause"
] | null | null | null | holoviews/tests/test_streams.py | chrinide/holoviews | e1234a60ae0809ac561c204b1998dff0452b2bf0 | [
"BSD-3-Clause"
] | null | null | null | """
Unit test of the streams system
"""
from collections import defaultdict
from unittest import SkipTest
import param
from panel.widgets import IntSlider
from holoviews.core.spaces import DynamicMap
from holoviews.core.util import LooseVersion, pd
from holoviews.element import Points, Scatter, Curve, Histogram, Poly... | 34.715517 | 95 | 0.595708 |
7f52a121e7727571e8f1a7b794f700f661100863 | 1,081 | py | Python | webapp/seed_user.py | naingthet/AniMate | 95ca152af40ae349400629f501dfac88a56637fb | [
"MIT"
] | 1 | 2021-01-15T07:48:50.000Z | 2021-01-15T07:48:50.000Z | webapp/seed_user.py | naingthet/AniMate | 95ca152af40ae349400629f501dfac88a56637fb | [
"MIT"
] | null | null | null | webapp/seed_user.py | naingthet/AniMate | 95ca152af40ae349400629f501dfac88a56637fb | [
"MIT"
] | null | null | null | import json
from app import db
import pandas as pd
from app.models import Ratings
'''
Seed my anime ratings into the database for testing
'''
# Exporting
def export_user_ratings():
ratings = Ratings.query.filter_by(user_id=1).all()
user_ratings = [[i.user_id, i.anime_id, i.anime_name, i.user_rating] for i in... | 32.757576 | 107 | 0.66975 |
311e14938ab51facccb4844d97be86a773c584c2 | 3,546 | py | Python | concept/graph/gnuplot/script.py | Nachtfeuer/concept-py | 64e1f82de144f959cdf3c6dcf0f692bbc0ceb20f | [
"MIT"
] | 2 | 2019-03-02T18:50:24.000Z | 2019-12-19T14:15:42.000Z | concept/graph/gnuplot/script.py | Nachtfeuer/concept-py | 64e1f82de144f959cdf3c6dcf0f692bbc0ceb20f | [
"MIT"
] | 10 | 2015-07-27T03:24:57.000Z | 2017-03-31T18:11:26.000Z | concept/graph/gnuplot/script.py | Nachtfeuer/concept-py | 64e1f82de144f959cdf3c6dcf0f692bbc0ceb20f | [
"MIT"
] | null | null | null | """
Gnuplot script class.
.. module:: plot
:platform: Unix, Windows
:synopis: Gnuplot script class.
.. moduleauthor:: Thomas Lehmann <thomas.lehmann.private@googlemail.com>
=======
License
=======
Copyright (c) 2015 Thomas Lehmann
Permission is hereby granted, free of charge, to any person... | 36.556701 | 94 | 0.657642 |
51e75442ce714cf3ba13751ad376b5d5307ead4c | 36,237 | py | Python | tools/wptrunner/wptrunner/testrunner.py | asakusuma/wpt | 9b38d0ac614a4132804b076c461738871689fae7 | [
"BSD-3-Clause"
] | 1 | 2020-03-04T12:03:03.000Z | 2020-03-04T12:03:03.000Z | tools/wptrunner/wptrunner/testrunner.py | sh3beyat/wpt | cb9c3cad6fbeb2ea8e6cb2424536c95e9be3b557 | [
"BSD-3-Clause"
] | null | null | null | tools/wptrunner/wptrunner/testrunner.py | sh3beyat/wpt | cb9c3cad6fbeb2ea8e6cb2424536c95e9be3b557 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import unicode_literals
import multiprocessing
import threading
import traceback
from six.moves.queue import Empty
from collections import namedtuple
from multiprocessing import Process, current_process, Queue
from mozlog import structuredlog, capture
# Special value used as a sentinal in various com... | 39.690033 | 116 | 0.59166 |
b912c81af63e8cb3b1f1085faa84dbce844f9cff | 389 | py | Python | backend/dustar/asgi.py | toto9602/Dustar | 1195fa84dda4b4ec64e3130679d80da8e5d52393 | [
"MIT"
] | null | null | null | backend/dustar/asgi.py | toto9602/Dustar | 1195fa84dda4b4ec64e3130679d80da8e5d52393 | [
"MIT"
] | null | null | null | backend/dustar/asgi.py | toto9602/Dustar | 1195fa84dda4b4ec64e3130679d80da8e5d52393 | [
"MIT"
] | 1 | 2021-11-27T06:40:09.000Z | 2021-11-27T06:40:09.000Z | """
ASGI config for dustar project.
It exposes the ASGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.2/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault('DJANGO_SETTIN... | 22.882353 | 78 | 0.784062 |
bf6ddbe80bb5622197ca67cddca7d7c4e487f085 | 36,045 | py | Python | seaborn/tests/test_core.py | tomasojea/seaborn | 9b03f8138949402a351fa06e2598144812aae586 | [
"BSD-3-Clause"
] | 1 | 2021-03-21T15:35:30.000Z | 2021-03-21T15:35:30.000Z | seaborn/tests/test_core.py | tomasojea/seaborn | 9b03f8138949402a351fa06e2598144812aae586 | [
"BSD-3-Clause"
] | null | null | null | seaborn/tests/test_core.py | tomasojea/seaborn | 9b03f8138949402a351fa06e2598144812aae586 | [
"BSD-3-Clause"
] | null | null | null | import numpy as np
import pandas as pd
import matplotlib as mpl
import matplotlib.pyplot as plt
import pytest
from numpy.testing import assert_array_equal
from pandas.testing import assert_frame_equal
from .._core import (
SemanticMapping,
HueMapping,
SizeMapping,
StyleMapping,
VectorPlotter,
... | 33.068807 | 80 | 0.571286 |
f0b1133c0120ac51c39c85a85a089d9d5ea23e7b | 36,762 | py | Python | hoogberta/trainer/tasks/multitask_tagging.py | lstnlp/HoogBERTa | 08940815a7e1ffbb39abf7555b4fc18877cceca4 | [
"MIT"
] | 7 | 2021-12-17T10:29:09.000Z | 2022-02-17T09:30:57.000Z | hoogberta/trainer/tasks/multitask_tagging.py | lstnlp/HoogBERTa | 08940815a7e1ffbb39abf7555b4fc18877cceca4 | [
"MIT"
] | 1 | 2022-01-30T15:01:22.000Z | 2022-01-30T15:01:22.000Z | hoogberta/trainer/tasks/multitask_tagging.py | lstnlp/HoogBERTa | 08940815a7e1ffbb39abf7555b4fc18877cceca4 | [
"MIT"
] | 6 | 2022-01-30T14:31:15.000Z | 2022-03-03T05:39:38.000Z | from hoogberta.trainer.tasks import Task
from hoogberta.trainer.tasks import register_task
from hoogberta.trainer.models import build_model
from hoogberta.trainer.utils import build_dataloader, build_data_iterator, load_dictionaries
from pathlib import Path
import os, json
import time
import torch
import torc... | 40.221007 | 235 | 0.53131 |
85571d6ab216096fc3fe51c9fa278e0809d1b271 | 157 | py | Python | dInfoImporter/__init__.py | layolu/dInfoImporter | 04a6ad8faf9c61dd3197dceae9bb41c716f1ce7f | [
"Apache-2.0"
] | null | null | null | dInfoImporter/__init__.py | layolu/dInfoImporter | 04a6ad8faf9c61dd3197dceae9bb41c716f1ce7f | [
"Apache-2.0"
] | null | null | null | dInfoImporter/__init__.py | layolu/dInfoImporter | 04a6ad8faf9c61dd3197dceae9bb41c716f1ce7f | [
"Apache-2.0"
] | null | null | null | from flask import Flask
app = Flask(__name__)
@app.route('/')
def root():
return 'Hello world!'
if __name__ == '__main__':
app.run(debug=True)
| 11.214286 | 26 | 0.636943 |
2743579e6a73012bd8fc9c42d37c1478d89254da | 3,096 | py | Python | filer/utils/compatibility.py | anaelorlinski/django-filer | cd4c1e0e0e6243fd05903bf86db49743153d3b36 | [
"BSD-3-Clause"
] | null | null | null | filer/utils/compatibility.py | anaelorlinski/django-filer | cd4c1e0e0e6243fd05903bf86db49743153d3b36 | [
"BSD-3-Clause"
] | null | null | null | filer/utils/compatibility.py | anaelorlinski/django-filer | cd4c1e0e0e6243fd05903bf86db49743153d3b36 | [
"BSD-3-Clause"
] | 1 | 2018-09-05T21:44:52.000Z | 2018-09-05T21:44:52.000Z | # -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
import sys
import django
from django.utils import six
try:
from django.utils.text import truncate_words
except ImportError:
# django >=1.5
from django.utils.text import Truncator
from django.utils.functional import allow... | 31.917526 | 98 | 0.693475 |
14c38f0e6a1efd0866e9217e74d5b7f7a5c2be24 | 544 | py | Python | src/riotwatcher/Handlers/RateLimit/__init__.py | acgandhi/Riot-Watcher | f8a7ea144a00fc62f9ffaee5bad3158f41251589 | [
"MIT"
] | null | null | null | src/riotwatcher/Handlers/RateLimit/__init__.py | acgandhi/Riot-Watcher | f8a7ea144a00fc62f9ffaee5bad3158f41251589 | [
"MIT"
] | null | null | null | src/riotwatcher/Handlers/RateLimit/__init__.py | acgandhi/Riot-Watcher | f8a7ea144a00fc62f9ffaee5bad3158f41251589 | [
"MIT"
] | null | null | null | from .InternalLimiter import InternalLimiter
from .HeaderBasedLimiter import HeaderBasedLimiter
from .ApplicationRateLimiter import ApplicationRateLimiter
from .Limits import Limit, LimitCollection, RawLimit
from .MethodRateLimiter import MethodRateLimiter
from .OopsRateLimiter import OopsRateLimiter
from .BasicRateLim... | 28.631579 | 58 | 0.795956 |
a22876cb96fac5f26817deff927930ccbefae4eb | 4,824 | py | Python | scripts/check_mutual_funds/main.py | gerryw1389/python | 74fedaf2034769f2865659f14d332026b9aaede3 | [
"MIT"
] | 2 | 2020-12-01T17:29:09.000Z | 2020-12-13T02:54:43.000Z | scripts/check_mutual_funds/main.py | gerryw1389/python | 74fedaf2034769f2865659f14d332026b9aaede3 | [
"MIT"
] | 4 | 2020-12-26T15:08:02.000Z | 2021-05-16T13:19:33.000Z | scripts/check_mutual_funds/main.py | gerryw1389/python | 74fedaf2034769f2865659f14d332026b9aaede3 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
################################################################
# Example of using AlphaVantage API
# Sign up to get an API key and import it
# This script currently just gets the 5 latest values for bitcoin but can do others as well
# will eventually replace my powershell script at https://aut... | 37.6875 | 117 | 0.614842 |
19bebe45f76e7434c4ce8d2d2090203db764d561 | 6,484 | py | Python | code/synthesizer/model.py | TONGJINGLV/dagan | 4b6701f0a31026d9a45ab988a645f0a2249cc45c | [
"MIT"
] | 5 | 2021-03-06T05:43:06.000Z | 2022-03-28T13:54:10.000Z | code/synthesizer/model.py | TONGJINGLV/dagan | 4b6701f0a31026d9a45ab988a645f0a2249cc45c | [
"MIT"
] | 1 | 2021-03-06T08:38:37.000Z | 2021-03-06T08:38:37.000Z | code/synthesizer/model.py | TONGJINGLV/dagan | 4b6701f0a31026d9a45ab988a645f0a2249cc45c | [
"MIT"
] | 5 | 2021-03-06T03:52:46.000Z | 2022-03-02T11:45:42.000Z | import torch
import torch.nn.functional as F
import torch.nn as nn
import torch.autograd as autograd
import torch.optim as optim
import numpy as np
import pandas as pd
import os
from torch.autograd import Variable
def mask_operate(data, mask, col_ind):
result = []
for i in range(mask.shape[1]):
sta = col_ind[i][0]... | 27.243697 | 112 | 0.624923 |
c11ceeb310731708170b866ff1033c5adb0442b1 | 2,767 | py | Python | bigflow_python/python/bigflow/user_defined_functions.py | advancedxy/bigflow_python | 8a244b483404fde7afc42eee98bc964da8ae03e2 | [
"Apache-2.0"
] | 1,236 | 2017-11-14T11:10:10.000Z | 2022-03-08T11:54:41.000Z | bigflow_python/python/bigflow/user_defined_functions.py | advancedxy/bigflow_python | 8a244b483404fde7afc42eee98bc964da8ae03e2 | [
"Apache-2.0"
] | 38 | 2017-11-14T16:29:12.000Z | 2020-01-23T08:32:04.000Z | bigflow_python/python/bigflow/user_defined_functions.py | advancedxy/bigflow_python | 8a244b483404fde7afc42eee98bc964da8ae03e2 | [
"Apache-2.0"
] | 184 | 2017-11-27T07:23:36.000Z | 2022-03-14T02:54:16.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
########################################################################
#
# Copyright (c) 2016 Baidu, Inc. All Rights Reserved.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may o... | 30.076087 | 74 | 0.580773 |
cc879115bc793f9a2bc5f88bbc00c67830248b18 | 2,944 | py | Python | vrp/vrptw.py | israelpereira55/VRPTW-Solomon | 3ae8338842d3783c3466565ba7454f0d6b9c3108 | [
"MIT"
] | 1 | 2021-08-17T01:49:23.000Z | 2021-08-17T01:49:23.000Z | vrp/vrptw.py | israelpereira55/VRPTW | 3ae8338842d3783c3466565ba7454f0d6b9c3108 | [
"MIT"
] | null | null | null | vrp/vrptw.py | israelpereira55/VRPTW | 3ae8338842d3783c3466565ba7454f0d6b9c3108 | [
"MIT"
] | null | null | null | import numpy as np
import math
import geometry
class VRPTW:
#coordinates [x,y]
#distances dij distance matrix
#time_windows [ei, li] earliest time of service, latest time of service
#services [si] service time
#demands [?]
vehicle_capacity : int
number_of_... | 36.8 | 203 | 0.578804 |
040befd236ec51766760875e0c18bbb76dbe0963 | 5,552 | py | Python | gidgetlab/aiohttp.py | jcmcken/gidgetlab | 3a58e46ff0974bb0712e32220f61227119452850 | [
"Apache-2.0"
] | null | null | null | gidgetlab/aiohttp.py | jcmcken/gidgetlab | 3a58e46ff0974bb0712e32220f61227119452850 | [
"Apache-2.0"
] | null | null | null | gidgetlab/aiohttp.py | jcmcken/gidgetlab | 3a58e46ff0974bb0712e32220f61227119452850 | [
"Apache-2.0"
] | null | null | null | import os
import sys
import asyncio
import traceback
from typing import Any, Mapping, Tuple, Optional
import cachetools
import aiohttp
from aiohttp import web
from . import abc as gl_abc, routing, sansio
class GitLabAPI(gl_abc.GitLabAPI):
"""An implementation of :class:`gidgetlab.abc.GitLabAPI` using
`aioht... | 35.589744 | 120 | 0.613473 |
33c6bc2d3a506bd9747a7f83c64b664f5bbbd371 | 5,852 | py | Python | src/plot_csv/plot.py | flucto-gmbh/SAAFOWE | 66cbe7c7eb46d837bd89a4bb5551b0540e9d3978 | [
"MIT"
] | null | null | null | src/plot_csv/plot.py | flucto-gmbh/SAAFOWE | 66cbe7c7eb46d837bd89a4bb5551b0540e9d3978 | [
"MIT"
] | null | null | null | src/plot_csv/plot.py | flucto-gmbh/SAAFOWE | 66cbe7c7eb46d837bd89a4bb5551b0540e9d3978 | [
"MIT"
] | null | null | null | import folium
import matplotlib.pyplot as plt
from mpl_toolkits.basemap import Basemap
import numpy as np
import pandas as pd
import tilemapbase
import webbrowser
from plot_config import FIGURE_CONFIGURATION, imu_accelerations, imu_rotations, imu_magfield, gps_position, gps_altitude
def plot_timeseries(data: pd.DataF... | 31.462366 | 160 | 0.652427 |
b9582bc64f26896dbb1fbd1d2c708834f20f237a | 1,238 | py | Python | ivy/functional/backends/mxnet/gradients.py | mattbarrett98/ivy | a706e59b907c0f78edb819959cc2035ebf48946f | [
"Apache-2.0"
] | null | null | null | ivy/functional/backends/mxnet/gradients.py | mattbarrett98/ivy | a706e59b907c0f78edb819959cc2035ebf48946f | [
"Apache-2.0"
] | null | null | null | ivy/functional/backends/mxnet/gradients.py | mattbarrett98/ivy | a706e59b907c0f78edb819959cc2035ebf48946f | [
"Apache-2.0"
] | null | null | null | """
Collection of MXNet gradient functions, wrapped to fit Ivy syntax and signature.
"""
# global
import ivy
import mxnet as mx
def variable(x):
x.attach_grad()
return x
def is_variable(x, exclusive=False):
return isinstance(x, mx.ndarray.ndarray.NDArray) and x.grad is not None
variable_data = lambda... | 22.509091 | 80 | 0.644588 |
9cab24286640c19a2ff1204e7ab0896a7e924023 | 1,913 | py | Python | test/test_extends.py | colinta/plywood | 49cf98f198da302ec66e11338320c6b72b642ffa | [
"BSD-2-Clause-FreeBSD"
] | 1 | 2015-06-11T06:17:42.000Z | 2015-06-11T06:17:42.000Z | test/test_extends.py | colinta/plywood | 49cf98f198da302ec66e11338320c6b72b642ffa | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | test/test_extends.py | colinta/plywood | 49cf98f198da302ec66e11338320c6b72b642ffa | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | from . import assert_output
def test_get_block():
input = '''
block 'test':
'this is my test'
get_block 'test'
'''
desired = 'this is my test\n'
assert_output(input, desired)
def test_get_block_override_second():
input = '''
block 'test':
'this is my test'
block 'test':
'this is overridd... | 18.940594 | 78 | 0.595923 |
0aef62ae8d528ccbc3d97c034c678d9a268fafe4 | 11,692 | py | Python | src/deutschland/mudab/model/filter.py | andreasbossard/deutschland | 6f561256c707e21f81b54b139b9acb745b901298 | [
"Apache-2.0"
] | 445 | 2021-07-26T22:00:26.000Z | 2022-03-31T08:31:08.000Z | src/deutschland/mudab/model/filter.py | andreasbossard/deutschland | 6f561256c707e21f81b54b139b9acb745b901298 | [
"Apache-2.0"
] | 30 | 2021-07-27T15:42:23.000Z | 2022-03-26T16:14:11.000Z | src/deutschland/mudab/model/filter.py | andreasbossard/deutschland | 6f561256c707e21f81b54b139b9acb745b901298 | [
"Apache-2.0"
] | 28 | 2021-07-27T10:48:43.000Z | 2022-03-26T14:31:30.000Z | """
Umweltbundesamt: Meeresumweltdatenbank (MUDAB)
Meeres-Monitoringdaten von Küstenbundesländern und Forschungseinrichtungen # noqa: E501
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
"""
import re # noqa: F401
import sys # noqa: F401
from deutschland.... | 41.169014 | 106 | 0.563035 |
71da44f94f86f136ec75cda8887309555a8ec153 | 6,125 | py | Python | pyFiDEL/ranks.py | sungcheolkim78/pyFiDEL | 670067b12a2efd276e23382251ec612af678731f | [
"Apache-2.0"
] | null | null | null | pyFiDEL/ranks.py | sungcheolkim78/pyFiDEL | 670067b12a2efd276e23382251ec612af678731f | [
"Apache-2.0"
] | null | null | null | pyFiDEL/ranks.py | sungcheolkim78/pyFiDEL | 670067b12a2efd276e23382251ec612af678731f | [
"Apache-2.0"
] | null | null | null | '''
ranks.py - rank based metric calculation for structured learning
Soli Deo Gloria
'''
__author__ = 'Sung-Cheol Kim'
__version__ = '1.0.0'
import numpy as np
import pandas as pd
import scipy
def auc_rank(scores: list, y: list) -> float:
''' calculate AUC using rank formula '''
if len(scores) != len(y):
... | 30.625 | 175 | 0.524245 |
b9a3e442c4ce45ab59c3e61bcdcff2f3e42638cb | 5,491 | py | Python | tb_rest_client/models/models_pe/rule_chain_import_result.py | samson0v/python_tb_rest_client | 08ff7898740f7cec2170e85d5c3c89e222e967f7 | [
"Apache-2.0"
] | 30 | 2020-06-19T06:42:50.000Z | 2021-08-23T21:16:36.000Z | tb_rest_client/models/models_pe/rule_chain_import_result.py | samson0v/python_tb_rest_client | 08ff7898740f7cec2170e85d5c3c89e222e967f7 | [
"Apache-2.0"
] | 25 | 2021-08-30T01:17:27.000Z | 2022-03-16T14:10:14.000Z | tb_rest_client/models/models_pe/rule_chain_import_result.py | samson0v/python_tb_rest_client | 08ff7898740f7cec2170e85d5c3c89e222e967f7 | [
"Apache-2.0"
] | 23 | 2020-07-06T13:41:54.000Z | 2021-08-23T21:04:50.000Z | # coding: utf-8
"""
ThingsBoard REST API
ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501
OpenAPI spec version: 3.3.3PAAS-RC1
Contact: info@thingsboard.io
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F40... | 29.05291 | 105 | 0.597159 |
8140204e34eef992d52257a3296d8e321b0c433c | 2,646 | py | Python | release/stubs.min/System/Runtime/InteropServices/__init___parts/_CustomAttributeBuilder.py | htlcnn/ironpython-stubs | 780d829e2104b2789d5f4d6f32b0ec9f2930ca03 | [
"MIT"
] | 182 | 2017-06-27T02:26:15.000Z | 2022-03-30T18:53:43.000Z | release/stubs.min/System/Runtime/InteropServices/__init___parts/_CustomAttributeBuilder.py | htlcnn/ironpython-stubs | 780d829e2104b2789d5f4d6f32b0ec9f2930ca03 | [
"MIT"
] | 28 | 2017-06-27T13:38:23.000Z | 2022-03-15T11:19:44.000Z | release/stubs.min/System/Runtime/InteropServices/__init___parts/_CustomAttributeBuilder.py | htlcnn/ironpython-stubs | 780d829e2104b2789d5f4d6f32b0ec9f2930ca03 | [
"MIT"
] | 67 | 2017-06-28T09:43:59.000Z | 2022-03-20T21:17:10.000Z | class _CustomAttributeBuilder:
""" Exposes the System.Reflection.Emit.CustomAttributeBuilder class to unmanaged code. """
def GetIDsOfNames(self,riid,rgszNames,cNames,lcid,rgDispId):
"""
GetIDsOfNames(self: _CustomAttributeBuilder,riid: Guid,rgszNames: IntPtr,cNames: UInt32,lcid: UInt32,rgDispId: IntPtr) -> G... | 30.767442 | 182 | 0.722222 |
83e1caf8bb0a834a127ba4fe6436dfb98522ef8a | 8,979 | py | Python | fanficfare/adapters/adapter_lumossycophanthexcom.py | Kolbo5/FanFicFare | cf2ae9b12631bfeeb9198ca686f9e58d4579aeb3 | [
"Apache-2.0"
] | null | null | null | fanficfare/adapters/adapter_lumossycophanthexcom.py | Kolbo5/FanFicFare | cf2ae9b12631bfeeb9198ca686f9e58d4579aeb3 | [
"Apache-2.0"
] | null | null | null | fanficfare/adapters/adapter_lumossycophanthexcom.py | Kolbo5/FanFicFare | cf2ae9b12631bfeeb9198ca686f9e58d4579aeb3 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2011 Fanficdownloader team, 2018 FanFicFare 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
#
# Un... | 38.536481 | 157 | 0.609311 |
3e1cc8628179b24ad6679a8a28d03dda2f5f26f3 | 41,243 | py | Python | neutron/tests/unit/api/test_extensions.py | ISCAS-VDI/neutron-base | 687f03d7131839ae8bc324d5823194d1245bb050 | [
"Apache-2.0"
] | null | null | null | neutron/tests/unit/api/test_extensions.py | ISCAS-VDI/neutron-base | 687f03d7131839ae8bc324d5823194d1245bb050 | [
"Apache-2.0"
] | 3 | 2015-02-27T00:48:55.000Z | 2015-04-21T05:29:37.000Z | neutron/tests/unit/api/test_extensions.py | ISCAS-VDI/neutron-base | 687f03d7131839ae8bc324d5823194d1245bb050 | [
"Apache-2.0"
] | 3 | 2015-02-26T00:55:17.000Z | 2020-03-01T17:05:40.000Z | # Copyright (c) 2011 OpenStack Foundation.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless... | 41.871066 | 79 | 0.651311 |
96bb25a82f6ebd73df1a404a55b2cd411c5be195 | 14,001 | py | Python | submissions/shigeria_inference2.py | upura/commonlitreadabilityprize | 5af91d122d7038c5f107fd5d17e024c160a4698d | [
"MIT"
] | 9 | 2021-08-06T09:22:18.000Z | 2022-03-02T15:50:05.000Z | submissions/shigeria_inference2.py | upura/commonlitreadabilityprize | 5af91d122d7038c5f107fd5d17e024c160a4698d | [
"MIT"
] | null | null | null | submissions/shigeria_inference2.py | upura/commonlitreadabilityprize | 5af91d122d7038c5f107fd5d17e024c160a4698d | [
"MIT"
] | null | null | null | import gc
import math
import multiprocessing
import os
import random
import time
import more_itertools
import numpy as np
import pandas as pd
import torch
import torch.nn as nn
from sklearn.model_selection import StratifiedKFold
from torch.utils.data import DataLoader, Dataset, Sampler
from transformers import AdamW, ... | 32.260369 | 95 | 0.608528 |
c76aa5a13efcef0f57709ef15b9973254faa2da3 | 3,342 | py | Python | huaweicloud-sdk-dds/huaweicloudsdkdds/v3/model/job_instance_info.py | huaweicloud/huaweicloud-sdk-python-v3 | 7a6270390fcbf192b3882bf763e7016e6026ef78 | [
"Apache-2.0"
] | 64 | 2020-06-12T07:05:07.000Z | 2022-03-30T03:32:50.000Z | huaweicloud-sdk-dds/huaweicloudsdkdds/v3/model/job_instance_info.py | huaweicloud/huaweicloud-sdk-python-v3 | 7a6270390fcbf192b3882bf763e7016e6026ef78 | [
"Apache-2.0"
] | 11 | 2020-07-06T07:56:54.000Z | 2022-01-11T11:14:40.000Z | huaweicloud-sdk-dds/huaweicloudsdkdds/v3/model/job_instance_info.py | huaweicloud/huaweicloud-sdk-python-v3 | 7a6270390fcbf192b3882bf763e7016e6026ef78 | [
"Apache-2.0"
] | 24 | 2020-06-08T11:42:13.000Z | 2022-03-04T06:44:08.000Z | # coding: utf-8
import re
import six
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
class JobInstanceInfo:
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is... | 23.871429 | 79 | 0.519449 |
7bd93d925dbcf83e0764e26fcfde6c65f5bb77af | 5,009 | py | Python | potpomo.py | romaindudek/PyTranslation-Pot-Po-Mo | d162d1825a81793d8ab2d48c3d92c6d376573842 | [
"MIT"
] | null | null | null | potpomo.py | romaindudek/PyTranslation-Pot-Po-Mo | d162d1825a81793d8ab2d48c3d92c6d376573842 | [
"MIT"
] | null | null | null | potpomo.py | romaindudek/PyTranslation-Pot-Po-Mo | d162d1825a81793d8ab2d48c3d92c6d376573842 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Simple instructions to generate Pot / po / mo files for translation
import sys
import os
from shutil import copyfile
from pathlib import Path
import subprocess
class PotPoMo:
DIR_PATH = os.getcwd()
LOCALES_DIR = os.path.join(os.getcwd(), 'locales')
def i... | 31.111801 | 178 | 0.562787 |
7cff476c0caa6a0f25411478bd4a4ebd320e59dd | 13,815 | py | Python | wildlifecompliance/components/artifact/utils.py | preranaandure/wildlifecompliance | bc19575f7bccf7e19adadbbaf5d3eda1d1aee4b5 | [
"Apache-2.0"
] | 1 | 2020-12-07T17:12:40.000Z | 2020-12-07T17:12:40.000Z | wildlifecompliance/components/artifact/utils.py | preranaandure/wildlifecompliance | bc19575f7bccf7e19adadbbaf5d3eda1d1aee4b5 | [
"Apache-2.0"
] | 14 | 2020-01-08T08:08:26.000Z | 2021-03-19T22:59:46.000Z | wildlifecompliance/components/artifact/utils.py | preranaandure/wildlifecompliance | bc19575f7bccf7e19adadbbaf5d3eda1d1aee4b5 | [
"Apache-2.0"
] | 15 | 2020-01-08T08:02:28.000Z | 2021-11-03T06:48:32.000Z | from wildlifecompliance.components.artifact.models import (
BriefOfEvidenceRecordOfInterview,
BriefOfEvidenceOtherStatements,
BriefOfEvidencePhysicalArtifacts,
BriefOfEvidenceDocumentArtifacts,
ProsecutionBriefRecordOfInterview,
ProsecutionBriefOtherStatements,
... | 51.356877 | 143 | 0.687079 |
f49b5e7fb02c8eb7ffb09cd2037d7cc3ca0b5544 | 61,441 | py | Python | modules/ccxt/async_support/bitfinex2.py | isajediknight/Sleep-Is-Overrated | 0a9e364a5d1507199f9674cf67ff18a8c22cdad7 | [
"MIT"
] | 2 | 2019-05-30T21:49:40.000Z | 2019-05-31T13:12:23.000Z | modules/ccxt/async_support/bitfinex2.py | isajediknight/Sleep-Is-Overrated | 0a9e364a5d1507199f9674cf67ff18a8c22cdad7 | [
"MIT"
] | null | null | null | modules/ccxt/async_support/bitfinex2.py | isajediknight/Sleep-Is-Overrated | 0a9e364a5d1507199f9674cf67ff18a8c22cdad7 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
from ccxt.async_support.bitfinex import bitfinex
import hashlib
import math
from ccxt.base.errors import ExchangeError
from ccxt.base.error... | 41.825051 | 207 | 0.462395 |
c0785e0a999668f09ecb482f19a1c2f651b0bfdd | 1,266 | py | Python | bsnl/server.py | shreyasseshadri/SudoSys | e066175604a1486978da63b80026677095a89ebd | [
"MIT"
] | null | null | null | bsnl/server.py | shreyasseshadri/SudoSys | e066175604a1486978da63b80026677095a89ebd | [
"MIT"
] | null | null | null | bsnl/server.py | shreyasseshadri/SudoSys | e066175604a1486978da63b80026677095a89ebd | [
"MIT"
] | 2 | 2018-07-19T13:44:49.000Z | 2018-07-19T18:30:47.000Z | import socket
import threading
from select import select
server_port = 8001
clients = []
run = True
def man():
global run, clients
while run:
try:
readable_client, _, _ = select(clients, [], [], .1)
for client in readable_client:
try:
msg =... | 23.886792 | 63 | 0.533175 |
2fe4eef7865d710e473bce8b268edd8f12023cb8 | 1,109 | py | Python | cvpods/utils/compat_wrapper.py | hanqiu-hq/cvpods | 597fa669151fdad87c250fa118a9e3a555f4fb5e | [
"Apache-2.0"
] | null | null | null | cvpods/utils/compat_wrapper.py | hanqiu-hq/cvpods | 597fa669151fdad87c250fa118a9e3a555f4fb5e | [
"Apache-2.0"
] | null | null | null | cvpods/utils/compat_wrapper.py | hanqiu-hq/cvpods | 597fa669151fdad87c250fa118a9e3a555f4fb5e | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python3
# -*- coding: utf-8 -*-
# Copyright (C) 2019-2021 Megvii Inc. All rights reserved.
import functools
from types import FunctionType
from loguru import logger
def deprecated_func(extra_info=None):
def deprecated(func):
@functools.wraps(func)
def wrap_deprecated(*args, **kwargs):
... | 24.108696 | 89 | 0.642922 |
493880544d8a99903722dde085c3891bf05d20bb | 1,083 | py | Python | UniformConfigurations/examples/create_open_rectangle.py | j-c-cook/UniformConfigurations | 3127d59c45c78dbd289df8f72af5c8af01be658d | [
"BSD-3-Clause"
] | null | null | null | UniformConfigurations/examples/create_open_rectangle.py | j-c-cook/UniformConfigurations | 3127d59c45c78dbd289df8f72af5c8af01be658d | [
"BSD-3-Clause"
] | null | null | null | UniformConfigurations/examples/create_open_rectangle.py | j-c-cook/UniformConfigurations | 3127d59c45c78dbd289df8f72af5c8af01be658d | [
"BSD-3-Clause"
] | null | null | null | # Jack C. Cook
# 7/1/20
# Create boreholes in an open rectangle
"""
0 0 0 0
0 0
0 0
0 0 0 0
"""
import Create_Rectangular_Fields as fieldgen
def main():
# Four boreholes in a line
# -------- inputs ----------
BottomY = 1 # nrows in Y from bottom
LeftX = 1 # nrows in x from left
... | 25.785714 | 104 | 0.578024 |
a28f5626fd42e2f2fae860894a7620f8c735b360 | 3,445 | py | Python | google-cloud-sdk/platform/bq/third_party/apiclient/errors.py | bopopescu/searchparty | afdc2805cb1b77bd5ac9fdd1a76217f4841f0ea6 | [
"Apache-2.0"
] | 1 | 2017-11-29T18:52:27.000Z | 2017-11-29T18:52:27.000Z | google-cloud-sdk/platform/bq/third_party/apiclient/errors.py | bopopescu/searchparty | afdc2805cb1b77bd5ac9fdd1a76217f4841f0ea6 | [
"Apache-2.0"
] | null | null | null | google-cloud-sdk/platform/bq/third_party/apiclient/errors.py | bopopescu/searchparty | afdc2805cb1b77bd5ac9fdd1a76217f4841f0ea6 | [
"Apache-2.0"
] | 3 | 2017-07-27T18:44:13.000Z | 2020-07-25T17:48:53.000Z | #!/usr/bin/env python
#
# Copyright 2014 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... | 24.432624 | 75 | 0.699565 |
0e93c89ecb0b8029e6aacf320241ced38170ffda | 808 | py | Python | __init__.py | mpavlak1/roxrec | 68cbdc7cf61abca57ffe9cd09628ac3315a6c5a8 | [
"MIT"
] | null | null | null | __init__.py | mpavlak1/roxrec | 68cbdc7cf61abca57ffe9cd09628ac3315a6c5a8 | [
"MIT"
] | 1 | 2020-01-16T17:45:09.000Z | 2020-01-16T17:45:09.000Z | __init__.py | mpavlak1/roxrec | 68cbdc7cf61abca57ffe9cd09628ac3315a6c5a8 | [
"MIT"
] | null | null | null | #/roxrec/__init__.py
'''
## ========================================================================== ##
- Roxrec is a package designed to find approximate matches to records
with non-exact merge fields.
- MongoDB required to facilitate record distribution and coordination
## Author: Michael Pavlak
## ====... | 27.862069 | 100 | 0.543317 |
7e72044d90ae973147d51b5107b263df082db43a | 641 | py | Python | manage.py | srcsoftwareengineer/test4interview-software-management | a406acf1b828266aaa9f9c383deea4983c27b61b | [
"MIT"
] | 1 | 2021-11-09T16:42:57.000Z | 2021-11-09T16:42:57.000Z | manage.py | srcsoftwareengineer/test4interview-software-management | a406acf1b828266aaa9f9c383deea4983c27b61b | [
"MIT"
] | null | null | null | manage.py | srcsoftwareengineer/test4interview-software-management | a406acf1b828266aaa9f9c383deea4983c27b61b | [
"MIT"
] | 1 | 2021-11-09T15:02:01.000Z | 2021-11-09T15:02:01.000Z | #!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'igssoftwaremanagement.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
... | 29.136364 | 85 | 0.689548 |
dca773ba1e02c1ca256c1def3aff2f3aa6f9f278 | 31,534 | py | Python | main_cifar.py | xcvil/Self-KWD | d599679a0420d88f2f34f7f6a8e620ccd1dbb0f4 | [
"MIT"
] | null | null | null | main_cifar.py | xcvil/Self-KWD | d599679a0420d88f2f34f7f6a8e620ccd1dbb0f4 | [
"MIT"
] | null | null | null | main_cifar.py | xcvil/Self-KWD | d599679a0420d88f2f34f7f6a8e620ccd1dbb0f4 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
import argparse
import builtins
import math
import os
import random
import shutil
import time
import warnings
from tqdm import tqdm
import pandas as pd
import torch
import torch.nn as nn
import torch.nn.parallel
import torch.b... | 44.103497 | 132 | 0.590474 |
179c475e7c4732e8a9b0aea8a9b17029b712bb4e | 408 | py | Python | wtforms/__init__.py | quantus/wtforms | 14d91cb05c6b2fca0f83d9dcff3d7b86292f18dd | [
"BSD-3-Clause"
] | null | null | null | wtforms/__init__.py | quantus/wtforms | 14d91cb05c6b2fca0f83d9dcff3d7b86292f18dd | [
"BSD-3-Clause"
] | null | null | null | wtforms/__init__.py | quantus/wtforms | 14d91cb05c6b2fca0f83d9dcff3d7b86292f18dd | [
"BSD-3-Clause"
] | 1 | 2021-05-04T12:16:27.000Z | 2021-05-04T12:16:27.000Z | """
WTForms
=======
WTForms is a flexible forms validation and rendering library for python web
development.
:copyright: Copyright (c) 2010 by Thomas Johansson, James Crasta and others.
:license: BSD, see LICENSE.txt for details.
"""
from wtforms import validators, widgets
from wtforms.fields import *
from wtforms.fo... | 24 | 76 | 0.77451 |
8e9fe46bbf367eb35526159e59bdd030228fce58 | 118 | py | Python | awesome_panel_extensions/frameworks/fast/templates/fast_list_template/__init__.py | MarcSkovMadsen/panel-extensions-template | f41ad8d8fb8502f87de3a4992917cbffb6299012 | [
"CC-BY-4.0"
] | 3 | 2020-07-16T07:28:45.000Z | 2020-07-17T12:53:56.000Z | awesome_panel_extensions/frameworks/fast/templates/fast_list_template/__init__.py | MarcSkovMadsen/panel-extensions-template | f41ad8d8fb8502f87de3a4992917cbffb6299012 | [
"CC-BY-4.0"
] | null | null | null | awesome_panel_extensions/frameworks/fast/templates/fast_list_template/__init__.py | MarcSkovMadsen/panel-extensions-template | f41ad8d8fb8502f87de3a4992917cbffb6299012 | [
"CC-BY-4.0"
] | null | null | null | """Provides the FastListTemplate"""
from .fast_list_template import FastDarkTheme, FastDefaultTheme, FastListTemplate
| 39.333333 | 81 | 0.847458 |
9b2af2ea7fe5ac3534e8509555a8f99a1a5ffa5d | 4,449 | py | Python | homeassistant/components/watson_tts/tts.py | miccico/core | 14c205384171dee59c1a908f8449f9864778b2dc | [
"Apache-2.0"
] | 6 | 2017-08-02T19:26:39.000Z | 2020-03-14T22:47:41.000Z | homeassistant/components/watson_tts/tts.py | miccico/core | 14c205384171dee59c1a908f8449f9864778b2dc | [
"Apache-2.0"
] | 57 | 2020-10-15T06:47:00.000Z | 2022-03-31T06:11:18.000Z | homeassistant/components/watson_tts/tts.py | miccico/core | 14c205384171dee59c1a908f8449f9864778b2dc | [
"Apache-2.0"
] | 14 | 2018-08-19T16:28:26.000Z | 2021-09-02T18:26:53.000Z | """Support for IBM Watson TTS integration."""
from ibm_cloud_sdk_core.authenticators import IAMAuthenticator
from ibm_watson import TextToSpeechV1
import voluptuous as vol
from homeassistant.components.tts import PLATFORM_SCHEMA, Provider
import homeassistant.helpers.config_validation as cv
CONF_URL = "watson_url"
CO... | 28.703226 | 88 | 0.685997 |
93a2130d025ef7a5fee2cee15b0f76df1ba1b822 | 16,384 | py | Python | server/services/users/user_service.py | stufinn/tasking-manager | 85956538001eb7f3192579271b4caace34394bed | [
"BSD-2-Clause"
] | null | null | null | server/services/users/user_service.py | stufinn/tasking-manager | 85956538001eb7f3192579271b4caace34394bed | [
"BSD-2-Clause"
] | null | null | null | server/services/users/user_service.py | stufinn/tasking-manager | 85956538001eb7f3192579271b4caace34394bed | [
"BSD-2-Clause"
] | null | null | null | from cachetools import TTLCache, cached
from flask import current_app
import datetime
from sqlalchemy import text, func, or_, desc
from server import db
from server.models.dtos.user_dto import (
UserDTO,
UserOSMDTO,
UserFilterDTO,
UserSearchQuery,
UserSearchDTO,
UserStatsDTO,
UserContributio... | 36.32816 | 113 | 0.651367 |
f572daa1ba023aab8aa85fe74eafcf4aa91b8c3f | 2,263 | py | Python | test/test_server/server.py | thecodesome/libwebler | 038f1cf9d42fbf3c35122c0648069b770246bb7f | [
"MIT"
] | null | null | null | test/test_server/server.py | thecodesome/libwebler | 038f1cf9d42fbf3c35122c0648069b770246bb7f | [
"MIT"
] | null | null | null | test/test_server/server.py | thecodesome/libwebler | 038f1cf9d42fbf3c35122c0648069b770246bb7f | [
"MIT"
] | 1 | 2018-08-22T09:40:20.000Z | 2018-08-22T09:40:20.000Z | from flask import Flask,request,jsonify,render_template,request,jsonify,make_response,redirect
app = Flask(__name__)
port = 3000
def getPrefix(arr):
s = ''
for a in arr[:-1]:
s += a + '/'
s += arr[-1]
return s
@app.route("/first/")
def first_link():
return render_template('first_page.htm... | 38.355932 | 109 | 0.677861 |
ca94247435089bb8ef6b624b62d3269acc337b88 | 102,600 | py | Python | udemy.py | darkfalcon321/Udemy-Course-Grabber-1 | caf57ff7f58f16c35b7dd4bd27ddfdaae81856e3 | [
"MIT"
] | null | null | null | udemy.py | darkfalcon321/Udemy-Course-Grabber-1 | caf57ff7f58f16c35b7dd4bd27ddfdaae81856e3 | [
"MIT"
] | null | null | null | udemy.py | darkfalcon321/Udemy-Course-Grabber-1 | caf57ff7f58f16c35b7dd4bd27ddfdaae81856e3 | [
"MIT"
] | null | null | null | import json
import os
import random
import re
#!/usr/bin/python3
import webbrowser
import threading
import multiprocessing
import time
from urllib.parse import parse_qs, urlsplit
import browser_cookie3
import PySimpleGUI as sg
import requests
import urllib3
from bs4 import BeautifulSoup
from pack.con... | 263.076923 | 88,176 | 0.907378 |
572c479a7dbd771312c16b3d4a37da789ba8b89c | 146 | py | Python | common/context_processors.py | wonderbeyond/ezlog | 6c0673d5ef0c90a5f977d410f3cc20587e239815 | [
"BSD-2-Clause"
] | 31 | 2015-02-19T03:23:52.000Z | 2021-03-30T09:38:27.000Z | common/context_processors.py | rouqiu/ezlog | 6c0673d5ef0c90a5f977d410f3cc20587e239815 | [
"BSD-2-Clause"
] | null | null | null | common/context_processors.py | rouqiu/ezlog | 6c0673d5ef0c90a5f977d410f3cc20587e239815 | [
"BSD-2-Clause"
] | 37 | 2015-01-13T07:42:58.000Z | 2018-04-08T08:06:28.000Z | # coding=utf-8
from common.models.friendlink import FriendLink
def friend_links(request):
return {'friend_links': FriendLink.objects.all(),}
| 24.333333 | 54 | 0.767123 |
0a1c09a2ce6153b30e745a0d5ef437cc211baa5f | 6,821 | py | Python | j3d/ttk1.py | blank63/j3dview | 498225e12119a9a2b4af9beed1be95f28d8410e2 | [
"MIT"
] | 13 | 2016-04-22T10:45:08.000Z | 2022-02-23T23:50:53.000Z | j3d/ttk1.py | RenolY2/j3dview | 428da6d0497c577546af6d44eb71c2171edafc58 | [
"MIT"
] | 1 | 2017-03-19T20:31:03.000Z | 2017-03-20T17:09:36.000Z | j3d/ttk1.py | blank63/j3dview | 498225e12119a9a2b4af9beed1be95f28d8410e2 | [
"MIT"
] | 2 | 2016-09-10T07:35:35.000Z | 2021-12-29T23:23:36.000Z | from math import cos,sin,radians
import numpy
from btypes.big_endian import *
import gx
from j3d.animation import Animation,select_interpolater,IncompatibleAnimationError
import j3d.string_table
class Header(Struct):
magic = ByteString(4)
section_size = uint32
loop_mode = uint8
angle_scale_exponent = ... | 39.201149 | 120 | 0.702096 |
10ba85e769b5b5933505c9b50cf6544c1b7391f8 | 3,916 | py | Python | tf_ops/grouping/tf_grouping.py | LeoDuhz/PWCLONet | a48ab1483fbf8c9a1024c7468637146c07664071 | [
"MIT"
] | 330 | 2019-04-17T02:09:24.000Z | 2022-03-20T12:56:07.000Z | tf_ops/grouping/tf_grouping.py | LeoDuhz/PWCLONet | a48ab1483fbf8c9a1024c7468637146c07664071 | [
"MIT"
] | 53 | 2019-05-10T04:29:08.000Z | 2022-01-24T13:26:56.000Z | tf_ops/grouping/tf_grouping.py | LeoDuhz/PWCLONet | a48ab1483fbf8c9a1024c7468637146c07664071 | [
"MIT"
] | 79 | 2019-04-16T08:31:33.000Z | 2022-01-06T11:07:38.000Z | import tensorflow as tf
from tensorflow.python.framework import ops
import sys
import os
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
sys.path.append(BASE_DIR)
grouping_module=tf.load_op_library(os.path.join(BASE_DIR, 'tf_grouping_so.so'))
def query_ball_point(radius, nsample, xyz1, xyz2):
'''
Input:
... | 37.653846 | 95 | 0.643258 |
1a77236ef1ddac60cce61155c19a19ad0246b789 | 4,633 | py | Python | twisted/internet/_win32serialport.py | ioggstream/twisted | 34f9b1e3f097685839000c656332c66ee85be5d8 | [
"Unlicense",
"MIT"
] | 7 | 2015-04-28T13:26:11.000Z | 2020-02-09T17:01:04.000Z | twisted/internet/_win32serialport.py | ioggstream/twisted | 34f9b1e3f097685839000c656332c66ee85be5d8 | [
"Unlicense",
"MIT"
] | 4 | 2017-02-19T23:58:13.000Z | 2019-11-01T15:31:22.000Z | twisted/internet/_win32serialport.py | ioggstream/twisted | 34f9b1e3f097685839000c656332c66ee85be5d8 | [
"Unlicense",
"MIT"
] | 6 | 2017-02-13T09:11:02.000Z | 2021-06-29T11:22:18.000Z | # Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Serial port support for Windows.
Requires PySerial and pywin32.
"""
# system imports
import serial
from serial import PARITY_NONE, PARITY_EVEN, PARITY_ODD
from serial import STOPBITS_ONE, STOPBITS_TWO
from serial import FIVEBITS, SIXBITS, SE... | 36.480315 | 97 | 0.628319 |
cb788a33beb1f694409b1b965287ac8f05d123f6 | 834 | py | Python | torch/optim/__init__.py | Hacky-DH/pytorch | 80dc4be615854570aa39a7e36495897d8a040ecc | [
"Intel"
] | 60,067 | 2017-01-18T17:21:31.000Z | 2022-03-31T21:37:45.000Z | torch/optim/__init__.py | Hacky-DH/pytorch | 80dc4be615854570aa39a7e36495897d8a040ecc | [
"Intel"
] | 66,955 | 2017-01-18T17:21:38.000Z | 2022-03-31T23:56:11.000Z | torch/optim/__init__.py | Hacky-DH/pytorch | 80dc4be615854570aa39a7e36495897d8a040ecc | [
"Intel"
] | 19,210 | 2017-01-18T17:45:04.000Z | 2022-03-31T23:51:56.000Z | """
:mod:`torch.optim` is a package implementing various optimization algorithms.
Most commonly used methods are already supported, and the interface is general
enough, so that more sophisticated ones can be also easily integrated in the
future.
"""
from .adadelta import Adadelta
from .adagrad import Adagrad
from .ada... | 21.384615 | 78 | 0.806954 |
52409cae424373f3123601e3e4399f1b4cb40488 | 2,224 | py | Python | Python_SDK/Ci_ImageSearch/Ci_ImageSearch_Bucket.py | shezhangjun/TencentCOS | 9916c9bf9eb65b72904eb4251eb53b964bc8ad46 | [
"MIT"
] | 2 | 2022-03-06T06:56:29.000Z | 2022-03-07T11:25:35.000Z | Python_SDK/Ci_ImageSearch/Ci_ImageSearch_Bucket.py | shezhangjun/TencentCOS | 9916c9bf9eb65b72904eb4251eb53b964bc8ad46 | [
"MIT"
] | null | null | null | Python_SDK/Ci_ImageSearch/Ci_ImageSearch_Bucket.py | shezhangjun/TencentCOS | 9916c9bf9eb65b72904eb4251eb53b964bc8ad46 | [
"MIT"
] | null | null | null | # -*- coding=utf-8
from qcloud_cos import CosConfig
from qcloud_cos import CosS3Client
import json
import requests
import xmltodict
import sys
import logging
# 正常情况日志级别使用INFO,需要定位时可以修改为DEBUG,此时SDK会打印和服务端的通信信息
logging.basicConfig(level=logging.WARNING, stream=sys.stdout)
# 1. 设置用户属性, 包括 secret_id, secret_key, region... | 34.215385 | 118 | 0.698741 |
27deb6193fb04c469326ba2e5dec49ced4c7d78d | 842 | py | Python | data_getter_test.py | MichaelLeachim/____testTaskMagetic | c432afcc9421ff0de612cbba53a8d71b6e85af1a | [
"MIT"
] | null | null | null | data_getter_test.py | MichaelLeachim/____testTaskMagetic | c432afcc9421ff0de612cbba53a8d71b6e85af1a | [
"MIT"
] | null | null | null | data_getter_test.py | MichaelLeachim/____testTaskMagetic | c432afcc9421ff0de612cbba53a8d71b6e85af1a | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
# @ Copyright (c) Michael Leahcim @
# @ You can find additional information regarding licensing of this work in LICENSE.md @
# @ You must not remove this ... | 46.777778 | 88 | 0.505938 |
a771d3f84ebe03011c2d07deb6df303eb1738b06 | 191 | py | Python | roscraco/router/tplink/wr941n.py | cyroxx/roscraco | fc0279928d0241f4eb475ac40b24ab22cb1d900a | [
"BSD-3-Clause"
] | 1 | 2020-09-06T09:30:13.000Z | 2020-09-06T09:30:13.000Z | roscraco/router/tplink/wr941n.py | cyroxx/roscraco | fc0279928d0241f4eb475ac40b24ab22cb1d900a | [
"BSD-3-Clause"
] | null | null | null | roscraco/router/tplink/wr941n.py | cyroxx/roscraco | fc0279928d0241f4eb475ac40b24ab22cb1d900a | [
"BSD-3-Clause"
] | null | null | null | from wr740n import Tplink_WR740N
class Tplink_WR941N(Tplink_WR740N):
def confirm_identity(self):
self._ensure_www_auth_header('Basic realm="TP-LINK Wireless N Router WR941N"')
| 23.875 | 86 | 0.769634 |
c2c37b00a2e5819c6204886c7c1f4f6b3323caa3 | 2,750 | py | Python | tests_app/models.py | ahammouda/django_simple_imports | 5d1c1ab5c3fdb9bc67117a1fd99ecbe11e42e5dd | [
"BSD-2-Clause"
] | null | null | null | tests_app/models.py | ahammouda/django_simple_imports | 5d1c1ab5c3fdb9bc67117a1fd99ecbe11e42e5dd | [
"BSD-2-Clause"
] | null | null | null | tests_app/models.py | ahammouda/django_simple_imports | 5d1c1ab5c3fdb9bc67117a1fd99ecbe11e42e5dd | [
"BSD-2-Clause"
] | null | null | null | from django.db import models
# Create your models here.
from django.contrib.auth.models import User
class Company(models.Model):
name = models.CharField(max_length=255,null=True)
natural_id = models.CharField(max_length=255)
class UserProfile(models.Model):
USER_TYPE_BOSS = 'BS'
USER_TYPE_WORKER = ... | 33.13253 | 90 | 0.687636 |
7088f302ea1bd960dc0b21c23204d739fd9af4f0 | 36,383 | py | Python | Savethemblobs/PythonistaKit.framework/pylib/xml/dom/expatbuilder.py | iApeiron/Savethemblobs_app | 38184facf78b55ba89a727be7b1fc08d6085f20c | [
"MIT"
] | 19 | 2017-05-17T16:48:02.000Z | 2020-08-18T18:21:45.000Z | Savethemblobs/PythonistaKit.framework/pylib/xml/dom/expatbuilder.py | iApeiron/Savethemblobs_app | 38184facf78b55ba89a727be7b1fc08d6085f20c | [
"MIT"
] | 2 | 2017-05-17T06:41:47.000Z | 2017-05-17T17:27:13.000Z | Savethemblobs/PythonistaKit.framework/pylib/xml/dom/expatbuilder.py | iApeiron/Savethemblobs_app | 38184facf78b55ba89a727be7b1fc08d6085f20c | [
"MIT"
] | 4 | 2017-05-17T03:56:25.000Z | 2018-11-09T00:00:20.000Z |
"""Facility to use the Expat parser to load a minidom instance
from a string or file.
This avoids all the overhead of SAX and pulldom to gain performance.
"""
# Warning!
#
# This module is tightly bound to the implementation details of the
# minidom DOM and can't be used with other DOM implementations. This
# is du... | 36.937056 | 81 | 0.60127 |
701f19e87eb58be26634603336914e93c900fd66 | 5,409 | py | Python | creational/builder.py | GustavoBoaz/design_patterns | b46c6dd6e355fce8f769b76c432ac8a00f236438 | [
"MIT"
] | null | null | null | creational/builder.py | GustavoBoaz/design_patterns | b46c6dd6e355fce8f769b76c432ac8a00f236438 | [
"MIT"
] | null | null | null | creational/builder.py | GustavoBoaz/design_patterns | b46c6dd6e355fce8f769b76c432ac8a00f236438 | [
"MIT"
] | null | null | null | """
O Builder é um padrão de design criacional que permite construir objetos
complexos passo a passo. O padrão permite produzir diferentes tipos e
representações de um objeto usando o mesmo código de construção.
Como Implementar:
1. Certifique-se de definir claramente as etapas comuns de construç... | 32.781818 | 88 | 0.591607 |
5bbb77531c477283923d4ea3ff22499a77217d5d | 100 | py | Python | code/pyFoamAPoMaFoXiiQt.py | sosohungry/pyfoam | b19e40a0ef1f41268930122226660414722178e6 | [
"MIT"
] | null | null | null | code/pyFoamAPoMaFoXiiQt.py | sosohungry/pyfoam | b19e40a0ef1f41268930122226660414722178e6 | [
"MIT"
] | null | null | null | code/pyFoamAPoMaFoXiiQt.py | sosohungry/pyfoam | b19e40a0ef1f41268930122226660414722178e6 | [
"MIT"
] | null | null | null | #! /usr/bin/env python
from PyFoam.Applications.APoMaFoXiiQt import APoMaFoXiiQt
APoMaFoXiiQt()
| 14.285714 | 57 | 0.79 |
2c2c428fb2c37246c15ac4ada515c4727d3a4c02 | 12,790 | py | Python | pycardano/coinselection.py | Blockery-io/pycardano | 81749b46324346a0e3cb4808290fd565f4ed7450 | [
"MIT"
] | 72 | 2022-01-09T03:54:06.000Z | 2022-03-30T22:05:44.000Z | pycardano/coinselection.py | Blockery-io/pycardano | 81749b46324346a0e3cb4808290fd565f4ed7450 | [
"MIT"
] | 13 | 2022-02-19T13:08:11.000Z | 2022-03-30T16:57:33.000Z | pycardano/coinselection.py | henryyuanheng-wang/pycardano | d58c53791ffef542762e6d0220d4ccd1c0950e5e | [
"MIT"
] | 15 | 2022-02-07T23:54:51.000Z | 2022-03-30T17:06:12.000Z | """
This module contains algorithms that select UTxOs from a parent list to satisfy some output constraints.
"""
import random
from typing import Iterable, List, Optional, Tuple
from pycardano.backend.base import ChainContext
from pycardano.exception import (
InputUTxODepletedException,
InsufficientUTxOBalanc... | 39.233129 | 119 | 0.605551 |
e135d3713fdfc2ff5a919b975ee17b9e47b3b947 | 10,274 | py | Python | python/cloudtik/core/_private/resource_spec.py | jerrychenhf/cloudtik | 5ceab948c5c8b2e00f644d2fb801311572aaf381 | [
"Apache-2.0"
] | 2 | 2022-03-28T05:03:57.000Z | 2022-03-28T09:00:48.000Z | python/cloudtik/core/_private/resource_spec.py | jerrychenhf/cloudtik | 5ceab948c5c8b2e00f644d2fb801311572aaf381 | [
"Apache-2.0"
] | 12 | 2022-03-29T05:07:18.000Z | 2022-03-31T13:57:57.000Z | python/cloudtik/core/_private/resource_spec.py | jerrychenhf/cloudtik | 5ceab948c5c8b2e00f644d2fb801311572aaf381 | [
"Apache-2.0"
] | 6 | 2022-03-28T05:04:24.000Z | 2022-03-29T01:22:22.000Z | from collections import namedtuple
import logging
import os
import re
import subprocess
import sys
import cloudtik.core._private.utils as utils
import cloudtik.core._private.constants as constants
import cloudtik.core._private.services as services
logger = logging.getLogger(__name__)
# Prefix for the node id resourc... | 37.772059 | 84 | 0.605314 |
18d084d1aa838fb21e6544e6ae985d475b0d7051 | 485 | py | Python | tests/vcs/test_is_vcs_installed.py | bradleypmartin/cookiecutter | 6540d2ad3b0ee3c30d9655171ef59b18d22ab0ed | [
"BSD-3-Clause"
] | 1 | 2021-12-12T12:38:28.000Z | 2021-12-12T12:38:28.000Z | tests/vcs/test_is_vcs_installed.py | bradleypmartin/cookiecutter | 6540d2ad3b0ee3c30d9655171ef59b18d22ab0ed | [
"BSD-3-Clause"
] | 1 | 2019-05-16T15:45:18.000Z | 2019-05-16T15:45:18.000Z | tests/vcs/test_is_vcs_installed.py | bradleypmartin/cookiecutter | 6540d2ad3b0ee3c30d9655171ef59b18d22ab0ed | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""Collection of tests around VCS detection."""
import pytest
from cookiecutter import vcs
@pytest.mark.parametrize('which_return, result', [
('', False),
(None, False),
(False, False),
('/usr/local/bin/git', True),
])
def test_is_vcs_installed(mocker, which_return, result):... | 21.086957 | 56 | 0.643299 |
bb0bfca074c93458748e4c63f3e51a35a9d59779 | 2,912 | py | Python | src/OTLMOW/PostenMapping/Model/Post050407019.py | davidvlaminck/OTLClassPython | 71330afeb37c3ea6d9981f521ff8f4a3f8b946fc | [
"MIT"
] | 2 | 2022-02-01T08:58:11.000Z | 2022-02-08T13:35:17.000Z | src/OTLMOW/PostenMapping/Model/Post050407019.py | davidvlaminck/OTLMOW | 71330afeb37c3ea6d9981f521ff8f4a3f8b946fc | [
"MIT"
] | null | null | null | src/OTLMOW/PostenMapping/Model/Post050407019.py | davidvlaminck/OTLMOW | 71330afeb37c3ea6d9981f521ff8f4a3f8b946fc | [
"MIT"
] | null | null | null | # coding=utf-8
from OTLMOW.PostenMapping.StandaardPost import StandaardPost
from OTLMOW.PostenMapping.StandaardPostMapping import StandaardPostMapping
# Generated with PostenCreator. To modify: extend, do not edit
class Post050407019(StandaardPost):
def __init__(self):
super().__init__(
nummer... | 44.8 | 104 | 0.561126 |
f45a550c220ecf14d6583e7fa9c24852975e24c6 | 4,272 | py | Python | crslab/config/config.py | Xiaolong-Qi/CRSLab | d507378c86f4996727bf062482e1f224486d4533 | [
"MIT"
] | 1 | 2021-01-06T10:39:10.000Z | 2021-01-06T10:39:10.000Z | crslab/config/config.py | Xiaolong-Qi/CRSLab | d507378c86f4996727bf062482e1f224486d4533 | [
"MIT"
] | null | null | null | crslab/config/config.py | Xiaolong-Qi/CRSLab | d507378c86f4996727bf062482e1f224486d4533 | [
"MIT"
] | null | null | null | # @Time : 2020/11/22
# @Author : Kun Zhou
# @Email : francis_kun_zhou@163.com
# UPDATE:
# @Time : 2020/11/23, 2020/12/20
# @Author : Kun Zhou, Xiaolei Wang
# @Email : francis_kun_zhou@163.com, wxl1999@foxmail.com
import json
import os
import time
from pprint import pprint
import yaml
from loguru import logger
... | 30.733813 | 120 | 0.564841 |
dd02259816516ff382234bcb35d456eb4eea0859 | 1,067 | py | Python | AuthenticationSystem/handlers/log.py | ljnath/RBAC | 7a4c2b0b4fd2d533ffdbf92d8b2d00b1ff510cae | [
"MIT"
] | null | null | null | AuthenticationSystem/handlers/log.py | ljnath/RBAC | 7a4c2b0b4fd2d533ffdbf92d8b2d00b1ff510cae | [
"MIT"
] | null | null | null | AuthenticationSystem/handlers/log.py | ljnath/RBAC | 7a4c2b0b4fd2d533ffdbf92d8b2d00b1ff510cae | [
"MIT"
] | null | null | null | from logging.handlers import RotatingFileHandler
import logging
class LogHandler():
""" Class for handling logs
"""
def __init__(self):
pass
@staticmethod
def get_logger(logger_name:str):
""" Static class to get a file for logging exception message
:param logger_name : ... | 38.107143 | 142 | 0.610122 |
234668def8003436a7be3e339c48ea44561991d7 | 1,470 | py | Python | python/phonenumbers/data/region_MT.py | rodgar-nvkz/python-phonenumbers | 4c7c4892211dbc9bc328bc3356b03853eaf993dc | [
"Apache-2.0"
] | 1 | 2020-04-16T21:40:27.000Z | 2020-04-16T21:40:27.000Z | python/phonenumbers/data/region_MT.py | rodgar-nvkz/python-phonenumbers | 4c7c4892211dbc9bc328bc3356b03853eaf993dc | [
"Apache-2.0"
] | 10 | 2020-03-24T10:47:53.000Z | 2021-04-08T19:51:44.000Z | python/phonenumbers/data/region_MT.py | rodgar-nvkz/python-phonenumbers | 4c7c4892211dbc9bc328bc3356b03853eaf993dc | [
"Apache-2.0"
] | 1 | 2018-10-24T20:48:56.000Z | 2018-10-24T20:48:56.000Z | """Auto-generated file, do not edit by hand. MT metadata"""
from ..phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata
PHONE_METADATA_MT = PhoneMetadata(id='MT', country_code=356, international_prefix='00',
general_desc=PhoneNumberDesc(national_number_pattern='3550\\d{4}|(?:[2579]\\d\\d|800)\\d{5}', ... | 98 | 174 | 0.708844 |
fca096d1d23e536560347dbd6f60a9dc29011a90 | 8,008 | py | Python | dev/tools/leveleditor/direct/tkpanels/TaskManagerPanel.py | CrankySupertoon01/Toontown-2 | 60893d104528a8e7eb4aced5d0015f22e203466d | [
"MIT"
] | 1 | 2021-02-13T22:40:50.000Z | 2021-02-13T22:40:50.000Z | dev/tools/leveleditor/direct/tkpanels/TaskManagerPanel.py | CrankySupertoonArchive/Toontown-2 | 60893d104528a8e7eb4aced5d0015f22e203466d | [
"MIT"
] | 1 | 2018-07-28T20:07:04.000Z | 2018-07-30T18:28:34.000Z | dev/tools/leveleditor/direct/tkpanels/TaskManagerPanel.py | CrankySupertoonArchive/Toontown-2 | 60893d104528a8e7eb4aced5d0015f22e203466d | [
"MIT"
] | 2 | 2019-12-02T01:39:10.000Z | 2021-02-13T22:41:00.000Z | """Undocumented Module"""
__all__ = ['TaskManagerPanel', 'TaskManagerWidget']
from direct.tkwidgets.AppShell import *
from Tkinter import *
from direct.showbase.DirectObject import DirectObject
import Pmw
class TaskManagerPanel(AppShell):
# Override class variables here
appname = 'TaskManager Panel'
fram... | 36.4 | 107 | 0.577423 |
4df1267ebbe977ab27c839de12856808b9d55871 | 2,211 | py | Python | tests/test_observable/test_observeon.py | yutiansut/RxPY | c3bbba77f9ebd7706c949141725e220096deabd4 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2018-11-16T09:07:13.000Z | 2018-11-16T09:07:13.000Z | tests/test_observable/test_observeon.py | yutiansut/RxPY | c3bbba77f9ebd7706c949141725e220096deabd4 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | tests/test_observable/test_observeon.py | yutiansut/RxPY | c3bbba77f9ebd7706c949141725e220096deabd4 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2020-05-08T08:23:08.000Z | 2020-05-08T08:23:08.000Z | import unittest
from rx.testing import TestScheduler, ReactiveTest
on_next = ReactiveTest.on_next
on_completed = ReactiveTest.on_completed
on_error = ReactiveTest.on_error
subscribe = ReactiveTest.subscribe
subscribed = ReactiveTest.subscribed
disposed = ReactiveTest.disposed
created = ReactiveTest.created
class Te... | 28.714286 | 71 | 0.571687 |
7c95cd9eafac28a1d975df581468b56d384a5262 | 573 | py | Python | events/migrations/0006_auto_20170910_0902.py | 0xelectron/mhtportal-web | bd05069d6245e86d4ae887cacf33b04ef9476816 | [
"MIT"
] | null | null | null | events/migrations/0006_auto_20170910_0902.py | 0xelectron/mhtportal-web | bd05069d6245e86d4ae887cacf33b04ef9476816 | [
"MIT"
] | 5 | 2019-10-20T06:17:36.000Z | 2021-06-10T18:13:29.000Z | events/migrations/0006_auto_20170910_0902.py | 0xelectron/mhtportal-web | bd05069d6245e86d4ae887cacf33b04ef9476816 | [
"MIT"
] | 2 | 2019-05-11T17:25:25.000Z | 2019-10-12T17:59:47.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11.3 on 2017-09-10 09:02
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('events', '0005_eventparticipant_registration_status'),
]
operations = [
mig... | 27.285714 | 158 | 0.631763 |
c6cc45529427edeb5095c6ffe848921cc2302a23 | 1,487 | py | Python | t00_chocolate.py | 2019-fall-csc-226/a01-breaking-bad-thyhnguyen | 3320a74a5c5ed7f26e47b9afff59f9d9b440ce25 | [
"MIT"
] | null | null | null | t00_chocolate.py | 2019-fall-csc-226/a01-breaking-bad-thyhnguyen | 3320a74a5c5ed7f26e47b9afff59f9d9b440ce25 | [
"MIT"
] | null | null | null | t00_chocolate.py | 2019-fall-csc-226/a01-breaking-bad-thyhnguyen | 3320a74a5c5ed7f26e47b9afff59f9d9b440ce25 | [
"MIT"
] | null | null | null | ######################################################################
# Author: Thy H. Nguyen ****** TODO: CHANGE THIS!! ******
# username: nguyent2 ****** TODO: CHANGE THIS!! *****
#
# Purpose: Designed to compute the total chocolate desired by the user
#
#########################################... | 33.795455 | 138 | 0.591123 |
a1e137908b6619b6da663fdaee915b2eab83c559 | 665 | py | Python | instacook_django/instacook/manage.py | pythonbykhaja/APIBuildingProjects | 6d3d4b6bdf28567649d2b3d572caff60e2765d56 | [
"Apache-2.0"
] | 1 | 2021-11-13T17:53:16.000Z | 2021-11-13T17:53:16.000Z | instacook_django/instacook/manage.py | pythonbykhaja/APIBuildingProjects | 6d3d4b6bdf28567649d2b3d572caff60e2765d56 | [
"Apache-2.0"
] | null | null | null | instacook_django/instacook/manage.py | pythonbykhaja/APIBuildingProjects | 6d3d4b6bdf28567649d2b3d572caff60e2765d56 | [
"Apache-2.0"
] | 3 | 2021-11-18T10:11:44.000Z | 2021-12-18T13:56:20.000Z | #!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
"""Run administrative tasks."""
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'instacook.settings')
try:
from django.core.management import execute_from_command_line
except Im... | 28.913043 | 73 | 0.679699 |
7d7be1e8b7dca0a7c9d0884a3d8b2ac603a9c291 | 5,869 | py | Python | helper.py | Daard/CarND-P12-Semantic-Segmentation | 2c16e718518fb2194f892ba439d224ed2d4150a7 | [
"MIT"
] | null | null | null | helper.py | Daard/CarND-P12-Semantic-Segmentation | 2c16e718518fb2194f892ba439d224ed2d4150a7 | [
"MIT"
] | null | null | null | helper.py | Daard/CarND-P12-Semantic-Segmentation | 2c16e718518fb2194f892ba439d224ed2d4150a7 | [
"MIT"
] | null | null | null | import re
import random
import numpy as np
import os.path
import scipy.misc
import shutil
import zipfile
import time
import tensorflow as tf
from glob import glob
from urllib.request import urlretrieve
from tqdm import tqdm
def timeit(method):
def timed(*args, **kw):
ts = time.time()
result = metho... | 36.91195 | 103 | 0.656159 |
a5afb69af5176978cba4c21d2ec59ab686d2c77a | 1,319 | py | Python | student_intervention/exploring_data.py | necromuralist/student_intervention | 470a8beb386f2a6b733514582dd286789fee4b59 | [
"MIT"
] | 1 | 2021-04-09T07:19:55.000Z | 2021-04-09T07:19:55.000Z | student_intervention/exploring_data.py | necromuralist/student_intervention | 470a8beb386f2a6b733514582dd286789fee4b59 | [
"MIT"
] | null | null | null | student_intervention/exploring_data.py | necromuralist/student_intervention | 470a8beb386f2a6b733514582dd286789fee4b59 | [
"MIT"
] | null | null | null |
# third party
import matplotlib.pyplot as plot
import numpy
import pandas as pd
import seaborn
# this code
from common import print_image_directive, STYLE
from common import student_data
seaborn.set_style(STYLE)
n_students = student_data.shape[0]
n_features = student_data.shape[1] - 1
n_passed = sum(student_data.p... | 34.710526 | 80 | 0.761941 |
0b1aa77d71deacf1380a8228a7c24e74d55a4794 | 8,343 | py | Python | twisted/python/logger/test/test_flatten.py | ioggstream/twisted | 34f9b1e3f097685839000c656332c66ee85be5d8 | [
"Unlicense",
"MIT"
] | null | null | null | twisted/python/logger/test/test_flatten.py | ioggstream/twisted | 34f9b1e3f097685839000c656332c66ee85be5d8 | [
"Unlicense",
"MIT"
] | null | null | null | twisted/python/logger/test/test_flatten.py | ioggstream/twisted | 34f9b1e3f097685839000c656332c66ee85be5d8 | [
"Unlicense",
"MIT"
] | null | null | null | # Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Test cases for L{twisted.python.logger._format}.
"""
import sys
from itertools import count
import json
try:
from time import tzset
# We should upgrade to a version of pyflakes that does not require this.
tzset
except ImportError... | 28.670103 | 79 | 0.544408 |
54de86841e3ba303baa6d6afce8f530f22ac3afc | 3,657 | py | Python | cephlm/tests/utils/test_system.py | ArdanaCLM/cephlm | 74afbcd078c0c903d9b8102d27c669decb124a38 | [
"Apache-2.0"
] | null | null | null | cephlm/tests/utils/test_system.py | ArdanaCLM/cephlm | 74afbcd078c0c903d9b8102d27c669decb124a38 | [
"Apache-2.0"
] | null | null | null | cephlm/tests/utils/test_system.py | ArdanaCLM/cephlm | 74afbcd078c0c903d9b8102d27c669decb124a38 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# (c) Copyright 2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE 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/licen... | 39.75 | 75 | 0.668307 |
9038a435a45c3c8a939a4781071879dcecffdd64 | 10,523 | py | Python | setuptools/_distutils/extension.py | hhartzer/setuptools | 588f8a944d16eb654183fab561054a80a71893a4 | [
"MIT"
] | null | null | null | setuptools/_distutils/extension.py | hhartzer/setuptools | 588f8a944d16eb654183fab561054a80a71893a4 | [
"MIT"
] | null | null | null | setuptools/_distutils/extension.py | hhartzer/setuptools | 588f8a944d16eb654183fab561054a80a71893a4 | [
"MIT"
] | null | null | null | """distutils.extension
Provides the Extension class, used to describe C/C++ extension
modules in setup scripts."""
import os
import warnings
# This class is really only used by the "build_ext" command, so it might
# make sense to put it in distutils.command.build_ext. However, that
# module is already big enough, a... | 43.6639 | 80 | 0.576927 |
fa3090ecda0459e98018b0684f942d5b22e503c4 | 7,204 | py | Python | tests/test_configurer.py | ceharvs/the-littlest-jupyterhub | 7172cd4372713f339a6e7eb002342aa0bfa85091 | [
"BSD-3-Clause"
] | 1 | 2019-02-11T07:23:11.000Z | 2019-02-11T07:23:11.000Z | tests/test_configurer.py | ceharvs/the-littlest-jupyterhub | 7172cd4372713f339a6e7eb002342aa0bfa85091 | [
"BSD-3-Clause"
] | null | null | null | tests/test_configurer.py | ceharvs/the-littlest-jupyterhub | 7172cd4372713f339a6e7eb002342aa0bfa85091 | [
"BSD-3-Clause"
] | null | null | null | """
Test configurer
"""
import os
import sys
from tljh import configurer
class MockConfigurer:
"""
Mock a Traitlet Configurable object.
Equivalent to the `c` in `c.JupyterHub.some_property` method of setting
traitlet properties. If an accessed attribute doesn't exist, a new instance
of EmtpyObj... | 25.728571 | 92 | 0.611049 |
29145a4c26746f18fd3fd88166a9bfda131f11b6 | 2,268 | py | Python | setup.py | RmStorm/mortgage-calculation | 834c41a67df47a3b4feea8c1f8cb8a199a0a5781 | [
"MIT"
] | null | null | null | setup.py | RmStorm/mortgage-calculation | 834c41a67df47a3b4feea8c1f8cb8a199a0a5781 | [
"MIT"
] | null | null | null | setup.py | RmStorm/mortgage-calculation | 834c41a67df47a3b4feea8c1f8cb8a199a0a5781 | [
"MIT"
] | null | null | null | # !/usr/bin/env python
# -*- coding: utf-8 -*-
import io
import os
from setuptools import find_packages, setup
# Package meta-data.
NAME = 'astrid-roald-mortgage-gui'
DESCRIPTION = 'A small gui for investigating various mortgages in Norway'
URL = 'https://github.com/RmStorm/mortgage-calculation'
EMAIL = 'roaldstorm@... | 28 | 79 | 0.675485 |
cdebebad30ba95cd5a14add0e0308fd81532a683 | 82 | py | Python | instawham/test.py | xelus47/Instawham | 9e123bda5422fff5375ac3b3e8fe79adf74f7612 | [
"Unlicense"
] | null | null | null | instawham/test.py | xelus47/Instawham | 9e123bda5422fff5375ac3b3e8fe79adf74f7612 | [
"Unlicense"
] | null | null | null | instawham/test.py | xelus47/Instawham | 9e123bda5422fff5375ac3b3e8fe79adf74f7612 | [
"Unlicense"
] | null | null | null | #!/usr/bin/python2
import output
if __name__ == "__main__":
output.out('line')
| 11.714286 | 26 | 0.682927 |
0363bf9ee7f74aecc822f416e41937ed251a154c | 92 | py | Python | apps/company/admin.py | dnetochaves/repense_rh | ba549bdadc90c088f258d9d640bd59fd696bb705 | [
"MIT"
] | null | null | null | apps/company/admin.py | dnetochaves/repense_rh | ba549bdadc90c088f258d9d640bd59fd696bb705 | [
"MIT"
] | 3 | 2021-01-22T06:05:42.000Z | 2021-02-16T10:06:36.000Z | apps/company/admin.py | dnetochaves/repense_rh | ba549bdadc90c088f258d9d640bd59fd696bb705 | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import Company
admin.site.register(Company)
| 15.333333 | 32 | 0.815217 |
8c8436b0700be6c198e76fd10e45ab875c15cb83 | 2,938 | py | Python | BlynK/blynk_timer_app.py | nighthawk9077/growbox-supervisor-system | 4f794b7ad33ac62680c415448f8e0e8d00a5fe7a | [
"Unlicense",
"MIT"
] | 5 | 2019-11-18T02:26:18.000Z | 2021-02-06T20:31:37.000Z | BlynK/blynk_timer_app.py | nighthawk9077/growbox-supervisor-system | 4f794b7ad33ac62680c415448f8e0e8d00a5fe7a | [
"Unlicense",
"MIT"
] | null | null | null | BlynK/blynk_timer_app.py | nighthawk9077/growbox-supervisor-system | 4f794b7ad33ac62680c415448f8e0e8d00a5fe7a | [
"Unlicense",
"MIT"
] | 1 | 2020-08-26T10:22:37.000Z | 2020-08-26T10:22:37.000Z | """
Blynk is a platform with iOS and Android apps to control
Arduino, Raspberry Pi and the likes over the Internet.
You can easily build graphic interfaces for all your
projects by simply dragging and dropping widgets.
Downloads, docs, tutorials: http://www.blynk.cc
Sketch generator: http://examples.blynk... | 34.97619 | 65 | 0.71341 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.