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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7ee6e6bcfb0b8b7ee7849726d860fc907f096557 | 142 | py | Python | bosc020/sql_alchemy.py | dpabosch/python-school | 312bc336c593b89ee0a00095525e8db365ca7f60 | [
"MIT"
] | 1 | 2018-08-20T07:30:37.000Z | 2018-08-20T07:30:37.000Z | bosc020/sql_alchemy.py | dpabosch/python-school | 312bc336c593b89ee0a00095525e8db365ca7f60 | [
"MIT"
] | null | null | null | bosc020/sql_alchemy.py | dpabosch/python-school | 312bc336c593b89ee0a00095525e8db365ca7f60 | [
"MIT"
] | null | null | null | import sqlalchemy
from sqlalchemy import create_engine
engine = create_engine('sqlite:///:memory:', echo=True)
print(sqlalchemy.__version__ ) | 28.4 | 55 | 0.802817 |
ca46ba69906905ec4ac610737e8815366f557075 | 306 | py | Python | medoraapp/urls.py | Angelamutyota/medora-health-center | 6659bf8d09f008779c502ce4ca999132e2201550 | [
"Unlicense",
"MIT"
] | null | null | null | medoraapp/urls.py | Angelamutyota/medora-health-center | 6659bf8d09f008779c502ce4ca999132e2201550 | [
"Unlicense",
"MIT"
] | null | null | null | medoraapp/urls.py | Angelamutyota/medora-health-center | 6659bf8d09f008779c502ce4ca999132e2201550 | [
"Unlicense",
"MIT"
] | null | null | null | from django import urls
from django.urls import path
from . import views
urlpatterns =[
path('register/', views.registerPage, name= 'register'),
path('login/', views.loginPage, name= 'loginpage'),
path('logout/',views.logoutpage,name='logout'),
path('',views.index, name = 'index'),
] | 27.818182 | 60 | 0.669935 |
c0d187d14a73a3609df2c5becf4cd69fdcc85f07 | 1,068 | py | Python | sdk/python/pulumi_azure_native/containerinstance/v20191201/__init__.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/containerinstance/v20191201/__init__.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/containerinstance/v20191201/__init__.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
# Export this package's modules as members:
from ._enums import *
from .container_group import *
from .get_container_group import *
from ._inputs impor... | 31.411765 | 108 | 0.690075 |
41bfc020765e73d24bda6908d7a7c9d81a1d439e | 23,278 | py | Python | bin/cmake_build.py | bloomberg/bde-tools | 9a815f03310b23c027389085ec2854f17ad6fb24 | [
"Apache-2.0"
] | 58 | 2015-01-11T23:03:10.000Z | 2022-01-16T07:51:56.000Z | bin/cmake_build.py | bloomberg/bde-tools | 9a815f03310b23c027389085ec2854f17ad6fb24 | [
"Apache-2.0"
] | 30 | 2015-01-22T19:59:36.000Z | 2021-08-18T14:43:00.000Z | bin/cmake_build.py | bloomberg/bde-tools | 9a815f03310b23c027389085ec2854f17ad6fb24 | [
"Apache-2.0"
] | 45 | 2015-01-30T10:31:06.000Z | 2022-01-16T07:51:58.000Z | #!/usr/bin/env python
from __future__ import print_function
import argparse
import collections
import errno
import json
import os
import platform
import shutil
import subprocess
import sys
import multiprocessing
####################################################################
# MSVC environment setup routines
if... | 36.832278 | 126 | 0.566286 |
f02d0059250ba47af31a38ac8aa6a7ce9def095f | 646,006 | py | Python | src/oci/identity/identity_client.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/identity/identity_client.py | xjuarez/oci-python-sdk | 3c1604e4e212008fb6718e2f68cdb5ef71fd5793 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | src/oci/identity/identity_client.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... | 49.456898 | 261 | 0.653345 |
f72e912ac0db16f9ba684696ee7a33c6512ccc03 | 328 | py | Python | src/django-nonrel/tests/regressiontests/admin_scripts/management/commands/app_command.py | adamjmcgrath/glancydesign | 826ede7c639879d5b79ee730eb5e91422768cb02 | [
"BSD-3-Clause"
] | 790 | 2015-01-03T02:13:39.000Z | 2020-05-10T19:53:57.000Z | tests/regressiontests/admin_scripts/management/commands/app_command.py | mradziej/django | 5d38965743a369981c9a738a298f467f854a2919 | [
"BSD-3-Clause"
] | 1,361 | 2015-01-08T23:09:40.000Z | 2020-04-14T00:03:04.000Z | tests/regressiontests/admin_scripts/management/commands/app_command.py | mradziej/django | 5d38965743a369981c9a738a298f467f854a2919 | [
"BSD-3-Clause"
] | 155 | 2015-01-08T22:59:31.000Z | 2020-04-08T08:01:53.000Z | from django.core.management.base import AppCommand
class Command(AppCommand):
help = 'Test Application-based commands'
requires_model_validation = False
args = '[appname ...]'
def handle_app(self, app, **options):
print 'EXECUTE:AppCommand app=%s, options=%s' % (app, sorted(options.items()))
... | 29.818182 | 86 | 0.67378 |
b8880008b220ed49c8223a3097a7592e4fd375a4 | 8,648 | py | Python | tests/mockssh.py | NinthDecimal/mrjob | e31dc43fbb11cf74efa80ce43c730ac0a6829b6b | [
"Apache-2.0"
] | 1 | 2015-02-22T00:12:25.000Z | 2015-02-22T00:12:25.000Z | tests/mockssh.py | NinthDecimal/mrjob | e31dc43fbb11cf74efa80ce43c730ac0a6829b6b | [
"Apache-2.0"
] | 1 | 2021-03-26T00:47:44.000Z | 2021-03-26T00:47:44.000Z | tests/mockssh.py | Milstein/mrjob | 226a741548cf125ecfb549b7c50d52cda932d045 | [
"Apache-2.0"
] | 1 | 2021-06-27T10:20:56.000Z | 2021-06-27T10:20:56.000Z | # Copyright 2009-2012 Yelp
#
# 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, softwa... | 34.181818 | 82 | 0.609736 |
305b0ea0e10090982a1eb65ca104deb98d4d92e9 | 7,027 | py | Python | v1.0.0.test/toontown/coghq/DistributedDoorEntityAI.py | TTOFFLINE-LEAK/ttoffline | bb0e91704a755d34983e94288d50288e46b68380 | [
"MIT"
] | 4 | 2019-07-01T15:46:43.000Z | 2021-07-23T16:26:48.000Z | v1.0.0.test/toontown/coghq/DistributedDoorEntityAI.py | TTOFFLINE-LEAK/ttoffline | bb0e91704a755d34983e94288d50288e46b68380 | [
"MIT"
] | 1 | 2019-06-29T03:40:05.000Z | 2021-06-13T01:15:16.000Z | v1.0.0.test/toontown/coghq/DistributedDoorEntityAI.py | TTOFFLINE-LEAK/ttoffline | bb0e91704a755d34983e94288d50288e46b68380 | [
"MIT"
] | 4 | 2019-07-28T21:18:46.000Z | 2021-02-25T06:37:25.000Z | from direct.distributed.ClockDelta import *
from direct.directnotify import DirectNotifyGlobal
from direct.showbase import DirectObject
import DistributedDoorEntityBase
from direct.distributed import DistributedObjectAI
from otp.level import DistributedEntityAI
from direct.fsm import FourStateAI
from direct.fsm import ... | 32.99061 | 176 | 0.657606 |
5cea405db059a0a9c6520a83b480c7dac0897430 | 1,182 | py | Python | experiments/experiment2/figure-speed.py | pytzcarraldo/paper_topology_public | b95bb38e6be9288f292eabcdb12c957f47b76377 | [
"MIT"
] | 2 | 2020-05-11T14:34:28.000Z | 2020-05-11T14:51:06.000Z | experiments/experiment2/figure-speed.py | pytzcarraldo/paper_topology_public | b95bb38e6be9288f292eabcdb12c957f47b76377 | [
"MIT"
] | null | null | null | experiments/experiment2/figure-speed.py | pytzcarraldo/paper_topology_public | b95bb38e6be9288f292eabcdb12c957f47b76377 | [
"MIT"
] | null | null | null | import sys
import numpy as np
import matplotlib.pyplot as plt
sys.path.append("../../../toolbox")
from toolbox import plot as ph
import helpers
n = 1000
rej_thresh = [0.025]
rej_times = np.array([0, 0, 0, 0, 0, 144128, 0]) / 60 / 60
smc_thresh = np.array([0.3, 0.2, 0.1, 0.075, 0.05, 0.025, 0.01])
smc_times = np.array... | 26.863636 | 75 | 0.612521 |
5f98b386217e1441c36e6a0e4031a2fd6b0c62a1 | 206 | py | Python | users/forms.py | indominus97/Mini-project-v.2.1 | 5dc9447370e2e64eb69698cdeed9b2d06490c4ea | [
"BSD-3-Clause"
] | null | null | null | users/forms.py | indominus97/Mini-project-v.2.1 | 5dc9447370e2e64eb69698cdeed9b2d06490c4ea | [
"BSD-3-Clause"
] | null | null | null | users/forms.py | indominus97/Mini-project-v.2.1 | 5dc9447370e2e64eb69698cdeed9b2d06490c4ea | [
"BSD-3-Clause"
] | null | null | null | from django.contrib.auth.models import User
from django import forms
class UserForm(forms.ModelForm):
password = forms.CharField()
class Meta:
model = User
fields = ['username', 'email', 'password'] | 22.888889 | 44 | 0.737864 |
a1eba7a3c6aa2d2df61c924c946e070d19459ac8 | 334 | py | Python | app/tests/api/test_recipe.py | kevinbowen777/fastapi-demo | 7c932c3423bf663c06722be11369a73843347e57 | [
"MIT"
] | null | null | null | app/tests/api/test_recipe.py | kevinbowen777/fastapi-demo | 7c932c3423bf663c06722be11369a73843347e57 | [
"MIT"
] | null | null | null | app/tests/api/test_recipe.py | kevinbowen777/fastapi-demo | 7c932c3423bf663c06722be11369a73843347e57 | [
"MIT"
] | null | null | null | from app.core.config import settings
def test_fetch_ideas_reddit_sync(client):
# When
response = client.get(f"{settings.API_V1_STR}/recipes/ideas/")
data = response.json()
# Then
assert response.status_code == 200
for key in data.keys():
assert key in ["recipes", "easyrecipes", "TopSe... | 25.692308 | 68 | 0.685629 |
34a4d6826723eedfa3ca331ad228cfd36472a071 | 417 | py | Python | Chapter02/B06246_02_06-filterAttributes.py | mapenthusiast/QGIS-Python-Programming-Cookbook-Second-Edition | 1b2fefdb09f614a2005976a451f882a198c6c9c5 | [
"MIT"
] | 43 | 2017-03-27T18:58:26.000Z | 2022-03-25T15:29:45.000Z | Chapter02/B06246_02_06-filterAttributes.py | mapenthusiast/QGIS-Python-Programming-Cookbook-Second-Edition | 1b2fefdb09f614a2005976a451f882a198c6c9c5 | [
"MIT"
] | 2 | 2018-07-02T09:23:47.000Z | 2018-08-23T13:57:41.000Z | Chapter02/B06246_02_06-filterAttributes.py | mapenthusiast/QGIS-Python-Programming-Cookbook-Second-Edition | 1b2fefdb09f614a2005976a451f882a198c6c9c5 | [
"MIT"
] | 31 | 2017-03-08T06:37:22.000Z | 2021-12-17T21:51:30.000Z | # Filtering a Layer by Attributes
# https://geospatialpython.googlecode.com/svn/NYC_MUSEUMS_GEO.zip
lyrPts = QgsVectorLayer("/qgis_data/nyc/NYC_MUSEUMS_GEO.shp", "Museums", "ogr")
QgsMapLayerRegistry.instance().addMapLayers([lyrPts])
selection = lyrPts.getFeatures(QgsFeatureRequest().setFilterExpression(u'"ZIP" = 100... | 41.7 | 89 | 0.788969 |
837ebe92e4564bd002e10416038aff5c3fa1f900 | 101,768 | py | Python | keras/backend/theano_backend.py | PJmouraocs/keras | 7a39b6c62d43c25472b2c2476bd2a8983ae4f682 | [
"MIT"
] | 4 | 2019-10-20T11:21:08.000Z | 2020-04-15T09:22:53.000Z | keras/backend/theano_backend.py | PJmouraocs/keras | 7a39b6c62d43c25472b2c2476bd2a8983ae4f682 | [
"MIT"
] | 7 | 2021-05-21T16:51:48.000Z | 2022-03-12T00:50:26.000Z | keras/backend/theano_backend.py | PJmouraocs/keras | 7a39b6c62d43c25472b2c2476bd2a8983ae4f682 | [
"MIT"
] | 2 | 2020-02-23T14:54:53.000Z | 2020-08-25T18:45:24.000Z | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from collections import defaultdict
from contextlib import contextmanager
import theano
from theano import tensor as T
from theano.sandbox.rng_mrg import MRG_RandomStreams as RandomStreams
from theano.tensor.si... | 33.979299 | 85 | 0.597339 |
4a68b88900723e838beeadb125a4f71f19ae77f2 | 4,532 | py | Python | targets/atlys_hdmi2eth.py | RacingTornado/fx2_emulation_timvideos | 7c12d6635a2e94c4afdcbfe6bce590b170ac1112 | [
"MIT"
] | 2 | 2017-03-01T09:42:23.000Z | 2021-01-11T04:43:22.000Z | targets/atlys_hdmi2eth.py | RacingTornado/fx2_emulation_timvideos | 7c12d6635a2e94c4afdcbfe6bce590b170ac1112 | [
"MIT"
] | null | null | null | targets/atlys_hdmi2eth.py | RacingTornado/fx2_emulation_timvideos | 7c12d6635a2e94c4afdcbfe6bce590b170ac1112 | [
"MIT"
] | null | null | null | from migen.fhdl.specials import Keep
from migen.flow.actor import *
from migen.actorlib.fifo import AsyncFIFO, SyncFIFO
from misoclib.soc import mem_decoder
from liteeth.common import *
from liteeth.phy import LiteEthPHY
from liteeth.phy.mii import LiteEthPHYMII
from liteeth.core import LiteEthUDPIPCore
from liteeth.... | 41.2 | 136 | 0.711386 |
9da13eda5d28dbbb508d3cfcdcd8e32f15e59cd8 | 844 | py | Python | qiskit/extensions/quantum_initializer/ucx.py | romainfd/qiskit-terra | b5285ccc5cb1d17b7c73402833f2750b93652426 | [
"Apache-2.0"
] | 2 | 2019-06-28T19:58:42.000Z | 2019-07-26T05:04:02.000Z | qiskit/extensions/quantum_initializer/ucx.py | romainfd/qiskit-terra | b5285ccc5cb1d17b7c73402833f2750b93652426 | [
"Apache-2.0"
] | 3 | 2018-11-13T17:33:37.000Z | 2018-12-03T09:35:00.000Z | qiskit/extensions/quantum_initializer/ucx.py | romainfd/qiskit-terra | b5285ccc5cb1d17b7c73402833f2750b93652426 | [
"Apache-2.0"
] | 2 | 2017-12-03T15:48:14.000Z | 2018-03-11T13:08:03.000Z | # -*- coding: utf-8 -*-
# This code is part of Qiskit.
#
# (C) Copyright IBM 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 modif... | 32.461538 | 88 | 0.74763 |
fca8d6da96a8a8e4867aeb7f51ef9d14053d705d | 396 | py | Python | instaproj/wsgi.py | rehemafaith/instaclone | 00f711498217a6fe08bc94fd9d5c00e6d1d3ecb0 | [
"MIT"
] | null | null | null | instaproj/wsgi.py | rehemafaith/instaclone | 00f711498217a6fe08bc94fd9d5c00e6d1d3ecb0 | [
"MIT"
] | 5 | 2021-03-19T00:50:03.000Z | 2021-09-08T01:00:56.000Z | instaproj/wsgi.py | rehemafaith/instaclone | 00f711498217a6fe08bc94fd9d5c00e6d1d3ecb0 | [
"MIT"
] | null | null | null | """
WSGI config for instaproj project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.11/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_SE... | 23.294118 | 78 | 0.787879 |
d5d9cd8e35ca25a8a16cf065004d65ac30543e13 | 1,268 | py | Python | rename_move_images_into_folders.py | RaviTejaKomma/Automate-Boring-Stuff-Python | e5d8df1b060f20e50691f824ecabc3a30dc845c7 | [
"MIT"
] | null | null | null | rename_move_images_into_folders.py | RaviTejaKomma/Automate-Boring-Stuff-Python | e5d8df1b060f20e50691f824ecabc3a30dc845c7 | [
"MIT"
] | null | null | null | rename_move_images_into_folders.py | RaviTejaKomma/Automate-Boring-Stuff-Python | e5d8df1b060f20e50691f824ecabc3a30dc845c7 | [
"MIT"
] | null | null | null |
from PIL import Image
import os
import shutil
def rename_move_images(SOURCE_DIR,DESTINATION_DIR):
files = os.listdir(SOURCE_DIR)
for file in files:
try:
pathAndFilename = os.path.join(SOURCE_DIR,file)
time_stamp = Image.open(pathAndFilename)._getexif()[36867]
... | 33.368421 | 95 | 0.634069 |
642ae8848c175dca17328e8ba616cd6ebf165de0 | 7,728 | py | Python | embeddings.py | lealex262/DeepSpeaker-pytorch | 99724865fe5658115698f2f36ea6db984829d7af | [
"MIT"
] | null | null | null | embeddings.py | lealex262/DeepSpeaker-pytorch | 99724865fe5658115698f2f36ea6db984829d7af | [
"MIT"
] | null | null | null | embeddings.py | lealex262/DeepSpeaker-pytorch | 99724865fe5658115698f2f36ea6db984829d7af | [
"MIT"
] | null | null | null | import argparse
import glob
import os
from tqdm import tqdm
import fnmatch
import numpy as np
import torch
import torch.optim as optim
from torch.autograd import Variable
import torch.utils.data as data
import torchvision.transforms as transforms
try:
from .audio_processing import totensor, truncate... | 34.346667 | 162 | 0.606496 |
4ddf271143e6845be823ce3220fc08f6d6ff64ab | 14,727 | py | Python | src/sage/geometry/polyhedron/backend_field.py | UCD4IDS/sage | 43474c96d533fd396fe29fe0782d44dc7f5164f7 | [
"BSL-1.0"
] | 1,742 | 2015-01-04T07:06:13.000Z | 2022-03-30T11:32:52.000Z | src/sage/geometry/polyhedron/backend_field.py | UCD4IDS/sage | 43474c96d533fd396fe29fe0782d44dc7f5164f7 | [
"BSL-1.0"
] | 66 | 2015-03-19T19:17:24.000Z | 2022-03-16T11:59:30.000Z | src/sage/geometry/polyhedron/backend_field.py | UCD4IDS/sage | 43474c96d533fd396fe29fe0782d44dc7f5164f7 | [
"BSL-1.0"
] | 495 | 2015-01-10T10:23:18.000Z | 2022-03-24T22:06:11.000Z | """
The Python backend
While slower than specialized C/C++ implementations, the
implementation is general and works with any exact field in Sage that
allows you to define polyhedra.
EXAMPLES::
sage: p0 = (0, 0)
sage: p1 = (1, 0)
sage: p2 = (1/2, AA(3).sqrt()/2) ... | 44.092814 | 123 | 0.548788 |
8d7e37e4bce3a43aac894b40b94cacfd52f04a6d | 5,929 | py | Python | experiments.py | katherinelihanyu/MultiPointPushing | 68da19e65aa2813382490b51d77358206344db10 | [
"Apache-2.0"
] | null | null | null | experiments.py | katherinelihanyu/MultiPointPushing | 68da19e65aa2813382490b51d77358206344db10 | [
"Apache-2.0"
] | null | null | null | experiments.py | katherinelihanyu/MultiPointPushing | 68da19e65aa2813382490b51d77358206344db10 | [
"Apache-2.0"
] | null | null | null | import numpy as np
import os
from state import *
def run_heap2(data_path, heap_num, num_steps):
if num_steps == 1:
return run_heap_one_step(data_path, heap_num)
path_i = os.path.join(data_path, "env%d.npy" % heap_num)
info = np.load(path_i)
num_objects = int(info[-1])
env1 = State(summary=... | 55.933962 | 273 | 0.685613 |
9fc0e494633d239c1343a88eb0bbbb5a8ee75cb8 | 33,513 | py | Python | tensorflow/python/framework/tensor_util.py | pengfeisu/tensorflow | cae852a32ee8ef86d4a58512c1177359c5bfd465 | [
"Apache-2.0"
] | 3 | 2017-12-04T07:45:22.000Z | 2018-04-20T06:53:17.000Z | tensorflow/python/framework/tensor_util.py | pengfeisu/tensorflow | cae852a32ee8ef86d4a58512c1177359c5bfd465 | [
"Apache-2.0"
] | null | null | null | tensorflow/python/framework/tensor_util.py | pengfeisu/tensorflow | cae852a32ee8ef86d4a58512c1177359c5bfd465 | [
"Apache-2.0"
] | 2 | 2019-05-07T08:41:50.000Z | 2020-10-14T13:29:37.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... | 37.953567 | 106 | 0.694775 |
48869d5dcda7ffc7cbb7cbcad76487f1c080d17a | 2,035 | py | Python | bla.py | Mik-the-koder/timeTable | 79dbb0d662c3e4b17007292c2c0f4314f3e3199e | [
"MIT"
] | null | null | null | bla.py | Mik-the-koder/timeTable | 79dbb0d662c3e4b17007292c2c0f4314f3e3199e | [
"MIT"
] | null | null | null | bla.py | Mik-the-koder/timeTable | 79dbb0d662c3e4b17007292c2c0f4314f3e3199e | [
"MIT"
] | null | null | null | """ A script that send an SMS alert about a predefined TimeTabel"""
# imports
from twilio.rest import TwilioRestClient
from datetime import datetime
import time
# Day defeniton
# fill your time and class according to the template below
# day = {Time:class}
# Time = float, class = String
mon = {}
tue = {}
... | 33.360656 | 166 | 0.687469 |
5b8c1c9cf6bcd68204b98cd19ff76ea7b7d562f7 | 1,758 | py | Python | test/utils.py | alexkunger/dialpad-python-sdk | f7319f791b4c94d07750be14bb57bb58ab37102c | [
"MIT"
] | null | null | null | test/utils.py | alexkunger/dialpad-python-sdk | f7319f791b4c94d07750be14bb57bb58ab37102c | [
"MIT"
] | null | null | null | test/utils.py | alexkunger/dialpad-python-sdk | f7319f791b4c94d07750be14bb57bb58ab37102c | [
"MIT"
] | null | null | null | import json
import os
import requests
RESOURCE_PATH = os.path.join(os.path.dirname(os.path.realpath(__file__)), '.resources')
def resource_filepath(filename):
"""Returns a path to the given file name in the test resources directory."""
return os.path.join(RESOURCE_PATH, filename)
def prepare_test_resources():... | 30.310345 | 93 | 0.697383 |
466aa02b5fe37c87621dff4f95ce3206cc08a569 | 17,185 | py | Python | modules/dbnd-airflow-monitor/test_dbnd_airflow_monitor/runtime_syncer/test_runtime_syncer.py | dmytrostriletskyi/dbnd | d4a5f5167523e80439c9d64182cdc87b40cbc48f | [
"Apache-2.0"
] | null | null | null | modules/dbnd-airflow-monitor/test_dbnd_airflow_monitor/runtime_syncer/test_runtime_syncer.py | dmytrostriletskyi/dbnd | d4a5f5167523e80439c9d64182cdc87b40cbc48f | [
"Apache-2.0"
] | null | null | null | modules/dbnd-airflow-monitor/test_dbnd_airflow_monitor/runtime_syncer/test_runtime_syncer.py | dmytrostriletskyi/dbnd | d4a5f5167523e80439c9d64182cdc87b40cbc48f | [
"Apache-2.0"
] | null | null | null | import random
import pytest
from mock import Mock, patch
from airflow_monitor.common.config_data import AirflowServerConfig
from airflow_monitor.fixer.runtime_fixer import AirflowRuntimeFixer
from airflow_monitor.syncer.runtime_syncer import AirflowRuntimeSyncer
from ..mock_airflow_data_fetcher import MockDagRun, M... | 35.802083 | 102 | 0.636893 |
b173bcbba0f70af97badcfb3d24494d1d5a45a61 | 5,856 | py | Python | lazaro/agents/loggers/tensorboard.py | GabrielMusat/lazaro | 9879e938eb1e6da1b6974edf8ab41ece7f33063c | [
"Apache-2.0"
] | 4 | 2021-05-03T15:48:44.000Z | 2021-05-23T16:05:42.000Z | lazaro/agents/loggers/tensorboard.py | GabrielMusat/lazaro | 9879e938eb1e6da1b6974edf8ab41ece7f33063c | [
"Apache-2.0"
] | null | null | null | lazaro/agents/loggers/tensorboard.py | GabrielMusat/lazaro | 9879e938eb1e6da1b6974edf8ab41ece7f33063c | [
"Apache-2.0"
] | null | null | null | import datetime
import json
import os
import typing as T
from abc import ABC
import torch
from .tensorboard_logger import TensorBoard
from ..base import models
from ..base.base_agent import BaseAgent
from ...environments import Environment
DISABLE_EMBEDDING = True
class TensorBoardLogger(BaseAgent, ABC):
def ... | 42.129496 | 120 | 0.608607 |
84be18304362b187ef36dcb8eddda66f0b0ce7d8 | 10,115 | py | Python | src/oic/utils/webfinger.py | chengweilun/pyoidc | 99baf58f44daa5c9239c2870b8d874af08002248 | [
"Apache-2.0"
] | null | null | null | src/oic/utils/webfinger.py | chengweilun/pyoidc | 99baf58f44daa5c9239c2870b8d874af08002248 | [
"Apache-2.0"
] | null | null | null | src/oic/utils/webfinger.py | chengweilun/pyoidc | 99baf58f44daa5c9239c2870b8d874af08002248 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
import json
import logging
import re
import requests
from six.moves.urllib.parse import urlencode
from six.moves.urllib.parse import urlparse
from oic.exception import PyoidcError
from oic.utils.time_util import in_a_while
try:
from past.builtins import basestring
except ImportError:
pass
__a... | 32.009494 | 80 | 0.550568 |
316872e6e165861177e7ba1241f88baaa7f0d09c | 172 | py | Python | Practice/Python/Sets/Set_discard_remove_pop.py | alexanderbauer89/HackerRank | 0fb6face083b0183692c9251ffe4bb635591393f | [
"MIT"
] | 1 | 2021-11-17T02:47:11.000Z | 2021-11-17T02:47:11.000Z | Practice/Python/Sets/Set_discard_remove_pop.py | alexanderbauer89/HackerRank | 0fb6face083b0183692c9251ffe4bb635591393f | [
"MIT"
] | null | null | null | Practice/Python/Sets/Set_discard_remove_pop.py | alexanderbauer89/HackerRank | 0fb6face083b0183692c9251ffe4bb635591393f | [
"MIT"
] | null | null | null | n = int(input())
s = set(map(int, input().split()))
for x in range(int(input())):
method, *args = input().split()
getattr(s, method)(*map(int, args))
print(sum(s))
| 24.571429 | 39 | 0.587209 |
10f73ec155dc6ce854a4e6b18fa7f242c8c804f5 | 1,952 | py | Python | pyprob/ppx/Tag.py | SRagy/pyprob | c8fc67d5f4ad78d565a86c2f86abe10b73549f18 | [
"BSD-2-Clause"
] | 268 | 2017-10-16T13:09:12.000Z | 2021-12-01T19:03:12.000Z | pyprob/ppx/Tag.py | SRagy/pyprob | c8fc67d5f4ad78d565a86c2f86abe10b73549f18 | [
"BSD-2-Clause"
] | 25 | 2019-09-28T18:25:46.000Z | 2022-03-28T09:23:14.000Z | pyprob/ppx/Tag.py | SRagy/pyprob | c8fc67d5f4ad78d565a86c2f86abe10b73549f18 | [
"BSD-2-Clause"
] | 33 | 2017-10-21T16:32:00.000Z | 2021-11-24T13:42:53.000Z | # automatically generated by the FlatBuffers compiler, do not modify
# namespace: ppx
import flatbuffers
from flatbuffers.compat import import_numpy
np = import_numpy()
class Tag(object):
__slots__ = ['_tab']
@classmethod
def GetRootAsTag(cls, buf, offset):
n = flatbuffers.encode.Get(flatbuffers... | 34.245614 | 135 | 0.67623 |
6abde45e9e793a1f6694891bfd44232b15234dca | 3,194 | py | Python | game/misc/parabola.py | Michael78912/SMNW | da5a7278cf1a14e2af2e9c291a5f53ba21f265e2 | [
"MIT"
] | 1 | 2018-12-11T23:42:57.000Z | 2018-12-11T23:42:57.000Z | game/misc/parabola.py | Michael78912/SMNW | da5a7278cf1a14e2af2e9c291a5f53ba21f265e2 | [
"MIT"
] | null | null | null | game/misc/parabola.py | Michael78912/SMNW | da5a7278cf1a14e2af2e9c291a5f53ba21f265e2 | [
"MIT"
] | null | null | null | import math
import sys
import os
from pprint import pprint
import pygame as pg
from pygame.locals import QUIT
sys.stdout = open(os.path.join(os.environ['USERPROFILE'], 'Desktop', 'stdout.log'), 'w')
CLOCK = pg.time.Clock()
FPS = 60
class Arcer:
def __init__(self, img, range_, pos):
self.img = img
... | 27.534483 | 105 | 0.498435 |
7154fed89b597b08ad6687b4d2672e587c30d580 | 3,622 | py | Python | engine.py | M4t1ss/sentiment-analysis-toolkit | 632d4ab0bea6198aa307f7452d88ea743e404497 | [
"MIT"
] | null | null | null | engine.py | M4t1ss/sentiment-analysis-toolkit | 632d4ab0bea6198aa307f7452d88ea743e404497 | [
"MIT"
] | null | null | null | engine.py | M4t1ss/sentiment-analysis-toolkit | 632d4ab0bea6198aa307f7452d88ea743e404497 | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
from tqdm import tqdm
from utils import categorical_accuracy
def loss_fn(outputs, targets):
return nn.CrossEntropyLoss()(outputs, targets)
def train_fn(data_loader, model, optimizer, device, scheduler):
model.train()
train_loss, train_acc = 0.0, 0.0
for bi, d in t... | 31.77193 | 74 | 0.579238 |
3cab6896c33fded97a3ed5703dd5ff47ae5063f2 | 1,573 | py | Python | ryu/tests/unit/app/test_ws_topology.py | MrCocoaCat/ryu | 9e9571991a73380099b7ba7c6f37e0e587080a6a | [
"Apache-2.0"
] | null | null | null | ryu/tests/unit/app/test_ws_topology.py | MrCocoaCat/ryu | 9e9571991a73380099b7ba7c6f37e0e587080a6a | [
"Apache-2.0"
] | null | null | null | ryu/tests/unit/app/test_ws_topology.py | MrCocoaCat/ryu | 9e9571991a73380099b7ba7c6f37e0e587080a6a | [
"Apache-2.0"
] | null | null | null | # Copyright (C) 2013 Stratosphere 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 agree... | 28.089286 | 78 | 0.668786 |
d92dce8bdc40252e51ea8cc06828dbbbf52c8839 | 31,030 | py | Python | pygame_gui/elements/ui_text_entry_line.py | halfninja/pygame_gui | 71b1150cb0c789339a9f8d781da15bdfad604f6c | [
"MIT"
] | null | null | null | pygame_gui/elements/ui_text_entry_line.py | halfninja/pygame_gui | 71b1150cb0c789339a9f8d781da15bdfad604f6c | [
"MIT"
] | null | null | null | pygame_gui/elements/ui_text_entry_line.py | halfninja/pygame_gui | 71b1150cb0c789339a9f8d781da15bdfad604f6c | [
"MIT"
] | null | null | null | import pygame
import re
import warnings
from typing import Union, List
from pygame_gui import ui_manager
from pygame_gui.core import ui_container
from pygame_gui.core.utility import clipboard_paste, clipboard_copy
from pygame_gui.core.ui_element import UIElement
class UITextEntryLine(UIElement):
"""
A GUI el... | 51.120264 | 120 | 0.558814 |
51920c36aaae7cf45fb2a5e7d5f749aa67abe0a4 | 3,712 | py | Python | nova/tests/image/test_transfer_modules.py | vmthunder/nova | baf05caab705c5778348d9f275dc541747b7c2de | [
"Apache-2.0"
] | 7 | 2015-09-22T11:27:16.000Z | 2015-11-02T12:33:46.000Z | nova/tests/image/test_transfer_modules.py | vmthunder/nova | baf05caab705c5778348d9f275dc541747b7c2de | [
"Apache-2.0"
] | 9 | 2015-05-20T11:20:17.000Z | 2017-07-27T08:21:33.000Z | nova/tests/image/test_transfer_modules.py | vmthunder/nova | baf05caab705c5778348d9f275dc541747b7c2de | [
"Apache-2.0"
] | 13 | 2015-05-05T09:34:04.000Z | 2017-11-08T02:03:46.000Z | # 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 agreed to in... | 36.392157 | 78 | 0.652748 |
e1e3b136db300dc979a77f98860fe2c9264aaf37 | 7,478 | py | Python | riberry/services/job.py | srafehi/riberry | 2ffa48945264177c6cef88512c1bc80ca4bf1d5e | [
"MIT"
] | 2 | 2019-12-09T10:24:36.000Z | 2019-12-09T10:26:56.000Z | riberry/services/job.py | srafehi/riberry | 2ffa48945264177c6cef88512c1bc80ca4bf1d5e | [
"MIT"
] | 2 | 2018-06-11T11:34:28.000Z | 2018-08-22T12:00:19.000Z | riberry/services/job.py | srafehi/riberry | 2ffa48945264177c6cef88512c1bc80ca4bf1d5e | [
"MIT"
] | null | null | null | import json
from io import BytesIO
from typing import Dict, Tuple, List
from riberry import model, services, policy, exc
class InputFileProxy(BytesIO):
def __init__(self, obj, filename=None):
self.filename = filename
super().__init__(obj)
@classmethod
def from_object(cls, obj, filename=... | 32.798246 | 147 | 0.65793 |
2dd28d8bf2b02447bf2fb5d4d8e6f40bf21c7241 | 839 | py | Python | day_2/pattern_13.py | anishLearnsToCode/python-training-1 | ef5d6b64f888e167faecd1410563173dcc27f319 | [
"MIT"
] | 3 | 2021-01-05T18:00:14.000Z | 2021-11-28T15:43:04.000Z | day_2/pattern_13.py | anishLearnsToCode/python-training-1 | ef5d6b64f888e167faecd1410563173dcc27f319 | [
"MIT"
] | null | null | null | day_2/pattern_13.py | anishLearnsToCode/python-training-1 | ef5d6b64f888e167faecd1410563173dcc27f319 | [
"MIT"
] | null | null | null | """
n = 5
____*
___*_*
__*___*
_*_____*
*_______*
_*_____*
__*___*
___*_*
____*
2nd last row : (n - 2) th
spaces(n - 2) = 2(n - 2) - 1 = 2n - 5
# upper triangle (n)
# spaces: n - i - 1
# star: 1
# spaces: 2i - 1
# star: 1 except for first
# lower triangle (n - 1)
# spaces: i + 1
# star: 1
# spaces: k - 2i
# star: 1 ... | 13.109375 | 40 | 0.487485 |
42415c2a5d84e34babf579ebba4da78bf4120326 | 601 | py | Python | tests/test_uuid.py | vphilippon/validators | 1dd07ab19aed7dd1c61ce04eac0e59807aa6e39c | [
"MIT"
] | null | null | null | tests/test_uuid.py | vphilippon/validators | 1dd07ab19aed7dd1c61ce04eac0e59807aa6e39c | [
"MIT"
] | null | null | null | tests/test_uuid.py | vphilippon/validators | 1dd07ab19aed7dd1c61ce04eac0e59807aa6e39c | [
"MIT"
] | 7 | 2020-03-06T17:08:52.000Z | 2021-04-27T06:07:09.000Z | # -*- coding: utf-8 -*-
import pytest
from validators import uuid, ValidationFailure
@pytest.mark.parametrize(('value',), [
('2bc1c94f-0deb-43e9-92a1-4775189ec9f8',),
])
def test_returns_true_on_valid_mac_address(value):
assert uuid(value)
@pytest.mark.parametrize(('value',), [
('2bc1c94f-deb-43e9-92a1... | 27.318182 | 65 | 0.727121 |
500437bd8dbd8bd5c64a2e864167852975593dc1 | 24,366 | py | Python | main.py | zh981008/zh-farm | e8cdb977579eb29417be000331c342427c4daf54 | [
"MIT"
] | null | null | null | main.py | zh981008/zh-farm | e8cdb977579eb29417be000331c342427c4daf54 | [
"MIT"
] | null | null | null | main.py | zh981008/zh-farm | e8cdb977579eb29417be000331c342427c4daf54 | [
"MIT"
] | null | null | null | import uiautomator2 as u2
import time
from utils import *
from cv import *
from Automator import *
import matplotlib.pylab as plt
# plt.ion()
# fig, ax = plt.subplots(1)
# plt.show()
a = Automator()
a.start()
def login_auth(ac,pwd):
need_auth = a.login(ac=ac,pwd=pwd)
if need_auth:
auth_name,auth_id ... | 30.419476 | 121 | 0.577444 |
4d691bb177f04a6e590b3c372ab16fd626d7ba46 | 5,405 | py | Python | Autocoders/Python/src/fprime_ac/generators/visitors/ChannelVisitor.py | sthagen/nasa-fprime | 7762d633d1c0728e68ef9217fb12a7c3070b61ac | [
"Apache-2.0"
] | 1 | 2022-03-15T16:17:15.000Z | 2022-03-15T16:17:15.000Z | Autocoders/Python/src/fprime_ac/generators/visitors/ChannelVisitor.py | sthagen/nasa-fprime | 7762d633d1c0728e68ef9217fb12a7c3070b61ac | [
"Apache-2.0"
] | null | null | null | Autocoders/Python/src/fprime_ac/generators/visitors/ChannelVisitor.py | sthagen/nasa-fprime | 7762d633d1c0728e68ef9217fb12a7c3070b61ac | [
"Apache-2.0"
] | null | null | null | # ===============================================================================
# NAME: ChannelVisitor.py
#
# DESCRIPTION: A visitor responsible for the generation of component header
# file.
#
# AUTHOR: reder
# EMAIL: reder@jpl.nasa.gov
# DATE CREATED : Feb 5, 2007
#
# Copyright 2013, California Insti... | 31.242775 | 82 | 0.547086 |
b252be7829f9971105bea5e317909e687d3dcf78 | 159 | py | Python | demos/test_calculations.py | erik-grabljevec/Tennis-Modelling | ca67a4e642a6e6b4d905c701de38160a4cf25495 | [
"MIT"
] | 4 | 2020-02-07T18:48:54.000Z | 2021-04-22T21:07:00.000Z | demos/test_calculations.py | erik-grabljevec/Tennis-Modelling | ca67a4e642a6e6b4d905c701de38160a4cf25495 | [
"MIT"
] | null | null | null | demos/test_calculations.py | erik-grabljevec/Tennis-Modelling | ca67a4e642a6e6b4d905c701de38160a4cf25495 | [
"MIT"
] | null | null | null | __author__ = 'riko'
import calculations as calc
import numpy as np
A = np.array([1.0, 2.0, 3.0, 4.0, 5.0, 6.0])
A = calc.smooth_time_series(A, 0.5)
print A | 15.9 | 44 | 0.660377 |
07eeb1765278b52f84ad3a7e52576bfae5990c1e | 4,861 | py | Python | src/abaqus/Load/BodyCurrentDensity.py | Haiiliin/PyAbaqus | f20db6ebea19b73059fe875a53be370253381078 | [
"MIT"
] | 7 | 2022-01-21T09:15:45.000Z | 2022-02-15T09:31:58.000Z | src/abaqus/Load/BodyCurrentDensity.py | Haiiliin/PyAbaqus | f20db6ebea19b73059fe875a53be370253381078 | [
"MIT"
] | null | null | null | src/abaqus/Load/BodyCurrentDensity.py | Haiiliin/PyAbaqus | f20db6ebea19b73059fe875a53be370253381078 | [
"MIT"
] | null | null | null | from abaqusConstants import *
from .Load import Load
from ..Region.Region import Region
class BodyCurrentDensity(Load):
"""The BodyCurrentDensity object stores the data for a body current.
The BodyCurrentDensity object is derived from the Load object.
Attributes
----------
name: str
A St... | 40.173554 | 117 | 0.647809 |
0adf2e8fc2c5f1cdd0f7954e06ed61fe1c11c153 | 2,013 | py | Python | v9/01_tesseract_test.py | gavinIRL/RHBotArray | 2b537c9657d74e9dd3f9dc8f679080c440df6e0c | [
"MIT"
] | null | null | null | v9/01_tesseract_test.py | gavinIRL/RHBotArray | 2b537c9657d74e9dd3f9dc8f679080c440df6e0c | [
"MIT"
] | 113 | 2021-05-02T13:23:10.000Z | 2021-07-12T21:22:01.000Z | v9/01_tesseract_test.py | gavinIRL/RHBotArray | 2b537c9657d74e9dd3f9dc8f679080c440df6e0c | [
"MIT"
] | null | null | null | # This will be a test file for detecting words in the game window
# Initial usage is aimed at identifying loot to sell
# And also for automated levelling by identifying mission accepts, etc.
from pytesseract import Output
import pytesseract
from PIL import Image
import os
import cv2
os.chdir(os.path.dirname(os.path.abs... | 35.315789 | 109 | 0.692499 |
b0404314fb4a4a675a9a16b921b8872bdce3782c | 47 | py | Python | test.py | 5tarlight/ai-blink | 0d88bb8ec008e0131f1184c801a1c217b4b03c0e | [
"MIT"
] | null | null | null | test.py | 5tarlight/ai-blink | 0d88bb8ec008e0131f1184c801a1c217b4b03c0e | [
"MIT"
] | null | null | null | test.py | 5tarlight/ai-blink | 0d88bb8ec008e0131f1184c801a1c217b4b03c0e | [
"MIT"
] | null | null | null | import os
print(os.path.abspath(os.getcwd()))
| 11.75 | 35 | 0.723404 |
f5432a69a1aff0f509c99b9be9571a10e8c403a1 | 1,753 | py | Python | solutions/prog14.py | aditya95sriram/aoc2021 | e73c2bb9707858ab850b8a4a8dbee0d6e78bd8b8 | [
"MIT"
] | null | null | null | solutions/prog14.py | aditya95sriram/aoc2021 | e73c2bb9707858ab850b8a4a8dbee0d6e78bd8b8 | [
"MIT"
] | null | null | null | solutions/prog14.py | aditya95sriram/aoc2021 | e73c2bb9707858ab850b8a4a8dbee0d6e78bd8b8 | [
"MIT"
] | null | null | null | import re, os, sys
from functools import reduce
from itertools import combinations as comb, permutations as perm, combinations_with_replacement as combr
from operator import itemgetter
from pprint import pprint
from math import *
from collections import defaultdict, Counter
import networkx as nx
import numpy as np
def... | 25.405797 | 104 | 0.588705 |
04253eceaa08d48fda86b0993b34459f92f6ec7d | 1,329 | py | Python | hbauth/core/migrations/0001_initial.py | LucasMatheusW/hb-auth | f1432a9c344f57f8e7d1947f9a2c10e527968ac0 | [
"BSD-3-Clause"
] | null | null | null | hbauth/core/migrations/0001_initial.py | LucasMatheusW/hb-auth | f1432a9c344f57f8e7d1947f9a2c10e527968ac0 | [
"BSD-3-Clause"
] | null | null | null | hbauth/core/migrations/0001_initial.py | LucasMatheusW/hb-auth | f1432a9c344f57f8e7d1947f9a2c10e527968ac0 | [
"BSD-3-Clause"
] | null | null | null | # Generated by Django 4.0.3 on 2022-03-27 22:25
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
migrat... | 40.272727 | 197 | 0.663657 |
e2c9beb77ed6623b11d70555cb2fb8917fde5e5b | 4,614 | py | Python | sdk/python/pulumi_vsphere/get_vmfs_disks.py | donovanmuller/pulumi-vsphere | 83c18fb177b41690416ef7517c512349b3da9be6 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_vsphere/get_vmfs_disks.py | donovanmuller/pulumi-vsphere | 83c18fb177b41690416ef7517c512349b3da9be6 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_vsphere/get_vmfs_disks.py | donovanmuller/pulumi-vsphere | 83c18fb177b41690416ef7517c512349b3da9be6 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** 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, Dict, List, Mapping, Optional, Tuple, Union
from . import _... | 34.432836 | 129 | 0.653879 |
7b813a8a2de1eb39e344931f58d0ea5d1e58baaa | 2,209 | py | Python | aliyun-python-sdk-iot/aliyunsdkiot/request/v20180120/InvokeDataAPIServiceRequest.py | liumihust/aliyun-openapi-python-sdk | c7b5dd4befae4b9c59181654289f9272531207ef | [
"Apache-2.0"
] | null | null | null | aliyun-python-sdk-iot/aliyunsdkiot/request/v20180120/InvokeDataAPIServiceRequest.py | liumihust/aliyun-openapi-python-sdk | c7b5dd4befae4b9c59181654289f9272531207ef | [
"Apache-2.0"
] | null | null | null | aliyun-python-sdk-iot/aliyunsdkiot/request/v20180120/InvokeDataAPIServiceRequest.py | liumihust/aliyun-openapi-python-sdk | c7b5dd4befae4b9c59181654289f9272531207ef | [
"Apache-2.0"
] | null | null | null | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 41.679245 | 118 | 0.721593 |
bbc80db30d24579ead9ae2da37933f3d4d9c4512 | 947 | py | Python | controller/stoprecognitionhandler.py | rajun1971/SpeechRecognitionWar | f3f1311d32aca795082884c40db1862b994f76c4 | [
"MIT"
] | 1 | 2020-05-27T05:23:23.000Z | 2020-05-27T05:23:23.000Z | controller/stoprecognitionhandler.py | rajun1971/SpeechRecognitionWar | f3f1311d32aca795082884c40db1862b994f76c4 | [
"MIT"
] | 3 | 2019-09-15T02:03:53.000Z | 2021-04-30T20:55:33.000Z | controller/stoprecognitionhandler.py | rajun1971/SpeechRecognitionWar | f3f1311d32aca795082884c40db1862b994f76c4 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import tornado.web
from logzero import logger
import model
class StopRecognitionHandler(tornado.web.RequestHandler):
def get(self, session_id):
logger.info('get:Enter')
tcs = model.SessionCollector().GetPropertyInSession(
session_id)['transcoders']
for ... | 27.057143 | 60 | 0.56283 |
282d73faa0e81b7a4d4c3164d081990e131ed957 | 23 | py | Python | keras/__init__.py | jgc128/keras | bb45991899a86df0490029661735ad9213f1e3bd | [
"MIT"
] | 1 | 2020-07-12T23:39:14.000Z | 2020-07-12T23:39:14.000Z | keras/__init__.py | jgc128/keras | bb45991899a86df0490029661735ad9213f1e3bd | [
"MIT"
] | null | null | null | keras/__init__.py | jgc128/keras | bb45991899a86df0490029661735ad9213f1e3bd | [
"MIT"
] | 1 | 2021-01-26T02:31:24.000Z | 2021-01-26T02:31:24.000Z | __version__ = '0.3.0'
| 11.5 | 22 | 0.608696 |
af2326ccd466ece9361a0990494157dfa76ff835 | 2,528 | py | Python | benten/cwl/linkedfiletype.py | stain/benten | 40440d36025e0b27b8dfa6752aa76b15e7abc0d1 | [
"Apache-2.0"
] | null | null | null | benten/cwl/linkedfiletype.py | stain/benten | 40440d36025e0b27b8dfa6752aa76b15e7abc0d1 | [
"Apache-2.0"
] | null | null | null | benten/cwl/linkedfiletype.py | stain/benten | 40440d36025e0b27b8dfa6752aa76b15e7abc0d1 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2019 Seven Bridges. See LICENSE
import shlex
import pathlib
from .basetype import CWLBaseType, IntelligenceContext, Intelligence, MapSubjectPredicate
from ..langserver.lspobjects import Range, Location, CompletionItem, Hover
from .lib import validate_and_load_linked_file
from ..code.intelligence impo... | 31.6 | 90 | 0.613924 |
7c08091dbfcd835b99f03dcb1891e10a028bac94 | 5,297 | py | Python | prefabricated_nodes/PolarizationRot.py | artiste-qb-net/QFog-Pyodide | 9ce6ad7ef6a7f7a71bbcd4fe6a6a35a5f02e8744 | [
"BSD-3-Clause"
] | null | null | null | prefabricated_nodes/PolarizationRot.py | artiste-qb-net/QFog-Pyodide | 9ce6ad7ef6a7f7a71bbcd4fe6a6a35a5f02e8744 | [
"BSD-3-Clause"
] | null | null | null | prefabricated_nodes/PolarizationRot.py | artiste-qb-net/QFog-Pyodide | 9ce6ad7ef6a7f7a71bbcd4fe6a6a35a5f02e8744 | [
"BSD-3-Clause"
] | null | null | null | # from DiscreteCondPot import *
from nodes.BayesNode import *
from prefabricated_nodes.BeamSplitter import *
import math
import cmath
import misc.Utilities as ut
class PolarizationRot(BayesNode):
"""
The Constructor of this class builds a BayesNode that has a transition
matrix appropriate for a polarizati... | 29.758427 | 76 | 0.559184 |
a016684006e7ec5e3548733eb43b5553678c4a28 | 338 | py | Python | functions/get_nag_ett_value.py | daviddoret/pyxag | 6884c7e100d28c3ce6273248caa40eaeab920bc5 | [
"MIT"
] | 1 | 2019-10-27T15:56:27.000Z | 2019-10-27T15:56:27.000Z | functions/get_nag_ett_value.py | daviddoret/pynag | 6884c7e100d28c3ce6273248caa40eaeab920bc5 | [
"MIT"
] | 11 | 2019-11-04T18:21:16.000Z | 2019-11-07T03:22:41.000Z | functions/get_nag_ett_value.py | daviddoret/pynag | 6884c7e100d28c3ce6273248caa40eaeab920bc5 | [
"MIT"
] | null | null | null | import logging
def get_nag_ett_value(nag, input_value, function_name):
logging.debug('get_nag_ett_value(%s, %s)', input_value, function_name)
input_index = nag.convert_input_to_ett_y_index(input_value)
function_index = nag.convert_function_name_to_ett_x_index(function_name)
return nag.ett[input_index,... | 33.8 | 76 | 0.801775 |
e57e3f0336000794416e87e94a6ae0555097e0f4 | 13,693 | py | Python | appengine/swarming/swarming_bot/bot_code/remote_client.py | Swift1313/luci-py | 0a4fdfc25f89833026be6a8b29c0a27b8f3c5fc4 | [
"Apache-2.0"
] | null | null | null | appengine/swarming/swarming_bot/bot_code/remote_client.py | Swift1313/luci-py | 0a4fdfc25f89833026be6a8b29c0a27b8f3c5fc4 | [
"Apache-2.0"
] | null | null | null | appengine/swarming/swarming_bot/bot_code/remote_client.py | Swift1313/luci-py | 0a4fdfc25f89833026be6a8b29c0a27b8f3c5fc4 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
# Copyright 2016 The LUCI Authors. All rights reserved.
# Use of this source code is governed under the Apache License, Version 2.0
# that can be found in the LICENSE file.
import base64
import datetime
import hashlib
import logging
import os
import threading
import time
import traceback
import urllib
... | 35.566234 | 80 | 0.689257 |
bbf5dff8bbfb61afb4041a7be15c7077cf059de1 | 14,843 | py | Python | nltk/metrics/agreement.py | tousif/nltk-gae | 9181f8991d0566e693f82d0bb0479219c3fc8768 | [
"Apache-2.0"
] | 3 | 2017-03-07T10:54:56.000Z | 2019-10-18T20:36:56.000Z | nltk/metrics/agreement.py | tousif/nltk-gae | 9181f8991d0566e693f82d0bb0479219c3fc8768 | [
"Apache-2.0"
] | null | null | null | nltk/metrics/agreement.py | tousif/nltk-gae | 9181f8991d0566e693f82d0bb0479219c3fc8768 | [
"Apache-2.0"
] | null | null | null | # Natural Language Toolkit: Agreement Metrics
#
# Copyright (C) 2001-2012 NLTK Project
# Author: Tom Lippincott <tom@cs.columbia.edu>
# URL: <http://www.nltk.org/>
# For license information, see LICENSE.TXT
#
"""
Implementations of inter-annotator agreement coefficients surveyed by Artstein
and Poesio (2007), Inter-Co... | 36.922886 | 130 | 0.598599 |
55e2ddff5a79ce8001bd79ce1ecf07c7859702af | 480 | py | Python | electron/electron-tf/test/bitcast.py | VerticalResearchGroup/eagle | 3b76771e2177290e604086a710d35455cba8db5e | [
"Apache-2.0"
] | null | null | null | electron/electron-tf/test/bitcast.py | VerticalResearchGroup/eagle | 3b76771e2177290e604086a710d35455cba8db5e | [
"Apache-2.0"
] | 2 | 2022-03-22T02:21:00.000Z | 2022-03-26T21:32:19.000Z | electron/electron-tf/test/bitcast.py | VerticalResearchGroup/eagle | 3b76771e2177290e604086a710d35455cba8db5e | [
"Apache-2.0"
] | 2 | 2022-01-31T08:54:14.000Z | 2022-02-17T06:07:29.000Z | #!/usr/bin/env python
# coding=utf-8
import tensorflow as tf
import numpy as np
tf.compat.v1.disable_eager_execution()
a = tf.random.normal(shape=[10], dtype=tf.float32)
with tf.device("/MY_DEVICE:0"):
eagle = tf.bitcast(a, tf.float16)
with tf.device("/CPU:0"):
cpu = tf.bitcast(a, tf.float16)
sess = tf.compa... | 30 | 115 | 0.73125 |
19509307abd3c802a5d021eb875cc2ddaa0876d4 | 1,676 | py | Python | examples/airflow/dags/etl_menu_items.py | mobuchowski/marquez | a1964623e13e95ee98b93517f11cdf116a1d1184 | [
"Apache-2.0"
] | 1 | 2021-11-02T08:14:47.000Z | 2021-11-02T08:14:47.000Z | examples/airflow/dags/etl_menu_items.py | mobuchowski/marquez | a1964623e13e95ee98b93517f11cdf116a1d1184 | [
"Apache-2.0"
] | 7 | 2021-05-06T15:16:13.000Z | 2022-03-01T23:10:43.000Z | examples/airflow/dags/etl_menu_items.py | mobuchowski/marquez | a1964623e13e95ee98b93517f11cdf116a1d1184 | [
"Apache-2.0"
] | 1 | 2021-09-02T14:03:28.000Z | 2021-09-02T14:03:28.000Z | from marquez_airflow import DAG
from airflow.operators.postgres_operator import PostgresOperator
from airflow.operators.sensors import ExternalTaskSensor
from airflow.utils.dates import days_ago
default_args = {
'owner': 'datascience',
'depends_on_past': False,
'start_date': days_ago(1),
'email_on_fail... | 24.647059 | 70 | 0.689737 |
bb1d624a9f34e40d5388d4a4daddec797105b87e | 385 | py | Python | registry/migrations/0008_item_og_meta.py | Cameron-D/gift-registry | 01f78d66b7aae7e4117701d4c4f5b49fd917db59 | [
"MIT"
] | null | null | null | registry/migrations/0008_item_og_meta.py | Cameron-D/gift-registry | 01f78d66b7aae7e4117701d4c4f5b49fd917db59 | [
"MIT"
] | null | null | null | registry/migrations/0008_item_og_meta.py | Cameron-D/gift-registry | 01f78d66b7aae7e4117701d4c4f5b49fd917db59 | [
"MIT"
] | null | null | null | # Generated by Django 3.2 on 2021-05-06 10:35
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('registry', '0007_auto_20210506_1023'),
]
operations = [
migrations.AddField(
model_name='item',
name='og_meta',
... | 20.263158 | 53 | 0.6 |
2ead4c919fd9d1e77a25f0a77e0fdcaf622a7c3f | 600 | py | Python | LeetCode/Design Bounded Blocking Queue.py | UtkarshPathrabe/Competitive-Coding | ba322fbb1b88682d56a9b80bdd92a853f1caa84e | [
"MIT"
] | 13 | 2021-09-02T07:30:02.000Z | 2022-03-22T19:32:03.000Z | LeetCode/Design Bounded Blocking Queue.py | UtkarshPathrabe/Competitive-Coding | ba322fbb1b88682d56a9b80bdd92a853f1caa84e | [
"MIT"
] | null | null | null | LeetCode/Design Bounded Blocking Queue.py | UtkarshPathrabe/Competitive-Coding | ba322fbb1b88682d56a9b80bdd92a853f1caa84e | [
"MIT"
] | 3 | 2021-08-24T16:06:22.000Z | 2021-09-17T15:39:53.000Z | from threading import Semaphore
class BoundedBlockingQueue(object):
def __init__(self, capacity: int):
self.emptySlots = Semaphore(capacity)
self.occupiedSlots = Semaphore(0)
self.queue = deque()
def enqueue(self, element: int) -> None:
self.emptySlots.acquire()
self.q... | 27.272727 | 45 | 0.636667 |
e60aa18478ca52a403ceaf57906bf71a373876d7 | 1,351 | py | Python | shopping_cart/api_app/views.py | matiasz8/shop-cart | faeff0a414db8e6764f5e45cbb4fab0806be64b1 | [
"MIT"
] | null | null | null | shopping_cart/api_app/views.py | matiasz8/shop-cart | faeff0a414db8e6764f5e45cbb4fab0806be64b1 | [
"MIT"
] | null | null | null | shopping_cart/api_app/views.py | matiasz8/shop-cart | faeff0a414db8e6764f5e45cbb4fab0806be64b1 | [
"MIT"
] | null | null | null | from rest_framework.views import APIView
from rest_framework.response import Response
from rest_framework import status
from .serializers import CartItemSerializer
from .models import CartItem
class CartItemViews(APIView):
def post(self, request):
serializer = CartItemSerializer(data=request.data)
... | 36.513514 | 66 | 0.535159 |
5ac6011bb213957ee9e1a84479a084bc3a585406 | 2,654 | py | Python | ex-ising.py | jiaseny/KDSD | 79362f8849b31ec4570f0697b91c724b8a9bdfed | [
"MIT"
] | 4 | 2018-09-20T19:03:17.000Z | 2022-03-01T16:26:43.000Z | ex-ising.py | jiaseny/KDSD | 79362f8849b31ec4570f0697b91c724b8a9bdfed | [
"MIT"
] | null | null | null | ex-ising.py | jiaseny/KDSD | 79362f8849b31ec4570f0697b91c724b8a9bdfed | [
"MIT"
] | null | null | null | """
Draw samples and apply KDSD and MMD tests to the Ising model.
"""
from __future__ import division
from util import *
from kernels import *
from ksd import KSD
from ksd_utils import *
from mmd import MMD
from ising import Ising
if __name__ == "__main__":
n, temp0, temp, seed, res_dir = sys.argv[1:]
n = in... | 31.595238 | 77 | 0.604371 |
acf4d8deadb6666a1ce832be1c555a1b2389c145 | 5,652 | py | Python | django/utils/translation/__init__.py | hafeez3000/django | 08e1175ac8d683b692ec3c67dc31df149f07dc8f | [
"BSD-3-Clause"
] | null | null | null | django/utils/translation/__init__.py | hafeez3000/django | 08e1175ac8d683b692ec3c67dc31df149f07dc8f | [
"BSD-3-Clause"
] | null | null | null | django/utils/translation/__init__.py | hafeez3000/django | 08e1175ac8d683b692ec3c67dc31df149f07dc8f | [
"BSD-3-Clause"
] | null | null | null | """
Internationalization support.
"""
import warnings
from os import path
from django.utils.encoding import force_unicode
from django.utils.functional import lazy
from django.utils.importlib import import_module
__all__ = [
'activate', 'deactivate', 'override', 'deactivate_all',
'get_language', 'get_languag... | 33.247059 | 78 | 0.704883 |
1509890efabc359c59208b7e1309411f7bcd0641 | 16,896 | py | Python | tensorflow/python/eager/graph_callable.py | jhabikal21/tensorflow | 98d20962172301385aae694141801a375debd2bc | [
"Apache-2.0"
] | null | null | null | tensorflow/python/eager/graph_callable.py | jhabikal21/tensorflow | 98d20962172301385aae694141801a375debd2bc | [
"Apache-2.0"
] | null | null | null | tensorflow/python/eager/graph_callable.py | jhabikal21/tensorflow | 98d20962172301385aae694141801a375debd2bc | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 40.713253 | 117 | 0.716679 |
f849a06c07067ebb532a61ebb0b4eaa32f9ae7ff | 1,114 | py | Python | conda_tools/test/test_edit_package.py | Amber-MD/ambertools-binary-build | 257f25cfbe829ee080807c6086d6edf8ec78c534 | [
"MIT"
] | 4 | 2018-12-02T19:43:52.000Z | 2019-12-14T01:15:50.000Z | conda_tools/test/test_edit_package.py | Amber-MD/ambertools-binary-build | 257f25cfbe829ee080807c6086d6edf8ec78c534 | [
"MIT"
] | 15 | 2017-09-03T03:37:27.000Z | 2020-10-07T15:19:56.000Z | conda_tools/test/test_edit_package.py | Amber-MD/ambertools-binary-build | 257f25cfbe829ee080807c6086d6edf8ec78c534 | [
"MIT"
] | 1 | 2021-06-01T19:18:54.000Z | 2021-06-01T19:18:54.000Z | # pytest -vs .
import os
import sys
from mock import patch
sys.path.insert(0, '..')
from edit_package import editing_conda_package
this_dir = os.path.dirname(__file__)
FAKE_TAR = os.path.join(this_dir, 'fake_data', 'fake_osx.tar.bz2')
def test_output_as_conda_package():
pkg_name = FAKE_TAR
output_dir = 'tm... | 25.906977 | 70 | 0.622083 |
3d1531310d87e9c518e0992b92711adffbb3a759 | 93 | py | Python | tests/__init__.py | early-month-subsidy/backend-server | 9abe7a0372eab5899dfc593783034583b6652577 | [
"MIT"
] | null | null | null | tests/__init__.py | early-month-subsidy/backend-server | 9abe7a0372eab5899dfc593783034583b6652577 | [
"MIT"
] | 5 | 2021-03-18T21:41:18.000Z | 2022-03-11T23:35:36.000Z | tests/__init__.py | early-month-subsidy/backend-server | 9abe7a0372eab5899dfc593783034583b6652577 | [
"MIT"
] | null | null | null | # -*- encoding: utf-8 -*-
# Copyright 2018 Vinzor Co.,Ltd.
#
# comment
#
# 18-11-5 leo : Init | 15.5 | 32 | 0.591398 |
354b28fe0ad7d8285998f29ec6ffc211d95eb72d | 6,727 | py | Python | tests/test_rules_format.py | alterway/processing-operator | f959bb023ff0b549897ee426a17a096b9437ab71 | [
"Apache-2.0"
] | null | null | null | tests/test_rules_format.py | alterway/processing-operator | f959bb023ff0b549897ee426a17a096b9437ab71 | [
"Apache-2.0"
] | null | null | null | tests/test_rules_format.py | alterway/processing-operator | f959bb023ff0b549897ee426a17a096b9437ab71 | [
"Apache-2.0"
] | null | null | null | import unittest
from rating.processing import rules
from rating.processing import utils
import yaml
class TestRulesFormat(unittest.TestCase):
def test_ruleset_base_config(self):
rules_test = yaml.safe_load("""
-
name: rules_small
labelSet:
instance_type: ... | 27.457143 | 65 | 0.423369 |
1ff843e5f4a0a2d4eae44c18523d1dd02eb455e0 | 8,880 | py | Python | games/Pooyan-v0.py | DustinAngerhofer/muzero-general-1 | aab58da92f5793fdfd6850af6a1028d7e31fd234 | [
"MIT"
] | null | null | null | games/Pooyan-v0.py | DustinAngerhofer/muzero-general-1 | aab58da92f5793fdfd6850af6a1028d7e31fd234 | [
"MIT"
] | null | null | null | games/Pooyan-v0.py | DustinAngerhofer/muzero-general-1 | aab58da92f5793fdfd6850af6a1028d7e31fd234 | [
"MIT"
] | null | null | null | import datetime
import os
import gym
import numpy
import torch
from .abstract_game import AbstractGame
try:
import cv2
except ModuleNotFoundError:
raise ModuleNotFoundError('Please run "pip install gym[atari]"')
class MuZeroConfig:
def __init__(self, args):
self.seed = 0 # Seed for numpy, torch... | 47.741935 | 202 | 0.658221 |
72c12bab5ce7e1e0e72429266900b7d690888a1c | 16,624 | py | Python | openml/tasks/task.py | Rong-Inspur/openml-python | 07d429c843cf589d8096db76d520317acf7a99ab | [
"BSD-3-Clause"
] | null | null | null | openml/tasks/task.py | Rong-Inspur/openml-python | 07d429c843cf589d8096db76d520317acf7a99ab | [
"BSD-3-Clause"
] | null | null | null | openml/tasks/task.py | Rong-Inspur/openml-python | 07d429c843cf589d8096db76d520317acf7a99ab | [
"BSD-3-Clause"
] | null | null | null | # License: BSD 3-Clause
from abc import ABC
from collections import OrderedDict
import io
import os
from typing import Union, Tuple, Dict, List, Optional, Any
from warnings import warn
import numpy as np
import pandas as pd
import scipy.sparse
import openml._api_calls
from openml.base import OpenMLBase
from .. impor... | 34.065574 | 101 | 0.60557 |
db9d07bc7e91e788d17bf442516bfd98d7fb346a | 2,704 | py | Python | neuralpredictors/layers/shifters/mlp.py | kellirestivo/neuralpredictors | 57205a90d2e3daa5f8746c6ef6170be9e35cb5f5 | [
"MIT"
] | 9 | 2020-11-26T18:22:32.000Z | 2022-01-22T15:51:52.000Z | neuralpredictors/layers/shifters/mlp.py | kellirestivo/neuralpredictors | 57205a90d2e3daa5f8746c6ef6170be9e35cb5f5 | [
"MIT"
] | 60 | 2020-10-21T15:32:28.000Z | 2022-02-25T10:38:16.000Z | neuralpredictors/layers/shifters/mlp.py | mohammadbashiri/neuralpredictors | 8e60c9ce91f83e3dcaa1b3dbe4422e1509ccbd5f | [
"MIT"
] | 21 | 2020-10-21T09:29:17.000Z | 2022-02-07T10:04:46.000Z | from .base import Shifter
import torch
from torch.nn.init import xavier_normal
from torch.nn import ModuleDict
from torch import nn
import logging
logger = logging.getLogger(__name__)
class MLP(Shifter):
def __init__(self, input_features=2, hidden_channels=10, shift_layers=1, **kwargs):
"""
Mul... | 36.053333 | 124 | 0.64682 |
b18a9a78da35388145931898e71b6279e44ff9fa | 7,937 | py | Python | raiden/network/blockchain_service.py | dannyk03/raiden | ebc1b598ef24d4e9c4d2cd26a79921338928e75e | [
"MIT"
] | 1 | 2018-10-27T11:30:06.000Z | 2018-10-27T11:30:06.000Z | raiden/network/blockchain_service.py | dannyk03/raiden | ebc1b598ef24d4e9c4d2cd26a79921338928e75e | [
"MIT"
] | null | null | null | raiden/network/blockchain_service.py | dannyk03/raiden | ebc1b598ef24d4e9c4d2cd26a79921338928e75e | [
"MIT"
] | null | null | null | import gevent
from cachetools.func import ttl_cache
from eth_utils import is_binary_address
from gevent.lock import Semaphore
from raiden.network.proxies import (
Discovery,
PaymentChannel,
SecretRegistry,
Token,
TokenNetwork,
TokenNetworkRegistry,
)
from raiden.network.rpc.client import JSONRP... | 37.976077 | 90 | 0.663223 |
f5ccf952779401506e55da7274bc5e5c73320f32 | 918 | py | Python | env/lib/python3.6/site-packages/webpack/django_integration.py | Raniac/NEURO-LEARN | 3c3acc55de8ba741e673063378e6cbaf10b64c7a | [
"Apache-2.0"
] | 8 | 2019-05-29T09:38:30.000Z | 2021-01-20T03:36:59.000Z | env/lib/python3.6/site-packages/webpack/django_integration.py | Raniac/neurolearn_dev | 3c3acc55de8ba741e673063378e6cbaf10b64c7a | [
"Apache-2.0"
] | 12 | 2021-03-09T03:01:16.000Z | 2022-03-11T23:59:36.000Z | env/lib/python3.6/site-packages/webpack/django_integration.py | Raniac/NEURO-LEARN | 3c3acc55de8ba741e673063378e6cbaf10b64c7a | [
"Apache-2.0"
] | 1 | 2020-07-17T12:49:49.000Z | 2020-07-17T12:49:49.000Z | from django.core.files.storage import FileSystemStorage
from django.contrib.staticfiles.finders import BaseStorageFinder
from .conf import settings
class WebpackFileStorage(FileSystemStorage):
"""
Standard file system storage for files handled by webpack.
"""
def __init__(self, location=None, base_url... | 32.785714 | 97 | 0.715686 |
a44c3952a1ccbe50f54b324920c34c94161a6b75 | 740 | py | Python | src/api/bkuser_core/user_settings/migrations/0009_alter_settingmeta_category_type.py | Chace-wang/bk-user | 057f270d66a1834312306c9fba1f4e95521f10b1 | [
"MIT"
] | null | null | null | src/api/bkuser_core/user_settings/migrations/0009_alter_settingmeta_category_type.py | Chace-wang/bk-user | 057f270d66a1834312306c9fba1f4e95521f10b1 | [
"MIT"
] | null | null | null | src/api/bkuser_core/user_settings/migrations/0009_alter_settingmeta_category_type.py | Chace-wang/bk-user | 057f270d66a1834312306c9fba1f4e95521f10b1 | [
"MIT"
] | null | null | null | # Generated by Django 3.2.5 on 2021-09-26 11:08
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("user_settings", "0008_auto_20210706_1702"),
]
operations = [
migrations.AlterField(
model_name="settingmeta",
name="... | 25.517241 | 58 | 0.463514 |
41b915c0bc7f39240d124c59475a66188b0217a0 | 836 | py | Python | src/data_gen/mol2smi.py | spacemanidol/Image2smiles | 95fa1a0f2c815f15e3d8c5ab8851e6148a7fd266 | [
"MIT"
] | 6 | 2021-01-26T14:08:49.000Z | 2022-03-07T13:05:43.000Z | src/data_gen/mol2smi.py | spacemanidol/Image2smiles | 95fa1a0f2c815f15e3d8c5ab8851e6148a7fd266 | [
"MIT"
] | null | null | null | src/data_gen/mol2smi.py | spacemanidol/Image2smiles | 95fa1a0f2c815f15e3d8c5ab8851e6148a7fd266 | [
"MIT"
] | 2 | 2022-03-02T00:06:26.000Z | 2022-03-02T06:46:42.000Z | import os
from tqdm import tqdm
import argparse
from rdkit import Chem
def main(args):
files = os.listdir(args.input_dir)
with open(args.output_file,'w') as w:
for a_file in files:
try:
m = Chem.MolFromMolFile(os.path.join(args.input_dir, a_file))
w.write('{}... | 36.347826 | 134 | 0.659091 |
c916afaf4c416c207e55a99fb196ec98881852db | 2,393 | py | Python | mooving_iot/drivers/acc/acc.py | DAVFoundation/mooving-iot-firmware | 937578333a1a6a06235a8290486a2906d1a43a7c | [
"MIT"
] | 1 | 2020-08-11T00:03:16.000Z | 2020-08-11T00:03:16.000Z | mooving_iot/drivers/acc/acc.py | DAVFoundation/iot-prototyping-platform | 937578333a1a6a06235a8290486a2906d1a43a7c | [
"MIT"
] | null | null | null | mooving_iot/drivers/acc/acc.py | DAVFoundation/iot-prototyping-platform | 937578333a1a6a06235a8290486a2906d1a43a7c | [
"MIT"
] | 1 | 2019-11-15T09:07:32.000Z | 2019-11-15T09:07:32.000Z | #***************************************************************************************************
# Imports
#***************************************************************************************************
# Global imports
import os
import threading
# Project imports
import mooving_iot.utils.logger as logger
imp... | 31.906667 | 100 | 0.534893 |
1021aa000e4c6e8c301a28fe22c267c1dcaa9502 | 4,847 | py | Python | instagram/settings.py | Bernard2030/instagramphotoapp | 98be950dfb58bef901849e1f69a6c45f15b228f8 | [
"MIT"
] | null | null | null | instagram/settings.py | Bernard2030/instagramphotoapp | 98be950dfb58bef901849e1f69a6c45f15b228f8 | [
"MIT"
] | null | null | null | instagram/settings.py | Bernard2030/instagramphotoapp | 98be950dfb58bef901849e1f69a6c45f15b228f8 | [
"MIT"
] | null | null | null | """
Django settings for instagram project.
Generated by 'django-admin startproject' using Django 3.2.8.
For more information on this file, see
https://docs.djangoproject.com/en/3.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.2/ref/settings/
"""
from pathl... | 26.2 | 91 | 0.703734 |
2ab5d4f4d85537bb93e921a982c99b046a491902 | 4,547 | py | Python | track_people_py/scripts/detect_darknet_opencv_people.py | kufusha/cabot | 52a40a39a29f0bd79b6fdd8f961708e09fda9a51 | [
"MIT"
] | null | null | null | track_people_py/scripts/detect_darknet_opencv_people.py | kufusha/cabot | 52a40a39a29f0bd79b6fdd8f961708e09fda9a51 | [
"MIT"
] | null | null | null | track_people_py/scripts/detect_darknet_opencv_people.py | kufusha/cabot | 52a40a39a29f0bd79b6fdd8f961708e09fda9a51 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2021 Carnegine Mellon University and IBM Corporation, and others
#
# 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 with... | 39.198276 | 129 | 0.716516 |
18c6895dbe4a388eeae86cce929578f70e16b6bf | 10,827 | py | Python | sdk/SpellCheck/spell_check_client/models/_models.py | WMRamadan/bing-search-sdk-for-python | 276d9cd6963c939081b3dec91bdd9aded42b3b35 | [
"MIT"
] | 12 | 2021-03-11T20:24:12.000Z | 2022-02-10T22:55:03.000Z | sdk/SpellCheck/spell_check_client/models/_models.py | WMRamadan/bing-search-sdk-for-python | 276d9cd6963c939081b3dec91bdd9aded42b3b35 | [
"MIT"
] | null | null | null | sdk/SpellCheck/spell_check_client/models/_models.py | WMRamadan/bing-search-sdk-for-python | 276d9cd6963c939081b3dec91bdd9aded42b3b35 | [
"MIT"
] | 10 | 2021-03-09T17:02:48.000Z | 2022-02-12T18:40:01.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6320, generator: {generator})
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# ---------------------------------------... | 30.412921 | 122 | 0.605339 |
7bb8c59fc953f1d8dda2090ddf8c041e450ce820 | 7,307 | py | Python | data/mpqa.py | izhx/nmnlp | 7b6ec807e6d97adc853a63406e3f498aeaa0f256 | [
"Apache-2.0"
] | 2 | 2020-11-02T14:41:37.000Z | 2020-12-23T07:23:58.000Z | data/mpqa.py | izhx/nmnlp | 7b6ec807e6d97adc853a63406e3f498aeaa0f256 | [
"Apache-2.0"
] | null | null | null | data/mpqa.py | izhx/nmnlp | 7b6ec807e6d97adc853a63406e3f498aeaa0f256 | [
"Apache-2.0"
] | null | null | null | """
Read raw mpqa data.
"""
import os
import re
import glob
from typing import Any, Dict, List, Union
REGEX_ATTR = re.compile(r'[a-z\-]*\=\"[^"]*\"')
def read_mpqa_doc(doc_path: str) -> List[Dict[str, Any]]:
def in_which_sentence(span) -> int:
for i, sent in enumerate(sentences):
if span[0]... | 40.148352 | 110 | 0.475298 |
a6dd584f9359e70e17aa80518c6e204fe2628a97 | 1,158 | py | Python | boxsdk/object/enterprise.py | KentaroAOKI/box-python-sdk | e52029b34d9c265375f6b4e7affe6b4b78e20e3a | [
"Apache-2.0"
] | 1 | 2020-05-18T14:25:10.000Z | 2020-05-18T14:25:10.000Z | boxsdk/object/enterprise.py | KentaroAOKI/box-python-sdk | e52029b34d9c265375f6b4e7affe6b4b78e20e3a | [
"Apache-2.0"
] | null | null | null | boxsdk/object/enterprise.py | KentaroAOKI/box-python-sdk | e52029b34d9c265375f6b4e7affe6b4b78e20e3a | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
from __future__ import unicode_literals, absolute_import
import json
from .base_object import BaseObject
from ..util.api_call_decorator import api_call
class Enterprise(BaseObject):
"""Represents a Box file version retention."""
_item_type = 'enterprise'
@api_call
def invite_user(s... | 26.930233 | 92 | 0.582902 |
dea75344f0da9c1937fd3b05dffb12525fbe6592 | 12,772 | py | Python | sm_layer/pathos/info.py | arunprsh/lambda-collection | b8ce31bfb744cc9ded92c0e5bf7e72639eac72f1 | [
"MIT"
] | 1 | 2021-09-24T00:24:20.000Z | 2021-09-24T00:24:20.000Z | sm_layer/pathos/info.py | arunprsh/lambda-collection | b8ce31bfb744cc9ded92c0e5bf7e72639eac72f1 | [
"MIT"
] | null | null | null | sm_layer/pathos/info.py | arunprsh/lambda-collection | b8ce31bfb744cc9ded92c0e5bf7e72639eac72f1 | [
"MIT"
] | null | null | null | # THIS FILE GENERATED FROM SETUP.PY
this_version = '0.2.8'
stable_version = '0.2.8'
readme = '''--------------------------------------------------------------------------
pathos: parallel graph management and execution in heterogeneous computing
--------------------------------------------------------------------------... | 45.451957 | 203 | 0.71923 |
269d52ac5d2549cfd814aa8615c8be63ad2946ed | 64,225 | py | Python | airflow/models/taskinstance.py | KrithikaMurugesan/airflow | 212c02b1b00c21af20a5798d9f72b2961c59f15e | [
"Apache-2.0"
] | 1 | 2020-02-25T10:21:05.000Z | 2020-02-25T10:21:05.000Z | airflow/models/taskinstance.py | bing0o0/airflow | 212c02b1b00c21af20a5798d9f72b2961c59f15e | [
"Apache-2.0"
] | null | null | null | airflow/models/taskinstance.py | bing0o0/airflow | 212c02b1b00c21af20a5798d9f72b2961c59f15e | [
"Apache-2.0"
] | null | null | null | #
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... | 39.090079 | 110 | 0.595111 |
e7486b2c1cbc06ebd5a102e81683f66dd4faabeb | 643 | py | Python | google_takeout_parser/log.py | karlicoss/google_takeout_parser | bfe91db0d0b7f75faa31c5fa177a1abeeb5c3cea | [
"MIT"
] | 10 | 2021-12-03T13:13:07.000Z | 2022-02-22T05:59:32.000Z | google_takeout_parser/log.py | karlicoss/google_takeout_parser | bfe91db0d0b7f75faa31c5fa177a1abeeb5c3cea | [
"MIT"
] | 19 | 2022-02-09T19:37:07.000Z | 2022-03-01T14:11:22.000Z | google_takeout_parser/log.py | seanbreckenridge/google_takeout_parser | 0421ccfa9f9db31b835478961c1cb84cd00a9db3 | [
"MIT"
] | null | null | null | import os
import logging
from typing import Optional
from logzero import setup_logger # type: ignore[import]
DEFAULT_LEVEL = logging.INFO
# global access to the logger
logger: logging.Logger
# logzero handles adding handling/modifying levels fine
# can be imported/configured multiple times
def setup(level: Optio... | 26.791667 | 96 | 0.769829 |
a326f96320b8ce6812dd1c0c12e89757bbb225cb | 1,922 | py | Python | drivers/classes/ms5837/test.py | Michael-Equi/jetson_car | e6bcfa0a0c2ef4f40698f724de5842ae21394956 | [
"MIT"
] | 5 | 2019-07-29T00:25:32.000Z | 2020-03-10T13:52:24.000Z | drivers/classes/ms5837/test.py | Michael-Equi/jetson_car | e6bcfa0a0c2ef4f40698f724de5842ae21394956 | [
"MIT"
] | 57 | 2018-11-09T17:00:44.000Z | 2019-07-11T00:09:58.000Z | drivers/classes/ms5837/test.py | Michael-Equi/jetson_car | e6bcfa0a0c2ef4f40698f724de5842ae21394956 | [
"MIT"
] | 2 | 2018-11-20T21:02:42.000Z | 2019-02-22T21:52:16.000Z | #!/usr/bin/env python
import ms5837
import time
sensor = ms5837.MS5837_30BA() # Default I2C bus is 1 (Raspberry Pi 3)
#sensor = ms5837.MS5837_30BA(0) # Specify I2C bus
#sensor = ms5837.MS5837_02BA()
#sensor = ms5837.MS5837_02BA(0)
#sensor = ms5837.MS5837(model=ms5837.MS5837_MODEL_30BA, bus=0) # Specify model and bus
... | 35.592593 | 103 | 0.685224 |
db4e654d71d8c77373b5a5e8df5becc00bc805c7 | 1,190 | py | Python | markdown/django/ua/web/accounts/migrations/0001_initial.py | hdknr/annotated-django | 5843908dd6586a54b92d974f45049fa87e64db8b | [
"PSF-2.0",
"BSD-3-Clause"
] | null | null | null | markdown/django/ua/web/accounts/migrations/0001_initial.py | hdknr/annotated-django | 5843908dd6586a54b92d974f45049fa87e64db8b | [
"PSF-2.0",
"BSD-3-Clause"
] | 55 | 2016-02-27T06:02:24.000Z | 2021-11-01T07:53:20.000Z | markdown/django/ua/web/accounts/migrations/0001_initial.py | hdknr/annotated-django | 5843908dd6586a54b92d974f45049fa87e64db8b | [
"PSF-2.0",
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.Create... | 37.1875 | 128 | 0.59916 |
723ee3f59268d3d134ce71e5954008f7cb9b5c74 | 2,942 | py | Python | test/test_crispr_cas9_create_df.py | babinyurii/crispr_cas9_research_group | cf04e010dfb555de332a003f6d672187c70b7b2e | [
"MIT"
] | 2 | 2021-05-28T13:09:44.000Z | 2021-10-05T15:47:40.000Z | test/test_crispr_cas9_create_df.py | babinyurii/crispr_cas9_research_group | cf04e010dfb555de332a003f6d672187c70b7b2e | [
"MIT"
] | null | null | null | test/test_crispr_cas9_create_df.py | babinyurii/crispr_cas9_research_group | cf04e010dfb555de332a003f6d672187c70b7b2e | [
"MIT"
] | 2 | 2020-11-23T09:42:16.000Z | 2021-08-28T02:03:04.000Z | # -*- coding: utf-8 -*-
"""
Created on Tue May 21 18:03:12 2019
@author: babin
"""
import sys
sys.path.append("..")
from crispr_cas9 import count_indels
def test_count_indels_single_del_from_head():
"""single deletions over the whole ref_seq
no insertions"""
#ref_seq, total_dels, total_ins, cov = count... | 30.329897 | 100 | 0.668933 |
67ece86ca5cf6a4931a78b053c701a61cbb55e73 | 410 | py | Python | dnd_gui/Characters/Character.py | JStuckner/DnD-GUI-2 | bf393c94e48df2e17113046b7f917ac2176ac8e8 | [
"MIT"
] | null | null | null | dnd_gui/Characters/Character.py | JStuckner/DnD-GUI-2 | bf393c94e48df2e17113046b7f917ac2176ac8e8 | [
"MIT"
] | null | null | null | dnd_gui/Characters/Character.py | JStuckner/DnD-GUI-2 | bf393c94e48df2e17113046b7f917ac2176ac8e8 | [
"MIT"
] | null | null | null | import json
import glob, os
def getPCs():
'''
Reads the files in this folder and returns a dictionary of PCs
'''
path = os.path.dirname(__file__)
print(path)
PCs = {} #PC dictionary
for file in glob.glob(path+"\\*.txt"):
print(file)
json_data=open(file).read()
... | 19.52381 | 66 | 0.565854 |
33694f0b6979fef89d8b6e76f9159cb521804553 | 878 | py | Python | python/tests/utils/test_path_tools.py | Zelenyy/phd-code | d5b8bfefd2418a915dde89f7da2cb6683f438556 | [
"MIT"
] | null | null | null | python/tests/utils/test_path_tools.py | Zelenyy/phd-code | d5b8bfefd2418a915dde89f7da2cb6683f438556 | [
"MIT"
] | null | null | null | python/tests/utils/test_path_tools.py | Zelenyy/phd-code | d5b8bfefd2418a915dde89f7da2cb6683f438556 | [
"MIT"
] | null | null | null | import unittest
import numpy as np
import tables
from phd.utils.path_tools import find_by_meta
class PathToolsTest(unittest.TestCase):
def test_hdf5(self):
path = "/home/zelenyy/temp/phd-run/result.hdf5"
with tables.open_file(path) as h5file:
table = h5file.get_node("/sim0001", "electr... | 32.518519 | 86 | 0.636674 |
89c2e50229904c2358360455f3890a57f61b65af | 14,107 | py | Python | lesson_functions.py | jorcus/CarND-Vehicle-Detection | 06c5b9051eee5963cc1635722c0d55c044abcc4a | [
"MIT"
] | null | null | null | lesson_functions.py | jorcus/CarND-Vehicle-Detection | 06c5b9051eee5963cc1635722c0d55c044abcc4a | [
"MIT"
] | null | null | null | lesson_functions.py | jorcus/CarND-Vehicle-Detection | 06c5b9051eee5963cc1635722c0d55c044abcc4a | [
"MIT"
] | null | null | null | from skimage.feature import hog
from sklearn.preprocessing import StandardScaler
import matplotlib.image as mpimg
import matplotlib.pyplot as plt
import numpy as np
import pickle
import cv2
import random
# NOTE: the next import is only valid
# for scikit-learn version <= 0.17
# if you are using scikit-learn >= 0.18 th... | 44.501577 | 131 | 0.637201 |
3c0f22856683554d2da6faf221fe61b388259e30 | 391 | py | Python | surveys/surveys/asgi.py | OscarPalominoC/retoDjango | 6d55b512d1b77ee4854d04ec5472b525e642d061 | [
"MIT"
] | null | null | null | surveys/surveys/asgi.py | OscarPalominoC/retoDjango | 6d55b512d1b77ee4854d04ec5472b525e642d061 | [
"MIT"
] | null | null | null | surveys/surveys/asgi.py | OscarPalominoC/retoDjango | 6d55b512d1b77ee4854d04ec5472b525e642d061 | [
"MIT"
] | null | null | null | """
ASGI config for surveys 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.1/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault('DJANGO_SETTI... | 23 | 78 | 0.785166 |
d78aa9dd7e89a3302813a3e3c1da9530298de417 | 3,417 | py | Python | batchprocessing/__main__.py | JPI93/imageprocessing-1 | fe4c0fc003b39d16de1209ca6a83d3e1ef15ce2d | [
"MIT"
] | null | null | null | batchprocessing/__main__.py | JPI93/imageprocessing-1 | fe4c0fc003b39d16de1209ca6a83d3e1ef15ce2d | [
"MIT"
] | null | null | null | batchprocessing/__main__.py | JPI93/imageprocessing-1 | fe4c0fc003b39d16de1209ca6a83d3e1ef15ce2d | [
"MIT"
] | null | null | null | MicaSenseimport argparse
import os
import sys
from copy import copy
SRC_ROOT = os.path.abspath(os.path.dirname(sys.argv[0]))
sys.path.insert(0, SRC_ROOT)
from batch_processing import BatchProcess
parser = argparse.ArgumentParser(prog='batchprocessing',
usage='python -m %(prog)s imagepath [options]',
descrip... | 59.947368 | 180 | 0.765291 |
239bde6f658fc5d1682c4bcd8a5f46bf2c0fa158 | 18,146 | py | Python | vnpy/api/da/generator/da_future_struct.py | funrunskypalace/vnpy | 2d87aede685fa46278d8d3392432cc127b797926 | [
"MIT"
] | 19,529 | 2015-03-02T12:17:35.000Z | 2022-03-31T17:18:27.000Z | vnpy/api/da/generator/da_future_struct.py | funrunskypalace/vnpy | 2d87aede685fa46278d8d3392432cc127b797926 | [
"MIT"
] | 2,186 | 2015-03-04T23:16:33.000Z | 2022-03-31T03:44:01.000Z | vnpy/api/da/generator/da_future_struct.py | funrunskypalace/vnpy | 2d87aede685fa46278d8d3392432cc127b797926 | [
"MIT"
] | 8,276 | 2015-03-02T05:21:04.000Z | 2022-03-31T13:13:13.000Z | CFutureRspInfoField = {
"ErrorID": "int",
"ErrorMsg": "string",
}
CFutureReqUserLoginField = {
"UserId": "string",
"UserPwd": "string",
"UserType": "string",
"MacAddress": "string",
"ComputerName": "string",
"SoftwareName": "string",
"SoftwareVersion": "string",
"AuthorCode": "s... | 24.755798 | 55 | 0.592031 |
7a661a7489233b9855aa1b29d8b2fc7427670a77 | 3,308 | py | Python | rasa/nlu/training_data/message.py | ALT-F1/rasa | 8d4a734616f72aca14f122716fbf338c42644188 | [
"Apache-2.0"
] | 4 | 2020-04-17T17:08:59.000Z | 2021-07-21T16:25:00.000Z | rasa/nlu/training_data/message.py | Doometnick/rasa | 969dc83a83f989a7774b2ff3ba186272b18bc73a | [
"Apache-2.0"
] | 5 | 2020-04-10T09:08:46.000Z | 2021-08-25T14:40:03.000Z | rasa/nlu/training_data/message.py | Doometnick/rasa | 969dc83a83f989a7774b2ff3ba186272b18bc73a | [
"Apache-2.0"
] | 2 | 2020-11-04T04:03:30.000Z | 2021-01-27T04:41:42.000Z | from typing import Any, Optional, Tuple, Text
from rasa.nlu.constants import (
ENTITIES_ATTRIBUTE,
INTENT_ATTRIBUTE,
RESPONSE_ATTRIBUTE,
RESPONSE_KEY_ATTRIBUTE,
TEXT_ATTRIBUTE,
RESPONSE_IDENTIFIER_DELIMITER,
)
from rasa.nlu.utils import ordered
class Message:
def __init__(
self, t... | 32.752475 | 117 | 0.623942 |
bfd01434a6420d35a614be7f0bd8a1a749d8041a | 3,893 | py | Python | plots.py | wilfredkisku/psudocompression-algo | a9b89ac441c6835223145f0e63b5780e7fea8cf3 | [
"MIT"
] | null | null | null | plots.py | wilfredkisku/psudocompression-algo | a9b89ac441c6835223145f0e63b5780e7fea8cf3 | [
"MIT"
] | null | null | null | plots.py | wilfredkisku/psudocompression-algo | a9b89ac441c6835223145f0e63b5780e7fea8cf3 | [
"MIT"
] | null | null | null | import tarfile
from io import BytesIO
import numpy as np
import matplotlib.pyplot as plt
from urllib.request import urlopen
def testOne():
#np.random.seed(444)
#fig, _= plt.subplots()
#print(type(fig))
#one_tick = fig.axes[0].yaxis.get_major_ticks()[0]
#print((one_tick.axes))
rng = np.arange... | 26.848276 | 137 | 0.594914 |
366187aedf9b8a9ca2336aaddae0a6a5947aef35 | 13,064 | py | Python | qiskit/pulse/instructions/instruction.py | ntgiwsvp/qiskit-terra | 206b8bcc930817d88f8244f7b984880aecde959d | [
"Apache-2.0"
] | null | null | null | qiskit/pulse/instructions/instruction.py | ntgiwsvp/qiskit-terra | 206b8bcc930817d88f8244f7b984880aecde959d | [
"Apache-2.0"
] | null | null | null | qiskit/pulse/instructions/instruction.py | ntgiwsvp/qiskit-terra | 206b8bcc930817d88f8244f7b984880aecde959d | [
"Apache-2.0"
] | null | null | null | # This code is part of Qiskit.
#
# (C) Copyright IBM 2019.
#
# 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 derivative wo... | 36.389972 | 98 | 0.602113 |
043fea36d09e8bb189b1fbd4820b39d86882ad0f | 8,740 | py | Python | joerd/source/ned_base.py | Hivemapper/HM-colony-joerd | 0b86765156d0612d837548c2cf70376c43b3405c | [
"MIT"
] | 207 | 2016-07-21T07:55:31.000Z | 2022-03-21T20:59:02.000Z | joerd/source/ned_base.py | Hivemapper/HM-colony-joerd | 0b86765156d0612d837548c2cf70376c43b3405c | [
"MIT"
] | 126 | 2016-07-22T15:58:32.000Z | 2022-03-19T09:52:30.000Z | joerd/source/ned_base.py | Hivemapper/HM-colony-joerd | 0b86765156d0612d837548c2cf70376c43b3405c | [
"MIT"
] | 47 | 2016-10-06T17:37:52.000Z | 2022-02-28T19:26:22.000Z | from joerd.util import BoundingBox
import joerd.download as download
import joerd.check as check
import joerd.srs as srs
import joerd.index as index
import joerd.mask as mask
import joerd.tmpdir as tmpdir
from joerd.mkdir_p import mkdir_p
from contextlib import closing
from shutil import copyfile
from ftplib import FTP... | 30.992908 | 79 | 0.589474 |
c191a6d45f844b48bef6deb660f6b8e635277326 | 15,048 | bzl | Python | private/rules/jetifier_maven_map.bzl | shs96c/rules_jvm_external | b1489af331d83990808c394affd1681450f6f312 | [
"Apache-2.0"
] | 1 | 2020-04-22T15:36:37.000Z | 2020-04-22T15:36:37.000Z | private/rules/jetifier_maven_map.bzl | shs96c/rules_jvm_external | b1489af331d83990808c394affd1681450f6f312 | [
"Apache-2.0"
] | null | null | null | private/rules/jetifier_maven_map.bzl | shs96c/rules_jvm_external | b1489af331d83990808c394affd1681450f6f312 | [
"Apache-2.0"
] | null | null | null | # Manually crafted from https://android.googlesource.com/platform/frameworks/support/+/refs/heads/androidx-master-dev/jetifier/jetifier/core/src/main/resources/default.config
# Take the "pomRules" section and transform it with inlined values from versions.latestReleased.
# Comment out the com.android.databinding and an... | 109.043478 | 174 | 0.626063 |
91aed5d76fd44e96c7a222348ce12040264178a4 | 3,098 | py | Python | tests/providers/microsoft/mssql/hooks/test_mssql.py | ahdbilal/airflow | 37afe55775676e2cb4cf6ed0cfc6c892855d6805 | [
"Apache-2.0"
] | 4 | 2020-02-16T18:13:54.000Z | 2021-01-01T03:22:19.000Z | tests/providers/microsoft/mssql/hooks/test_mssql.py | ahdbilal/airflow | 37afe55775676e2cb4cf6ed0cfc6c892855d6805 | [
"Apache-2.0"
] | 14 | 2019-11-22T09:24:20.000Z | 2021-07-09T06:06:59.000Z | tests/providers/microsoft/mssql/hooks/test_mssql.py | ahdbilal/airflow | 37afe55775676e2cb4cf6ed0cfc6c892855d6805 | [
"Apache-2.0"
] | 1 | 2021-05-01T21:54:37.000Z | 2021-05-01T21:54:37.000Z | #
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... | 42.438356 | 102 | 0.750807 |
4bc3319cd405a07bdb18b83d3845ed6049ad22f2 | 6,262 | py | Python | Intel/benchmarks/minigo/8-nodes-32s-cpx-tensorflow/selfplay.py | goswamig/training_results_v0.7 | 4278ce8a0f3d4db6b5e6054277724ca36278d7a3 | [
"Apache-2.0"
] | 48 | 2020-07-29T18:09:23.000Z | 2021-10-09T01:53:33.000Z | Intel/benchmarks/minigo/8-nodes-32s-cpx-tensorflow/selfplay.py | goswamig/training_results_v0.7 | 4278ce8a0f3d4db6b5e6054277724ca36278d7a3 | [
"Apache-2.0"
] | 21 | 2021-08-31T08:34:50.000Z | 2022-03-17T11:42:10.000Z | Intel/benchmarks/minigo/8-nodes-32s-cpx-tensorflow/selfplay.py | lablup/training_results_v0.7 | f5bb59aa0f8b18b602763abe47d1d24d0d54b197 | [
"Apache-2.0"
] | 42 | 2020-08-01T06:41:24.000Z | 2022-01-20T10:33:08.000Z | # Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 34.98324 | 96 | 0.664324 |
70ca3ad812de82dfcdef40ff403ec9d01ae9e571 | 996 | py | Python | rest/taskrouter/jwts/taskqueue/example-1/example-1.6.x.py | Tshisuaka/api-snippets | 52b50037d4af0f3b96adf76197964725a1501e96 | [
"MIT"
] | 234 | 2016-01-27T03:04:38.000Z | 2022-02-25T20:13:43.000Z | rest/taskrouter/jwts/taskqueue/example-1/example-1.6.x.py | Tshisuaka/api-snippets | 52b50037d4af0f3b96adf76197964725a1501e96 | [
"MIT"
] | 351 | 2016-04-06T16:55:33.000Z | 2022-03-10T18:42:36.000Z | rest/taskrouter/jwts/taskqueue/example-1/example-1.6.x.py | Tshisuaka/api-snippets | 52b50037d4af0f3b96adf76197964725a1501e96 | [
"MIT"
] | 494 | 2016-03-30T15:28:20.000Z | 2022-03-28T19:39:36.000Z | # Download the Python helper library from twilio.com/docs/python/install
import os
from twilio.jwt.taskrouter.capabilities import TaskQueueCapabilityToken
# Your Account Sid and Auth Token from twilio.com/user/account
# To set up environmental variables, see http://twil.io/secure
account_sid = os.environ['TWILIO_ACCOU... | 33.2 | 72 | 0.800201 |
8103d7c42358fe8fbd97a7118ba4716b3bdf96c3 | 3,619 | py | Python | baidu_code/bcoreapi/ticket/lock_seat.py | deevarvar/myLab | 7a5019f5f7fc11e173d350e6e2a7d2c80504782d | [
"MIT"
] | null | null | null | baidu_code/bcoreapi/ticket/lock_seat.py | deevarvar/myLab | 7a5019f5f7fc11e173d350e6e2a7d2c80504782d | [
"MIT"
] | null | null | null | baidu_code/bcoreapi/ticket/lock_seat.py | deevarvar/myLab | 7a5019f5f7fc11e173d350e6e2a7d2c80504782d | [
"MIT"
] | 3 | 2016-10-08T15:01:49.000Z | 2018-05-24T03:14:24.000Z | #-*- coding=utf-8 -*-
'''
@description: 核心购票新接口——座位图获取接口测试用例。
@author: miliang<miliang@baidu.com>
'''
import sys
import time
from base import Ticket_Base
from settings import NEW_PARTNER_SUPPORTED
class Ticket_Lock_Seat(Ticket_Base):
#@参数说明:
#@third_from : 合作方
#@seq_no : 场次号
#@third_id : 第三方影院id
#@l... | 33.82243 | 152 | 0.565626 |
2683f532ce5074febfec9df6c01d27c70ce98ebb | 29,415 | py | Python | autotest/test_gwt_adv02.py | scharlton2/modflow6 | 83ac72ee3b6f580aaffef6352cf15c1697d3ce66 | [
"CC0-1.0"
] | 3 | 2019-07-10T21:16:57.000Z | 2021-10-08T00:56:20.000Z | autotest/test_gwt_adv02.py | scharlton2/modflow6 | 83ac72ee3b6f580aaffef6352cf15c1697d3ce66 | [
"CC0-1.0"
] | null | null | null | autotest/test_gwt_adv02.py | scharlton2/modflow6 | 83ac72ee3b6f580aaffef6352cf15c1697d3ce66 | [
"CC0-1.0"
] | 3 | 2019-11-28T16:26:50.000Z | 2020-02-05T11:08:37.000Z | """
MODFLOW 6 Autotest
Test the advection schemes in the gwt advection package for a one-dimensional
model grid of triangular cells. The cells are created by starting with a
regular grid of squares and then cutting every cell into a triangle, except
the first and last.
"""
import os
import pytest
import sys
import n... | 29.444444 | 82 | 0.442631 |
2751a1e41667bdf76a0836084e7929c9ca25849c | 12,108 | py | Python | admin/views/channel.py | sluggard6/bgirl | 3c9fa895189ef16442694830d0c05cf60ee5187b | [
"Apache-2.0"
] | null | null | null | admin/views/channel.py | sluggard6/bgirl | 3c9fa895189ef16442694830d0c05cf60ee5187b | [
"Apache-2.0"
] | null | null | null | admin/views/channel.py | sluggard6/bgirl | 3c9fa895189ef16442694830d0c05cf60ee5187b | [
"Apache-2.0"
] | null | null | null | # -*- coding:utf-8 -*-
from flask import (g, render_template, Blueprint, flash, request, redirect, url_for, jsonify)
from sqlalchemy.exc import IntegrityError
from bg_biz.orm.pic import Channel, Group, Pic, Supplier
from form.channel import ChannelForm, GroupForm
from form import obj2form, form2obj
from sharper.flaska... | 36.802432 | 110 | 0.504625 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.