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
7ceaba19b2ae0fdea8ed8a631ad36be10ed6c44e
1,109
py
Python
cron2/removeExpiredPremium.py
B1N4R1/HackSkill
0910f274a462dc58d45cf6442886634d027f139b
[ "MIT" ]
null
null
null
cron2/removeExpiredPremium.py
B1N4R1/HackSkill
0910f274a462dc58d45cf6442886634d027f139b
[ "MIT" ]
null
null
null
cron2/removeExpiredPremium.py
B1N4R1/HackSkill
0910f274a462dc58d45cf6442886634d027f139b
[ "MIT" ]
null
null
null
import MySQLdb import sys import time start_time = time.time() db = MySQLdb.connect(host="127.0.0.1",user="root",passwd="",db="game") cur = db.cursor() cur.execute(" SELECT id, boughtDate, premiumUntil, totalPaid \ FROM users_premium \ WHERE TIMESTAMPDIFF(SECOND, NOW(), premiumUntil) < 0 \ ") imported = ...
22.632653
101
0.65284
3a087e62ac22911da5fdb8885a38a29be59f29a3
3,390
py
Python
xmrnodes/helpers.py
lalanza808/monero.fail
f55dc9e893944ba093bda055ea5b93cd96dcf051
[ "MIT" ]
17
2020-10-24T15:50:18.000Z
2022-03-17T07:56:07.000Z
xmrnodes/helpers.py
savg110/monero.fail
b88bd19578dd177503ae7e92ef22d83535dcaadb
[ "MIT" ]
7
2020-10-18T11:30:16.000Z
2022-03-19T04:47:51.000Z
xmrnodes/helpers.py
savg110/monero.fail
b88bd19578dd177503ae7e92ef22d83535dcaadb
[ "MIT" ]
8
2020-10-18T11:18:10.000Z
2022-03-31T15:08:29.000Z
import sys import socket import pickle from os import path from requests import get as r_get from levin.section import Section from levin.bucket import Bucket from levin.ctypes import * from levin.constants import LEVIN_SIGNATURE from xmrnodes import config def make_request(url: str, path="/get_info", data=None): ...
28.25
89
0.59587
3fbe0814e0cc979a4f22fd4d27c849268addcb19
838
py
Python
python/arrays/guess_game.py
hs634/algorithms
e411d747eb27a1c784605e44111de2703f6dde4d
[ "MIT" ]
null
null
null
python/arrays/guess_game.py
hs634/algorithms
e411d747eb27a1c784605e44111de2703f6dde4d
[ "MIT" ]
null
null
null
python/arrays/guess_game.py
hs634/algorithms
e411d747eb27a1c784605e44111de2703f6dde4d
[ "MIT" ]
null
null
null
__author__ = 'harsh' import random inclusive_range = (1, 1000) print("Guess my target number that is between %i and %i (inclusive).\n" % inclusive_range) target = random.randint(*inclusive_range) answer, i = None, 0 while answer != target: i += 1 try: txt = input("Your guess(%i): " % i) ...
26.1875
71
0.591885
105210cb91ff98016e26321ba885a0ed1211eb33
732
py
Python
nlcpy_test/247_Irecv_Waitany.py
SX-Aurora/mpi4py-ve
aa6b1f97933196f8a485d5d808e89d5a29b58b1c
[ "BSD-2-Clause" ]
null
null
null
nlcpy_test/247_Irecv_Waitany.py
SX-Aurora/mpi4py-ve
aa6b1f97933196f8a485d5d808e89d5a29b58b1c
[ "BSD-2-Clause" ]
null
null
null
nlcpy_test/247_Irecv_Waitany.py
SX-Aurora/mpi4py-ve
aa6b1f97933196f8a485d5d808e89d5a29b58b1c
[ "BSD-2-Clause" ]
null
null
null
from mpi4pyve import MPI import numpy as np import nlcpy as vp comm = MPI.COMM_WORLD size = comm.Get_size() rank = comm.Get_rank() if rank == 0: print("rank = ",rank) x = vp.array([1,2,3], dtype=int) print("x = ",x) print("type(x) = ",type(x)) comm.Send([x, MPI.INT], dest=1) elif rank == 1...
22.875
64
0.561475
cf7a1fd452f713ff0f0feac226ee5ec1e892cd26
875
py
Python
OpenGLWrapper_JE/venv/Lib/site-packages/OpenGL/_opaque.py
JE-Chen/je_old_repo
a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5
[ "MIT" ]
null
null
null
OpenGLWrapper_JE/venv/Lib/site-packages/OpenGL/_opaque.py
JE-Chen/je_old_repo
a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5
[ "MIT" ]
null
null
null
OpenGLWrapper_JE/venv/Lib/site-packages/OpenGL/_opaque.py
JE-Chen/je_old_repo
a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5
[ "MIT" ]
null
null
null
"""Data-type definitions for EGL/GLES""" import ctypes pointer = ctypes.pointer class _Opaque( ctypes.Structure ): """An Opaque Structure reference (base class)""" class _opaque_pointer( ctypes.POINTER( _Opaque ) ): _type_ = _Opaque @classmethod def from_param( cls, value ): return ct...
33.653846
71
0.637714
0a5ce34073548f67fcc1caf2cdf0514cf60748d5
5,347
py
Python
mpilogger/__init__.py
mbkumar/python-mpi-logger
0ec9890b0b5a1afe17c4f67dafed63d9637db023
[ "BSD-2-Clause" ]
null
null
null
mpilogger/__init__.py
mbkumar/python-mpi-logger
0ec9890b0b5a1afe17c4f67dafed63d9637db023
[ "BSD-2-Clause" ]
null
null
null
mpilogger/__init__.py
mbkumar/python-mpi-logger
0ec9890b0b5a1afe17c4f67dafed63d9637db023
[ "BSD-2-Clause" ]
null
null
null
import sys import time import logging import array import atexit import mpi4py from mpi4py import MPI # Maximum length of message in characters _message_maxlen = 2048 # Interval between checking for new logging messages. # Used instead of Waitsome to reduce CPU load. _sleep_interval = 0.01 # Because of clashes be...
29.541436
108
0.614363
88c3a5115a388ef59e047ed01803306213048fb1
512
py
Python
blog/urls.py
flannerykj/urbanapplause
c9b6c0f9a2f65b869fe1e6fa921972e7236e4fe5
[ "MIT" ]
null
null
null
blog/urls.py
flannerykj/urbanapplause
c9b6c0f9a2f65b869fe1e6fa921972e7236e4fe5
[ "MIT" ]
null
null
null
blog/urls.py
flannerykj/urbanapplause
c9b6c0f9a2f65b869fe1e6fa921972e7236e4fe5
[ "MIT" ]
null
null
null
from django.conf.urls import include, url from . import views from django.views.generic.base import TemplateView from unidecode import unidecode app_name = 'blog' urlpatterns = [ url(r'^$', views.IndexView.as_view(), name='index'), url(r'^post/(?P<slug>[^\.]+)/$', views.DetailView.as_view(), name='post-detail'...
42.666667
103
0.666016
2f1716febd3efe8157a74a82dff8728a840a1eca
32,517
py
Python
src/oci/database/models/vm_cluster_summary.py
xjuarez/oci-python-sdk
3c1604e4e212008fb6718e2f68cdb5ef71fd5793
[ "Apache-2.0", "BSD-3-Clause" ]
3
2020-09-10T22:09:45.000Z
2021-12-24T17:00:07.000Z
src/oci/database/models/vm_cluster_summary.py
xjuarez/oci-python-sdk
3c1604e4e212008fb6718e2f68cdb5ef71fd5793
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
src/oci/database/models/vm_cluster_summary.py
xjuarez/oci-python-sdk
3c1604e4e212008fb6718e2f68cdb5ef71fd5793
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
# coding: utf-8 # Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c...
34.666311
245
0.66965
a089540c79194b9dcc83a29076eb3387a911b327
11,500
py
Python
o3seespy/command/uniaxial_material/pytz.py
o3seespy/o3seespy
4fdd942370df1ac8d454e361f651405717b8584c
[ "MIT", "BSD-3-Clause" ]
16
2019-10-24T17:58:46.000Z
2022-03-01T19:48:06.000Z
o3seespy/command/uniaxial_material/pytz.py
o3seespy/o3seespy
4fdd942370df1ac8d454e361f651405717b8584c
[ "MIT", "BSD-3-Clause" ]
5
2020-04-17T01:39:27.000Z
2020-12-18T05:07:58.000Z
o3seespy/command/uniaxial_material/pytz.py
o3seespy/o3seespy
4fdd942370df1ac8d454e361f651405717b8584c
[ "MIT", "BSD-3-Clause" ]
6
2020-02-20T02:13:11.000Z
2021-11-01T19:08:41.000Z
from o3seespy.command.uniaxial_material.base_material import UniaxialMaterialBase class PySimple1(UniaxialMaterialBase): """ The PySimple1 UniaxialMaterial Class This command is used to construct a PySimple1 uniaxial material object. """ op_type = 'PySimple1' def __init__(self, osi, soi...
39.930556
140
0.607652
543f1fb0cc8ee77fc6838c3d2fcab5cd2b6f2d3f
158
py
Python
pykp/metric/__init__.py
VieZhong/seq2seq-keyphrase-pytorch
92a41469ddbe6d76a545c4e24f6c672b98e0b289
[ "Apache-2.0" ]
152
2019-10-07T03:15:53.000Z
2022-03-24T16:26:26.000Z
pykp/metric/__init__.py
VieZhong/seq2seq-keyphrase-pytorch
92a41469ddbe6d76a545c4e24f6c672b98e0b289
[ "Apache-2.0" ]
46
2019-11-04T09:51:51.000Z
2022-03-06T18:40:13.000Z
pykp/metric/__init__.py
VieZhong/seq2seq-keyphrase-pytorch
92a41469ddbe6d76a545c4e24f6c672b98e0b289
[ "Apache-2.0" ]
41
2018-03-29T13:41:12.000Z
2021-06-22T14:28:21.000Z
# -*- coding: utf-8 -*- """ Python File Template """ import os __author__ = "Rui Meng" __email__ = "rui.meng@pitt.edu" if __name__ == '__main__': pass
13.166667
31
0.620253
acd1fbf32e2713c6a1e36d0b3d940b9ca8919618
11,668
py
Python
torchdynamo/variables/lists.py
frank-wei/torchdynamo
26c4c1b593bebf4246e566749dade38254b59ffb
[ "BSD-3-Clause" ]
41
2021-09-14T14:58:06.000Z
2022-02-25T12:36:22.000Z
torchdynamo/variables/lists.py
frank-wei/torchdynamo
26c4c1b593bebf4246e566749dade38254b59ffb
[ "BSD-3-Clause" ]
62
2022-03-11T00:12:37.000Z
2022-03-31T20:04:27.000Z
torchdynamo/variables/lists.py
frank-wei/torchdynamo
26c4c1b593bebf4246e566749dade38254b59ffb
[ "BSD-3-Clause" ]
6
2021-11-19T17:50:56.000Z
2022-02-10T22:31:58.000Z
from typing import Dict from typing import List import torch from .. import variables from ..bytecode_transformation import create_instruction from ..exc import unimplemented from ..source import GetItemSource from ..utils import namedtuple_fields from .base import MutableLocal from .base import VariableTracker cla...
33.147727
81
0.580905
374f4269ce4ea2819f2c0716553a24bf9355229d
530
py
Python
projects/migrations/0015_review_project_id.py
kiptoo-rotich/Awards
7206861279df86328b49e81af0429380a14676de
[ "MIT" ]
null
null
null
projects/migrations/0015_review_project_id.py
kiptoo-rotich/Awards
7206861279df86328b49e81af0429380a14676de
[ "MIT" ]
null
null
null
projects/migrations/0015_review_project_id.py
kiptoo-rotich/Awards
7206861279df86328b49e81af0429380a14676de
[ "MIT" ]
null
null
null
# Generated by Django 3.2.5 on 2021-07-19 16:06 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('projects', '0014_remove_review_project_id'), ] operations = [ migrations.AddField( model_name='...
25.238095
116
0.645283
90a6ee5541cdf2baf41de31f5e91b873be0c5a34
39,294
py
Python
test/aqua/operators/test_op_construction.py
TDHTTTT/qiskit-aqua
3486ea6da7a2c799c86a6590d2813088d76c99e0
[ "Apache-2.0" ]
1
2020-10-02T15:35:03.000Z
2020-10-02T15:35:03.000Z
test/aqua/operators/test_op_construction.py
vikpande/qiskit-aqua
b45f952e342398156e9ed61a2126a85b4d55effd
[ "Apache-2.0" ]
null
null
null
test/aqua/operators/test_op_construction.py
vikpande/qiskit-aqua
b45f952e342398156e9ed61a2126a85b4d55effd
[ "Apache-2.0" ]
null
null
null
# This code is part of Qiskit. # # (C) Copyright IBM 2018, 2020. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivat...
40.803738
100
0.606505
5fb4dd50fc3fd4c152d26007b54559f48bae1c49
664
py
Python
tests/test.py
xmonader/pyvalidators
e4940a73fc1e9466437801df04833bdde2eb9972
[ "Apache-2.0" ]
null
null
null
tests/test.py
xmonader/pyvalidators
e4940a73fc1e9466437801df04833bdde2eb9972
[ "Apache-2.0" ]
null
null
null
tests/test.py
xmonader/pyvalidators
e4940a73fc1e9466437801df04833bdde2eb9972
[ "Apache-2.0" ]
null
null
null
from validators.extensions.string import * from validators.extensions.numeric import * class Point: def __init__(self, x, y, name): self._x = x self._y = y self._name = name @Upper def name(self): return self._name @name.setter def name(self, val): sel...
15.809524
43
0.545181
2f477c6496f89f67b4136845736ec47b0b1d3bc2
1,160
py
Python
plugins/zendesk/icon_zendesk/actions/delete_membership/schema.py
jakub-kaluza/insightconnect-plugins
f36292a65439dfc61cf99f0a1e65ce9ec0703877
[ "MIT" ]
null
null
null
plugins/zendesk/icon_zendesk/actions/delete_membership/schema.py
jakub-kaluza/insightconnect-plugins
f36292a65439dfc61cf99f0a1e65ce9ec0703877
[ "MIT" ]
null
null
null
plugins/zendesk/icon_zendesk/actions/delete_membership/schema.py
jakub-kaluza/insightconnect-plugins
f36292a65439dfc61cf99f0a1e65ce9ec0703877
[ "MIT" ]
null
null
null
# GENERATED BY KOMAND SDK - DO NOT EDIT import insightconnect_plugin_runtime import json class Component: DESCRIPTION = "Delete organization membership" class Input: MEMBERSHIP_ID = "membership_id" class Output: STATUS = "status" class DeleteMembershipInput(insightconnect_plugin_runtime.Inpu...
18.709677
69
0.609483
2cb1f1d4f8eca8271a6f7761ba7d7401042ab08d
4,330
py
Python
mooclet_engine/engine/migrations/0001_initial.py
marshallho/mooclet-engine
176c23299df89b624d008dc903646555c0c0cc4e
[ "MIT" ]
5
2018-11-13T22:01:51.000Z
2021-05-29T02:37:20.000Z
mooclet_engine/engine/migrations/0001_initial.py
marshallho/mooclet-engine
176c23299df89b624d008dc903646555c0c0cc4e
[ "MIT" ]
3
2020-02-11T22:44:25.000Z
2021-06-10T17:49:12.000Z
mooclet_engine/engine/migrations/0001_initial.py
marshallho/mooclet-engine
176c23299df89b624d008dc903646555c0c0cc4e
[ "MIT" ]
7
2017-01-19T15:58:25.000Z
2018-11-10T06:47:44.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2017-05-02 17:49 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.Create...
45.104167
158
0.581524
f151d313b7147a367622827db4a6a31b70611001
699
py
Python
social_app/middleware/restrict_users_middleware.py
sh3b/social_app
64aadd05570373ea75834b53b0b4abd2b16c8451
[ "MIT" ]
null
null
null
social_app/middleware/restrict_users_middleware.py
sh3b/social_app
64aadd05570373ea75834b53b0b4abd2b16c8451
[ "MIT" ]
4
2021-06-04T23:11:02.000Z
2022-02-10T11:23:57.000Z
social_app/middleware/restrict_users_middleware.py
shuayb/social_app
64aadd05570373ea75834b53b0b4abd2b16c8451
[ "MIT" ]
null
null
null
from django.shortcuts import redirect class RestrictAdminToAdminArea: def __init__(self, get_response): self.get_response = get_response def __call__(self, request): # Code to be executed for each request before # the view (and later middleware) are called. is_authenticated =...
27.96
61
0.662375
f75561a740ca41a1fc5f1f92084b941d610610c1
2,143
py
Python
pennylane/drawer/utils.py
therooler/pennylane
88a8a5960a2ffd218a12f85ace632021eef2abf5
[ "Apache-2.0" ]
539
2018-11-13T08:45:42.000Z
2020-07-27T18:17:16.000Z
pennylane/drawer/utils.py
therooler/pennylane
88a8a5960a2ffd218a12f85ace632021eef2abf5
[ "Apache-2.0" ]
588
2018-11-14T10:21:47.000Z
2020-07-28T06:27:14.000Z
pennylane/drawer/utils.py
therooler/pennylane
88a8a5960a2ffd218a12f85ace632021eef2abf5
[ "Apache-2.0" ]
165
2018-11-13T18:58:56.000Z
2020-07-27T17:18:17.000Z
# Copyright 2018-2021 Xanadu Quantum Technologies Inc. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or...
35.716667
90
0.719085
4295e3bb3675f8ba1c61332882a50bc28d24ceba
1,868
py
Python
homeassistant/components/lutron_caseta/binary_sensor.py
domwillcode/home-assistant
f170c80bea70c939c098b5c88320a1c789858958
[ "Apache-2.0" ]
6
2020-07-18T16:33:25.000Z
2021-09-26T09:52:04.000Z
homeassistant/components/lutron_caseta/binary_sensor.py
domwillcode/home-assistant
f170c80bea70c939c098b5c88320a1c789858958
[ "Apache-2.0" ]
47
2020-07-23T07:14:33.000Z
2022-03-31T06:01:46.000Z
homeassistant/components/lutron_caseta/binary_sensor.py
klauern/home-assistant-core
c18ba6aec0627e6afb6442c678edb5ff2bb17db6
[ "Apache-2.0" ]
5
2020-03-29T00:29:13.000Z
2021-09-06T20:58:40.000Z
"""Support for Lutron Caseta Occupancy/Vacancy Sensors.""" from pylutron_caseta import OCCUPANCY_GROUP_OCCUPIED from homeassistant.components.binary_sensor import ( DEVICE_CLASS_OCCUPANCY, BinarySensorEntity, ) from . import DOMAIN as CASETA_DOMAIN, LutronCasetaDevice async def async_setup_entry(hass, confi...
29.650794
68
0.709315
269a9a41aabb54e076d9738fa4616234e1afb19c
75
py
Python
sssdevops/listtools.py
jvaldiviezom/sssdevops
b8843a8a9161e9d76069e3c6d188874b63948559
[ "BSD-3-Clause" ]
null
null
null
sssdevops/listtools.py
jvaldiviezom/sssdevops
b8843a8a9161e9d76069e3c6d188874b63948559
[ "BSD-3-Clause" ]
1
2018-07-09T19:22:15.000Z
2018-07-09T19:23:59.000Z
sssdevops/listtools.py
jvaldiviezom/sssdevops
b8843a8a9161e9d76069e3c6d188874b63948559
[ "BSD-3-Clause" ]
1
2018-07-09T19:36:13.000Z
2018-07-09T19:36:13.000Z
""" Miscellaneous list manipulation """ def split(num_lst, index): pass
9.375
31
0.706667
6c9943e96679919a26a5059259ea3ddf53a684df
10,864
py
Python
tests/unit/frontend/tvm/test_relay.py
anilmartha/pyxir
0972aed63748afd82ef414b67a6cceaedd738b38
[ "Apache-2.0" ]
25
2020-06-17T22:41:13.000Z
2022-03-22T16:28:22.000Z
tests/unit/frontend/tvm/test_relay.py
anilmartha/pyxir
0972aed63748afd82ef414b67a6cceaedd738b38
[ "Apache-2.0" ]
25
2021-03-16T06:26:44.000Z
2022-03-18T11:28:33.000Z
tests/unit/frontend/tvm/test_relay.py
anilmartha/pyxir
0972aed63748afd82ef414b67a6cceaedd738b38
[ "Apache-2.0" ]
19
2020-07-30T10:03:02.000Z
2021-06-29T01:18:16.000Z
# Copyright 2020 Xilinx Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
35.736842
85
0.594348
7af6b5480bc1b71e5979ff265a38e2cde8a8cf1d
2,631
py
Python
tests/restart/walls.py
Uornca/mirheo
162c722ffa27c02e1f5b0d1866816e44c2393f0f
[ "MIT" ]
22
2019-07-17T13:06:41.000Z
2021-12-15T14:45:24.000Z
tests/restart/walls.py
Uornca/mirheo
162c722ffa27c02e1f5b0d1866816e44c2393f0f
[ "MIT" ]
63
2019-06-26T13:30:47.000Z
2021-02-23T10:13:10.000Z
tests/restart/walls.py
dimaleks/uDeviceX
2ad5e9dd9f118e3998b291cbfc35ee91205bbef8
[ "MIT" ]
9
2019-10-11T07:32:19.000Z
2021-05-17T11:25:35.000Z
#!/usr/bin/env python import argparse import mirheo as mir parser = argparse.ArgumentParser() parser.add_argument("--restart", action='store_true', default=False) parser.add_argument("--ranks", type=int, nargs=3, default=(1,1,1)) args = parser.parse_args() dt = 0.001 domain = (8, 16, 8) force = (1.0, 0, 0) density...
31.698795
140
0.687571
a6c542ab4db206e7a4c52c0cb6ba4fb428cc883a
1,151
py
Python
app/core/tests/test_models.py
Rokiaa/recipe-app-API
991fc93824cd3e4137fda255c39afbe1f120b1aa
[ "MIT" ]
null
null
null
app/core/tests/test_models.py
Rokiaa/recipe-app-API
991fc93824cd3e4137fda255c39afbe1f120b1aa
[ "MIT" ]
null
null
null
app/core/tests/test_models.py
Rokiaa/recipe-app-API
991fc93824cd3e4137fda255c39afbe1f120b1aa
[ "MIT" ]
null
null
null
from django.test import TestCase from django.contrib.auth import get_user_model class ModelTests(TestCase): def test_create_user_with_email_successful(self): """Test creating a new user with an email is successful""" email = 'test@londonappdev.com' password = 'Testpass123' user = get_user_model().objects.cre...
29.512821
63
0.743701
79172c37be5acbd28e438c9ad9a3a402b7f462b7
145,314
py
Python
research/object_detection/meta_architectures/center_net_meta_arch.py
TUDelftHao/models
faf0c2dc442ceaa8425aff73abd00f92f3137b7b
[ "Apache-2.0" ]
1
2020-09-25T14:30:08.000Z
2020-09-25T14:30:08.000Z
research/object_detection/meta_architectures/center_net_meta_arch.py
TUDelftHao/models
faf0c2dc442ceaa8425aff73abd00f92f3137b7b
[ "Apache-2.0" ]
null
null
null
research/object_detection/meta_architectures/center_net_meta_arch.py
TUDelftHao/models
faf0c2dc442ceaa8425aff73abd00f92f3137b7b
[ "Apache-2.0" ]
null
null
null
# 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...
45.883802
97
0.716559
67e13de7fefe80eb811d631330e4002f3f518687
1,775
py
Python
share/qt/extract_strings_qt.py
sk21new/sk21
1a98560d355653887c5ce0bcb0f3b7cbab837fe9
[ "MIT" ]
1
2017-12-08T21:45:38.000Z
2017-12-08T21:45:38.000Z
share/qt/extract_strings_qt.py
sk21new/sk21
1a98560d355653887c5ce0bcb0f3b7cbab837fe9
[ "MIT" ]
null
null
null
share/qt/extract_strings_qt.py
sk21new/sk21
1a98560d355653887c5ce0bcb0f3b7cbab837fe9
[ "MIT" ]
null
null
null
#!/usr/bin/python ''' Extract _("...") strings for translation and convert to Qt4 stringdefs so that they can be picked up by Qt linguist. ''' from subprocess import Popen, PIPE import glob OUT_CPP="src/qt/sk21strings.cpp" EMPTY=['""'] def parse_po(text): """ Parse 'po' format produced by xgettext. Return...
25
80
0.577465
bd2176b466118820f4db66a420409c099c50570b
5,735
py
Python
src/bin/shipyard_airflow/shipyard_airflow/plugins/ucp_base_operator.py
att-comdev/shipyard
14d66afb012025a5289818d8e8d2092ccce19ffa
[ "Apache-2.0" ]
14
2017-07-05T14:12:51.000Z
2021-05-20T23:31:55.000Z
src/bin/shipyard_airflow/shipyard_airflow/plugins/ucp_base_operator.py
att-comdev/shipyard
14d66afb012025a5289818d8e8d2092ccce19ffa
[ "Apache-2.0" ]
14
2017-06-09T04:33:44.000Z
2018-05-07T13:07:40.000Z
src/bin/shipyard_airflow/shipyard_airflow/plugins/ucp_base_operator.py
att-comdev/shipyard
14d66afb012025a5289818d8e8d2092ccce19ffa
[ "Apache-2.0" ]
16
2017-05-18T15:22:22.000Z
2019-06-14T16:43:44.000Z
# Copyright 2018 AT&T Intellectual Property. All other 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...
35.84375
79
0.626678
37ffde90b437c0c57bc7b43d701f24860d1ac8cb
4,298
py
Python
learning/rnn_mlp_training.py
flclain/master
a40a2a5bf4e1017da3a5cf3456eb0b28de6f86e8
[ "MIT" ]
null
null
null
learning/rnn_mlp_training.py
flclain/master
a40a2a5bf4e1017da3a5cf3456eb0b28de6f86e8
[ "MIT" ]
null
null
null
learning/rnn_mlp_training.py
flclain/master
a40a2a5bf4e1017da3a5cf3456eb0b28de6f86e8
[ "MIT" ]
1
2020-12-15T07:34:39.000Z
2020-12-15T07:34:39.000Z
import torch import torch.nn as nn # import torch.nn.functional as f import torch.optim as optim # import torchvision # import torchvision.transforms as transforms # import matplotlib.pyplot as plt from torch.utils.data.dataset import Dataset from torch.utils.data import DataLoader from sklearn.model_selection import ...
33.317829
178
0.715449
caf410dc4f803c362bb81514b33d542391fd4081
2,764
py
Python
reinforcement_learning/sequential_agent.py
TeamSerpentine/flatlands-2020
003ea89e13b148b3757bec1808d9d2cf66e29ed5
[ "BSD-3-Clause" ]
null
null
null
reinforcement_learning/sequential_agent.py
TeamSerpentine/flatlands-2020
003ea89e13b148b3757bec1808d9d2cf66e29ed5
[ "BSD-3-Clause" ]
null
null
null
reinforcement_learning/sequential_agent.py
TeamSerpentine/flatlands-2020
003ea89e13b148b3757bec1808d9d2cf66e29ed5
[ "BSD-3-Clause" ]
null
null
null
import sys from pathlib import Path import numpy as np from flatland.envs.observations import TreeObsForRailEnv from flatland.envs.predictions import ShortestPathPredictorForRailEnv from flatland.envs.rail_env import RailEnv from flatland.envs.rail_generators import complex_rail_generator from flatland.envs.schedule_g...
32.139535
139
0.713097
9b792e8a6a9822fb55a12c36c49ca0c2f9b81a71
5,835
py
Python
hummingbot/connector/derivative/binance_perpetual/binance_perpetual_user_stream_data_source.py
csdenboer/hummingbot
8a799675a325ebdbb74d76b2a44472cdbf74d691
[ "Apache-2.0" ]
4
2021-09-15T02:56:57.000Z
2022-03-01T19:59:19.000Z
hummingbot/connector/derivative/binance_perpetual/binance_perpetual_user_stream_data_source.py
csdenboer/hummingbot
8a799675a325ebdbb74d76b2a44472cdbf74d691
[ "Apache-2.0" ]
8
2020-10-01T05:17:54.000Z
2020-11-09T13:38:19.000Z
hummingbot/connector/derivative/binance_perpetual/binance_perpetual_user_stream_data_source.py
csdenboer/hummingbot
8a799675a325ebdbb74d76b2a44472cdbf74d691
[ "Apache-2.0" ]
3
2021-01-25T00:23:20.000Z
2022-03-21T18:57:33.000Z
import asyncio import logging from typing import Optional, Dict, AsyncIterable import aiohttp import ujson import websockets from websockets import ConnectionClosed from hummingbot.core.data_type.user_stream_tracker_data_source import UserStreamTrackerDataSource from hummingbot.core.utils.async_utils import safe_ensu...
45.944882
118
0.590917
fbaf02fb23637f10f0fccdbead266af6a6fdc1a7
39
py
Python
pybind_torch/example.py
nachovizzo/pybind_pytorch
8b99fa084b19bea6572122211761f241c0e43728
[ "MIT" ]
2
2021-07-06T17:09:18.000Z
2021-07-22T03:54:33.000Z
pybind_torch/example.py
nachovizzo/pybind_pytorch
8b99fa084b19bea6572122211761f241c0e43728
[ "MIT" ]
null
null
null
pybind_torch/example.py
nachovizzo/pybind_pytorch
8b99fa084b19bea6572122211761f241c0e43728
[ "MIT" ]
null
null
null
from pybind_torch import greet greet()
13
30
0.820513
d98c8cd8658d84b45a1e59ee41fa12b27889c85d
1,334
py
Python
src/ggrc_workflows/migrations/versions/20140806232046_520b31514bd2_add_relative_dates.py
Smotko/ggrc-core
b3abb58b24e7559960d71a94ba79c75539e7fe29
[ "Apache-2.0" ]
null
null
null
src/ggrc_workflows/migrations/versions/20140806232046_520b31514bd2_add_relative_dates.py
Smotko/ggrc-core
b3abb58b24e7559960d71a94ba79c75539e7fe29
[ "Apache-2.0" ]
12
2015-01-08T14:50:19.000Z
2017-11-29T19:37:53.000Z
src/ggrc_workflows/migrations/versions/20140806232046_520b31514bd2_add_relative_dates.py
mikecb/ggrc-core
1cda560cb0920021416e07740c6cca1acba56268
[ "ECL-2.0", "Apache-2.0" ]
1
2015-01-08T13:25:09.000Z
2015-01-08T13:25:09.000Z
# Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file> # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> # Created By: anze@reciprocitylabs.com # Maintained By: anze@reciprocitylabs.com """Add relative dates Revision ID: 520b31514bd2 Revises: 32221e9f330c Create D...
36.054054
101
0.755622
1f8b033a87f45127f41d3cf13eeb12197205500d
630
py
Python
web_manage/manage.py
chicken-noodle/mysite
6973edd1357a2490f7f47e5ce427af5b144fb50a
[ "bzip2-1.0.6" ]
1
2019-09-02T02:14:51.000Z
2019-09-02T02:14:51.000Z
web_manage/manage.py
chicken-noodle/mysite
6973edd1357a2490f7f47e5ce427af5b144fb50a
[ "bzip2-1.0.6" ]
null
null
null
web_manage/manage.py
chicken-noodle/mysite
6973edd1357a2490f7f47e5ce427af5b144fb50a
[ "bzip2-1.0.6" ]
1
2019-09-02T03:33:06.000Z
2019-09-02T03:33:06.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', 'web_manage.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: raise Imp...
28.636364
74
0.684127
fbb5e5cca05c0f0db531fdacd35a3080f810441e
13
py
Python
constants.py
AntonMelentiev/aqa_sandbox
1ca71c71aa3be572b36eb8b9f95a57afb2ada87f
[ "Apache-2.0" ]
3
2021-09-02T13:52:01.000Z
2022-01-12T13:07:00.000Z
constants.py
AntonMelentiev/aqa_sandbox
1ca71c71aa3be572b36eb8b9f95a57afb2ada87f
[ "Apache-2.0" ]
null
null
null
constants.py
AntonMelentiev/aqa_sandbox
1ca71c71aa3be572b36eb8b9f95a57afb2ada87f
[ "Apache-2.0" ]
null
null
null
TIMEOUT = 10
6.5
12
0.692308
775f09a5879b55ec31c0cc774613efc4f38632f6
73
py
Python
celery_once/backends/__init__.py
alkymi-io/celery-once
adcb91d393569703b560c863305746b2e0e12d28
[ "BSD-2-Clause" ]
388
2017-06-02T00:10:24.000Z
2022-03-31T12:49:09.000Z
celery_once/backends/__init__.py
alkymi-io/celery-once
adcb91d393569703b560c863305746b2e0e12d28
[ "BSD-2-Clause" ]
82
2017-06-05T11:16:15.000Z
2021-11-25T12:59:03.000Z
celery_once/backends/__init__.py
alkymi-io/celery-once
adcb91d393569703b560c863305746b2e0e12d28
[ "BSD-2-Clause" ]
63
2017-05-12T17:39:09.000Z
2021-11-23T19:37:53.000Z
# -*- coding: utf-8 -*- from .file import File from .redis import Redis
14.6
24
0.657534
a89f2c2bb9be0f6c15c85e5ecc0c5974752d4cd6
4,878
py
Python
envoy/examples/puma-proxy/internal_lib/backend/loader.py
kevinjesse/puma
163a363275bf5d84d1957aaf23783be84053e40f
[ "MIT" ]
null
null
null
envoy/examples/puma-proxy/internal_lib/backend/loader.py
kevinjesse/puma
163a363275bf5d84d1957aaf23783be84053e40f
[ "MIT" ]
null
null
null
envoy/examples/puma-proxy/internal_lib/backend/loader.py
kevinjesse/puma
163a363275bf5d84d1957aaf23783be84053e40f
[ "MIT" ]
null
null
null
# # @author Kevin Jesse # @email kevin.r.jesse@gmail.com # """ Loader loads the configuration settings for parts of speech and loads the questions for Qlib """ import nltk from collections import defaultdict import json import os.path as path #old default weights nounw=.8, adjw=1, numw=.8, verbbw=.6, v...
29.92638
102
0.541
b6329102dc5d80ed9ba2001d701e9e1f67adb3f0
1,049
py
Python
Hill Climbing/HCRastrigin.py
aislan-leite/Metaheuristic
e3553a78a2df76188c764801968a702929758406
[ "MIT" ]
null
null
null
Hill Climbing/HCRastrigin.py
aislan-leite/Metaheuristic
e3553a78a2df76188c764801968a702929758406
[ "MIT" ]
1
2017-07-16T20:24:48.000Z
2017-07-16T20:24:48.000Z
Hill Climbing/HCRastrigin.py
aislan-leite/Metaheuristic
e3553a78a2df76188c764801968a702929758406
[ "MIT" ]
null
null
null
import math import random #Benchmarck Rastrigin def fo(x,y): z = 20 + (x * x - 10 * (math.cos(2 * math.pi * x))) + (y * y - 10 * (math.cos(2 * math.pi * y))) return z #inicialização das variaveis de decisão s0 = random.uniform(-5.12,5.12) s1 = random.uniform(-5.12,5.12) sx = s0 #variavel atual de s0 sy = s1 #...
29.138889
100
0.519542
f793dd5ddab841029b32ef726bb057c266ba5baa
406
py
Python
app/blueprints/events.py
vabs/quizzy
1ffe60c0f018c253e977c920b537a42cc7825e0e
[ "Apache-2.0" ]
null
null
null
app/blueprints/events.py
vabs/quizzy
1ffe60c0f018c253e977c920b537a42cc7825e0e
[ "Apache-2.0" ]
1
2021-02-08T20:22:55.000Z
2021-02-08T20:22:55.000Z
app/blueprints/events.py
vabs/quizzy
1ffe60c0f018c253e977c920b537a42cc7825e0e
[ "Apache-2.0" ]
null
null
null
from flask import session from flask_socketio import emit, join_room, leave_room from .. import socketio, connected_players @socketio.on('joined', namespace='/play') def joined(): join_room('quizzy') emit('status', {'msg': session.get('name') + ' has joined the game.'}, room='quizzy') @socketio.on('/status'...
29
89
0.699507
eb893890ad5ca8b5af2efcfb2b2fa78dd5440406
1,576
py
Python
IDC/network.py
Khanhnn00/blind_sr_denoise
3153f90d20fd884ab69b47c30c685e0175276055
[ "Apache-2.0" ]
null
null
null
IDC/network.py
Khanhnn00/blind_sr_denoise
3153f90d20fd884ab69b47c30c685e0175276055
[ "Apache-2.0" ]
null
null
null
IDC/network.py
Khanhnn00/blind_sr_denoise
3153f90d20fd884ab69b47c30c685e0175276055
[ "Apache-2.0" ]
null
null
null
import torch import torch.nn as nn from util import swap_axis class Generator(nn.Module): def __init__(self, conf): super(Generator, self).__init__() struct = conf.G_structure # First layer - Converting RGB image to latent space self.first_layer = nn.Conv2d(in_channels=1, out_channe...
52.533333
132
0.685914
62ed500dfd499cd55a6e4bb728f7f0a8f4a88798
2,184
py
Python
comicolorization/models/ltbc/low_level.py
DwangoMediaVillage/Comicolorization
98f323e78baceae0b1086f01ac51b5e8a7515abb
[ "MIT" ]
122
2017-08-21T10:01:07.000Z
2022-03-21T13:52:19.000Z
comicolorization/models/ltbc/low_level.py
DwangoMediaVillage/Comicolorization
98f323e78baceae0b1086f01ac51b5e8a7515abb
[ "MIT" ]
7
2017-10-20T15:12:13.000Z
2022-01-30T23:04:37.000Z
comicolorization/models/ltbc/low_level.py
DwangoMediaVillage/Comicolorization
98f323e78baceae0b1086f01ac51b5e8a7515abb
[ "MIT" ]
26
2017-08-22T08:11:20.000Z
2022-03-09T14:59:18.000Z
import chainer class LowLevelNetwork(chainer.Chain): def __init__(self): super(LowLevelNetwork, self).__init__( conv1_1=chainer.links.Convolution2D( in_channels=None, out_channels=64, ksize=3, stride=2, pad=1), ...
35.803279
74
0.521978
402b333f5405da00b984f2ec73e6a52965d3fd8e
21,385
py
Python
tegridy-tools/minGPT/minGPT.py
aikovsky/tegridy-tools
4a87e1a27e2ad9ee6e16049bde7835836caa4fdd
[ "Apache-2.0" ]
18
2020-12-27T09:29:34.000Z
2022-03-28T12:15:57.000Z
tegridy-tools/minGPT/minGPT.py
aikovsky/tegridy-tools
4a87e1a27e2ad9ee6e16049bde7835836caa4fdd
[ "Apache-2.0" ]
null
null
null
tegridy-tools/minGPT/minGPT.py
aikovsky/tegridy-tools
4a87e1a27e2ad9ee6e16049bde7835836caa4fdd
[ "Apache-2.0" ]
7
2021-02-16T14:11:03.000Z
2022-01-24T09:04:01.000Z
# -*- coding: utf-8 -*- # This is a stand-alone version of minGPT by Andrej Karpathy as a single Python module # Based on minGPT sorce code as it appears on Aug 25, 2020 # https://github.com/karpathy/minGPT ####################################################### # Critical requirements # !pip install numpy # !pip i...
40.27307
140
0.599065
ebff2eaf768395dcee0f3048be569ef2108251f8
1,449
py
Python
scripts/sources/s_min_rel_ent_point_view.py
dpopadic/arpmRes
ddcc4de713b46e3e9dcb77cc08c502ce4df54f76
[ "MIT" ]
6
2021-04-10T13:24:30.000Z
2022-03-26T08:20:42.000Z
scripts/sources/s_min_rel_ent_point_view.py
dpopadic/arpmRes
ddcc4de713b46e3e9dcb77cc08c502ce4df54f76
[ "MIT" ]
null
null
null
scripts/sources/s_min_rel_ent_point_view.py
dpopadic/arpmRes
ddcc4de713b46e3e9dcb77cc08c502ce4df54f76
[ "MIT" ]
6
2019-08-13T22:02:17.000Z
2022-02-09T17:49:12.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # --- # jupyter: # jupytext: # text_representation: # extension: .py # format_name: light # format_version: '1.4' # jupytext_version: 1.1.4 # kernelspec: # display_name: Python 3 # language: python # name: python3 # --- # # s_mi...
34.5
219
0.640442
123ba3a5bd385551f74597fccda733f67347c2b2
1,241
py
Python
project/get_db.py
c24-microws-mar/catalog-service
cc5489129e23181a68a29b39c38fc50a542e8095
[ "MIT" ]
null
null
null
project/get_db.py
c24-microws-mar/catalog-service
cc5489129e23181a68a29b39c38fc50a542e8095
[ "MIT" ]
null
null
null
project/get_db.py
c24-microws-mar/catalog-service
cc5489129e23181a68a29b39c38fc50a542e8095
[ "MIT" ]
null
null
null
url = "http://musicbrainz.org/ws/2/release?query={}&limit=50&fmt=json" cover_url_temp = 'http://coverartarchive.org/release/{}' import requests import json import string import random albums = [] for word in ['offspring', 'britney', 'baby', 'metal', 'house', 'dance','hot']:#string.ascii_lowercase[0:3]: print word ou...
28.860465
107
0.639001
27cc0fba65cadf85bf95f6d9e03cfca21768229f
2,590
py
Python
tests/test_monitor.py
insidus341/DeskLEDs
e0bb3f0258dc47198b88373ada83f545aa5ebf14
[ "MIT" ]
null
null
null
tests/test_monitor.py
insidus341/DeskLEDs
e0bb3f0258dc47198b88373ada83f545aa5ebf14
[ "MIT" ]
3
2021-06-08T22:01:10.000Z
2022-03-12T00:40:10.000Z
tests/test_monitor.py
insidus341/DeskLEDs
e0bb3f0258dc47198b88373ada83f545aa5ebf14
[ "MIT" ]
1
2020-07-19T13:33:14.000Z
2020-07-19T13:33:14.000Z
from run.monitor import Monitor MONITOR_ID = 1 def test_monitor_get_monitor_id(): monitor = Monitor(MONITOR_ID) assert monitor.get_monitor_id() == MONITOR_ID def test_monitor_get_monitor_middle(): monitor = Monitor(MONITOR_ID) assert isinstance(monitor.get_monitor_bounding_box(), tuple) def test_mon...
36.478873
78
0.8
2714ab1dc920f4d69780fef5e1c153299b3abb2d
3,832
py
Python
stages/third/process_results_repack.py
ClaudioGuevara/rosetta
beb6a390433e7a98adb125b26a035ecd44e7b15a
[ "AFL-1.1" ]
null
null
null
stages/third/process_results_repack.py
ClaudioGuevara/rosetta
beb6a390433e7a98adb125b26a035ecd44e7b15a
[ "AFL-1.1" ]
null
null
null
stages/third/process_results_repack.py
ClaudioGuevara/rosetta
beb6a390433e7a98adb125b26a035ecd44e7b15a
[ "AFL-1.1" ]
null
null
null
import os import re from utils.create_file import create_file def process_results_repack(complex_folder, antibody, antigen, rosetta_path): structure_selected="" file_results=open(os.path.join(complex_folder, "repack.fasc"), "r").read().splitlines()[2:] score=0 rep_force=20 for line in file_results...
127.733333
1,825
0.725992
727cbca9729a478b178a5d810021879554351863
516
py
Python
blender/arm/logicnode/native/LN_write_storage.py
onelsonic/armory
55cfead0844923d419d75bf4bd677ebed714b4b5
[ "Zlib" ]
2,583
2016-07-27T08:25:47.000Z
2022-03-31T10:42:17.000Z
blender/arm/logicnode/native/LN_write_storage.py
N8n5h/armory
5b4d24f067a2354bafd3ab417bb8e30ee0c5aff8
[ "Zlib" ]
2,122
2016-07-31T14:20:04.000Z
2022-03-31T20:44:14.000Z
blender/arm/logicnode/native/LN_write_storage.py
N8n5h/armory
5b4d24f067a2354bafd3ab417bb8e30ee0c5aff8
[ "Zlib" ]
451
2016-08-12T05:52:58.000Z
2022-03-31T01:33:07.000Z
from arm.logicnode.arm_nodes import * class WriteStorageNode(ArmLogicTreeNode): """Writes the given content in the given key. @seeNode Read Storage""" bl_idname = 'LNWriteStorageNode' bl_label = 'Write Storage' arm_section = 'file' arm_version = 1 def arm_init(self, context): self...
28.666667
53
0.680233
5e82b0e549d258f31943ed40500785dd7a49dd3f
2,674
py
Python
setup.py
showmen15/testEEE
44619da6d0972903fc93691e30688b3c0fd4e6e7
[ "MIT" ]
null
null
null
setup.py
showmen15/testEEE
44619da6d0972903fc93691e30688b3c0fd4e6e7
[ "MIT" ]
null
null
null
setup.py
showmen15/testEEE
44619da6d0972903fc93691e30688b3c0fd4e6e7
[ "MIT" ]
null
null
null
# coding=utf-8 # !/usr/bin/env python import sys try: from setuptools import setup except ImportError: sys.stderr.write('using distutils\n') from distutils.core import setup with open('requirements.txt') as f: required = f.read().splitlines() setup( name='amber-python-drivers', packages=[ ...
31.833333
81
0.624907
735c0f9b94a074e017423b24fdca158adb2505e9
2,719
py
Python
src/joemetry/utils.py
RESPULTE/Joemetry
7922fff9d28cfdbc60373dfba1e86e5206ffe7a4
[ "MIT" ]
null
null
null
src/joemetry/utils.py
RESPULTE/Joemetry
7922fff9d28cfdbc60373dfba1e86e5206ffe7a4
[ "MIT" ]
null
null
null
src/joemetry/utils.py
RESPULTE/Joemetry
7922fff9d28cfdbc60373dfba1e86e5206ffe7a4
[ "MIT" ]
null
null
null
from math import sqrt, acos, sin, cos, radians from joemetry._type_hints import * from joemetry import Point, Segment, Polygon # broke def get_circumcircle_of_triangle(triangle: List[Point], radius: bool = True) -> Union[Tuple[Point, float], Point]: point_a, point_b, point_c = triangle angle_a = sin(2 * point...
39.985294
121
0.677823
f5629fbd70ea52108e2042a7665256167b0decd5
3,531
py
Python
oneflow/python/test/ops/test_inplace.py
xxg1413/oneflow
f2e3c85a25b8aecfb6c0c0af1737833b1a77e135
[ "Apache-2.0" ]
1
2020-10-13T03:03:40.000Z
2020-10-13T03:03:40.000Z
oneflow/python/test/ops/test_inplace.py
xxg1413/oneflow
f2e3c85a25b8aecfb6c0c0af1737833b1a77e135
[ "Apache-2.0" ]
null
null
null
oneflow/python/test/ops/test_inplace.py
xxg1413/oneflow
f2e3c85a25b8aecfb6c0c0af1737833b1a77e135
[ "Apache-2.0" ]
null
null
null
""" Copyright 2020 The OneFlow 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 law or agr...
30.973684
86
0.695837
aca1c0057270ef3c7589edc276ff4d60d077080d
5,319
py
Python
doclink/clients/requests_.py
Luoyufu/doclink
41e57f7e9891f47579cf9131000d87bb8cc09d05
[ "MIT" ]
4
2018-01-23T04:49:52.000Z
2018-09-09T01:56:13.000Z
doclink/clients/requests_.py
Luoyufu/doclink
41e57f7e9891f47579cf9131000d87bb8cc09d05
[ "MIT" ]
2
2019-10-18T15:48:06.000Z
2019-10-18T15:49:47.000Z
doclink/clients/requests_.py
Luoyufu/doclink
41e57f7e9891f47579cf9131000d87bb8cc09d05
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import atexit import os import requests from requests_toolbelt import MultipartEncoder from six import string_types class RequestsClient(object): optional_args = ( 'params', 'data', 'headers', 'cookies', 'files', 'auth', 'timeout', 'allow_redirects', 'proxies', '...
34.096154
93
0.567964
384b97d644ed3a7235c2356d38f0bfdcdb6b972c
1,994
py
Python
Python/add-and-search-word-data-structure-design.py
bssrdf/LeetCode-5
746df5cff523361145a74d9d429dc541a7b99910
[ "MIT" ]
68
2018-01-13T07:15:37.000Z
2022-02-20T12:58:24.000Z
Python/add-and-search-word-data-structure-design.py
ambershen/LeetCode
0c53580697b05fadb3981d97bd25f1d9da65fd2f
[ "MIT" ]
2
2021-12-10T01:43:37.000Z
2021-12-14T21:48:53.000Z
Python/add-and-search-word-data-structure-design.py
ambershen/LeetCode
0c53580697b05fadb3981d97bd25f1d9da65fd2f
[ "MIT" ]
63
2017-04-10T03:38:25.000Z
2022-03-17T23:24:51.000Z
# Time: O(min(n, h)), per operation # Space: O(min(n, h)) # # Design a data structure that supports the following two operations: # # void addWord(word) # bool search(word) # search(word) can search a literal word or a regular expression string containing only letters a-z or .. # A . means it can represent any one le...
29.323529
106
0.610331
e60f382ed573628bde9c01dbd7e51363f98ac3f0
685
py
Python
python/robot-name/robot_name.py
tamireinhorn/exercism
3ca78b262ad590b67c75c5d1cd83db02bc2d1e6e
[ "MIT" ]
null
null
null
python/robot-name/robot_name.py
tamireinhorn/exercism
3ca78b262ad590b67c75c5d1cd83db02bc2d1e6e
[ "MIT" ]
2
2021-12-18T16:31:51.000Z
2021-12-18T16:33:33.000Z
python/robot-name/robot_name.py
tamireinhorn/Exercism
3a3d5744e88ab4457df4e6ac20d772d8c50c43da
[ "MIT" ]
null
null
null
import string, random ALPHABET = string.ascii_uppercase robot_names = set() class Robot: def __init__(self): self.name = self.generate_name() def generate_name(self): letters = ''.join(random.sample(ALPHABET, 2)) numbers = ''.join(list(map(str,(random.sample(range(10), 3))...
32.619048
75
0.586861
967a015e313688d5a31b45df961b8f245d62ad08
9,485
py
Python
gds3xtrude/gds3xtrude/gds3xtrude.py
diadatp/gds3xtrude_openjscad
49b82c0a905a59c82a97e151077c234c4cbc8eeb
[ "Apache-2.0" ]
null
null
null
gds3xtrude/gds3xtrude/gds3xtrude.py
diadatp/gds3xtrude_openjscad
49b82c0a905a59c82a97e151077c234c4cbc8eeb
[ "Apache-2.0" ]
null
null
null
gds3xtrude/gds3xtrude/gds3xtrude.py
diadatp/gds3xtrude_openjscad
49b82c0a905a59c82a97e151077c234c4cbc8eeb
[ "Apache-2.0" ]
null
null
null
## ## Copyright (c) 2018-2019 Thomas Kramer. ## ## This file is part of gds3xtrude ## (see https://codeberg.org/tok/gds3xtrude). ## ## This program is free software: you can redistribute it and/or modify ## it under the terms of the GNU Affero General Public License as ## published by the Free Software Foundation, e...
35.792453
121
0.650817
b6326b5b3ce356788eb3f399409e47099e102f50
29
py
Python
optimizer/__init__.py
lorenz0890/pytorch-admm-pruning
85f15d86e6d9037fe4016ebcd435065ecba823b5
[ "BSD-3-Clause" ]
null
null
null
optimizer/__init__.py
lorenz0890/pytorch-admm-pruning
85f15d86e6d9037fe4016ebcd435065ecba823b5
[ "BSD-3-Clause" ]
null
null
null
optimizer/__init__.py
lorenz0890/pytorch-admm-pruning
85f15d86e6d9037fe4016ebcd435065ecba823b5
[ "BSD-3-Clause" ]
null
null
null
from .admm_optimizer import *
29
29
0.827586
3cb0c37f30178379ae72671077a8b4ea3cec370b
3,391
py
Python
invenio_records_resources/services/files/results.py
tzubaki/invenio-records-resources
82e77d5f6e89abf38c871e912cc97b4bdf289c20
[ "MIT" ]
null
null
null
invenio_records_resources/services/files/results.py
tzubaki/invenio-records-resources
82e77d5f6e89abf38c871e912cc97b4bdf289c20
[ "MIT" ]
null
null
null
invenio_records_resources/services/files/results.py
tzubaki/invenio-records-resources
82e77d5f6e89abf38c871e912cc97b4bdf289c20
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # Copyright (C) 2020 CERN. # Copyright (C) 2020 Northwestern University. # # Invenio-Records-Resources is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see LICENSE file for more # details. """File service results.""" from ..base import ServiceL...
29.232759
76
0.592451
4c0c8056fb70152074788f94ec40e214d1e8a208
1,591
py
Python
logic/clustering.py
moff4/gladius
773a4e81fcfca7376292c8f9ba601b62324a65f0
[ "MIT" ]
null
null
null
logic/clustering.py
moff4/gladius
773a4e81fcfca7376292c8f9ba601b62324a65f0
[ "MIT" ]
null
null
null
logic/clustering.py
moff4/gladius
773a4e81fcfca7376292c8f9ba601b62324a65f0
[ "MIT" ]
null
null
null
from collections import defaultdict from conf import conf SQL_LOAD_NEAREST = ''' SELECT distinct pt1.tag, pt2.tag FROM ( select * from hashtag.post_tag where tag in (%s) ) pt1 inner join hashtag.post_tag pt2 on pt1.post = pt2.post and pt1.tag != pt2.tag ''' LOAD_LIMIT = 50 class Clustering: def _...
25.66129
74
0.516028
338e547573b8b81493ce3c8f0420f9097830b239
6,053
py
Python
my_string_utils.py
jeayu/MyStringUtils
5ed84b5b6b77b2d33e69ea9a0fe05d9619ddc0b9
[ "MIT" ]
2
2020-05-26T07:44:30.000Z
2020-05-26T07:44:33.000Z
my_string_utils.py
jeayu/MyStringUtils
5ed84b5b6b77b2d33e69ea9a0fe05d9619ddc0b9
[ "MIT" ]
null
null
null
my_string_utils.py
jeayu/MyStringUtils
5ed84b5b6b77b2d33e69ea9a0fe05d9619ddc0b9
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import sublime import sublime_plugin import re import json def camel2underline(camel_str): result = re.sub(r'([a-z]|\d)([A-Z])', r'\1_\2', camel_str) return result.lower() if result is not camel_str else camel_str def underline2camel(underline_str): return re.sub(r'(_\w)', lambda...
33.815642
110
0.609945
b68e6bd9e8ede3e31c39d27b5cec1f18c3e722e0
2,805
py
Python
toontown/models/clash/news.py
jaczerob/toontown.py
fe23ffaddb2a663cbca49ce2358ef266a9c72196
[ "MIT" ]
null
null
null
toontown/models/clash/news.py
jaczerob/toontown.py
fe23ffaddb2a663cbca49ce2358ef266a9c72196
[ "MIT" ]
null
null
null
toontown/models/clash/news.py
jaczerob/toontown.py
fe23ffaddb2a663cbca49ce2358ef266a9c72196
[ "MIT" ]
null
null
null
""" The MIT License (MIT) Copyright (c) 2022-present jaczerob Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, me...
28.333333
97
0.678788
4842bc0945519ad824f0ed739624add23d6778ac
10,322
py
Python
lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/scripted_bkpt/TestScriptedResolver.py
dan-zheng/llvm-project
6b792850da0345274758c9260fda5df5e57ab486
[ "Apache-2.0" ]
456
2015-01-15T08:44:39.000Z
2022-03-31T22:34:57.000Z
lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/scripted_bkpt/TestScriptedResolver.py
dan-zheng/llvm-project
6b792850da0345274758c9260fda5df5e57ab486
[ "Apache-2.0" ]
2
2018-01-23T09:02:40.000Z
2018-03-09T20:34:27.000Z
lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/scripted_bkpt/TestScriptedResolver.py
dan-zheng/llvm-project
6b792850da0345274758c9260fda5df5e57ab486
[ "Apache-2.0" ]
254
2015-01-19T21:53:39.000Z
2022-02-23T19:38:56.000Z
""" Test setting breakpoints using a scripted resolver """ from __future__ import print_function import os import lldb import lldbsuite.test.lldbutil as lldbutil from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * class TestScriptedResolver(TestBase): mydir = TestBase.compute_mydir(_...
47.787037
139
0.68136
68a85e2eba55eb07f89edbfc4a16fc364bff03be
8,537
py
Python
negspacy/negation.py
arianpasquali/negspacy
da9c43f4fc46c2a18076846ac660642167c547c3
[ "MIT" ]
null
null
null
negspacy/negation.py
arianpasquali/negspacy
da9c43f4fc46c2a18076846ac660642167c547c3
[ "MIT" ]
null
null
null
negspacy/negation.py
arianpasquali/negspacy
da9c43f4fc46c2a18076846ac660642167c547c3
[ "MIT" ]
null
null
null
from spacy.tokens import Token, Doc, Span from spacy.matcher import PhraseMatcher import logging from negspacy.termsets_pt import LANGUAGES class Negex: """ A spaCy pipeline component which identifies negated tokens in text. Based on: NegEx - A Simple Algorithm for Identifying Negated Findings and Diseasesin ...
35.869748
110
0.577721
f8c8d25cf9699c94619fffb859093aa25e6a3720
718
py
Python
exercicios/ex088.py
DeyvisonR/curso_python
983b634d39f542369628ae48c7449ea75fd1ebbd
[ "MIT" ]
null
null
null
exercicios/ex088.py
DeyvisonR/curso_python
983b634d39f542369628ae48c7449ea75fd1ebbd
[ "MIT" ]
null
null
null
exercicios/ex088.py
DeyvisonR/curso_python
983b634d39f542369628ae48c7449ea75fd1ebbd
[ "MIT" ]
null
null
null
from time import sleep from random import randint print('=' * 50) print(f'{"JOGUE NA MEGA SENA":^50}') print('=' * 50) jogos = [] jogosqt = int(input('quantos jogos você quer que eu sorteie: ')) print(f'{f" sorteando {jogosqt} jogos ":=^50}') cont = 0 cont2 = 0 sorteados = [] while cont2 < jogosqt: while cont <...
25.642857
64
0.557103
c94a079f9a4ce4081c478bc373d381070ddfaf96
11,423
py
Python
official/vision/detection/modeling/architecture/nn_blocks.py
gujralsanyam22/models
d96f8f043dbe2b5ca8ea1785f57df8faf68d8875
[ "Apache-2.0" ]
15
2018-08-15T19:29:39.000Z
2021-11-05T02:14:59.000Z
official/vision/detection/modeling/architecture/nn_blocks.py
yangxl-2014-fe/models
11ea5237818e791a5717716d5413977f4c4db1e3
[ "Apache-2.0" ]
5
2020-10-01T09:02:34.000Z
2021-02-21T12:50:11.000Z
official/vision/detection/modeling/architecture/nn_blocks.py
yangxl-2014-fe/models
11ea5237818e791a5717716d5413977f4c4db1e3
[ "Apache-2.0" ]
8
2020-09-17T13:09:11.000Z
2021-12-17T09:58:43.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.808777
80
0.674954
b8c028c1c6f4f26dd578eaa9b75c31c072305c33
12,114
py
Python
sdk/python/pulumi_azure_native/containerservice/v20201201/maintenance_configuration.py
polivbr/pulumi-azure-native
09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/containerservice/v20201201/maintenance_configuration.py
polivbr/pulumi-azure-native
09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/containerservice/v20201201/maintenance_configuration.py
polivbr/pulumi-azure-native
09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities fro...
48.846774
1,184
0.679379
9cbc1ce37e4c5bf9afa3c0243903ceed0b83109b
330
py
Python
fabdeploy/api.py
kolia1985/fabdeploy
fa746d94fde058ab86aadbc5d4a391dfcbfd983a
[ "BSD-3-Clause" ]
null
null
null
fabdeploy/api.py
kolia1985/fabdeploy
fa746d94fde058ab86aadbc5d4a391dfcbfd983a
[ "BSD-3-Clause" ]
null
null
null
fabdeploy/api.py
kolia1985/fabdeploy
fa746d94fde058ab86aadbc5d4a391dfcbfd983a
[ "BSD-3-Clause" ]
null
null
null
from __future__ import absolute_import from . import fabd, system, git, release, virtualenv, nginx, django, pip, \ postgres, mysql, supervisor, users, ssh, tar, gunicorn, uwsgi, rabbitmq, \ apache, redis, flask, angularjs from .base import setup_fabdeploy from .containers import conf, DefaultConf from .task im...
36.666667
78
0.760606
0673e7d1d0a5c5a54a0632f428aa39364457ad4a
5,839
py
Python
SymbolExtractorAndRenamer/lldb/packages/Python/lldbsuite/test/lldbplatformutil.py
Polidea/SiriusObfuscator
b0e590d8130e97856afe578869b83a209e2b19be
[ "Apache-2.0" ]
427
2018-05-29T14:21:02.000Z
2022-03-16T03:17:54.000Z
SymbolExtractorAndRenamer/lldb/packages/Python/lldbsuite/test/lldbplatformutil.py
PolideaPlayground/SiriusObfuscator
b0e590d8130e97856afe578869b83a209e2b19be
[ "Apache-2.0" ]
25
2018-07-23T08:34:15.000Z
2021-11-05T07:13:36.000Z
SymbolExtractorAndRenamer/lldb/packages/Python/lldbsuite/test/lldbplatformutil.py
PolideaPlayground/SiriusObfuscator
b0e590d8130e97856afe578869b83a209e2b19be
[ "Apache-2.0" ]
52
2018-07-19T19:57:32.000Z
2022-03-11T16:05:38.000Z
""" This module contains functions used by the test cases to hide the architecture and/or the platform dependent nature of the tests. """ from __future__ import absolute_import # System modules import itertools import re import subprocess import sys import os # Third-party modules import six from six.moves.urllib im...
32.259669
94
0.66347
30541c8137a89dd3d950e95bc0d3ea2cfb4b6a34
5,897
py
Python
tests/components/datadog/test_init.py
Hypfer/home-assistant
204ca3f3a6e24ef11ece2e2ee490a8d77553c147
[ "Apache-2.0" ]
1
2019-12-06T08:49:19.000Z
2019-12-06T08:49:19.000Z
tests/components/datadog/test_init.py
FuqiangSong/home-assistant
d5419b77f9c245e5af006143eb55ae4dda3f174e
[ "Apache-2.0" ]
2
2021-02-08T20:39:43.000Z
2021-09-08T01:36:57.000Z
tests/components/datadog/test_init.py
FuqiangSong/home-assistant
d5419b77f9c245e5af006143eb55ae4dda3f174e
[ "Apache-2.0" ]
null
null
null
"""The tests for the Datadog component.""" from unittest import mock import unittest from homeassistant.const import ( EVENT_LOGBOOK_ENTRY, EVENT_STATE_CHANGED, STATE_OFF, STATE_ON, ) from homeassistant.setup import setup_component import homeassistant.components.datadog as datadog import homeassistant...
33.697143
88
0.564863
62b8063ef72c212839ab87a26d25a4b059fa0ebf
4,741
py
Python
Experimentation/pygen/generated.py
svenssonjoel/COPPE
8a2a0b3ee09ba70fa59b85dfaffe510b1882209b
[ "BSD-3-Clause" ]
null
null
null
Experimentation/pygen/generated.py
svenssonjoel/COPPE
8a2a0b3ee09ba70fa59b85dfaffe510b1882209b
[ "BSD-3-Clause" ]
null
null
null
Experimentation/pygen/generated.py
svenssonjoel/COPPE
8a2a0b3ee09ba70fa59b85dfaffe510b1882209b
[ "BSD-3-Clause" ]
null
null
null
import checkpoint as checkpoint import tensorflow.compat.v1 as tf import json as json import numpy as np import os as os with open("checkpoint/code_gen_test.json") as f: network = json.load(f) def model(input_data, network): conv_filters = tf.keras.initializers.glorot_uniform(seed=None)(shape=(3, 3, input_d...
75.253968
389
0.74035
121ecdcea7a2359a904c565fee78b0c9ecf587a3
7,661
py
Python
contrib/devtools/update-translations.py
niocutl/ltucoin
ce1d3edd6d165a551b4467a015fa4ad028f38100
[ "MIT" ]
null
null
null
contrib/devtools/update-translations.py
niocutl/ltucoin
ce1d3edd6d165a551b4467a015fa4ad028f38100
[ "MIT" ]
null
null
null
contrib/devtools/update-translations.py
niocutl/ltucoin
ce1d3edd6d165a551b4467a015fa4ad028f38100
[ "MIT" ]
null
null
null
#!/usr/bin/python # Copyright (c) 2014 Wladimir J. van der Laan # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. ''' Run this script from the root of the repository to update all translations from transifex. It will do the following...
37.553922
124
0.629422
b98e1cd7dbd9f6c3c2671c1304f60e1ea6db10e6
1,541
py
Python
src/data/importer/base_loader.py
shivamraval98/T5_AE
75c2e55c9adced49f670063e649499911b95158e
[ "MIT" ]
5
2021-11-09T19:02:02.000Z
2022-03-29T01:32:31.000Z
src/data/importer/base_loader.py
shivamraval98/T5_AE
75c2e55c9adced49f670063e649499911b95158e
[ "MIT" ]
null
null
null
src/data/importer/base_loader.py
shivamraval98/T5_AE
75c2e55c9adced49f670063e649499911b95158e
[ "MIT" ]
1
2021-12-05T11:38:01.000Z
2021-12-05T11:38:01.000Z
import pandas as pd import os from sklearn.model_selection import train_test_split import preprocessor as p ''' BaseLoader class which is extended by other Data Loaders ''' class BaseLoader(object): def __init__(self): self.split_path = os.getcwd() + "/data/splits/" self.dataset_path = os.getcwd() ...
28.537037
89
0.589877
e2a573db4410f533350107de0a9779da235b7537
13,572
py
Python
samples/fpga/matrix_multiplication_systolic.py
xiacijie/dace
2d942440b1d7b139ba112434bfa78f754e10bfe5
[ "BSD-3-Clause" ]
1
2021-07-26T07:58:06.000Z
2021-07-26T07:58:06.000Z
samples/fpga/matrix_multiplication_systolic.py
xiacijie/dace
2d942440b1d7b139ba112434bfa78f754e10bfe5
[ "BSD-3-Clause" ]
null
null
null
samples/fpga/matrix_multiplication_systolic.py
xiacijie/dace
2d942440b1d7b139ba112434bfa78f754e10bfe5
[ "BSD-3-Clause" ]
1
2021-03-04T13:01:48.000Z
2021-03-04T13:01:48.000Z
# Copyright 2019-2021 ETH Zurich and the DaCe authors. All rights reserved. import argparse import dace import numpy as np import pdb import select import sys N = dace.symbol("N") K = dace.symbol("K") M = dace.symbol("M") P = dace.symbol("P") def make_copy_to_fpga_state(sdfg): ##################################...
35.251948
80
0.510021
e4457699bfaa5fe0156d64a22304952821c0a088
984
py
Python
paddlehub/finetune/task/__init__.py
HawChang/PaddleHub
7faf09eb423b7c844392e6fa19b9b8db49928835
[ "Apache-2.0" ]
2
2020-11-30T08:54:01.000Z
2021-04-07T10:11:36.000Z
paddlehub/finetune/task/__init__.py
haoyuying/PaddleHub
9894fbb1dc8575ae1fa74f32a23cc1363467461b
[ "Apache-2.0" ]
null
null
null
paddlehub/finetune/task/__init__.py
haoyuying/PaddleHub
9894fbb1dc8575ae1fa74f32a23cc1363467461b
[ "Apache-2.0" ]
null
null
null
#coding:utf-8 # Copyright (c) 2019 PaddlePaddle 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 r...
44.727273
110
0.805894
014533f23b9746874a3b3476a9825bbb2e0f6cbb
18,000
py
Python
pytorch/pytorchcv/models/pyramidnet_cifar.py
raijinspecial/imgclsmob
c5d3ab207a6304f1343e4394f0467bdc7403a72a
[ "MIT" ]
null
null
null
pytorch/pytorchcv/models/pyramidnet_cifar.py
raijinspecial/imgclsmob
c5d3ab207a6304f1343e4394f0467bdc7403a72a
[ "MIT" ]
null
null
null
pytorch/pytorchcv/models/pyramidnet_cifar.py
raijinspecial/imgclsmob
c5d3ab207a6304f1343e4394f0467bdc7403a72a
[ "MIT" ]
null
null
null
""" PyramidNet for CIFAR, implemented in PyTorch. Original paper: 'Deep Pyramidal Residual Networks,' https://arxiv.org/abs/1610.02915. """ __all__ = ['CIFARPyramidNet', 'pyramidnet110_a48_cifar10', 'pyramidnet110_a48_cifar100', 'pyramidnet110_a84_cifar10', 'pyramidnet110_a84_cifar100', 'pyramidnet1...
33.333333
120
0.641
915c69b11ec1626176128d0d9628e6a8b119f1bc
387
py
Python
test/sample_test.py
murphyGo/MurphyML
a079d3418464ad9183a3292688b4f4476526db36
[ "MIT" ]
null
null
null
test/sample_test.py
murphyGo/MurphyML
a079d3418464ad9183a3292688b4f4476526db36
[ "MIT" ]
null
null
null
test/sample_test.py
murphyGo/MurphyML
a079d3418464ad9183a3292688b4f4476526db36
[ "MIT" ]
null
null
null
import unittest # unittest sample class SampleTest(unittest.TestCase): def test_sample(self): self.assertTrue(True, "always pass") def test_str(self): subStr = 'hihi' fullStr = f"\u0394\u2341{subStr}" self.assertEqual(type(fullStr), str) # pytest sample def test_sample2():...
16.125
44
0.640827
bac24e328d9e0f914dfc3ee2b07df6c2cdc59a93
3,177
py
Python
python/docs/source/conf.py
fvaleye/metadata-guardian
ab5d6cada67785c3cfd98112f68e8fdb193d1617
[ "Apache-2.0" ]
9
2021-12-31T20:32:35.000Z
2022-02-18T17:51:49.000Z
python/docs/source/conf.py
fvaleye/metadata-guardian
ab5d6cada67785c3cfd98112f68e8fdb193d1617
[ "Apache-2.0" ]
1
2022-02-25T16:35:04.000Z
2022-02-28T21:08:53.000Z
python/docs/source/conf.py
fvaleye/metadata-guardian
ab5d6cada67785c3cfd98112f68e8fdb193d1617
[ "Apache-2.0" ]
null
null
null
# Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Path setup -------------------------------------------------------------- # If ex...
33.797872
86
0.67548
bd0eb9086498ec7c3d75e8e3ae937d856aca3b38
9,001
py
Python
pyqtgraph/widgets/ScatterPlotWidget.py
feketeimre/pyqtgraph
b421cc27905338438e99cf19d4962c51e64079bd
[ "MIT" ]
null
null
null
pyqtgraph/widgets/ScatterPlotWidget.py
feketeimre/pyqtgraph
b421cc27905338438e99cf19d4962c51e64079bd
[ "MIT" ]
null
null
null
pyqtgraph/widgets/ScatterPlotWidget.py
feketeimre/pyqtgraph
b421cc27905338438e99cf19d4962c51e64079bd
[ "MIT" ]
1
2019-07-15T19:35:15.000Z
2019-07-15T19:35:15.000Z
from ..Qt import QtGui, QtCore from .PlotWidget import PlotWidget from .DataFilterWidget import DataFilterParameter from .ColorMapWidget import ColorMapParameter from .. import parametertree as ptree from .. import functions as fn from .. import getConfigOption from ..graphicsItems.TextItem import TextItem import numpy...
38.965368
121
0.576936
ad6d8b82a642d86349b749e9de501a814a68bf2f
18,162
py
Python
spherov2/controls/v2.py
Cole1220/spherov2.py
8981cee23055bf36bafc75c4355a8930a00eb6bd
[ "MIT" ]
23
2020-06-22T16:17:21.000Z
2022-03-15T15:53:39.000Z
spherov2/controls/v2.py
Cole1220/spherov2.py
8981cee23055bf36bafc75c4355a8930a00eb6bd
[ "MIT" ]
16
2020-06-11T12:52:26.000Z
2021-12-11T02:38:23.000Z
spherov2/controls/v2.py
Cole1220/spherov2.py
8981cee23055bf36bafc75c4355a8930a00eb6bd
[ "MIT" ]
5
2021-01-14T17:39:27.000Z
2021-07-30T19:09:07.000Z
import threading from collections import OrderedDict, defaultdict from enum import IntEnum, Enum, auto, IntFlag from typing import Dict, List, Callable, NamedTuple, Tuple from spherov2.commands.drive import DriveFlags from spherov2.commands.drive import RawMotorModes as DriveRawMotorModes from spherov2.commands.io imp...
35.611765
110
0.613864
8ce6ea873c70fec92b504405bfc134392dc9a19d
1,169
py
Python
pythonlearn/Third-Module/Tornado/TEST_DEMOS/Form/server.py
yc19890920/Learn
3990e75b469225ba7b430539ef9a16abe89eb863
[ "Apache-2.0" ]
1
2021-01-11T06:30:44.000Z
2021-01-11T06:30:44.000Z
pythonlearn/Third-Module/Tornado/TEST_DEMOS/Form/server.py
yc19890920/Learn
3990e75b469225ba7b430539ef9a16abe89eb863
[ "Apache-2.0" ]
23
2020-02-12T02:35:49.000Z
2022-02-11T03:45:40.000Z
pythonlearn/Third-Module/Tornado/TEST_DEMOS/Form/server.py
yc19890920/Learn
3990e75b469225ba7b430539ef9a16abe89eb863
[ "Apache-2.0" ]
2
2020-04-08T15:39:46.000Z
2020-10-10T10:13:09.000Z
# -*- coding: utf-8 -*- # import os import tornado.web import tornado.ioloop import tornado.options import tornado.httpserver from tornado import locale from tornado.options import define, options define("port", default=8000, help="run on the given port", type=int) class IndexHandler(tornado.web.RequestHa...
28.512195
75
0.640719
ba627fcb347a4e424105628be406de1ede07998c
3,283
py
Python
pomdp_py/utils/interfaces/simple_rl.py
beckymathew/pomdp-py
4864514277e49dee4b7c3fb303970de7b6a888ea
[ "MIT" ]
87
2020-02-16T03:12:10.000Z
2022-03-31T08:38:10.000Z
pomdp_py/utils/interfaces/simple_rl.py
beckymathew/pomdp-py
4864514277e49dee4b7c3fb303970de7b6a888ea
[ "MIT" ]
15
2020-08-01T00:25:33.000Z
2022-02-19T22:37:11.000Z
pomdp_py/utils/interfaces/simple_rl.py
beckymathew/pomdp-py
4864514277e49dee4b7c3fb303970de7b6a888ea
[ "MIT" ]
26
2020-02-20T01:15:33.000Z
2022-03-30T16:21:37.000Z
""" Provides utility functions that interfaces with `simple_rl <https://github.com/david-abel/simple_rl>`_. Essentially, this will convert an agent in pomdp_py into a simple_rl.MDPClass or POMDPClass. Note that since creating these classes require enumerable aciton and observation spaces, this conversion is only feasi...
42.089744
103
0.673469
f149870ce5099dc14c5ea591f5e0b61107cd647f
276
py
Python
demo.py
re-treat/DialoFlow
b7b729ddf5d146ee201c987f3a44894ad24938ce
[ "MIT" ]
null
null
null
demo.py
re-treat/DialoFlow
b7b729ddf5d146ee201c987f3a44894ad24938ce
[ "MIT" ]
null
null
null
demo.py
re-treat/DialoFlow
b7b729ddf5d146ee201c987f3a44894ad24938ce
[ "MIT" ]
null
null
null
from generate import * history = [] while True: new_sentence = input('>> User: ').replace('\n','') history.append(new_sentence) resps = get_responses(history[-5:],mode='sample') best_resp = resps[0] print(">> Bot:",best_resp) history.append(best_resp)
27.6
54
0.644928
279e060f2fe087b6cc2ad799fcd36463630e1c95
9,021
py
Python
.ycm_extra_conf.py
WenDaTesi/pdc-graph
1565c01258a05e2949d86f2fa4fc8423d79c0f58
[ "MIT" ]
null
null
null
.ycm_extra_conf.py
WenDaTesi/pdc-graph
1565c01258a05e2949d86f2fa4fc8423d79c0f58
[ "MIT" ]
null
null
null
.ycm_extra_conf.py
WenDaTesi/pdc-graph
1565c01258a05e2949d86f2fa4fc8423d79c0f58
[ "MIT" ]
null
null
null
# This file is NOT licensed under the GPLv3, which is the license for the rest # of YouCompleteMe. # # Here's the license text for this file: # # This is free and unencumbered software released into the public domain. # # Anyone is free to copy, modify, publish, use, compile, sell, or # distribute this software, either...
31.652632
82
0.654584
425184f4b8ad2a123e9ff9653be3018f77cdee1c
322
py
Python
demo.py
billyblu2000/Chorderator
6e5e077da649966e872dbd1494f3606a23937e8b
[ "MIT" ]
7
2021-04-12T08:17:10.000Z
2022-01-30T05:55:25.000Z
demo.py
billyblu2000/Chorderator
6e5e077da649966e872dbd1494f3606a23937e8b
[ "MIT" ]
null
null
null
demo.py
billyblu2000/Chorderator
6e5e077da649966e872dbd1494f3606a23937e8b
[ "MIT" ]
null
null
null
import chorderator as cdt cdt.set_melody('MIDI demos/inputs/10.mid') cdt.set_phrase([1]) cdt.set_meta(tonic=cdt.Key.C, mode=cdt.Mode.MAJOR, meter=cdt.Meter.FOUR_FOUR, tempo=120) cdt.set_output_chord_style(cdt.ChordStyle.EMOTIONAL) cdt.set_output_progression_style(cdt.ProgressionStyle.POP) cdt.generate_save('generated...
35.777778
88
0.81677
49baa866fd39ed4eb27d113495060f760a0ba625
1,356
py
Python
users/migrations/0001_initial.py
Dopaman/xcurator_backend
1d8253c8bcea9d37e48f745df63c63f122f13db0
[ "MIT" ]
null
null
null
users/migrations/0001_initial.py
Dopaman/xcurator_backend
1d8253c8bcea9d37e48f745df63c63f122f13db0
[ "MIT" ]
1
2021-10-06T13:22:45.000Z
2021-10-06T13:22:45.000Z
users/migrations/0001_initial.py
Dopaman/xcurator_backend
1d8253c8bcea9d37e48f745df63c63f122f13db0
[ "MIT" ]
2
2021-10-01T13:58:34.000Z
2021-10-02T14:52:34.000Z
# Generated by Django 3.2.5 on 2021-08-27 19:28 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='User', fields=[ ('id', models.BigAutoField(...
38.742857
117
0.581858
6c5f15c10afba95b4860c9f85890b0227228fd3e
7,761
py
Python
background_file_handler/backgroundProcess.py
MarcoMuellner/APOLLO
0011702f93bbf12367fcc30970ba9af25be00a8f
[ "MIT" ]
null
null
null
background_file_handler/backgroundProcess.py
MarcoMuellner/APOLLO
0011702f93bbf12367fcc30970ba9af25be00a8f
[ "MIT" ]
null
null
null
background_file_handler/backgroundProcess.py
MarcoMuellner/APOLLO
0011702f93bbf12367fcc30970ba9af25be00a8f
[ "MIT" ]
null
null
null
import re import subprocess from res.strings import * from support.directoryManager import cd import time from res.conf_file_str import general_background_result_path,general_binary_path,general_kic\ ,internal_noise_value,internal_mag_value,internal_multiple_mag,general_use_pcb,internal_path\ ,analysis_folder_...
40.847368
139
0.630589
7ab0c8acbe3294ba46f21a5c37fd62582bc15b35
28,348
py
Python
pytorch_lightning/core/hooks.py
jbuckman/pytorch-lightning
cc74fb717a7127fecd4dbb9c743ba28b40de7f64
[ "Apache-2.0" ]
null
null
null
pytorch_lightning/core/hooks.py
jbuckman/pytorch-lightning
cc74fb717a7127fecd4dbb9c743ba28b40de7f64
[ "Apache-2.0" ]
1
2021-03-26T02:16:20.000Z
2021-03-26T02:16:20.000Z
pytorch_lightning/core/hooks.py
jbuckman/pytorch-lightning
cc74fb717a7127fecd4dbb9c743ba28b40de7f64
[ "Apache-2.0" ]
null
null
null
# Copyright The PyTorch Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
34.782822
120
0.595774
d5163c84bf22b6c35391f74a0eb64536a55c3d09
3,496
py
Python
testing/test_rnn_layer.py
Elisa-Raspanti/NumPyNet
4e8d0d415275088f485457cdcf251d28a6826b0f
[ "MIT" ]
null
null
null
testing/test_rnn_layer.py
Elisa-Raspanti/NumPyNet
4e8d0d415275088f485457cdcf251d28a6826b0f
[ "MIT" ]
null
null
null
testing/test_rnn_layer.py
Elisa-Raspanti/NumPyNet
4e8d0d415275088f485457cdcf251d28a6826b0f
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from __future__ import division from __future__ import print_function from random import choice import numpy as np import pytest from hypothesis import given from hypothesis import settings from hypothesis import strategies as st from NumPyNet.layers import RNN_layer ...
36.8
104
0.622712
55a5cfbf8b41c716275973acf1add2b793097f4e
19,552
py
Python
keras/applications/mobilenet.py
websterkovacek/keras
631102a7c9efb57a351355090796d5850285663c
[ "Apache-2.0" ]
1
2021-01-01T00:16:04.000Z
2021-01-01T00:16:04.000Z
keras/applications/mobilenet.py
websterkovacek/keras
631102a7c9efb57a351355090796d5850285663c
[ "Apache-2.0" ]
1
2021-01-10T15:10:05.000Z
2021-01-25T09:19:15.000Z
keras/applications/mobilenet.py
websterkovacek/keras
631102a7c9efb57a351355090796d5850285663c
[ "Apache-2.0" ]
1
2021-01-10T09:06:39.000Z
2021-01-10T09:06:39.000Z
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
42.59695
80
0.652721
09904dd97d03cda66177c6197ef0d588d318b6ed
6,983
py
Python
tests/core/test_jose/test_jwe.py
johnjdailey/authlib
de4e4ec735e0a9a57906129f16df2addc6a4c908
[ "BSD-3-Clause" ]
1
2020-08-04T08:29:39.000Z
2020-08-04T08:29:39.000Z
tests/core/test_jose/test_jwe.py
johnjdailey/authlib
de4e4ec735e0a9a57906129f16df2addc6a4c908
[ "BSD-3-Clause" ]
null
null
null
tests/core/test_jose/test_jwe.py
johnjdailey/authlib
de4e4ec735e0a9a57906129f16df2addc6a4c908
[ "BSD-3-Clause" ]
null
null
null
import os import unittest from authlib.jose import errors from authlib.jose import JsonWebEncryption, JWE_ALGORITHMS, JWS_ALGORITHMS from tests.util import read_file_path class JWETest(unittest.TestCase): def test_register_invalid_algorithms(self): self.assertRaises( ValueError, Js...
35.627551
78
0.573822
dd649a4eb9a77d5dac8882593ded91f58fbc0e67
1,856
py
Python
test/programytest/dialog/storage/test_file.py
whackur/chatbot
bb4b4dace89f1f8aae2b6377bf7d2601e66af7a7
[ "MIT" ]
2
2018-06-16T09:32:22.000Z
2019-07-21T13:16:00.000Z
test/programytest/dialog/storage/test_file.py
whackur/chatbot
bb4b4dace89f1f8aae2b6377bf7d2601e66af7a7
[ "MIT" ]
3
2020-07-16T04:00:42.000Z
2021-03-31T18:52:22.000Z
test/programytest/dialog/storage/test_file.py
whackur/chatbot
bb4b4dace89f1f8aae2b6377bf7d2601e66af7a7
[ "MIT" ]
4
2018-06-29T23:50:44.000Z
2020-11-05T08:13:47.000Z
import unittest import os from programy.dialog.dialog import Sentence, Question, Conversation from programy.bot import Bot from programy.brain import Brain from programy.config.brain.brain import BrainConfiguration from programy.config.bot.bot import BotConfiguration from programy.config.bot.filestorage import BotConv...
40.347826
101
0.742457
2ab5b656be7a7728dab97a14cf9706c1dcfa22f8
2,491
py
Python
dell_projector/main.py
Abhiseshan/dell-projector
ef869afc9c33a6907160948c6548cad2d96e7341
[ "MIT" ]
null
null
null
dell_projector/main.py
Abhiseshan/dell-projector
ef869afc9c33a6907160948c6548cad2d96e7341
[ "MIT" ]
null
null
null
dell_projector/main.py
Abhiseshan/dell-projector
ef869afc9c33a6907160948c6548cad2d96e7341
[ "MIT" ]
null
null
null
from bs4 import BeautifulSoup import requests import socket import logging logger = logging.getLogger(__name__) HOME_PAGE = "/home.htm" PROTOCOL = "http://" TIMEOUT = 5 CONTROL_PORT = 41794 ATTRIBUTES = { "Status:": "STATUS", "Lamp Hours:": "LAMP_HOURS" } COMANDS = { "on": [0x05, 0x00, 0...
29.654762
94
0.578884
fe25062db91ad6bf05dbb4b4a7fc5f1b08ac7f8d
11,998
py
Python
kombu/tests/test_entities.py
jheld/kombu
5ade56f2d52deee2f9ecea0180c2ea56400345be
[ "BSD-3-Clause" ]
1
2019-06-22T23:30:30.000Z
2019-06-22T23:30:30.000Z
kombu/tests/test_entities.py
rectalogic/kombu
82dc37b4c151a2d4e7eec1f96ada5babc8749e8e
[ "BSD-3-Clause" ]
null
null
null
kombu/tests/test_entities.py
rectalogic/kombu
82dc37b4c151a2d4e7eec1f96ada5babc8749e8e
[ "BSD-3-Clause" ]
1
2019-01-29T00:47:41.000Z
2019-01-29T00:47:41.000Z
from __future__ import absolute_import import pickle from kombu import Connection, Exchange, Producer, Queue, binding from kombu.exceptions import NotBoundError from .case import Case, Mock, call from .mocks import Transport def get_conn(): return Connection(transport=Transport) class test_binding(Case): ...
32.080214
79
0.597433
3fbaff2c4928d0324eaa61312102075823f7dd96
627
py
Python
ros/src/twist_controller/lowpass.py
edufford/CarND-Capstone
dd466a3e9e1eeb3c3f4b37175b9694600d8cc8c8
[ "MIT" ]
9
2018-03-07T01:38:31.000Z
2020-05-14T14:22:52.000Z
ros/src/twist_controller/lowpass.py
edufford/CarND-Capstone
dd466a3e9e1eeb3c3f4b37175b9694600d8cc8c8
[ "MIT" ]
95
2018-02-27T11:37:30.000Z
2019-02-09T20:37:03.000Z
ros/src/twist_controller/lowpass.py
edufford/CarND-Capstone
dd466a3e9e1eeb3c3f4b37175b9694600d8cc8c8
[ "MIT" ]
4
2018-02-26T21:20:17.000Z
2019-08-09T15:50:53.000Z
class LowPassFilter(object): def __init__(self, tau, ts): self.a = 1. / (tau / ts + 1.) self.b = tau / ts / (tau / ts + 1.) self.last_val = 0. # Initialize from last_val = 0 instead of allowing an initial step # change on activation when dbw_enabled turns ON self.r...
23.222222
74
0.54067
10c634c1a0d842d616a780fae1e7ea6edafe0b34
27,598
py
Python
sdk/python/pulumi_azure_native/network/v20210201/get_application_gateway.py
polivbr/pulumi-azure-native
09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/network/v20210201/get_application_gateway.py
polivbr/pulumi-azure-native
09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/network/v20210201/get_application_gateway.py
polivbr/pulumi-azure-native
09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities fro...
50.361314
926
0.714545
fe1cdcd1f163c4b090e05f89313e48818b2fd276
4,963
py
Python
tests/parse_shebang_test.py
mmabey/pre-commit
7728162d7a47f387187e379b8011b224b168555d
[ "MIT" ]
1
2022-03-17T22:18:16.000Z
2022-03-17T22:18:16.000Z
tests/parse_shebang_test.py
mmabey/pre-commit
7728162d7a47f387187e379b8011b224b168555d
[ "MIT" ]
null
null
null
tests/parse_shebang_test.py
mmabey/pre-commit
7728162d7a47f387187e379b8011b224b168555d
[ "MIT" ]
null
null
null
from __future__ import absolute_import from __future__ import unicode_literals import contextlib import distutils.spawn import io import os import sys import pytest from pre_commit import parse_shebang from pre_commit.envcontext import envcontext from pre_commit.envcontext import Var from pre_commit.util import make...
32.437908
79
0.71348
9874adf2d9213b130e6dd06336a13134fbad3466
859
py
Python
lib/dataset/preprocess_utils/lane_utils.py
decisionforce/mmTransformer
be25d26118d2dfdac72b1d1e0cf6cbf14f7f4a0b
[ "Apache-2.0" ]
199
2021-03-23T06:10:50.000Z
2022-03-31T08:23:00.000Z
lib/dataset/preprocess_utils/lane_utils.py
yuzhouxianzhi/mmTransformer
be25d26118d2dfdac72b1d1e0cf6cbf14f7f4a0b
[ "Apache-2.0" ]
16
2021-04-12T12:48:46.000Z
2022-03-10T14:11:26.000Z
lib/dataset/preprocess_utils/lane_utils.py
yuzhouxianzhi/mmTransformer
be25d26118d2dfdac72b1d1e0cf6cbf14f7f4a0b
[ "Apache-2.0" ]
23
2021-03-29T01:37:56.000Z
2022-03-30T01:48:41.000Z
import os import numpy as np # Only support nearby in our implementation def get_nearby_lane_feature_ls(am, agent_df, obs_len, city_name, lane_radius, norm_center, has_attr=False, mode='nearby', query_bbox=None): ''' compute lane features args: norm_center: np.ndarray mode: 'nearby' retur...
37.347826
139
0.715949
eb7ec3447ebf724a3f7d1580af6d37a9a8ebaf62
17,522
py
Python
planar_mpc/main.py
enhatem/quadrotor_mpc_acados
9ca50ecc0a852ba5f9464df0ccd5d40e3ebfc295
[ "Apache-2.0" ]
null
null
null
planar_mpc/main.py
enhatem/quadrotor_mpc_acados
9ca50ecc0a852ba5f9464df0ccd5d40e3ebfc295
[ "Apache-2.0" ]
null
null
null
planar_mpc/main.py
enhatem/quadrotor_mpc_acados
9ca50ecc0a852ba5f9464df0ccd5d40e3ebfc295
[ "Apache-2.0" ]
1
2021-12-29T03:37:01.000Z
2021-12-29T03:37:01.000Z
from extended_kalman_filter.setup_ekf import setup_ekf import sys import time import numpy as np import matplotlib.pyplot as plt from acados_settings import acados_settings from extended_kalman_filter.ekf import * from extended_kalman_filter.jacobians import * from plotFnc import * from utils import * from trajectory ...
38.008677
119
0.637256
12bc8473668334ca22f49eb9f8686eab416a468a
1,141
py
Python
Lib/idlelib/idle_test/test_editor.py
livioso/cpython
077061a7b24917aaf31057885c69919c5a553c88
[ "PSF-2.0" ]
854
2017-09-11T16:42:28.000Z
2022-03-27T14:17:09.000Z
Lib/idlelib/idle_test/test_editor.py
livioso/cpython
077061a7b24917aaf31057885c69919c5a553c88
[ "PSF-2.0" ]
242
2019-01-29T15:48:27.000Z
2022-03-31T22:09:21.000Z
Lib/idlelib/idle_test/test_editor.py
livioso/cpython
077061a7b24917aaf31057885c69919c5a553c88
[ "PSF-2.0" ]
73
2017-09-13T18:07:48.000Z
2022-03-17T13:02:29.000Z
"Test editor, coverage 35%." from idlelib import editor import unittest from test.support import requires from tkinter import Tk Editor = editor.EditorWindow class EditorWindowTest(unittest.TestCase): @classmethod def setUpClass(cls): requires('gui') cls.root = Tk() cls.root.withdra...
24.276596
70
0.614373
f6282198e7ac6786f3abffd7982090e0423a6088
1,260
py
Python
701_insert_binary_tree.py
claytonjwong/leetcode-py
16bbf8ac0ba5c80fe3ef67ade0d61a12991270a7
[ "MIT" ]
1
2020-07-15T14:16:23.000Z
2020-07-15T14:16:23.000Z
701_insert_binary_tree.py
claytonjwong/leetcode-py
16bbf8ac0ba5c80fe3ef67ade0d61a12991270a7
[ "MIT" ]
null
null
null
701_insert_binary_tree.py
claytonjwong/leetcode-py
16bbf8ac0ba5c80fe3ef67ade0d61a12991270a7
[ "MIT" ]
null
null
null
# # 701. Insert into a Binary Search Tree # # Q: https://leetcode.com/problems/insert-into-a-binary-search-tree/ # A: https://leetcode.com/problems/insert-into-a-binary-search-tree/discuss/881995/Javascript-Python3-C%2B%2B-Recursive # class TreeNode: def __init__(self, val): self.val = val self.lef...
30.731707
119
0.538095
c4fefdc214492cea1babb4602c66150baa73caf6
1,783
py
Python
two.py
hanee211/paper14
edb0739e879284aaa2b03b41252b1d4a724bb01d
[ "MIT" ]
null
null
null
two.py
hanee211/paper14
edb0739e879284aaa2b03b41252b1d4a724bb01d
[ "MIT" ]
null
null
null
two.py
hanee211/paper14
edb0739e879284aaa2b03b41252b1d4a724bb01d
[ "MIT" ]
null
null
null
import numpy as np import tensorflow as tf import helpers from tensorflow.contrib.rnn import LSTMCell, LSTMStateTuple tf.reset_default_graph() sess = tf.InteractiveSession() PAD = 0 EOS = 1 vocab_size = 10 input_embedding_size = 20 encoder_hidden_units = 20 decoder_hidden_units = encoder_hidden_units...
36.387755
109
0.722378
1cbbbc74318e856e912b82f86d91c2557a03f4f4
1,902
py
Python
examples/ucass_test.py
JGirdwood/AeroSAM_logger
0ccd2f99be2546b7728a87fc10d4b462f04a44ed
[ "MIT" ]
1
2020-11-11T13:04:25.000Z
2020-11-11T13:04:25.000Z
examples/ucass_test.py
JGirdwood/AeroSAM_logger
0ccd2f99be2546b7728a87fc10d4b462f04a44ed
[ "MIT" ]
null
null
null
examples/ucass_test.py
JGirdwood/AeroSAM_logger
0ccd2f99be2546b7728a87fc10d4b462f04a44ed
[ "MIT" ]
null
null
null
import met import ucass import log import pix from time import sleep from gpiozero import LED if __name__ == '__main__': act_led = LED(19) resolution_ms = 500 run_forever = False run_time = 10 ss = ucass.UCASS(25) print("UCASS Connected") #mavcon = pix.MavlinkConnection('/dev/ttyS0', 57600...
33.368421
118
0.618297
fc12ec065a9bd810daaff19fb3bca4a15bb2e4ba
19,199
py
Python
homeassistant/bootstrap.py
edofullin/core
106dc4d28ad59cb192c60fc7a354cafa86899ea4
[ "Apache-2.0" ]
1
2021-04-28T09:51:08.000Z
2021-04-28T09:51:08.000Z
homeassistant/bootstrap.py
edofullin/core
106dc4d28ad59cb192c60fc7a354cafa86899ea4
[ "Apache-2.0" ]
60
2020-08-03T07:32:56.000Z
2022-03-31T06:02:07.000Z
homeassistant/bootstrap.py
edofullin/core
106dc4d28ad59cb192c60fc7a354cafa86899ea4
[ "Apache-2.0" ]
4
2017-01-10T04:17:33.000Z
2021-09-02T16:37:24.000Z
"""Provide methods to bootstrap a Home Assistant instance.""" from __future__ import annotations import asyncio import contextlib from datetime import datetime import logging import logging.handlers import os import sys import threading from time import monotonic from typing import TYPE_CHECKING, Any import voluptuou...
33.216263
95
0.660972
5c4e9d61d96d4d3239d3288d5bc5c3d450f820ca
4,512
py
Python
OCR_For_Car_License/chinese_recog.py
qw85639229/Car_License_SVM
c5b0062e84e5000c7940b1d90cc7c63e52afed21
[ "MIT" ]
1
2020-04-20T07:56:07.000Z
2020-04-20T07:56:07.000Z
OCR_For_Car_License/chinese_recog.py
qw85639229/Car_License_SVM
c5b0062e84e5000c7940b1d90cc7c63e52afed21
[ "MIT" ]
null
null
null
OCR_For_Car_License/chinese_recog.py
qw85639229/Car_License_SVM
c5b0062e84e5000c7940b1d90cc7c63e52afed21
[ "MIT" ]
null
null
null
import cv2 import os import numpy as np test_root = './data/test_chinese/' test_img_path = os.listdir(test_root) template_size = (100, 100) def calculate_similarity(template, image): shape1 = template.shape shape2 = image.shape if shape1 != shape2: image = cv2.resize(image, template_size) t...
30.693878
113
0.609043