hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 11
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 251 | max_stars_repo_name stringlengths 4 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 251 | max_issues_repo_name stringlengths 4 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 251 | max_forks_repo_name stringlengths 4 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.05M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.04M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7f223ce0b0a9bae329fb3c8299587d1e8fad0fa3 | 1,576 | py | Python | edinet_baseline_hourly_module/edinet_models/pyEMIS/ConsumptionModels/constantMonthlyModel.py | BeeGroup-cimne/module_edinet | 0cda52e9d6222a681f85567e9bf0f7e5885ebf5e | [
"MIT"
] | null | null | null | edinet_baseline_hourly_module/edinet_models/pyEMIS/ConsumptionModels/constantMonthlyModel.py | BeeGroup-cimne/module_edinet | 0cda52e9d6222a681f85567e9bf0f7e5885ebf5e | [
"MIT"
] | 13 | 2021-03-25T22:24:38.000Z | 2022-03-12T00:56:45.000Z | edinet_baseline_hourly_module/edinet_models/pyEMIS/ConsumptionModels/constantMonthlyModel.py | BeeGroup-cimne/module_edinet | 0cda52e9d6222a681f85567e9bf0f7e5885ebf5e | [
"MIT"
] | 1 | 2019-03-13T09:49:56.000Z | 2019-03-13T09:49:56.000Z | #This is a class because it stores its model parameters and has a 'prediction' function which returns predictions for input data
import numpy as np
from baseModel import baseModel, ModellingError as me
from datetime import datetime
import pandas as pd | 37.52381 | 128 | 0.701142 |
7f225c7492072715078bdd768b21a5ef8c2bd1a5 | 3,746 | py | Python | geojson_rewind/rewind.py | chris48s/geojson-rewind | fc0fe3e64cb2228b4aa35788866eb3ab973f6a94 | [
"MIT"
] | 15 | 2019-02-22T15:43:35.000Z | 2021-12-16T14:31:33.000Z | geojson_rewind/rewind.py | chris48s/geojson-rewind | fc0fe3e64cb2228b4aa35788866eb3ab973f6a94 | [
"MIT"
] | 18 | 2019-06-12T08:58:50.000Z | 2022-01-31T02:06:17.000Z | geojson_rewind/rewind.py | chris48s/geojson-rewind | fc0fe3e64cb2228b4aa35788866eb3ab973f6a94 | [
"MIT"
] | 2 | 2019-07-19T17:29:23.000Z | 2021-11-10T16:56:44.000Z | import argparse
import copy
import json
import logging
import math
import sys
RADIUS = 6378137
if __name__ == "__main__":
sys.exit(main())
| 27.343066 | 85 | 0.585424 |
7f23399a461688f3bfbab0ead1e3f84996220c76 | 1,591 | py | Python | corehq/apps/domain/project_access/middleware.py | kkrampa/commcare-hq | d64d7cad98b240325ad669ccc7effb07721b4d44 | [
"BSD-3-Clause"
] | 1 | 2020-05-05T13:10:01.000Z | 2020-05-05T13:10:01.000Z | corehq/apps/domain/project_access/middleware.py | kkrampa/commcare-hq | d64d7cad98b240325ad669ccc7effb07721b4d44 | [
"BSD-3-Clause"
] | 1 | 2019-12-09T14:00:14.000Z | 2019-12-09T14:00:14.000Z | corehq/apps/domain/project_access/middleware.py | MaciejChoromanski/commcare-hq | fd7f65362d56d73b75a2c20d2afeabbc70876867 | [
"BSD-3-Clause"
] | 5 | 2015-11-30T13:12:45.000Z | 2019-07-01T19:27:07.000Z | from __future__ import absolute_import
from __future__ import unicode_literals
from datetime import datetime, timedelta
from django.utils.deprecation import MiddlewareMixin
from corehq.apps.domain.project_access.models import SuperuserProjectEntryRecord, ENTRY_RECORD_FREQUENCY
from corehq.util.quickcache import quickc... | 49.71875 | 104 | 0.754871 |
7f238b01c0def33202fd44f0d56c115a89fb1370 | 9,288 | py | Python | languages/Natlab/src/natlab/tame/builtin/gen/classProp.py | dherre3/mclab-core | ccdcd6f46ee42285c7ad055ff0a9ea3361112e11 | [
"Apache-2.0"
] | 11 | 2015-05-31T16:11:35.000Z | 2021-02-16T00:04:48.000Z | languages/Natlab/src/natlab/tame/builtin/gen/classProp.py | sshrdp/mclab | 1843078edb13e647c0261d1944320ffbcf02ad99 | [
"Apache-2.0"
] | 12 | 2015-05-04T16:21:04.000Z | 2019-04-24T21:49:33.000Z | languages/Natlab/src/natlab/tame/builtin/gen/classProp.py | sshrdp/mclab | 1843078edb13e647c0261d1944320ffbcf02ad99 | [
"Apache-2.0"
] | 13 | 2015-05-31T17:16:45.000Z | 2021-02-09T17:08:26.000Z | # DEPRECATED - THERE IS A PARSER FOR THE CLASS LANGUAGE IN JAVA NOW
# TODO -delete
# processing Class tag - class propagation language
import processTags
import sys
# definition of the class propagation language - in a dictionary
# helper method - converts numbers to a MatlabClassVar
# 1) python classes
# general ma... | 46.673367 | 134 | 0.669681 |
612f623225d8c8f8a22570950f3c2e1560fdac28 | 2,392 | py | Python | python/rrc_simulation/pinocchio_utils.py | prstolpe/rrc_simulation | b430fe4e575641cdd64945cf57d0dd67a0eea17a | [
"BSD-3-Clause"
] | 39 | 2020-08-10T20:27:57.000Z | 2021-03-02T17:10:31.000Z | python/rrc_simulation/pinocchio_utils.py | prstolpe/rrc_simulation | b430fe4e575641cdd64945cf57d0dd67a0eea17a | [
"BSD-3-Clause"
] | 8 | 2020-08-12T09:14:17.000Z | 2020-09-22T12:57:40.000Z | python/rrc_simulation/pinocchio_utils.py | prstolpe/rrc_simulation | b430fe4e575641cdd64945cf57d0dd67a0eea17a | [
"BSD-3-Clause"
] | 22 | 2020-08-10T20:20:13.000Z | 2020-10-08T20:42:30.000Z | import numpy as np
import pinocchio
| 31.064935 | 79 | 0.599916 |
61311e2005e71142f8cad95fe41af86e171237aa | 226 | py | Python | expense/admin.py | jramnai/ExpenseCalculator | e220ab0531dc0849e50c713f8f06f5f08be2319a | [
"MIT"
] | 1 | 2019-11-24T10:03:07.000Z | 2019-11-24T10:03:07.000Z | expense/admin.py | jramnai/ExpenseCalculator | e220ab0531dc0849e50c713f8f06f5f08be2319a | [
"MIT"
] | 2 | 2020-06-06T00:10:07.000Z | 2021-06-10T22:18:23.000Z | expense/admin.py | jramnai/ExpenseCalculator | e220ab0531dc0849e50c713f8f06f5f08be2319a | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.contrib import admin
from .models import Category, Expense
# Register your models here.
admin.site.register(Category)
admin.site.register(Expense)
| 22.6 | 39 | 0.778761 |
6133a6ac1f3abd910d3fcd607ed9220a877b07c1 | 1,383 | py | Python | setup.py | dbots-pkg/dbots.py | 3076e39b30276844328dc7d14287310130c81c1e | [
"MIT"
] | 8 | 2020-04-09T05:21:29.000Z | 2021-11-01T19:47:50.000Z | setup.py | dbots-pkg/dbots.py | 3076e39b30276844328dc7d14287310130c81c1e | [
"MIT"
] | 13 | 2020-09-25T06:25:16.000Z | 2021-11-15T22:06:59.000Z | setup.py | dbots-pkg/dbots.py | 3076e39b30276844328dc7d14287310130c81c1e | [
"MIT"
] | 1 | 2021-06-02T17:26:04.000Z | 2021-06-02T17:26:04.000Z | import setuptools
import re
requirements = []
with open('requirements.txt') as f:
requirements = f.read().splitlines()
version = ''
with open('dbots/__init__.py') as f:
version = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]', f.read(), re.MULTILINE).group(1)
if not version:
raise RuntimeError('vers... | 31.431818 | 99 | 0.617498 |
6134e4f18a0efb8caf473f314596ff6aa401c746 | 597 | py | Python | ml-work/test.py | numankh/HypeBeastDashboard | 8b30fe2cb972a603b6ce1d84004b418d52471a7e | [
"MIT"
] | null | null | null | ml-work/test.py | numankh/HypeBeastDashboard | 8b30fe2cb972a603b6ce1d84004b418d52471a7e | [
"MIT"
] | null | null | null | ml-work/test.py | numankh/HypeBeastDashboard | 8b30fe2cb972a603b6ce1d84004b418d52471a7e | [
"MIT"
] | null | null | null | # linear regression feature importance
from sklearn.datasets import make_regression
from sklearn.linear_model import LinearRegression
from matplotlib import pyplot
# define dataset
X, y = make_regression(n_samples=1000, n_features=10, n_informative=5, random_state=1)
# define the model
model = LinearRegression()
# fit ... | 31.421053 | 86 | 0.778894 |
61353a4f4ab02e99fc9e1983a95020c9594e9427 | 4,483 | py | Python | parl/utils/logger.py | TomorrowIsAnOtherDay/PARL | 0fc314630664a3205873a325d8c3105ec4c2500f | [
"Apache-2.0"
] | 1 | 2019-08-01T08:34:40.000Z | 2019-08-01T08:34:40.000Z | parl/utils/logger.py | TomorrowIsAnOtherDay/PARL | 0fc314630664a3205873a325d8c3105ec4c2500f | [
"Apache-2.0"
] | null | null | null | parl/utils/logger.py | TomorrowIsAnOtherDay/PARL | 0fc314630664a3205873a325d8c3105ec4c2500f | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2018 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 required by app... | 30.496599 | 98 | 0.61789 |
61361bb27deebdcaf54deab305993d93df72c9f9 | 357 | py | Python | venv/lib/python2.7/site-packages/nano-1.0a3-py2.7.egg/nano/blog/settings.py | 784134748/kubernetes-install | 5df59632c2619632e422948b667fb68eab9ff5be | [
"MIT"
] | null | null | null | venv/lib/python2.7/site-packages/nano-1.0a3-py2.7.egg/nano/blog/settings.py | 784134748/kubernetes-install | 5df59632c2619632e422948b667fb68eab9ff5be | [
"MIT"
] | 1 | 2021-04-30T20:41:19.000Z | 2021-04-30T20:41:19.000Z | venv/lib/python2.7/site-packages/nano-1.0a3-py2.7.egg/nano/blog/settings.py | 784134748/kubernetes-install | 5df59632c2619632e422948b667fb68eab9ff5be | [
"MIT"
] | null | null | null | from django.conf import settings
NANO_BLOG_TAGS = None
# Optional support for django-taggit
try:
if ('taggit' in settings.INSTALLED_APPS
and getattr(settings, 'NANO_BLOG_USE_TAGS', False)):
import taggit as NANO_BLOG_TAGS
except ImportError:
pass
NANO_BLOG_SPECIAL_TAGS = getattr(settings, 'N... | 25.5 | 81 | 0.745098 |
6137412bca12c1594b05667ccd21c7747a8c970c | 278 | py | Python | scripts/get_article.py | theblueskies/prose | 0251669de08abd6f7b0577701d786685c4e61a34 | [
"MIT"
] | 2,906 | 2017-04-05T17:03:08.000Z | 2022-03-30T21:37:05.000Z | scripts/get_article.py | theblueskies/prose | 0251669de08abd6f7b0577701d786685c4e61a34 | [
"MIT"
] | 70 | 2017-02-22T04:41:32.000Z | 2022-01-19T19:24:33.000Z | scripts/get_article.py | theblueskies/prose | 0251669de08abd6f7b0577701d786685c4e61a34 | [
"MIT"
] | 162 | 2017-04-13T15:07:26.000Z | 2022-01-23T18:07:32.000Z | import os
from newspaper import Article
url = 'http://fox13now.com/2013/12/30/new-year-new-laws-obamacare-pot-guns-and-drones/'
article = Article(url)
article.download()
article.parse()
with open(os.path.join('testdata', 'article.txt'), 'w') as f:
f.write(article.text)
| 21.384615 | 87 | 0.719424 |
613a98422c87f9037a1871ac68d9a3a2da07842e | 337 | py | Python | examples/example_02.py | vesche/juc2 | 3484175988bbf0c8f188c876641f1dd39b3c4af0 | [
"MIT"
] | null | null | null | examples/example_02.py | vesche/juc2 | 3484175988bbf0c8f188c876641f1dd39b3c4af0 | [
"MIT"
] | null | null | null | examples/example_02.py | vesche/juc2 | 3484175988bbf0c8f188c876641f1dd39b3c4af0 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""
juc2/examples/example_02.py
Move a rectangle across the terminal. <3
"""
from juc2 import art, Stage
stage = Stage(height=40, width=80, frame=True)
rectangle = art.Shapes.Rectangle(width=10, height=5, x=5, y=5)
while True:
stage.draw(rectangle, FPS=4)
if rectangle.x < 60:
... | 18.722222 | 62 | 0.676558 |
613e54b69b09b894c0bfdcdad303fe36c638d48b | 18,784 | py | Python | codes/att_reader/layers.py | caglar/Attentive_reader | dcb9eb7d8fd1fd71c4ef333fed3aac7df99d663d | [
"BSD-3-Clause"
] | 31 | 2016-03-02T16:00:37.000Z | 2019-03-18T16:01:55.000Z | codes/att_reader/layers.py | caglar/Attentive_reader | dcb9eb7d8fd1fd71c4ef333fed3aac7df99d663d | [
"BSD-3-Clause"
] | 1 | 2016-05-30T16:59:05.000Z | 2016-05-30T16:59:05.000Z | codes/att_reader/layers.py | caglar/Attentive_reader | dcb9eb7d8fd1fd71c4ef333fed3aac7df99d663d | [
"BSD-3-Clause"
] | 14 | 2016-03-02T16:08:55.000Z | 2019-03-18T16:01:57.000Z | import theano
import theano.tensor as tensor
import numpy
from att_reader.utils import prfx, norm_weight, ortho_weight
from core.utils import dot, sharedX
from core.commons import Sigmoid, Tanh, Rect, global_trng, Linear, ELU
"""
We have functions to create the layers and initialize them.
"""
profile = False
la... | 31.047934 | 101 | 0.486744 |
613ea9b31a2272b26363309b98b740602337ecd8 | 10,687 | py | Python | server/itk_tube.py | KitwareMedical/itk-tube-web | dbd29e6fba6f63929dea5ba5f7170ab47b1104f6 | [
"BSD-3-Clause"
] | 3 | 2017-12-31T10:16:44.000Z | 2018-06-02T21:30:46.000Z | server/itk_tube.py | KitwareMedical/itk-tube-web | dbd29e6fba6f63929dea5ba5f7170ab47b1104f6 | [
"BSD-3-Clause"
] | 2 | 2017-11-15T15:33:27.000Z | 2017-12-04T14:26:41.000Z | server/itk_tube.py | KitwareMedical/itk-tube-web | dbd29e6fba6f63929dea5ba5f7170ab47b1104f6 | [
"BSD-3-Clause"
] | 2 | 2018-01-30T14:52:54.000Z | 2018-10-10T01:50:44.000Z | r"""
This module is a ITK Web server application.
The following command line illustrates how to use it::
$ python .../server/itk-tube.py --data /.../path-to-your-data-file
--data
Path to file to load.
Any WSLink executable script comes with a set of standard arguments that ca... | 33.606918 | 106 | 0.623561 |
613ed83ec74ebf36b8cc8d8d8a4d471088eef80d | 3,388 | py | Python | SimplE/tester.py | dertilo/knowledge-graph-reasoning | e36d57ee34aa2b532f4dfa98a1e1d222037337cc | [
"MIT"
] | null | null | null | SimplE/tester.py | dertilo/knowledge-graph-reasoning | e36d57ee34aa2b532f4dfa98a1e1d222037337cc | [
"MIT"
] | null | null | null | SimplE/tester.py | dertilo/knowledge-graph-reasoning | e36d57ee34aa2b532f4dfa98a1e1d222037337cc | [
"MIT"
] | null | null | null | import torch
from tqdm import tqdm
from dataset import Dataset
import numpy as np
from measure import Measure
from os import listdir
from os.path import isfile, join
| 37.644444 | 96 | 0.592975 |
613fd24f44efdf77077663143efe7c456df30295 | 14,319 | py | Python | eulxml/xmlmap/cerp.py | ig0774/eulxml | 17d71c7d98c0cebda9932b7f13e72093805e1fe2 | [
"Apache-2.0"
] | 19 | 2015-02-23T17:01:24.000Z | 2022-03-14T08:14:16.000Z | eulxml/xmlmap/cerp.py | ig0774/eulxml | 17d71c7d98c0cebda9932b7f13e72093805e1fe2 | [
"Apache-2.0"
] | 30 | 2015-07-24T17:11:52.000Z | 2021-01-19T22:29:37.000Z | eulxml/xmlmap/cerp.py | ig0774/eulxml | 17d71c7d98c0cebda9932b7f13e72093805e1fe2 | [
"Apache-2.0"
] | 13 | 2015-01-27T21:49:16.000Z | 2021-01-19T23:00:00.000Z | # file eulxml/xmlmap/cerp.py
#
# Copyright 2010,2011 Emory University Libraries
#
# 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
#
... | 35.887218 | 104 | 0.68238 |
6140947de47795d851d9a57f819bb4fedb7e6c30 | 706 | py | Python | nestfit/test/__init__.py | autocorr/nestf | 7b82c42d8be75837e87c3ce4053714acb219b013 | [
"MIT"
] | 11 | 2019-08-22T17:19:10.000Z | 2021-12-10T06:43:32.000Z | nestfit/test/__init__.py | autocorr/nestf | 7b82c42d8be75837e87c3ce4053714acb219b013 | [
"MIT"
] | 3 | 2019-09-30T22:28:56.000Z | 2021-02-15T21:40:33.000Z | nestfit/test/__init__.py | autocorr/nestf | 7b82c42d8be75837e87c3ce4053714acb219b013 | [
"MIT"
] | 2 | 2020-06-30T07:18:18.000Z | 2020-07-13T16:27:33.000Z | #!/usr/bin/env python3
import warnings
from pathlib import Path
from spectral_cube import SpectralCube
from astropy.wcs import FITSFixedWarning
DATA_PATH = Path(__file__).parent / "data"
NH3_RMS_K = 0.35
| 23.533333 | 64 | 0.677054 |
614115a92e300f92dd37eb72064e8a55346da282 | 228 | py | Python | djangopeople/djangopeople/management/commands/recluster.py | timgraham/djangopeople | de595ac8d7e8540871c282294a332a835ac0c177 | [
"MIT"
] | null | null | null | djangopeople/djangopeople/management/commands/recluster.py | timgraham/djangopeople | de595ac8d7e8540871c282294a332a835ac0c177 | [
"MIT"
] | null | null | null | djangopeople/djangopeople/management/commands/recluster.py | timgraham/djangopeople | de595ac8d7e8540871c282294a332a835ac0c177 | [
"MIT"
] | null | null | null | from django.core.management.base import NoArgsCommand
from ... import clustering
| 20.727273 | 53 | 0.723684 |
6141442f7c66378254acb69ff2d917fdf3531f0e | 211 | py | Python | phl_courts_scraper/portal/__init__.py | PhilaController/phl-courts-scraper | d18eca8c5658f88b8f783903ab65c247f8f6d579 | [
"MIT"
] | null | null | null | phl_courts_scraper/portal/__init__.py | PhilaController/phl-courts-scraper | d18eca8c5658f88b8f783903ab65c247f8f6d579 | [
"MIT"
] | 1 | 2022-03-12T00:52:08.000Z | 2022-03-12T00:52:08.000Z | phl_courts_scraper/portal/__init__.py | PhilaController/phl-courts-scraper | d18eca8c5658f88b8f783903ab65c247f8f6d579 | [
"MIT"
] | null | null | null | """Parse the UJS court portal."""
from .core import UJSPortalScraper # noqa: F401
from .schema import PortalResult, PortalResults # noqa: F401
__all__ = ["UJSPortalScraper", "PortalResult", "PortalResults"]
| 30.142857 | 63 | 0.744076 |
61417ac842baa5fce26e656d22d5a3fc89e691b0 | 3,671 | py | Python | tuning/TensileConfiguration.py | mhbliao/Tensile | 99261adfa7fe6b30b0c76b17b87bbd6cb41bae60 | [
"MIT"
] | null | null | null | tuning/TensileConfiguration.py | mhbliao/Tensile | 99261adfa7fe6b30b0c76b17b87bbd6cb41bae60 | [
"MIT"
] | null | null | null | tuning/TensileConfiguration.py | mhbliao/Tensile | 99261adfa7fe6b30b0c76b17b87bbd6cb41bae60 | [
"MIT"
] | 5 | 2019-07-29T01:23:56.000Z | 2022-03-08T09:28:10.000Z |
import os
import sys
import argparse
################################################################################
# Print Debug
################################################################################
#def printWarning(message):
# print "Tensile::WARNING: %s" % message
# sys.stdout.flush()
try:
im... | 25.493056 | 143 | 0.602016 |
61419b6e24bcba1a05210251891441000213b61a | 1,557 | py | Python | WeLearn/M3-Python/L1-Python_Intro/hello.py | Sheldon101/mycssi2019labs | 4ff1ecda475a54be79ee9ce44f1dac77418df2db | [
"Apache-2.0"
] | null | null | null | WeLearn/M3-Python/L1-Python_Intro/hello.py | Sheldon101/mycssi2019labs | 4ff1ecda475a54be79ee9ce44f1dac77418df2db | [
"Apache-2.0"
] | null | null | null | WeLearn/M3-Python/L1-Python_Intro/hello.py | Sheldon101/mycssi2019labs | 4ff1ecda475a54be79ee9ce44f1dac77418df2db | [
"Apache-2.0"
] | null | null | null | #num1=int(raw_input("Enter num #1:"))
#num2=int(raw_input("Enter num #2:"))
#total= num1 + num2
#print("The sum is: "+ str(total))
# need to be a string so computer can read it
# all strings can be integers but not all integers can be strings
# num = int(raw_input("Enter a number:"))
# if num>0:
# print("That's a p... | 26.389831 | 98 | 0.626204 |
614460f71cfeb7b215e13c2a3a7099f7272a6039 | 11,541 | py | Python | test/test_server.py | gndu91/wsproto | 7ddbdd9d7feee16b72ef7cd50c71fe18a88ce094 | [
"MIT"
] | 179 | 2017-05-03T19:52:16.000Z | 2022-03-26T13:14:46.000Z | test/test_server.py | gndu91/wsproto | 7ddbdd9d7feee16b72ef7cd50c71fe18a88ce094 | [
"MIT"
] | 116 | 2017-05-03T20:18:50.000Z | 2022-02-27T12:33:34.000Z | test/test_server.py | gndu91/wsproto | 7ddbdd9d7feee16b72ef7cd50c71fe18a88ce094 | [
"MIT"
] | 38 | 2017-05-04T18:04:07.000Z | 2022-02-26T19:54:36.000Z | from typing import cast, List, Optional, Tuple
import h11
import pytest
from wsproto import WSConnection
from wsproto.connection import SERVER
from wsproto.events import (
AcceptConnection,
Event,
RejectConnection,
RejectData,
Request,
)
from wsproto.extensions import Extension
from wsproto.typing... | 32.418539 | 87 | 0.593709 |
6148d66b350b1b75a0fa80c7fdba2459fab09824 | 1,499 | py | Python | KnowledgeMapping/spark/connNeo4j/demo_mysql.py | nickliqian/ralph_doc_to_chinese | be120ce2bb94a8e8395630218985f5e51ae087d9 | [
"MIT"
] | 8 | 2018-05-22T01:11:33.000Z | 2020-03-19T01:44:55.000Z | KnowledgeMapping/spark/connNeo4j/demo_mysql.py | nickliqian/ralph_doc_to_chinese | be120ce2bb94a8e8395630218985f5e51ae087d9 | [
"MIT"
] | null | null | null | KnowledgeMapping/spark/connNeo4j/demo_mysql.py | nickliqian/ralph_doc_to_chinese | be120ce2bb94a8e8395630218985f5e51ae087d9 | [
"MIT"
] | 3 | 2018-07-25T09:31:53.000Z | 2019-09-14T14:05:31.000Z | import pymysql
print("Connect to mysql...")
mysql_db = "report_system"
m_conn = pymysql.connect(host='192.168.20.20', port=3306, user='admin', passwd='1qaz@WSX', db=mysql_db, charset='utf8')
m_cursor = m_conn.cursor()
# sql = "select row_key,account_id,cell_no,is_id_match,product_id,response_ref_id,query_time from t... | 45.424242 | 263 | 0.682455 |
614996a118e2aab5b9a38bd9e742094a6bc21b63 | 993 | py | Python | attached/delete.py | yougikou/yougikou.github.io | a8ebb2a8e525e735806ea6d8a8a7f89fbf0305c1 | [
"Apache-2.0"
] | 1 | 2022-01-25T17:24:05.000Z | 2022-01-25T17:24:05.000Z | attached/delete.py | yougikou/yougikou.github.io | a8ebb2a8e525e735806ea6d8a8a7f89fbf0305c1 | [
"Apache-2.0"
] | 6 | 2020-05-06T23:36:55.000Z | 2021-11-02T10:46:11.000Z | attached/delete.py | yougikou/yougikou.github.io | a8ebb2a8e525e735806ea6d8a8a7f89fbf0305c1 | [
"Apache-2.0"
] | null | null | null | import sys, os, time, traceback
from pdfrw import PdfReader, PdfWriter, PageMerge
if __name__ == "__main__":
inpfn = sys.argv[1]
try:
assert inpfn
if inpfn.lower().endswith(".pdf"):
if not os.path.exists("out"):
os.mkdir("out")
processFile(inpfn... | 29.205882 | 67 | 0.562941 |
614b094bc6fe81f808b2770a13e59af2778e159e | 321 | py | Python | Audio Features/waveplot.py | kritika58/A-Novel-Framework-Using-Neutrosophy-for-Integrated-Speech-and-Text-Sentiment-Analysis | a16bd5d02f2efd34ad20f496fb59f273fdb9b60c | [
"MIT"
] | null | null | null | Audio Features/waveplot.py | kritika58/A-Novel-Framework-Using-Neutrosophy-for-Integrated-Speech-and-Text-Sentiment-Analysis | a16bd5d02f2efd34ad20f496fb59f273fdb9b60c | [
"MIT"
] | null | null | null | Audio Features/waveplot.py | kritika58/A-Novel-Framework-Using-Neutrosophy-for-Integrated-Speech-and-Text-Sentiment-Analysis | a16bd5d02f2efd34ad20f496fb59f273fdb9b60c | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
import librosa.display
plt.rcParams.update({'font.size': 16})
y, sr = librosa.load(librosa.util.example_audio_file())
plt.figure(figsize=(18, 7))
librosa.display.waveplot(y, sr=sr, x_axis='s')
print(sr)
plt.ylabel('Sampling Rate',fontsize=32)
plt.xlabel('Time (s)',fontsize=32)
plt.show(... | 29.181818 | 55 | 0.744548 |
614c833cd5e98e613a94ad6a3e10cb9506f857ac | 49,928 | py | Python | services/dashboard/projekt/dashboard_server.py | JoshPrim/EVA-Projekt | 94e4f594519eda676e0f5f2787f8643831f346df | [
"Apache-2.0"
] | 2 | 2018-05-30T08:40:26.000Z | 2018-09-06T15:37:25.000Z | services/dashboard/projekt/dashboard_server.py | JoshPrim/EVA-Projekt | 94e4f594519eda676e0f5f2787f8643831f346df | [
"Apache-2.0"
] | 1 | 2021-06-01T22:37:55.000Z | 2021-06-01T22:37:55.000Z | services/dashboard/projekt/dashboard_server.py | JoshPrim/EVA-Projekt | 94e4f594519eda676e0f5f2787f8643831f346df | [
"Apache-2.0"
] | 2 | 2018-05-31T14:55:04.000Z | 2018-08-29T09:38:31.000Z | # -*- coding: utf-8 -*-
'''
Autor: Joshua Prim, Philipp Krenitz, Bartos Mosch, Sophie Hagemann
Version: 1.3
Server fuer das hosten des FaSta-Dashboards
Copyright 2018 The Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance... | 42.491915 | 232 | 0.500581 |
614d70b8129724b5e053055af8277e59183bfa60 | 1,753 | py | Python | hardware/humidity_rev001/main.py | deniz195/json-sensor | c0e55d39bab3be6eca444273fb5436e1eafe8860 | [
"MIT"
] | 1 | 2018-10-30T11:22:33.000Z | 2018-10-30T11:22:33.000Z | hardware/humidity_rev001/main.py | deniz195/json-sensor | c0e55d39bab3be6eca444273fb5436e1eafe8860 | [
"MIT"
] | null | null | null | hardware/humidity_rev001/main.py | deniz195/json-sensor | c0e55d39bab3be6eca444273fb5436e1eafe8860 | [
"MIT"
] | null | null | null | # Trinket IO demo
# Welcome to CircuitPython 2.0.0 :)
import board
from digitalio import DigitalInOut, Direction, Pull
from analogio import AnalogOut, AnalogIn
import touchio
from adafruit_hid.keyboard import Keyboard
from adafruit_hid.keycode import Keycode
import adafruit_dotstar as dotstar
import time
import neop... | 20.869048 | 72 | 0.654307 |
614f16ac6495c02324492c1a2db96f18b5c7f6dc | 20,681 | py | Python | tests/lib/raw.py | Defense-Cyber-Crime-Center/dfvfs | da2ccbc4c989ced5ad651057bd8f5a4b18af6d37 | [
"Apache-2.0"
] | 2 | 2016-02-18T12:46:26.000Z | 2022-03-13T03:05:05.000Z | tests/lib/raw.py | Defense-Cyber-Crime-Center/dfvfs | da2ccbc4c989ced5ad651057bd8f5a4b18af6d37 | [
"Apache-2.0"
] | null | null | null | tests/lib/raw.py | Defense-Cyber-Crime-Center/dfvfs | da2ccbc4c989ced5ad651057bd8f5a4b18af6d37 | [
"Apache-2.0"
] | 5 | 2016-12-18T08:05:39.000Z | 2019-11-19T21:18:00.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""Tests for the storage media RAW image support helper functions."""
import unittest
from dfvfs.lib import raw
from dfvfs.lib import definitions
from dfvfs.path import fake_path_spec
from dfvfs.path import raw_path_spec
from dfvfs.resolver import context
from dfvfs.vfs impor... | 41.695565 | 80 | 0.748175 |
614f585cc17a886444d4e45f07eb1b61a7b2e1d3 | 2,062 | py | Python | src/tools/plot_training_log.py | motherapp/CenterNet | 8a8a80e21637fab1462916b1a555fd2b2bfb6988 | [
"MIT"
] | 6 | 2019-11-22T05:54:16.000Z | 2020-03-27T07:35:32.000Z | src/tools/plot_training_log.py | motherapp/CenterNet | 8a8a80e21637fab1462916b1a555fd2b2bfb6988 | [
"MIT"
] | null | null | null | src/tools/plot_training_log.py | motherapp/CenterNet | 8a8a80e21637fab1462916b1a555fd2b2bfb6988 | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
from matplotlib.animation import FuncAnimation
import numpy as np
import sys
import time
if __name__ == '__main__':
main()
| 25.775 | 72 | 0.567895 |
61507394f52ac1e05ac449ce9da47bed8f214087 | 50,220 | py | Python | pyxb/binding/content.py | thorstenb/pyxb | 634e86f61dfb73a2900f32fc3d819e9c25365a49 | [
"Apache-2.0"
] | null | null | null | pyxb/binding/content.py | thorstenb/pyxb | 634e86f61dfb73a2900f32fc3d819e9c25365a49 | [
"Apache-2.0"
] | null | null | null | pyxb/binding/content.py | thorstenb/pyxb | 634e86f61dfb73a2900f32fc3d819e9c25365a49 | [
"Apache-2.0"
] | null | null | null | # Copyright 2009, Peter A. Bigot
#
# 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 ... | 44.168865 | 162 | 0.652708 |
6150aa4c86be0709bceaea10c0cd77d46a394ca4 | 2,447 | py | Python | scripts/imglss-query-tycho-veto.py | desihub/imaginglss | 09258d20015869fead9bad6020da2bc0d161f670 | [
"MIT"
] | 6 | 2015-04-30T18:58:28.000Z | 2020-11-23T16:52:02.000Z | scripts/imglss-query-tycho-veto.py | desihub/imaginglss | 09258d20015869fead9bad6020da2bc0d161f670 | [
"MIT"
] | 15 | 2015-07-21T18:44:30.000Z | 2018-09-07T22:40:31.000Z | scripts/imglss-query-tycho-veto.py | desihub/imaginglss | 09258d20015869fead9bad6020da2bc0d161f670 | [
"MIT"
] | 2 | 2017-11-29T16:58:34.000Z | 2018-07-23T15:52:59.000Z | #!/usr/bin/env python
#
# Code to query the VETO mask of objects/randoms
# It takes the NOISES extension as an input
# It writers a VETO extension.
# Usage, see python query_veto.py -h
#
from __future__ import print_function
__author__ = "Yu Feng and Martin White"
__version__ = "1.0"
__email__ = "yfeng1@berkeley.ed... | 30.974684 | 125 | 0.679199 |
615124af15bbf9dc72d9e0297469abcf9e8f9255 | 5,573 | py | Python | model.py | hafizur-rahman/CarND-Behavioral-Cloning-P3 | 2a094918c2901d0db4496649d66c89d7c5d512c8 | [
"MIT"
] | null | null | null | model.py | hafizur-rahman/CarND-Behavioral-Cloning-P3 | 2a094918c2901d0db4496649d66c89d7c5d512c8 | [
"MIT"
] | null | null | null | model.py | hafizur-rahman/CarND-Behavioral-Cloning-P3 | 2a094918c2901d0db4496649d66c89d7c5d512c8 | [
"MIT"
] | null | null | null | import csv
import cv2
import numpy as np
from sklearn.utils import shuffle
# Generators
import random
from keras.models import Sequential
from keras.layers import Flatten, Dense,Lambda, Cropping2D, Dropout, Conv2D
from keras.layers.convolutional import Convolution2D
if __name__== "__main__":
impor... | 33.371257 | 99 | 0.616903 |
615449c99a13e49491115643772692dd1ae14eec | 3,078 | py | Python | backend/bundle/controller.py | FlickerSoul/Graphery | 8b1390e1ba96fd2867f0cd8e5fc1d4ad6108121e | [
"MIT"
] | 5 | 2020-08-26T00:15:01.000Z | 2021-01-11T17:24:51.000Z | backend/bundle/controller.py | FlickerSoul/Graphery | 8b1390e1ba96fd2867f0cd8e5fc1d4ad6108121e | [
"MIT"
] | 69 | 2020-08-02T23:45:44.000Z | 2021-04-17T03:04:32.000Z | backend/bundle/controller.py | FlickerSoul/Graphery | 8b1390e1ba96fd2867f0cd8e5fc1d4ad6108121e | [
"MIT"
] | 4 | 2020-09-10T05:40:49.000Z | 2020-12-20T11:44:16.000Z | from __future__ import annotations
import logging
import pathlib
from logging.handlers import TimedRotatingFileHandler
from os import getenv
from typing import Union, List, Mapping
from bundle.utils.recorder import Recorder
from bundle.utils.cache_file_helpers import CacheFolder, USER_DOCS_PATH
from bundle.seeker imp... | 37.084337 | 99 | 0.71345 |
6154b821741459ad2d01df318a4ca52a34575108 | 9,773 | py | Python | CPC training/tune.py | haoyudong-97/tg2019task | 4f31968cc49105d13bc95487136dc3ae986bf4d1 | [
"MIT"
] | null | null | null | CPC training/tune.py | haoyudong-97/tg2019task | 4f31968cc49105d13bc95487136dc3ae986bf4d1 | [
"MIT"
] | null | null | null | CPC training/tune.py | haoyudong-97/tg2019task | 4f31968cc49105d13bc95487136dc3ae986bf4d1 | [
"MIT"
] | null | null | null | # Copyright 2018 Dong-Hyun Lee, Kakao Brain.
# (Strongly inspired by original Google BERT code and Hugging Face's code)
""" Fine-tuning on A Classification Task with pretrained Transformer """
import itertools
import csv
import fire
import torch
import torch.nn as nn
from torch.utils.data import Dataset, DataLoader
... | 31.525806 | 112 | 0.600941 |
6156a185a0ec9e2713a8896fbea860c9a2788539 | 2,069 | py | Python | test/teos/unit/test_extended_appointment.py | ritikramuka/python-teos | daa9d8dc89d5ddc3f29f2b7b2dda05bf0c79c82d | [
"MIT"
] | 86 | 2020-03-20T23:58:40.000Z | 2022-02-27T11:25:11.000Z | test/teos/unit/test_extended_appointment.py | sr-gi/python-teos | f8f214125a2f7c82fed278dc21ee5d517e7de72a | [
"MIT"
] | 160 | 2020-03-23T16:31:51.000Z | 2022-03-05T13:22:21.000Z | test/teos/unit/test_extended_appointment.py | sr-gi/python-teos | f8f214125a2f7c82fed278dc21ee5d517e7de72a | [
"MIT"
] | 17 | 2020-03-21T10:28:37.000Z | 2022-02-23T12:22:00.000Z | import pytest
from teos.extended_appointment import ExtendedAppointment
# Parent methods are not tested.
def test_init_ext_appointment(ext_appointment_data):
# The appointment has no checks whatsoever, since the inspector is the one taking care or that, and the only one
# creating appointments.
ext_ap... | 36.946429 | 116 | 0.744804 |
6156bf0e3221f1152ca5fede44ceb1bca071a86d | 1,246 | py | Python | toolchain/riscv/MSYS/python/Lib/test/encoded_modules/__init__.py | zhiqiang-hu/bl_iot_sdk | 154ee677a8cc6a73e6a42a5ff12a8edc71e6d15d | [
"Apache-2.0"
] | 207 | 2018-10-01T08:53:01.000Z | 2022-03-14T12:15:54.000Z | toolchain/riscv/MSYS/python/Lib/test/encoded_modules/__init__.py | zhiqiang-hu/bl_iot_sdk | 154ee677a8cc6a73e6a42a5ff12a8edc71e6d15d | [
"Apache-2.0"
] | 8 | 2019-06-29T14:18:51.000Z | 2022-02-19T07:30:27.000Z | toolchain/riscv/MSYS/python/Lib/test/encoded_modules/__init__.py | zhiqiang-hu/bl_iot_sdk | 154ee677a8cc6a73e6a42a5ff12a8edc71e6d15d | [
"Apache-2.0"
] | 76 | 2020-03-16T01:47:46.000Z | 2022-03-21T16:37:07.000Z | # -*- encoding: utf-8 -*-
# This is a package that contains a number of modules that are used to
# test import from the source files that have different encodings.
# This file (the __init__ module of the package), is encoded in utf-8
# and contains a list of strings from various unicode planes that are
# encoded... | 51.916667 | 81 | 0.731942 |
6157139686e8da9fc83cd2b69a5a6860b9518492 | 2,554 | py | Python | kinoko/text/patch_tsv.py | koyo922/kinoko | 4750d8e6b1a68ba771cd89b352989ef05b293d45 | [
"MIT"
] | 13 | 2019-10-27T12:19:27.000Z | 2022-03-12T13:30:31.000Z | kinoko/text/patch_tsv.py | iloveslq/kinoko | 4750d8e6b1a68ba771cd89b352989ef05b293d45 | [
"MIT"
] | null | null | null | kinoko/text/patch_tsv.py | iloveslq/kinoko | 4750d8e6b1a68ba771cd89b352989ef05b293d45 | [
"MIT"
] | 10 | 2019-10-27T12:21:21.000Z | 2022-03-12T13:30:22.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# vim: tabstop=4 shiftwidth=4 expandtab number
"""
csv/tsv
e.g.
<reference.txt>:
jiaose juese
xxx <DEL>
<file_to_patch>:
field1 field2 jiaose field4
field1 field2 xxx field4
<resultstdout>,:
field1 field2 juese field4
patchtsv -r input/ref1.txt input/ref2.txt \
... | 28.377778 | 112 | 0.627643 |
6158ddbd923564b0fc6dc5759ee9c0f2fdcd6fb9 | 3,078 | py | Python | toolkit/utils/report_utils.py | suraj-testing2/Flowers_Toilet | 21c981531a505a8b74ee42c33a3f4d68ef72d7f3 | [
"Apache-2.0"
] | 22 | 2015-01-22T12:10:50.000Z | 2021-10-12T03:30:56.000Z | toolkit/utils/report_utils.py | suraj-testing2/Flowers_Toilet | 21c981531a505a8b74ee42c33a3f4d68ef72d7f3 | [
"Apache-2.0"
] | null | null | null | toolkit/utils/report_utils.py | suraj-testing2/Flowers_Toilet | 21c981531a505a8b74ee42c33a3f4d68ef72d7f3 | [
"Apache-2.0"
] | 17 | 2016-01-28T04:54:39.000Z | 2021-10-12T03:30:49.000Z | #!/usr/bin/python
#
# Copyright 2014 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required b... | 28.766355 | 76 | 0.690058 |
6158e50e667f81e2d5e70166a7f7dc89a015b4a3 | 323 | py | Python | Sinavro/Types/BaseClass.py | pl-Steve28-lq/SinavroLang | 8f8344bf9d92ba5498f9bbf103fb2c80cde724d2 | [
"MIT"
] | 4 | 2020-12-24T10:11:18.000Z | 2021-09-09T01:24:05.000Z | Sinavro/Types/BaseClass.py | pl-Steve28-lq/SinavroLang | 8f8344bf9d92ba5498f9bbf103fb2c80cde724d2 | [
"MIT"
] | null | null | null | Sinavro/Types/BaseClass.py | pl-Steve28-lq/SinavroLang | 8f8344bf9d92ba5498f9bbf103fb2c80cde724d2 | [
"MIT"
] | null | null | null | gencls = lambda n: type(f'Sinavro{n.title()}', (SinavroObject,), {'__init__': init, 'type': n})
SinavroInt = gencls('int')
SinavroFloat = gencls('float')
SinavroString = gencls('string')
SinavroBool = gencls('bool')
SinavroArray = gencls('array')
| 29.363636 | 96 | 0.681115 |
615ad8eba732cef089d5695b78282f0eeaae7437 | 2,824 | py | Python | HUGS/Interface/_upload.py | hugs-cloud/hugs | 65aef97d662746f1382bd03b15f46a6647c7b7f5 | [
"Apache-2.0"
] | null | null | null | HUGS/Interface/_upload.py | hugs-cloud/hugs | 65aef97d662746f1382bd03b15f46a6647c7b7f5 | [
"Apache-2.0"
] | 5 | 2020-08-18T12:22:46.000Z | 2020-09-30T14:30:11.000Z | HUGS/Interface/_upload.py | hugs-cloud/hugs | 65aef97d662746f1382bd03b15f46a6647c7b7f5 | [
"Apache-2.0"
] | 2 | 2020-06-11T20:30:24.000Z | 2020-10-29T17:30:21.000Z | import tempfile
from pathlib import Path
import ipywidgets as widgets
from HUGS.Client import Process
from HUGS.Interface import Credentials
| 31.032967 | 88 | 0.555949 |
615cff61d92d443e22f1204db917f9dba1c6f6b4 | 10,987 | py | Python | tools/run_tests/xds_k8s_test_driver/tests/url_map/metadata_filter_test.py | minerba/grpc | 775362a2cea21363339d73215e3b9a1394ad55b2 | [
"Apache-2.0"
] | null | null | null | tools/run_tests/xds_k8s_test_driver/tests/url_map/metadata_filter_test.py | minerba/grpc | 775362a2cea21363339d73215e3b9a1394ad55b2 | [
"Apache-2.0"
] | null | null | null | tools/run_tests/xds_k8s_test_driver/tests/url_map/metadata_filter_test.py | minerba/grpc | 775362a2cea21363339d73215e3b9a1394ad55b2 | [
"Apache-2.0"
] | null | null | null | # Copyright 2022 The gRPC Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | 39.521583 | 80 | 0.576408 |
615eb18c148fdcb7f52ffdef75ab23706867bb3b | 2,268 | py | Python | tmpFile.py | yingyulou/tmpFile | 557e74351a0412b70c0ef1179479920e86b31bc4 | [
"MIT"
] | 2 | 2019-06-11T10:30:35.000Z | 2020-08-27T07:05:41.000Z | tmpFile.py | yingyulou/tmpFile | 557e74351a0412b70c0ef1179479920e86b31bc4 | [
"MIT"
] | null | null | null | tmpFile.py | yingyulou/tmpFile | 557e74351a0412b70c0ef1179479920e86b31bc4 | [
"MIT"
] | 1 | 2019-03-17T02:52:21.000Z | 2019-03-17T02:52:21.000Z | #!/bin/env python
# coding=UTF-8
'''
DESCRIPTION
tmpFile
A module for creating temporary files and folders.
VERSION
1.4.0
LATEST UPDATE
2019.3.4
'''
# Import Python Lib
from os import remove, mkdir
from os.path import join, exists, abspath
from uuid import uuid4
from shutil import rmtree
#####... | 19.220339 | 80 | 0.479718 |
615ee1b639ae928638b3d914af60405b9ed2a109 | 364 | py | Python | hw_asr/augmentations/wave_augmentations/__init__.py | isdevnull/asr_hw | 9650506b80d4e38574b63390f79a6f01786b7d18 | [
"MIT"
] | null | null | null | hw_asr/augmentations/wave_augmentations/__init__.py | isdevnull/asr_hw | 9650506b80d4e38574b63390f79a6f01786b7d18 | [
"MIT"
] | null | null | null | hw_asr/augmentations/wave_augmentations/__init__.py | isdevnull/asr_hw | 9650506b80d4e38574b63390f79a6f01786b7d18 | [
"MIT"
] | null | null | null | from hw_asr.augmentations.wave_augmentations.Gain import Gain
from hw_asr.augmentations.wave_augmentations.ImpulseResponse import ImpulseResponse
from hw_asr.augmentations.wave_augmentations.Noise import GaussianNoise
from hw_asr.augmentations.wave_augmentations.TimeStretch import TimeStretch
__all__ = [
"Gain",
... | 33.090909 | 83 | 0.837912 |
6160876a4005d2218239e0d5b0c8b1ee445778c9 | 2,408 | py | Python | python/ambassador/compile.py | Asher-Wang/ambassador | 393a52832d081e0d8d0e0ecd5a14cfe18c62b837 | [
"Apache-2.0"
] | 3,438 | 2017-04-23T23:10:18.000Z | 2021-06-02T10:11:45.000Z | python/ambassador/compile.py | Asher-Wang/ambassador | 393a52832d081e0d8d0e0ecd5a14cfe18c62b837 | [
"Apache-2.0"
] | 1,906 | 2017-04-11T17:47:54.000Z | 2021-06-02T14:20:11.000Z | python/ambassador/compile.py | Asher-Wang/ambassador | 393a52832d081e0d8d0e0ecd5a14cfe18c62b837 | [
"Apache-2.0"
] | 591 | 2017-04-17T17:50:08.000Z | 2021-06-01T08:20:34.000Z | # Copyright 2020 Datawire. 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... | 31.272727 | 97 | 0.703904 |
616100bd2e732fe916b837123e49949956a2ff99 | 3,241 | py | Python | elasticdl/python/tests/elasticdl_job_service_test.py | DLPerf/elasticdl | b9c03ea0e81861ae8d349c3d8ffd1f7b588b910b | [
"MIT"
] | null | null | null | elasticdl/python/tests/elasticdl_job_service_test.py | DLPerf/elasticdl | b9c03ea0e81861ae8d349c3d8ffd1f7b588b910b | [
"MIT"
] | null | null | null | elasticdl/python/tests/elasticdl_job_service_test.py | DLPerf/elasticdl | b9c03ea0e81861ae8d349c3d8ffd1f7b588b910b | [
"MIT"
] | null | null | null | # Copyright 2020 The ElasticDL 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... | 35.615385 | 79 | 0.648874 |
61613f61f3fc11a9f27623175f5c0fb4554e699d | 24,590 | py | Python | train/train.py | miramirakim227/SwapNeRF_GT | 84444660a7fc8b5f796503d90f3a055889c44389 | [
"BSD-2-Clause"
] | null | null | null | train/train.py | miramirakim227/SwapNeRF_GT | 84444660a7fc8b5f796503d90f3a055889c44389 | [
"BSD-2-Clause"
] | null | null | null | train/train.py | miramirakim227/SwapNeRF_GT | 84444660a7fc8b5f796503d90f3a055889c44389 | [
"BSD-2-Clause"
] | null | null | null | # Training to a set of multiple objects (e.g. ShapeNet or DTU)
# tensorboard logs available in logs/<expname>
import sys
import os
sys.path.insert(
0, os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "src"))
)
import warnings
import trainlib
from model import make_model, loss
from render import NeRF... | 42.98951 | 176 | 0.551037 |
61633ee4b11cae72781872ad72fdde6424de3acc | 240,628 | py | Python | Calculation.py | atranel/resqdb | 76b8a5089732ae63c867b734c5053908687122bc | [
"MIT"
] | null | null | null | Calculation.py | atranel/resqdb | 76b8a5089732ae63c867b734c5053908687122bc | [
"MIT"
] | null | null | null | Calculation.py | atranel/resqdb | 76b8a5089732ae63c867b734c5053908687122bc | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Thu Jul 09 13:28:05 2017
@author: Marie Jankujova
"""
import sys
import os
from datetime import datetime, time, date
import pandas as pd
import numpy as np
from numpy import inf
import pytz
import logging
import scipy.stats as st
from scipy.stats import sem, t
from scipy import ... | 96.405449 | 1,175 | 0.683898 |
616393b01319880a58b68d651fe6bd662c0ef5d6 | 13,451 | py | Python | api_level_2/qt/basic.py | olklymov/valkka-examples | 92be5f815cd3927100ccc4220c588bdd7c510797 | [
"MIT"
] | 12 | 2018-06-28T13:40:53.000Z | 2022-01-07T12:46:15.000Z | api_level_2/qt/basic.py | olklymov/valkka-examples | 92be5f815cd3927100ccc4220c588bdd7c510797 | [
"MIT"
] | 6 | 2019-04-29T16:55:38.000Z | 2022-03-04T17:00:15.000Z | api_level_2/qt/basic.py | olklymov/valkka-examples | 92be5f815cd3927100ccc4220c588bdd7c510797 | [
"MIT"
] | 5 | 2019-04-21T15:42:55.000Z | 2021-08-16T10:53:30.000Z | """
basic.py : Some basic classes encapsulating filter chains
* Copyright 2017-2020 Valkka Security Ltd. and Sampsa Riikonen
*
* Authors: Sampsa Riikonen <sampsa.riikonen@iki.fi>
*
* This file is part of the Valkka library.
*
* Valkka is free software: you can redistribute it and/or modify
* it under the term... | 34.401535 | 211 | 0.635046 |
6163cb2b3ca8b632e91d64eb5923fcae7762780f | 455 | py | Python | need_an_image/utils/store.py | RyouMon/i-need-an-image | a2b2b42ca0ab9cb2e9886733339fdec7641f0246 | [
"MIT"
] | 1 | 2022-02-05T04:25:39.000Z | 2022-02-05T04:25:39.000Z | need_an_image/utils/store.py | RyouMon/i-need-an-image | a2b2b42ca0ab9cb2e9886733339fdec7641f0246 | [
"MIT"
] | 5 | 2021-08-11T15:59:04.000Z | 2021-09-18T15:21:37.000Z | need_an_image/utils/store.py | RyouMon/i-need-an-image | a2b2b42ca0ab9cb2e9886733339fdec7641f0246 | [
"MIT"
] | null | null | null | import os.path
from uuid import uuid4
def save_image(image, save_to='.'):
"""
Save image to local dick
"""
suffix = '.jpg'
if image.mode == 'P':
image = image.convert('RGBA')
if image.mode == 'RGBA':
suffix = '.png'
filename = uuid4().hex + suffix
if not os.path.isd... | 18.2 | 46 | 0.589011 |
61654d0d5ba34a716dc57dc18432e7eb9d5225f1 | 670 | py | Python | leetcode/191.py | pingrunhuang/CodeChallenge | a8e5274e04c47d851836197907266418af4f1a22 | [
"MIT"
] | null | null | null | leetcode/191.py | pingrunhuang/CodeChallenge | a8e5274e04c47d851836197907266418af4f1a22 | [
"MIT"
] | null | null | null | leetcode/191.py | pingrunhuang/CodeChallenge | a8e5274e04c47d851836197907266418af4f1a22 | [
"MIT"
] | null | null | null | '''
191. Number of 1 Bits
Write a function that takes an unsigned integer and returns the number of 1' bits it has (also known as the Hamming weight).
For example, the 32-bit integer 11' has binary representation 00000000000000000000000000001011, so the function should return 3.
'''
if __name__ == '__main__':
s... | 23.928571 | 129 | 0.591045 |
6165681678fb46f70ca964ea77be210bc24f6207 | 3,817 | py | Python | examples/color4.py | yang69can/pyngl | 78a7040ce9de4b7a442b0c3b5faecccab2f01426 | [
"Apache-2.0"
] | 125 | 2016-11-24T09:04:28.000Z | 2022-01-22T14:06:56.000Z | examples/color4.py | yang69can/pyngl | 78a7040ce9de4b7a442b0c3b5faecccab2f01426 | [
"Apache-2.0"
] | 52 | 2017-11-08T23:23:02.000Z | 2022-03-20T03:17:39.000Z | examples/color4.py | yang69can/pyngl | 78a7040ce9de4b7a442b0c3b5faecccab2f01426 | [
"Apache-2.0"
] | 25 | 2017-08-27T10:50:43.000Z | 2022-01-29T14:56:05.000Z | #
# File:
# color4.py
#
# Synopsis:
# Draws sixteen sample color boxs with RGB labels.
#
# Category:
# Colors
#
# Author:
# Fred Clare
#
# Date of initial publication:
# January, 2006
#
# Description:
# This example draws sixteen color boxes using the RGB
# values for named colors. The boxes... | 28.066176 | 116 | 0.589992 |
61672e950ab29487e7137f084aa554a9e2b34c33 | 90 | py | Python | t4_hotel/apps.py | dnswd/SIRUCO | eb1dae3dbbae384ef53d7bd262c5977a13fad2ef | [
"Unlicense"
] | null | null | null | t4_hotel/apps.py | dnswd/SIRUCO | eb1dae3dbbae384ef53d7bd262c5977a13fad2ef | [
"Unlicense"
] | null | null | null | t4_hotel/apps.py | dnswd/SIRUCO | eb1dae3dbbae384ef53d7bd262c5977a13fad2ef | [
"Unlicense"
] | null | null | null | from django.apps import AppConfig
| 15 | 33 | 0.755556 |
616842334b3b74678e4d196cefe1da10ade1ad1a | 4,495 | py | Python | gameAI.py | dshao2007/TermProject | ff277a107e7427e76d95311c511890d9202d676f | [
"MIT"
] | null | null | null | gameAI.py | dshao2007/TermProject | ff277a107e7427e76d95311c511890d9202d676f | [
"MIT"
] | null | null | null | gameAI.py | dshao2007/TermProject | ff277a107e7427e76d95311c511890d9202d676f | [
"MIT"
] | null | null | null |
import random
from evaluator import ChessEval
| 33.051471 | 101 | 0.507008 |
616c7ed2448ca92350545be4a2621305508ad028 | 604 | py | Python | scripts/Render_Animation.py | eecheve/Gaussian-2-Blender | 14811ad6092ec7be09b043752a2db3514599eede | [
"Apache-2.0"
] | 1 | 2021-09-17T21:33:45.000Z | 2021-09-17T21:33:45.000Z | scripts/Render_Animation.py | eecheve/Gaussian-2-Blender | 14811ad6092ec7be09b043752a2db3514599eede | [
"Apache-2.0"
] | null | null | null | scripts/Render_Animation.py | eecheve/Gaussian-2-Blender | 14811ad6092ec7be09b043752a2db3514599eede | [
"Apache-2.0"
] | 1 | 2021-09-19T21:38:24.000Z | 2021-09-19T21:38:24.000Z | import bpy
bpy.context.scene.render.film_transparent = True
bpy.context.scene.render.image_settings.color_mode = 'RGBA'
| 40.266667 | 124 | 0.708609 |
616dffb214ea24ee589984d6eb4777f8c7994c0b | 6,843 | py | Python | src/dictstore/interface.py | sampathbalivada/dictstore | d58c8ea22d52d54d93e189cbf290ffbc7e04c6f6 | [
"Apache-2.0"
] | 1 | 2021-12-21T14:23:50.000Z | 2021-12-21T14:23:50.000Z | src/dictstore/interface.py | sampathbalivada/dictstore | d58c8ea22d52d54d93e189cbf290ffbc7e04c6f6 | [
"Apache-2.0"
] | null | null | null | src/dictstore/interface.py | sampathbalivada/dictstore | d58c8ea22d52d54d93e189cbf290ffbc7e04c6f6 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 Sai Sampath Kumar Balivada
# 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 ... | 32.585714 | 78 | 0.640362 |
616e5cf634f2586b19810e30e33e8aba47812b49 | 494 | py | Python | slender/tests/list/test_include.py | torokmark/slender | 3bf815e22f7802ba48706f31ba608cf609e23e68 | [
"Apache-2.0"
] | 1 | 2020-01-10T21:51:46.000Z | 2020-01-10T21:51:46.000Z | slender/tests/list/test_include.py | torokmark/slender | 3bf815e22f7802ba48706f31ba608cf609e23e68 | [
"Apache-2.0"
] | null | null | null | slender/tests/list/test_include.py | torokmark/slender | 3bf815e22f7802ba48706f31ba608cf609e23e68 | [
"Apache-2.0"
] | null | null | null |
import re
from unittest import TestCase
from expects import expect, equal, raise_error, be_true, be_false
from slender import List
| 27.444444 | 76 | 0.653846 |
616ebe1d1635b2f07a1a9a30098f7891fad01adc | 7,261 | py | Python | tests/Util/test_config.py | JI511/Personal_Fitness | 25d54908398caf9291e70069dca97a567b1bd94b | [
"MIT"
] | null | null | null | tests/Util/test_config.py | JI511/Personal_Fitness | 25d54908398caf9291e70069dca97a567b1bd94b | [
"MIT"
] | 75 | 2019-04-01T01:57:34.000Z | 2019-09-26T00:14:28.000Z | tests/Util/test_config.py | JI511/Personal_Fitness | 25d54908398caf9291e70069dca97a567b1bd94b | [
"MIT"
] | 1 | 2019-08-11T07:25:15.000Z | 2019-08-11T07:25:15.000Z | # ----------------------------------------------------------------------------------------------------------------------
# Body Weight test cases
# ----------------------------------------------------------------------------------------------------------------------
# imports
import unittest
import tempfile
import ... | 43.479042 | 120 | 0.440986 |
61710e8907c2bd15913967ac4ab6eb06210e8681 | 8,164 | py | Python | userbot/plugins/fontstyles.py | anandhu-dev/catuserbot | 0ae10db978c1a9bf3f4f0da991a86d85fc29c0f1 | [
"MIT"
] | 2 | 2020-05-22T16:24:42.000Z | 2020-05-22T16:31:37.000Z | userbot/plugins/fontstyles.py | himawari27/catuserbot | 1a395bf197a68c795eb0d5114718fb28c40b0315 | [
"MIT"
] | 1 | 2021-02-08T20:47:53.000Z | 2021-02-08T20:47:53.000Z | userbot/plugins/fontstyles.py | himawari27/catuserbot | 1a395bf197a68c795eb0d5114718fb28c40b0315 | [
"MIT"
] | 3 | 2021-03-01T07:44:15.000Z | 2021-06-06T13:28:11.000Z |
import re
import time
import requests
from telethon import events
from userbot import CMD_HELP
from userbot.utils import register
import asyncio
import random
EMOJIS = [
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
... | 24.297619 | 87 | 0.3573 |
617125f168844e031dc3dc197fac38fb76b23ec5 | 16,175 | py | Python | test/api/drawing/test_drawing_objects.py | rizwanniazigroupdocs/aspose-words-cloud-python | b943384a1e3c0710cc84df74119e6edf7356037e | [
"MIT"
] | null | null | null | test/api/drawing/test_drawing_objects.py | rizwanniazigroupdocs/aspose-words-cloud-python | b943384a1e3c0710cc84df74119e6edf7356037e | [
"MIT"
] | null | null | null | test/api/drawing/test_drawing_objects.py | rizwanniazigroupdocs/aspose-words-cloud-python | b943384a1e3c0710cc84df74119e6edf7356037e | [
"MIT"
] | null | null | null | # -----------------------------------------------------------------------------------
# <copyright company="Aspose" file="test_drawing_objects.py">
# Copyright (c) 2020 Aspose.Words for Cloud
# </copyright>
# <summary>
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this softwar... | 53.559603 | 271 | 0.750108 |
617166834f93fc78ae610274ccab793d6d6b1c12 | 4,200 | py | Python | freqent/tests/azimuthal_average_tests/make_sphericalWaveTest.py | lab-of-living-matter/freqent | 210d8f25a59894d903c42d52e5475900303f9631 | [
"Apache-2.0"
] | 5 | 2021-01-16T01:39:39.000Z | 2022-01-19T00:23:38.000Z | freqent/tests/azimuthal_average_tests/make_sphericalWaveTest.py | lab-of-living-matter/freqent | 210d8f25a59894d903c42d52e5475900303f9631 | [
"Apache-2.0"
] | null | null | null | freqent/tests/azimuthal_average_tests/make_sphericalWaveTest.py | lab-of-living-matter/freqent | 210d8f25a59894d903c42d52e5475900303f9631 | [
"Apache-2.0"
] | 1 | 2021-08-20T15:03:30.000Z | 2021-08-20T15:03:30.000Z | import numpy as np
import matplotlib.pyplot as plt
import freqent.freqentn as fen
import dynamicstructurefactor.sqw as sqw
from itertools import product
import os
import matplotlib as mpl
mpl.rcParams['pdf.fonttype'] = 42
savepath = '/media/daniel/storage11/Dropbox/LLM_Danny/frequencySpaceDissipation/tests/freqentn_te... | 30.882353 | 102 | 0.602619 |
6172cb90d3acbe6eb936a5e0311837e45f59b5d1 | 1,217 | py | Python | setup.py | kimvanwyk/red-mail | 78dc763e5b5f09eed820a11233299dd2c7b0190b | [
"MIT"
] | null | null | null | setup.py | kimvanwyk/red-mail | 78dc763e5b5f09eed820a11233299dd2c7b0190b | [
"MIT"
] | null | null | null | setup.py | kimvanwyk/red-mail | 78dc763e5b5f09eed820a11233299dd2c7b0190b | [
"MIT"
] | null | null | null | from setuptools import setup, find_packages
import versioneer
with open("README.md", "r") as f:
long_description = f.read()
setup(
name="redmail",
version=versioneer.get_version(),
cmdclass=versioneer.get_cmdclass(),
author="Mikael Koli",
author_email="koli.mikael@gmail.com",
url="https://... | 30.425 | 64 | 0.637634 |
61741f74b759c1266c2b4eff5463940e41acbff2 | 1,691 | py | Python | wagtailcomments/basic/migrations/0001_initial.py | takeflight/wagtailcomments | 941ae2f16fccb867a33d2ed4c21b8e5e04af712d | [
"BSD-3-Clause"
] | 7 | 2016-09-28T10:51:44.000Z | 2018-09-29T08:27:23.000Z | wagtailcomments/basic/migrations/0001_initial.py | takeflight/wagtailcomments | 941ae2f16fccb867a33d2ed4c21b8e5e04af712d | [
"BSD-3-Clause"
] | null | null | null | wagtailcomments/basic/migrations/0001_initial.py | takeflight/wagtailcomments | 941ae2f16fccb867a33d2ed4c21b8e5e04af712d | [
"BSD-3-Clause"
] | 2 | 2017-05-21T08:41:19.000Z | 2018-08-06T13:50:59.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.9.7 on 2016-07-29 06:13
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
import enumchoicefield.fields
import wagtailcomments.models
| 40.261905 | 141 | 0.646954 |
61752f9c0020e5238d87c07d19b74f84c1ea9f90 | 4,286 | py | Python | tests_requre/service/test_views.py | IceWreck/packit-service | ab8a3ae7b7f078f4a5bf3465516c1abc894fe3dc | [
"MIT"
] | null | null | null | tests_requre/service/test_views.py | IceWreck/packit-service | ab8a3ae7b7f078f4a5bf3465516c1abc894fe3dc | [
"MIT"
] | 2 | 2020-09-02T08:14:27.000Z | 2020-09-03T03:16:27.000Z | tests_requre/service/test_views.py | IceWreck/packit-service | ab8a3ae7b7f078f4a5bf3465516c1abc894fe3dc | [
"MIT"
] | null | null | null | from flask import url_for
from flexmock import flexmock
from packit_service import models
from packit_service.models import CoprBuildModel
from packit_service.service.views import _get_build_info
from tests_requre.conftest import SampleValues
| 39.321101 | 88 | 0.765749 |
617841c4391105795ebe61db8ed27da43f2a59f5 | 1,644 | py | Python | watchapp/urls.py | kepha-okari/the-watch | 80720ad4ffc394e5acbca0fbf1fc9f1dbff0f56f | [
"MIT"
] | null | null | null | watchapp/urls.py | kepha-okari/the-watch | 80720ad4ffc394e5acbca0fbf1fc9f1dbff0f56f | [
"MIT"
] | 7 | 2020-02-11T23:48:54.000Z | 2022-03-11T23:16:45.000Z | watchapp/urls.py | kepha-okari/the-watch | 80720ad4ffc394e5acbca0fbf1fc9f1dbff0f56f | [
"MIT"
] | null | null | null | from django.conf.urls import url,include
from django.contrib.auth.decorators import login_required
from django.conf import settings
from django.conf.urls.static import static
from . import views
urlpatterns = [
url(r'^$',views.index,name='hoodNews'),
url(r'^new/hood/',views.create_hood, name='newHood'),
ur... | 51.375 | 76 | 0.666058 |
6178677cf010170ac4ef5c808891d12fe972a547 | 1,088 | py | Python | shopyoapi/uploads.py | Maurilearn/learnings | 0af03e5646c9053b3cfc27465983ce466ad2f3cb | [
"MIT"
] | null | null | null | shopyoapi/uploads.py | Maurilearn/learnings | 0af03e5646c9053b3cfc27465983ce466ad2f3cb | [
"MIT"
] | null | null | null | shopyoapi/uploads.py | Maurilearn/learnings | 0af03e5646c9053b3cfc27465983ce466ad2f3cb | [
"MIT"
] | null | null | null |
from werkzeug.security import generate_password_hash
from shopyoapi.init import db
from app import app
from modules.auth.models import User
from modules.school.models import Setting
# from modules.settings.models import Settings
'''
def add_setting(name, value):
with app.app_context():
if Settings.query... | 26.536585 | 68 | 0.59375 |
6179a809c6fd4ff96baedddbf9bb9dae658ef8c7 | 1,256 | py | Python | neutron_plugin_contrail/plugins/opencontrail/neutron_middleware.py | hamzazafar/contrail-neutron-plugin | fb8dbcabc8240e5c47753ae6e2af5556d0a38421 | [
"Apache-2.0"
] | 3 | 2021-09-07T05:02:24.000Z | 2022-02-11T04:25:43.000Z | neutron_plugin_contrail/plugins/opencontrail/neutron_middleware.py | hamzazafar/contrail-neutron-plugin | fb8dbcabc8240e5c47753ae6e2af5556d0a38421 | [
"Apache-2.0"
] | 1 | 2016-04-26T09:05:42.000Z | 2016-04-26T09:05:42.000Z | neutron_plugin_contrail/plugins/opencontrail/neutron_middleware.py | hamzazafar/contrail-neutron-plugin | fb8dbcabc8240e5c47753ae6e2af5556d0a38421 | [
"Apache-2.0"
] | 5 | 2020-07-14T07:52:05.000Z | 2022-03-24T15:08:02.000Z | import logging
from eventlet import corolocal
from eventlet.greenthread import getcurrent
"""
This middleware is used to forward user token to Contrail API server.
Middleware is inserted at head of Neutron pipeline via api-paste.ini file
so that user token can be preserved in local storage of Neutron thread.
This is ... | 32.205128 | 78 | 0.731688 |
617b72d47fe1a620e75af426de3f519c6430df3c | 858 | py | Python | scofield/tax/models.py | howiworkdaily/scofield-project | f0daaf785c344a0da1f5b624518c9fa6c0514745 | [
"BSD-3-Clause"
] | 4 | 2016-04-10T13:37:58.000Z | 2018-06-11T18:49:29.000Z | scofield/tax/models.py | howiworkdaily/scofield-project | f0daaf785c344a0da1f5b624518c9fa6c0514745 | [
"BSD-3-Clause"
] | null | null | null | scofield/tax/models.py | howiworkdaily/scofield-project | f0daaf785c344a0da1f5b624518c9fa6c0514745 | [
"BSD-3-Clause"
] | 2 | 2015-04-08T19:52:19.000Z | 2021-02-10T08:08:19.000Z | from django.db import models
| 25.235294 | 99 | 0.670163 |
617c68a4d53862bcf891011b1dad1759a3111e16 | 1,114 | py | Python | helpers/sett/resolvers/StrategySushiDiggWbtcLpOptimizerResolver.py | shuklaayush/badger-system | 1274eadbd0b0f3a02efbf40702719ce1d0a96c44 | [
"MIT"
] | 99 | 2020-12-02T08:40:48.000Z | 2022-03-15T05:21:06.000Z | helpers/sett/resolvers/StrategySushiDiggWbtcLpOptimizerResolver.py | shuklaayush/badger-system | 1274eadbd0b0f3a02efbf40702719ce1d0a96c44 | [
"MIT"
] | 115 | 2020-12-15T07:15:39.000Z | 2022-03-28T22:21:03.000Z | helpers/sett/resolvers/StrategySushiDiggWbtcLpOptimizerResolver.py | shuklaayush/badger-system | 1274eadbd0b0f3a02efbf40702719ce1d0a96c44 | [
"MIT"
] | 56 | 2020-12-11T06:50:04.000Z | 2022-02-21T09:17:38.000Z | from brownie import interface
from rich.console import Console
from helpers.utils import snapBalancesMatchForToken
from .StrategyBaseSushiResolver import StrategyBaseSushiResolver
console = Console()
| 35.935484 | 82 | 0.719928 |
61800d60ef6f519972904d1a00c8aac0445bd6de | 8,161 | py | Python | Section 8/4/4/Ej7.4/UCBExp.py | marcosherreroa/Aplicaciones-de-los-algoritmos-bandidos | ee93f8f401440de05d56127acb5c75fcc2c92ef2 | [
"MIT"
] | null | null | null | Section 8/4/4/Ej7.4/UCBExp.py | marcosherreroa/Aplicaciones-de-los-algoritmos-bandidos | ee93f8f401440de05d56127acb5c75fcc2c92ef2 | [
"MIT"
] | null | null | null | Section 8/4/4/Ej7.4/UCBExp.py | marcosherreroa/Aplicaciones-de-los-algoritmos-bandidos | ee93f8f401440de05d56127acb5c75fcc2c92ef2 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
""""
Bandidos estocsticos: introduccin, algoritmos y experimentos
TFG Informtica
Seccin 8.4.4
Figuras 26, 27 y 28
Autor: Marcos Herrero Agustn
"""
import math
import random
import scipy.stats as stats
import matplotlib.pyplot as plt
import numpy as np
plotDeltaRegret... | 31.268199 | 95 | 0.556304 |
618075f97fd8bcbc379afe1ad839a7ec6ec22b97 | 801 | py | Python | tools/code_coverage/package/oss/cov_json.py | deltabravozulu/pytorch | c6eef589971e45bbedacc7f65533d1b8f80a6895 | [
"Intel"
] | 206 | 2020-11-28T22:56:38.000Z | 2022-03-27T02:33:04.000Z | tools/code_coverage/package/oss/cov_json.py | deltabravozulu/pytorch | c6eef589971e45bbedacc7f65533d1b8f80a6895 | [
"Intel"
] | 19 | 2020-12-09T23:13:14.000Z | 2022-01-24T23:24:08.000Z | tools/code_coverage/package/oss/cov_json.py | deltabravozulu/pytorch | c6eef589971e45bbedacc7f65533d1b8f80a6895 | [
"Intel"
] | 28 | 2020-11-29T15:25:12.000Z | 2022-01-20T02:16:27.000Z | from ..tool import clang_coverage
from ..util.setting import CompilerType, Option, TestList, TestPlatform
from ..util.utils import check_compiler_type
from .init import detect_compiler_type
from .run import clang_run, gcc_run
| 33.375 | 71 | 0.694132 |
618142523ce1ce96219a613cc5fd09c36753e7ac | 843 | py | Python | metaworld/envs/asset_path_utils.py | vinnibuh/metaworld | e394aea9f000fe3e3778a4fd40bfb9e806752341 | [
"MIT"
] | null | null | null | metaworld/envs/asset_path_utils.py | vinnibuh/metaworld | e394aea9f000fe3e3778a4fd40bfb9e806752341 | [
"MIT"
] | null | null | null | metaworld/envs/asset_path_utils.py | vinnibuh/metaworld | e394aea9f000fe3e3778a4fd40bfb9e806752341 | [
"MIT"
] | 1 | 2021-10-07T21:56:07.000Z | 2021-10-07T21:56:07.000Z | import os
import xml.etree.ElementTree as ET
from tempfile import NamedTemporaryFile
ENV_ASSET_DIR_V1 = os.path.join(os.path.dirname(__file__), 'assets_v1')
ENV_ASSET_DIR_V2 = os.path.join(os.path.dirname(__file__), 'assets_v2')
| 32.423077 | 71 | 0.720047 |
6182beb680bd2a5d8ef6901a320c44fa56fbc31b | 5,458 | py | Python | landcover_change_application/lccs_l3.py | opendatacube/datacube-conference-2019 | 4c5a0f77c239c550ba1ae6fbc2e2098947e3db36 | [
"Apache-2.0"
] | 5 | 2019-02-18T00:44:38.000Z | 2019-02-26T17:57:40.000Z | landcover_change_application/lccs_l3.py | opendatacube/datacube-conference-2019 | 4c5a0f77c239c550ba1ae6fbc2e2098947e3db36 | [
"Apache-2.0"
] | null | null | null | landcover_change_application/lccs_l3.py | opendatacube/datacube-conference-2019 | 4c5a0f77c239c550ba1ae6fbc2e2098947e3db36 | [
"Apache-2.0"
] | 3 | 2019-02-11T02:44:04.000Z | 2020-12-21T22:56:33.000Z | """
LCCS Level 3 Classification
| Class name | Code | Numeric code |
|----------------------------------|-----|-----|
| Cultivated Terrestrial Vegetated | A11 | 111 |
| Natural Terrestrial Vegetated | A12 | 112 |
| Cultivated Aquatic Vegetated | A23 | 123 |
| Natural Aquatic Vegetated | A24 | 124 |
| Art... | 33.484663 | 92 | 0.611213 |
618446f9da1ab0931b796eb8d9862b418bee6a2b | 1,115 | py | Python | hackerearth/Algorithms/Buggy Bot/solution.py | ATrain951/01.python-com_Qproject | c164dd093954d006538020bdf2e59e716b24d67c | [
"MIT"
] | 4 | 2020-07-24T01:59:50.000Z | 2021-07-24T15:14:08.000Z | hackerearth/Algorithms/Buggy Bot/solution.py | ATrain951/01.python-com_Qproject | c164dd093954d006538020bdf2e59e716b24d67c | [
"MIT"
] | null | null | null | hackerearth/Algorithms/Buggy Bot/solution.py | ATrain951/01.python-com_Qproject | c164dd093954d006538020bdf2e59e716b24d67c | [
"MIT"
] | null | null | null | """
# Sample code to perform I/O:
name = input() # Reading input from STDIN
print('Hi, %s.' % name) # Writing output to STDOUT
# Warning: Printing unwanted or ill-formatted data to output will cause the test cases to fail
"""
# Write your code here
from collections import defaultdict
n, m, ... | 27.875 | 94 | 0.608072 |
6184f4fe218bfd606582f03f1fc738924fc5eb85 | 893 | py | Python | level1/migrations/0002_auto_20200219_1812.py | smateenml/arabic | 948f66a4e3e39d49c9420f02ced89e0e1558086c | [
"Apache-2.0"
] | 1 | 2022-03-27T07:17:02.000Z | 2022-03-27T07:17:02.000Z | level1/migrations/0002_auto_20200219_1812.py | smateenml/arabic | 948f66a4e3e39d49c9420f02ced89e0e1558086c | [
"Apache-2.0"
] | null | null | null | level1/migrations/0002_auto_20200219_1812.py | smateenml/arabic | 948f66a4e3e39d49c9420f02ced89e0e1558086c | [
"Apache-2.0"
] | 1 | 2022-03-27T07:17:03.000Z | 2022-03-27T07:17:03.000Z | # Generated by Django 3.0.2 on 2020-02-19 18:12
from django.db import migrations
| 23.5 | 47 | 0.536394 |
6184ff3e6d5499ae2279934df653ba237021e92e | 328 | py | Python | rh/apps/case_studies/cms_apps.py | rapidpro/chpro-microsite | 4e1d1210b49ec60ab0711d78235bf45eeb5c0275 | [
"BSD-3-Clause"
] | null | null | null | rh/apps/case_studies/cms_apps.py | rapidpro/chpro-microsite | 4e1d1210b49ec60ab0711d78235bf45eeb5c0275 | [
"BSD-3-Clause"
] | 108 | 2018-01-30T15:26:18.000Z | 2021-06-10T17:29:57.000Z | rh/apps/case_studies/cms_apps.py | rapidpro/chpro-microsite | 4e1d1210b49ec60ab0711d78235bf45eeb5c0275 | [
"BSD-3-Clause"
] | null | null | null | from cms.app_base import CMSApp
from cms.apphook_pool import apphook_pool
apphook_pool.register(CaseStudiesApphook)
| 23.428571 | 59 | 0.75 |
6186d31062ff042063bc9ec5db6e940f05791cef | 2,989 | py | Python | manim_demo/project/matplotlib_demo.py | shujunge/manim_tutorial | 8e320373f0404dcc0a200ab3750ee70784dc1345 | [
"MIT"
] | null | null | null | manim_demo/project/matplotlib_demo.py | shujunge/manim_tutorial | 8e320373f0404dcc0a200ab3750ee70784dc1345 | [
"MIT"
] | null | null | null | manim_demo/project/matplotlib_demo.py | shujunge/manim_tutorial | 8e320373f0404dcc0a200ab3750ee70784dc1345 | [
"MIT"
] | null | null | null | from manimlib.imports import *
from srcs.utils import run
import matplotlib.pyplot as plt
import numpy as np
from matplotlib.backends.backend_agg import FigureCanvasAgg
from sklearn import svm # sklearn = scikit-learn
from sklearn.datasets import make_moons
def mplfig_to_npimage(fig):
""" Converts a matplotlib ... | 32.846154 | 94 | 0.658749 |
6186f8d5ab1178cb5b433da5dd21ea78201073c1 | 3,513 | py | Python | dlms_cosem/clients/experimental_meter.py | Layty/dlms-cosem | 95b67054a1dfb928e960547b0246b7b6794f0594 | [
"MIT"
] | 1 | 2021-08-20T09:19:07.000Z | 2021-08-20T09:19:07.000Z | dlms_cosem/clients/experimental_meter.py | Layty/dlms-cosem | 95b67054a1dfb928e960547b0246b7b6794f0594 | [
"MIT"
] | null | null | null | dlms_cosem/clients/experimental_meter.py | Layty/dlms-cosem | 95b67054a1dfb928e960547b0246b7b6794f0594 | [
"MIT"
] | null | null | null | from contextlib import contextmanager
from decimal import Decimal
from typing import *
import attr
from dlms_cosem import cosem, utils
from dlms_cosem.clients.dlms_client import DlmsClient
from dlms_cosem.cosem import Obis
from dlms_cosem.cosem.profile_generic import Data, ProfileGeneric
from dlms_cosem.protocol.xdlm... | 31.648649 | 88 | 0.670937 |
61899674fe81953319c1bcfc90f72353e48fa375 | 8,637 | py | Python | inference/encoder_train_pipeline.py | kuzhamuratov/deep-landscape | 255999cb2f87bc72b68fe29483a4fb7605f0e26b | [
"MIT"
] | 95 | 2020-07-21T15:57:12.000Z | 2022-03-28T02:46:40.000Z | inference/encoder_train_pipeline.py | kuzhamuratov/deep-landscape | 255999cb2f87bc72b68fe29483a4fb7605f0e26b | [
"MIT"
] | 5 | 2020-09-02T10:00:20.000Z | 2020-12-19T05:19:16.000Z | inference/encoder_train_pipeline.py | kuzhamuratov/deep-landscape | 255999cb2f87bc72b68fe29483a4fb7605f0e26b | [
"MIT"
] | 21 | 2020-09-09T14:31:48.000Z | 2022-03-24T13:47:58.000Z | import copy
import datetime
import os
import random
import traceback
import numpy as np
import torch
from torch.utils.data import DataLoader
from torchvision.utils import save_image
from inference.inference_utils import get_trange, get_tqdm
def predict_with_model(model, dataset, device='cuda', batch_size=32, n... | 38.216814 | 120 | 0.587009 |
618aadd7fe62fbfa6544e105456f6c6a8c7ddd78 | 1,443 | py | Python | app/forms.py | paulpaulaga/ask-paul | 1af662243ac5d05e3f3b237f743a11de25d712e7 | [
"MIT"
] | null | null | null | app/forms.py | paulpaulaga/ask-paul | 1af662243ac5d05e3f3b237f743a11de25d712e7 | [
"MIT"
] | 1 | 2021-10-05T07:42:54.000Z | 2021-10-05T07:42:54.000Z | app/forms.py | paulpaulaga/ask-paul | 1af662243ac5d05e3f3b237f743a11de25d712e7 | [
"MIT"
] | null | null | null | from django import forms
from app.models import Question, Profile, Answer
from django.contrib.auth.models import User
| 27.226415 | 77 | 0.627859 |
618abbfd430402efb7dde78a0d8e25929179a059 | 3,722 | py | Python | python/cc_emergency/functional/transforms/language_filter.py | DavidNemeskey/cc_emergency_corpus | 6a6707ea6e939047014db7de8a4031ae7901351a | [
"MIT"
] | null | null | null | python/cc_emergency/functional/transforms/language_filter.py | DavidNemeskey/cc_emergency_corpus | 6a6707ea6e939047014db7de8a4031ae7901351a | [
"MIT"
] | null | null | null | python/cc_emergency/functional/transforms/language_filter.py | DavidNemeskey/cc_emergency_corpus | 6a6707ea6e939047014db7de8a4031ae7901351a | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# vim: set fileencoding=utf-8 :
"""Language / domain filtering transforms."""
from functools import partial
import importlib
import inspect
import tldextract
from cc_emergency.functional.core import Filter
from cc_emergency.utils import first
| 36.135922 | 79 | 0.59108 |
618dbd305a51529f96610d98339902bb9a67056f | 241 | py | Python | mathgenerator/funcs/volumeSphereFunc.py | furins/mathgenerator | 3ba50015ef4d9abaa404b5d3b9bb272cfdcf2deb | [
"MIT"
] | null | null | null | mathgenerator/funcs/volumeSphereFunc.py | furins/mathgenerator | 3ba50015ef4d9abaa404b5d3b9bb272cfdcf2deb | [
"MIT"
] | null | null | null | mathgenerator/funcs/volumeSphereFunc.py | furins/mathgenerator | 3ba50015ef4d9abaa404b5d3b9bb272cfdcf2deb | [
"MIT"
] | null | null | null | from .__init__ import *
| 21.909091 | 52 | 0.647303 |
618dc6198da7239c2edc0143aac74d64a250d04c | 841 | py | Python | create_widget.py | Adam01/Cylinder | 84ca02e2860df579a4e0514c4060a0c497e167a5 | [
"MIT"
] | 4 | 2015-02-19T17:46:27.000Z | 2018-10-27T08:00:58.000Z | create_widget.py | Adam01/Cylinder | 84ca02e2860df579a4e0514c4060a0c497e167a5 | [
"MIT"
] | 3 | 2015-04-09T18:14:35.000Z | 2015-05-07T02:36:48.000Z | create_widget.py | Adam01/Cylinder | 84ca02e2860df579a4e0514c4060a0c497e167a5 | [
"MIT"
] | null | null | null | import os
import sys
import shutil
templateDir = "./Cylinder/WidgetTemplate"
widgetOutDir = "./Cylinder/rapyd/Widgets/"
if len(sys.argv) > 1:
name = sys.argv[1]
widgetDir = os.path.join(widgetOutDir, name)
if not os.path.exists(widgetDir):
if os.path.exists(templateDir):
os.mkdir(widg... | 32.346154 | 87 | 0.62069 |
618ed936ea97eb91d0ed1cb9b6eb7123a3f94c4d | 1,380 | py | Python | examples/06-worker.py | pacslab/serverless-performance-simulator | 5dd1623ad873d005b457676c060232205de7f552 | [
"MIT"
] | 5 | 2021-06-17T15:50:40.000Z | 2022-02-15T21:24:39.000Z | examples/06-worker.py | sicilly/simfaas | 5dd1623ad873d005b457676c060232205de7f552 | [
"MIT"
] | null | null | null | examples/06-worker.py | sicilly/simfaas | 5dd1623ad873d005b457676c060232205de7f552 | [
"MIT"
] | 5 | 2020-07-19T22:57:34.000Z | 2021-11-16T01:40:03.000Z | import zmq
import time
import sys
import struct
import multiprocessing
from examples.sim_trace import generate_trace
port = "5556"
if len(sys.argv) > 1:
port = sys.argv[1]
int(port)
socket_addr = "tcp://127.0.0.1:%s" % port
worker_count = multiprocessing.cpu_count() * 2 + 1
stop_signal = False
if __name__... | 26.538462 | 98 | 0.626087 |
6190146c6aed9af23bf26291c4ff9c3eaefe84de | 3,532 | py | Python | ensembl_genes/species.py | ravwojdyla/ensembl-genes | f48f9f23427a34a8920bea19b9b7c220eb43facc | [
"Apache-2.0"
] | 5 | 2021-10-11T17:18:48.000Z | 2022-02-22T03:32:39.000Z | ensembl_genes/species.py | ravwojdyla/ensembl-genes | f48f9f23427a34a8920bea19b9b7c220eb43facc | [
"Apache-2.0"
] | 13 | 2021-10-11T18:30:30.000Z | 2022-03-04T15:36:21.000Z | ensembl_genes/species.py | ravwojdyla/ensembl-genes | f48f9f23427a34a8920bea19b9b7c220eb43facc | [
"Apache-2.0"
] | 2 | 2021-10-15T18:31:53.000Z | 2022-02-12T04:23:18.000Z | from dataclasses import dataclass
from typing import Optional, Union
from ensembl_genes.models import GeneForMHC
human = Species(
name="homo_sapiens",
common_name="human",
# GRCh38
assembly="38",
# Regex pattern that valid human ensembl gene IDs should match.
# https://bioinformatics.stackex... | 32.40367 | 98 | 0.668743 |
6191690a86eb7024d9f9224d6a7236a89bda9fa5 | 1,294 | py | Python | app_covid19data/tests/test_views.py | falken20/covid19web | 3826e5cc51dc24d373a1f614ccdb7c30993312ce | [
"MIT"
] | null | null | null | app_covid19data/tests/test_views.py | falken20/covid19web | 3826e5cc51dc24d373a1f614ccdb7c30993312ce | [
"MIT"
] | null | null | null | app_covid19data/tests/test_views.py | falken20/covid19web | 3826e5cc51dc24d373a1f614ccdb7c30993312ce | [
"MIT"
] | null | null | null | from django.test import TestCase
from django.urls import reverse
from django.utils import timezone
from model_bakery import baker
from app_covid19data.models import DataCovid19Item
from app_covid19data import views
| 36.971429 | 106 | 0.681607 |
619239cbab47f38d61f102bfd2c870af018bffa8 | 407 | py | Python | Chapter05/restful_python_2_05/Django01/games_service/games/models.py | PacktPublishing/Hands-On-RESTful-Python-Web-Services-Second-Edition | db8212c90f6394d8ee6fadb038e2b01ef83c963d | [
"MIT"
] | 45 | 2018-12-21T01:02:16.000Z | 2022-03-18T08:23:13.000Z | Chapter05/restful_python_2_05/Django01/games_service/games/models.py | PacktPublishing/Hands-On-RESTful-Python-Web-Services-Second-Edition | db8212c90f6394d8ee6fadb038e2b01ef83c963d | [
"MIT"
] | 12 | 2020-02-11T23:32:33.000Z | 2021-06-10T22:29:56.000Z | Chapter05/restful_python_2_05/Django01/games_service/games/models.py | PacktPublishing/Hands-On-RESTful-Python-Web-Services-Second-Edition | db8212c90f6394d8ee6fadb038e2b01ef83c963d | [
"MIT"
] | 29 | 2019-02-11T16:45:56.000Z | 2022-03-29T12:43:27.000Z | from django.db import models
| 29.071429 | 63 | 0.732187 |
61938ef87f807b50b7ef975df7fc7cd96772c7e3 | 7,100 | py | Python | old_py2/controllers/datafeed_controller.py | bovlb/the-blue-alliance | 29389649d96fe060688f218d463e642dcebfd6cc | [
"MIT"
] | null | null | null | old_py2/controllers/datafeed_controller.py | bovlb/the-blue-alliance | 29389649d96fe060688f218d463e642dcebfd6cc | [
"MIT"
] | null | null | null | old_py2/controllers/datafeed_controller.py | bovlb/the-blue-alliance | 29389649d96fe060688f218d463e642dcebfd6cc | [
"MIT"
] | null | null | null | import logging
import os
import datetime
import tba_config
import time
import json
from google.appengine.api import taskqueue
from google.appengine.ext import ndb
from google.appengine.ext import webapp
from google.appengine.ext.webapp import template
from consts.event_type import EventType
from consts.media_type imp... | 40.340909 | 125 | 0.640704 |
6193b4548eb4ff84fedce496ec547a4d080086f6 | 3,841 | py | Python | src/bot/handlers/essence_part_handler.py | nchursin/claimant | 890ce1a3ced8db9d2e2fbddb8a3207e82ac05326 | [
"BSD-3-Clause"
] | 3 | 2022-03-03T19:10:25.000Z | 2022-03-03T19:57:15.000Z | src/bot/handlers/essence_part_handler.py | nchursin/claimant | 890ce1a3ced8db9d2e2fbddb8a3207e82ac05326 | [
"BSD-3-Clause"
] | 9 | 2022-03-03T18:56:37.000Z | 2022-03-29T18:34:02.000Z | src/bot/handlers/essence_part_handler.py | nchursin/claimant | 890ce1a3ced8db9d2e2fbddb8a3207e82ac05326 | [
"BSD-3-Clause"
] | 1 | 2022-03-04T11:59:11.000Z | 2022-03-04T11:59:11.000Z | from typing import Optional, List
from aiogram import types, Dispatcher, filters
from aiogram.dispatcher import FSMContext
from aiogram.dispatcher.filters.state import StatesGroup, State
from aiogram.types import ReplyKeyboardMarkup
from handlers.common_actions_handlers import process_manual_enter, process_option_sel... | 44.149425 | 100 | 0.724291 |
6193bd05256f7e3ff92d7c5240b4a667fe8be22a | 4,523 | py | Python | SCRWebService/message_handling/message_forwarder.py | tomzo/integration-adaptors | d4f296d3e44475df6f69a78a27fac6ed5b67513b | [
"Apache-2.0"
] | null | null | null | SCRWebService/message_handling/message_forwarder.py | tomzo/integration-adaptors | d4f296d3e44475df6f69a78a27fac6ed5b67513b | [
"Apache-2.0"
] | 4 | 2021-03-31T19:46:30.000Z | 2021-03-31T19:55:03.000Z | SCRWebService/message_handling/message_forwarder.py | tomzo/integration-adaptors | d4f296d3e44475df6f69a78a27fac6ed5b67513b | [
"Apache-2.0"
] | 2 | 2020-04-02T11:22:17.000Z | 2021-04-11T07:24:48.000Z | """Module related to processing of an outbound message"""
from typing import Dict, Optional
from utilities import integration_adaptors_logger as log
from builder.pystache_message_builder import MessageGenerationError
from message_handling.message_sender import MessageSender
import xml.etree.ElementTree as ET
logger = ... | 47.610526 | 117 | 0.661729 |
619557a199ed9607989d1a9b61ecbecc26b2b6f6 | 809 | py | Python | HackerRank/Alphabet Rangoli/solution.py | nikku1234/Code-Practise | 94eb6680ea36efd10856c377000219285f77e5a4 | [
"Apache-2.0"
] | 9 | 2020-07-02T06:06:17.000Z | 2022-02-26T11:08:09.000Z | HackerRank/Alphabet Rangoli/solution.py | nikku1234/Code-Practise | 94eb6680ea36efd10856c377000219285f77e5a4 | [
"Apache-2.0"
] | 1 | 2021-11-04T17:26:36.000Z | 2021-11-04T17:26:36.000Z | HackerRank/Alphabet Rangoli/solution.py | nikku1234/Code-Practise | 94eb6680ea36efd10856c377000219285f77e5a4 | [
"Apache-2.0"
] | 8 | 2021-01-31T10:31:12.000Z | 2022-03-13T09:15:55.000Z | import string
def print_rangoli(size):
# your code goes here
'''
alphabets = ["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]
symbol = '-'
array_size = size + 3*(size-1)
print(array_size)
for i in range(0,array_size):
for left_... | 25.28125 | 121 | 0.483313 |
61986b8629c565625618497302e6f724f841c131 | 779 | py | Python | src/visualize/visualize_checkpoint.py | Immocat/ACTOR | c7237e82e333bf2c57f7d8e12f27d0831233befc | [
"MIT"
] | 164 | 2021-09-06T12:43:39.000Z | 2022-03-29T02:33:38.000Z | src/visualize/visualize_checkpoint.py | Immocat/ACTOR | c7237e82e333bf2c57f7d8e12f27d0831233befc | [
"MIT"
] | 14 | 2021-09-17T00:42:24.000Z | 2022-03-07T04:18:12.000Z | src/visualize/visualize_checkpoint.py | Immocat/ACTOR | c7237e82e333bf2c57f7d8e12f27d0831233befc | [
"MIT"
] | 27 | 2021-09-07T04:38:38.000Z | 2022-03-29T00:37:10.000Z | import os
import matplotlib.pyplot as plt
import torch
from src.utils.get_model_and_data import get_model_and_data
from src.parser.visualize import parser
from .visualize import viz_epoch
import src.utils.fixseed # noqa
plt.switch_backend('agg')
if __name__ == '__main__':
main()
| 24.34375 | 78 | 0.741977 |
619f55e5cd0fde19ef49d00d5c74c41a8e978000 | 938 | py | Python | APIs/Biquery/src/infra/models/datasets.py | clarencejlee/jdp | d3d31db0138ff06f2f5ec592d85317941af4f280 | [
"MIT"
] | null | null | null | APIs/Biquery/src/infra/models/datasets.py | clarencejlee/jdp | d3d31db0138ff06f2f5ec592d85317941af4f280 | [
"MIT"
] | null | null | null | APIs/Biquery/src/infra/models/datasets.py | clarencejlee/jdp | d3d31db0138ff06f2f5ec592d85317941af4f280 | [
"MIT"
] | null | null | null | from enum import Enum
from tortoise import fields
from tortoise.models import Model | 32.344828 | 65 | 0.643923 |
61a07bb292fcae2ff0accde2ff05fef346e1cb96 | 6,046 | py | Python | src/python/pipelines_utils/file_utils.py | InformaticsMatters/pipelines-utils | 07182505500fe2e3ab1db29332f6a7ec98b0c1b6 | [
"Apache-2.0"
] | null | null | null | src/python/pipelines_utils/file_utils.py | InformaticsMatters/pipelines-utils | 07182505500fe2e3ab1db29332f6a7ec98b0c1b6 | [
"Apache-2.0"
] | 33 | 2018-01-23T10:20:41.000Z | 2019-07-09T14:25:33.000Z | src/python/pipelines_utils/file_utils.py | InformaticsMatters/pipelines-utils | 07182505500fe2e3ab1db29332f6a7ec98b0c1b6 | [
"Apache-2.0"
] | 1 | 2018-10-31T06:04:08.000Z | 2018-10-31T06:04:08.000Z | #!/usr/bin/env python
# Copyright 2018 Informatics Matters Ltd.
#
# 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 applicab... | 40.306667 | 78 | 0.66391 |
61a0f5abd8c986c58949f55434b22326da67e0f2 | 13,154 | py | Python | devlin2/modular_square/rtl/gen_reduction_lut.py | supranational/-vdf-fpga-round3-results | 5914821abc400cc21b97b93af01a675f3f009fd3 | [
"BSD-3-Clause"
] | 44 | 2019-08-01T20:52:10.000Z | 2021-09-15T02:08:41.000Z | devlin2/modular_square/rtl/gen_reduction_lut.py | supranational/-vdf-fpga-round3-results | 5914821abc400cc21b97b93af01a675f3f009fd3 | [
"BSD-3-Clause"
] | null | null | null | devlin2/modular_square/rtl/gen_reduction_lut.py | supranational/-vdf-fpga-round3-results | 5914821abc400cc21b97b93af01a675f3f009fd3 | [
"BSD-3-Clause"
] | 19 | 2019-07-25T02:02:02.000Z | 2022-01-27T15:53:30.000Z | #!/usr/bin/python3
################################################################################
# Copyright 2019 Supranational 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
#
# h... | 34.615789 | 623 | 0.541508 |
61a1dc570a9218509b77bdf2225164ed8e7e0a90 | 23,422 | py | Python | StinoStarter.py | geekroo/Stino | c3f416c807857fb4c2180219d984c4fcc83678d6 | [
"MIT"
] | 1 | 2016-12-28T05:36:20.000Z | 2016-12-28T05:36:20.000Z | StinoStarter.py | MHaroonBaig/Stino | c3f416c807857fb4c2180219d984c4fcc83678d6 | [
"MIT"
] | null | null | null | StinoStarter.py | MHaroonBaig/Stino | c3f416c807857fb4c2180219d984c4fcc83678d6 | [
"MIT"
] | 1 | 2018-11-25T19:36:45.000Z | 2018-11-25T19:36:45.000Z | #-*- coding: utf-8 -*-
# StinoStarter.py
import os
import sublime
import sublime_plugin
st_version = int(sublime.version())
if st_version < 3000:
import app
else:
from . import app
| 35.380665 | 128 | 0.76727 |
61a276c4ae721f1e18e33a6cdf82a3165f5b364f | 3,994 | py | Python | dqo/relational/tests/test_augmentation.py | danield137/deep_query_optimzation | 01a25c966338007f15d14dea1b37e388e47bcfe3 | [
"MIT"
] | null | null | null | dqo/relational/tests/test_augmentation.py | danield137/deep_query_optimzation | 01a25c966338007f15d14dea1b37e388e47bcfe3 | [
"MIT"
] | null | null | null | dqo/relational/tests/test_augmentation.py | danield137/deep_query_optimzation | 01a25c966338007f15d14dea1b37e388e47bcfe3 | [
"MIT"
] | null | null | null | from dqo.db.tests.datasets import employees_db_w_meta
from dqo.relational import SQLParser
from dqo.relational import parse_tree
test_db = employees_db_w_meta()
| 34.431034 | 102 | 0.662494 |
61a4375cdc7350ac4c1ad459005657ca06a87ebe | 1,326 | py | Python | src/newt/db/_ook.py | bmjjr/db | 39d3833f4458fcd20d09f383711745842b5db4f2 | [
"MIT"
] | 153 | 2017-01-24T16:55:00.000Z | 2022-03-21T08:24:13.000Z | src/newt/db/_ook.py | bmjjr/db | 39d3833f4458fcd20d09f383711745842b5db4f2 | [
"MIT"
] | 14 | 2017-01-25T17:04:49.000Z | 2021-12-05T19:26:35.000Z | src/newt/db/_ook.py | bmjjr/db | 39d3833f4458fcd20d09f383711745842b5db4f2 | [
"MIT"
] | 16 | 2017-01-25T07:25:17.000Z | 2022-03-21T08:24:16.000Z | import relstorage.storage
import ZODB.Connection
# Monkey patches, ook
relstorage.storage.RelStorage.ex_cursor = _ex_cursor
relstorage.storage.RelStorage.ex_connect = _ex_connect
def _ex_get(self, oid, ghost_pickle):
"""Return the persistent object with oid 'oid'."""
if self.opened is None:
raise Co... | 28.212766 | 71 | 0.697587 |
61a4a530246434eb38e7c667db777d5e633e159d | 13,214 | py | Python | template1.py | gregwa1953/FCM160 | b5c0a912e140e78891f587d2d271c23bff7333c2 | [
"MIT"
] | null | null | null | template1.py | gregwa1953/FCM160 | b5c0a912e140e78891f587d2d271c23bff7333c2 | [
"MIT"
] | null | null | null | template1.py | gregwa1953/FCM160 | b5c0a912e140e78891f587d2d271c23bff7333c2 | [
"MIT"
] | null | null | null | #! /usr/bin/env python
# -*- coding: utf-8 -*-
# ======================================================
# template1.py
# ------------------------------------------------------
# Created for Full Circle Magazine Issue #160
# Written by G.D. Walters
# Copyright (c) 2020 by G.D. Walters
# This source code is release... | 32.546798 | 1,325 | 0.546163 |
61a585a44deae31d51275f2f707d00d0ecb8a314 | 1,744 | py | Python | arimaModel.py | gehadnaser/fraud-detection_stockmarket | 96c70daf304faa415435fdc457eba832ff9737bc | [
"MIT"
] | null | null | null | arimaModel.py | gehadnaser/fraud-detection_stockmarket | 96c70daf304faa415435fdc457eba832ff9737bc | [
"MIT"
] | null | null | null | arimaModel.py | gehadnaser/fraud-detection_stockmarket | 96c70daf304faa415435fdc457eba832ff9737bc | [
"MIT"
] | null | null | null | import numpy as np, pandas as pd
import math
from statsmodels.tsa.arima_model import ARIMA
from statsmodels.tsa.stattools import adfuller, kpss, acf
import matplotlib.pyplot as plt
plt.rcParams.update({'figure.figsize': (9, 7), 'figure.dpi': 120})
# Import data
Read('foodico')
| 28.590164 | 69 | 0.62156 |
61a6fedac82e9e4878bc3c795bf52464ab6e2eb9 | 4,388 | py | Python | code/preprocess/data_process.py | hms-dbmi/VarPPUD | 316a45f33c12dfecadb17fa41b699ef95096a623 | [
"Apache-2.0"
] | null | null | null | code/preprocess/data_process.py | hms-dbmi/VarPPUD | 316a45f33c12dfecadb17fa41b699ef95096a623 | [
"Apache-2.0"
] | null | null | null | code/preprocess/data_process.py | hms-dbmi/VarPPUD | 316a45f33c12dfecadb17fa41b699ef95096a623 | [
"Apache-2.0"
] | 1 | 2022-01-18T17:14:31.000Z | 2022-01-18T17:14:31.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Dec 9 15:38:54 2020
@author: rayin
"""
# pic-sure api lib
import PicSureHpdsLib
import PicSureClient
# python_lib for pic-sure
# https://github.com/hms-dbmi/Access-to-Data-using-PIC-SURE-API/tree/master/NIH_Undiagnosed_Diseases_Network
from python_li... | 33.496183 | 146 | 0.76618 |