hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
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
245
max_issues_repo_name
stringlengths
6
130
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
245
max_forks_repo_name
stringlengths
6
130
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
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
1c3076bcbd064f30b55915f2787a6ddae3356262
12
py
Python
lona/default_routes.py
sobolevn/lona
14af03bb8607f553ccfaf8e86b748a76b359518d
[ "MIT" ]
null
null
null
lona/default_routes.py
sobolevn/lona
14af03bb8607f553ccfaf8e86b748a76b359518d
[ "MIT" ]
null
null
null
lona/default_routes.py
sobolevn/lona
14af03bb8607f553ccfaf8e86b748a76b359518d
[ "MIT" ]
null
null
null
routes = []
6
11
0.5
routes = []
true
true
1c3077632495fee023345b216ceb0915ef87302e
10,261
py
Python
tests/test_exceptions.py
adriangb/di
f277bb7189c8e8bde41170afb3181e6600b06be8
[ "MIT" ]
57
2021-09-28T00:48:08.000Z
2022-03-16T16:50:39.000Z
tests/test_exceptions.py
adriangb/di
f277bb7189c8e8bde41170afb3181e6600b06be8
[ "MIT" ]
59
2021-09-25T00:06:22.000Z
2022-03-31T15:49:36.000Z
tests/test_exceptions.py
adriangb/di
f277bb7189c8e8bde41170afb3181e6600b06be8
[ "MIT" ]
3
2021-12-31T10:03:03.000Z
2021-12-31T16:07:54.000Z
from dataclasses import dataclass, field from typing import AsyncGenerator, Dict, Generator import pytest from di.container import Container, bind_by_type from di.dependant import Dependant, Marker from di.executors import AsyncExecutor, SyncExecutor from di.typing import Annotated @dataclass class Recorder: ca...
30.629851
84
0.639801
from dataclasses import dataclass, field from typing import AsyncGenerator, Dict, Generator import pytest from di.container import Container, bind_by_type from di.dependant import Dependant, Marker from di.executors import AsyncExecutor, SyncExecutor from di.typing import Annotated @dataclass class Recorder: ca...
true
true
1c3079030e036d60b7d7ba161c6b01ad3c4257bc
517
py
Python
PaddleCode.py
DavidGoedicke/Keybyfoot
071a198cc8b7c288c663684661910856bee9554f
[ "MIT" ]
null
null
null
PaddleCode.py
DavidGoedicke/Keybyfoot
071a198cc8b7c288c663684661910856bee9554f
[ "MIT" ]
null
null
null
PaddleCode.py
DavidGoedicke/Keybyfoot
071a198cc8b7c288c663684661910856bee9554f
[ "MIT" ]
null
null
null
# Write your code here :-) from adafruit_circuitplayground.express import cpx from adafruit_hid.keyboard import Keyboard from adafruit_hid.keycode import Keycode kbd = Keyboard() while True: if cpx.button_a: kbd.send(Keycode.SHIFT, Keycode.F1) # Type capital 'A' while cpx.button_a: # Wait for b...
30.411765
63
0.68472
from adafruit_circuitplayground.express import cpx from adafruit_hid.keyboard import Keyboard from adafruit_hid.keycode import Keycode kbd = Keyboard() while True: if cpx.button_a: kbd.send(Keycode.SHIFT, Keycode.F1) while cpx.button_a: pass if cpx.button_b: kbd.send(...
true
true
1c307903fc4a73d389b2163b38b203b058a3feac
11,784
py
Python
WikiNotification/notification.py
UfSoft/trac-wiki-notification
6d42df044f51404ccac956fa379200540fecd231
[ "BSD-3-Clause" ]
1
2016-07-27T01:27:58.000Z
2016-07-27T01:27:58.000Z
WikiNotification/notification.py
SpamExperts/trac-wikinotification
eac0c6a945cc0b54df57986292b52b4a7f8ab78c
[ "BSD-3-Clause" ]
null
null
null
WikiNotification/notification.py
SpamExperts/trac-wikinotification
eac0c6a945cc0b54df57986292b52b4a7f8ab78c
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # vim: sw=4 ts=4 fenc=utf-8 # ============================================================================= # $Id: notification.py 66 2008-03-14 09:02:03Z s0undt3ch $ # ============================================================================= # $URL: http://wikinotification.ufsof...
39.28
99
0.561524
import re from trac import __version__ from trac.core import * from trac.util.text import CRLF from trac.wiki.model import WikiPage from trac.versioncontrol.diff import unified_diff from trac.notification import NotifyEmail, NotificationSystem from trac.config import Option, BoolOption, ListOption, IntO...
false
true
1c3079c602eecd54e71a2cec8693fdc41f994ccb
10,128
py
Python
river/naive_bayes/multinomial.py
mathco-wf/river
c6ff38fa4ce4843ede1cba77248e0370a67a36f6
[ "BSD-3-Clause" ]
4
2019-04-09T16:51:08.000Z
2021-07-26T15:43:30.000Z
river/naive_bayes/multinomial.py
mathco-wf/river
c6ff38fa4ce4843ede1cba77248e0370a67a36f6
[ "BSD-3-Clause" ]
null
null
null
river/naive_bayes/multinomial.py
mathco-wf/river
c6ff38fa4ce4843ede1cba77248e0370a67a36f6
[ "BSD-3-Clause" ]
1
2021-10-19T03:16:07.000Z
2021-10-19T03:16:07.000Z
import collections import math import numpy as np import pandas as pd from scipy import sparse from river.base import tags from . import base __all__ = ["MultinomialNB"] class MultinomialNB(base.BaseNB): """Naive Bayes classifier for multinomial models. Multinomial Naive Bayes model learns from occurrenc...
27.225806
133
0.545616
import collections import math import numpy as np import pandas as pd from scipy import sparse from river.base import tags from . import base __all__ = ["MultinomialNB"] class MultinomialNB(base.BaseNB): def __init__(self, alpha=1.0): self.alpha = alpha self.class_counts = collections.Counter...
true
true
1c307c2ec51e4229f3a13309e2eaebf35e627944
12,700
py
Python
src/utils.py
CSMMLab/neuralEntropyClosures
5efc5961f2fac36921a749d35f3636c61d1cc873
[ "MIT" ]
4
2021-09-23T07:21:23.000Z
2021-12-24T11:35:39.000Z
src/utils.py
ScSteffen/neuralEntropyClosures
5efc5961f2fac36921a749d35f3636c61d1cc873
[ "MIT" ]
null
null
null
src/utils.py
ScSteffen/neuralEntropyClosures
5efc5961f2fac36921a749d35f3636c61d1cc873
[ "MIT" ]
null
null
null
''' Accumulation of utility functions Date: 15.03.2021 Author: Steffen Schotthöfer ''' import numpy as np import time import pandas as pd import tensorflow as tf import matplotlib.pyplot as plt from matplotlib import colors from matplotlib import cm import seaborn as sns import os from pathlib import Path import git ...
34.048257
117
0.586299
import numpy as np import time import pandas as pd import tensorflow as tf import matplotlib.pyplot as plt from matplotlib import colors from matplotlib import cm import seaborn as sns import os from pathlib import Path import git def finiteDiff(x, y): grad = np.zeros(x.shape) grad[0] = (y[1] - y[0]) / ...
true
true
1c307c3e462df1c24c517bb60c8034e700396b3c
4,162
py
Python
haystack/backends/simple_backend.py
speedplane/django-haystack
4ace30aea6aa1b1708f79a5a9df20a00fa0b4d96
[ "BSD-3-Clause" ]
1
2017-10-12T14:25:06.000Z
2017-10-12T14:25:06.000Z
haystack/backends/simple_backend.py
speedplane/django-haystack
4ace30aea6aa1b1708f79a5a9df20a00fa0b4d96
[ "BSD-3-Clause" ]
1
2016-08-03T18:01:43.000Z
2016-08-03T18:03:00.000Z
haystack/backends/simple_backend.py
speedplane/django-haystack
4ace30aea6aa1b1708f79a5a9df20a00fa0b4d96
[ "BSD-3-Clause" ]
null
null
null
""" A very basic, ORM-based backend for simple search during tests. """ from __future__ import unicode_literals from django.conf import settings from django.db.models import Q from django.utils import six from haystack import connections from haystack.backends import BaseEngine, BaseSearchBackend, BaseSearchQuery, Sear...
31.530303
120
0.585296
from __future__ import unicode_literals from django.conf import settings from django.db.models import Q from django.utils import six from haystack import connections from haystack.backends import BaseEngine, BaseSearchBackend, BaseSearchQuery, SearchNode, log_query from haystack.inputs import PythonData from haystack.m...
true
true
1c307ce12279edfdfc64e8c1d5f17d195f3bab13
5,961
py
Python
tests/test_app.py
lonjoy/webssh-1
96d9ae5b4d1654957f155e95c5bf1ad4ac65c734
[ "MIT" ]
1
2019-08-06T21:06:01.000Z
2019-08-06T21:06:01.000Z
tests/test_app.py
lonjoy/webssh-1
96d9ae5b4d1654957f155e95c5bf1ad4ac65c734
[ "MIT" ]
null
null
null
tests/test_app.py
lonjoy/webssh-1
96d9ae5b4d1654957f155e95c5bf1ad4ac65c734
[ "MIT" ]
3
2019-08-06T21:06:05.000Z
2021-03-19T18:05:02.000Z
import json import webssh.handler as handler import random import threading import tornado.websocket import tornado.gen from tornado.testing import AsyncHTTPTestCase from tornado.options import options from webssh.main import make_app, make_handlers from webssh.settings import get_app_settings from tests.sshserver imp...
37.490566
98
0.635464
import json import webssh.handler as handler import random import threading import tornado.websocket import tornado.gen from tornado.testing import AsyncHTTPTestCase from tornado.options import options from webssh.main import make_app, make_handlers from webssh.settings import get_app_settings from tests.sshserver imp...
true
true
1c307d5ea663713b36099465d0bc37a762fec3b4
4,978
py
Python
tests/test_identifiers_org.py
kkaris/bioregistry
e8cdaf8e8c5670873ce10a5a67d7850b76e5eff7
[ "MIT" ]
null
null
null
tests/test_identifiers_org.py
kkaris/bioregistry
e8cdaf8e8c5670873ce10a5a67d7850b76e5eff7
[ "MIT" ]
null
null
null
tests/test_identifiers_org.py
kkaris/bioregistry
e8cdaf8e8c5670873ce10a5a67d7850b76e5eff7
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """Tests for identifiers.org.""" import unittest from textwrap import dedent, fill import requests import bioregistry from bioregistry import get_identifiers_org_curie, get_identifiers_org_url from bioregistry.constants import IDOT_BROKEN from bioregistry.version import VERSION class TestI...
41.140496
107
0.579751
import unittest from textwrap import dedent, fill import requests import bioregistry from bioregistry import get_identifiers_org_curie, get_identifiers_org_url from bioregistry.constants import IDOT_BROKEN from bioregistry.version import VERSION class TestIdentifiersOrg(unittest.TestCase): def setUp(self) -...
true
true
1c307f129b7b9a4f05c6c3ccf4c09c472b5e3e97
784
py
Python
PARCIAL 3/TIENE BIENGO.py
msolivera/Phyton
1322fa2ff4bb06a17350fefa7e5268c0969e5b53
[ "bzip2-1.0.6" ]
null
null
null
PARCIAL 3/TIENE BIENGO.py
msolivera/Phyton
1322fa2ff4bb06a17350fefa7e5268c0969e5b53
[ "bzip2-1.0.6" ]
null
null
null
PARCIAL 3/TIENE BIENGO.py
msolivera/Phyton
1322fa2ff4bb06a17350fefa7e5268c0969e5b53
[ "bzip2-1.0.6" ]
null
null
null
#EJERCICIO 2: def tiene_bingo (lista_carton,lista_sorteados): for i in lista_carton: if lista_carton == lista_sorteados: return True return False #print(tiene_bingo([1,2,3,4,5,6,7,8,9,10,11,12,13,14,15],[89,2,3,4,5,6,7,8,9,10,11,12,13,14,15])) #EJERCICIO 3: def va_por_uno (lista_car...
23.757576
107
0.542092
def tiene_bingo (lista_carton,lista_sorteados): for i in lista_carton: if lista_carton == lista_sorteados: return True return False def va_por_uno (lista_carton,lista_sorteados): nueva_lista = [] contador = 1 for i in lista_sorteados: if i not in lista_c...
true
true
1c307f7380f8fd71a24f0817b185c3e074fee827
788
py
Python
profiles_api/migrations/0002_profilefeeditem.py
ViswanathToku/profiles-rest-api
d1f803cf4fa0bd1a9256981c6f36b235ff0921ae
[ "MIT" ]
null
null
null
profiles_api/migrations/0002_profilefeeditem.py
ViswanathToku/profiles-rest-api
d1f803cf4fa0bd1a9256981c6f36b235ff0921ae
[ "MIT" ]
null
null
null
profiles_api/migrations/0002_profilefeeditem.py
ViswanathToku/profiles-rest-api
d1f803cf4fa0bd1a9256981c6f36b235ff0921ae
[ "MIT" ]
null
null
null
# Generated by Django 2.2 on 2020-09-02 07:35 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('profiles_api', '0001_initial'), ] operations = [ migrations.CreateModel( ...
31.52
126
0.633249
from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('profiles_api', '0001_initial'), ] operations = [ migrations.CreateModel( name='ProfileFeedItem', ...
true
true
1c3080268c0c639b8ac8ad3feeff60bd30358ede
483
py
Python
webdemo/db/models.py
HandingHu/webdemo
b9fdb67b66da8e59097c962971b32a8d7a3fc471
[ "Apache-2.0" ]
null
null
null
webdemo/db/models.py
HandingHu/webdemo
b9fdb67b66da8e59097c962971b32a8d7a3fc471
[ "Apache-2.0" ]
null
null
null
webdemo/db/models.py
HandingHu/webdemo
b9fdb67b66da8e59097c962971b32a8d7a3fc471
[ "Apache-2.0" ]
null
null
null
from sqlalchemy import Column, Integer, String from sqlalchemy.ext import declarative from sqlalchemy import Index Base = declarative.declarative_base() class User(Base): """User table""" __tablename__ = 'user' __table_args__ = ( Index('ix_user_user_id', 'user_id'), ) id = Column(Integ...
23
58
0.693582
from sqlalchemy import Column, Integer, String from sqlalchemy.ext import declarative from sqlalchemy import Index Base = declarative.declarative_base() class User(Base): __tablename__ = 'user' __table_args__ = ( Index('ix_user_user_id', 'user_id'), ) id = Column(Integer, primary_key=True)...
true
true
1c3080d4f7687ff106fe73ad8217819e989cb32a
1,802
py
Python
baselines/unrel/spatial_features.py
sadjadasghari/SpatialSense
4cb5ecb4b99dbea76ecb92878cce411e1c5edfcd
[ "BSD-2-Clause" ]
null
null
null
baselines/unrel/spatial_features.py
sadjadasghari/SpatialSense
4cb5ecb4b99dbea76ecb92878cce411e1c5edfcd
[ "BSD-2-Clause" ]
null
null
null
baselines/unrel/spatial_features.py
sadjadasghari/SpatialSense
4cb5ecb4b99dbea76ecb92878cce411e1c5edfcd
[ "BSD-2-Clause" ]
null
null
null
import pdb import json import pickle import numpy as np import math import random from sklearn.mixture import GaussianMixture def raw_spatial_feature(bbox_s, bbox_o): w_s = bbox_s[3] - bbox_s[2] h_s = bbox_s[1] - bbox_s[0] w_o = bbox_o[3] - bbox_o[2] h_o = bbox_o[1] - bbox_o[0] # Scale scale_...
27.30303
97
0.554939
import pdb import json import pickle import numpy as np import math import random from sklearn.mixture import GaussianMixture def raw_spatial_feature(bbox_s, bbox_o): w_s = bbox_s[3] - bbox_s[2] h_s = bbox_s[1] - bbox_s[0] w_o = bbox_o[3] - bbox_o[2] h_o = bbox_o[1] - bbox_o[0] scale_s = w_s...
true
true
1c30813c31cea016c2bfc6735c4a6c49e9435a81
82
py
Python
src/server/roles.py
Duje1/discord-bot
e764fa7f4d8270c67128653fc53ad350d2269739
[ "MIT" ]
1
2020-10-05T16:56:36.000Z
2020-10-05T16:56:36.000Z
src/server/roles.py
Duje1/discord-bot
e764fa7f4d8270c67128653fc53ad350d2269739
[ "MIT" ]
3
2020-10-08T14:46:01.000Z
2022-03-01T23:36:40.000Z
src/server/roles.py
Duje1/discord-bot
e764fa7f4d8270c67128653fc53ad350d2269739
[ "MIT" ]
2
2020-10-11T10:01:50.000Z
2020-10-18T18:12:19.000Z
ADMIN = 762379009672740905 BOT = 762734724204199946 TESTROLE = 763054600063549440
20.5
29
0.853659
ADMIN = 762379009672740905 BOT = 762734724204199946 TESTROLE = 763054600063549440
true
true
1c308275c43b758f63c40d690cd36354a92de7e0
1,892
py
Python
train.py
jakubzadrozny/kmml-data-challenge
5127fb1df14808fb9b5cda2599b503beba6ccb23
[ "MIT" ]
null
null
null
train.py
jakubzadrozny/kmml-data-challenge
5127fb1df14808fb9b5cda2599b503beba6ccb23
[ "MIT" ]
null
null
null
train.py
jakubzadrozny/kmml-data-challenge
5127fb1df14808fb9b5cda2599b503beba6ccb23
[ "MIT" ]
null
null
null
import numpy as np from data import load_data from ridge import KRRClassifier from logistic import KernelLogisticClassifier from svm import KSVM from utils import KernelCrossValidation from kernels import SpectrumKernel, SumKernel, SubstringKernel SEED = 47 FOLDS = 10 model_path = None # set this to save trained mo...
24.571429
93
0.609937
import numpy as np from data import load_data from ridge import KRRClassifier from logistic import KernelLogisticClassifier from svm import KSVM from utils import KernelCrossValidation from kernels import SpectrumKernel, SumKernel, SubstringKernel SEED = 47 FOLDS = 10 model_path = None results_path = None kerne...
true
true
1c3082a7b233f9f2ee619318845bb47275ea08c1
189
py
Python
tweets/api/pagination.py
rakibulislam01/Tweetme
ae787b1b6c0303ba8a52a804764e9fc5853b2219
[ "MIT" ]
null
null
null
tweets/api/pagination.py
rakibulislam01/Tweetme
ae787b1b6c0303ba8a52a804764e9fc5853b2219
[ "MIT" ]
null
null
null
tweets/api/pagination.py
rakibulislam01/Tweetme
ae787b1b6c0303ba8a52a804764e9fc5853b2219
[ "MIT" ]
null
null
null
from rest_framework import pagination class StandardResultPagination(pagination.PageNumberPagination): page_size = 10 page_size_query_param = 'page_size' max_page_size = 1000
23.625
64
0.798942
from rest_framework import pagination class StandardResultPagination(pagination.PageNumberPagination): page_size = 10 page_size_query_param = 'page_size' max_page_size = 1000
true
true
1c3083b053c36cb7424857788d7f86f73d8c2312
862
py
Python
azure-mgmt-dns/azure/mgmt/dns/models/ptr_record.py
CharaD7/azure-sdk-for-python
9fdf0aac0cec8a15a5bb2a0ea27dd331dbfa2f5c
[ "MIT" ]
null
null
null
azure-mgmt-dns/azure/mgmt/dns/models/ptr_record.py
CharaD7/azure-sdk-for-python
9fdf0aac0cec8a15a5bb2a0ea27dd331dbfa2f5c
[ "MIT" ]
null
null
null
azure-mgmt-dns/azure/mgmt/dns/models/ptr_record.py
CharaD7/azure-sdk-for-python
9fdf0aac0cec8a15a5bb2a0ea27dd331dbfa2f5c
[ "MIT" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
29.724138
76
0.569606
from msrest.serialization import Model class PtrRecord(Model): _attribute_map = { 'ptrdname': {'key': 'ptrdname', 'type': 'str'}, } def __init__(self, ptrdname=None): self.ptrdname = ptrdname
true
true
1c30848fe8db838bf2ea7ab14ebea0d07ae3d297
2,311
py
Python
setup.py
mark-mishyn/django-axes
dfaf67810abd21a0e76200a4906c1bffdd4fa9c9
[ "MIT" ]
null
null
null
setup.py
mark-mishyn/django-axes
dfaf67810abd21a0e76200a4906c1bffdd4fa9c9
[ "MIT" ]
null
null
null
setup.py
mark-mishyn/django-axes
dfaf67810abd21a0e76200a4906c1bffdd4fa9c9
[ "MIT" ]
null
null
null
#!/usr/bin/env python from setuptools import setup, find_packages setup( name="django-axes", description="Keep track of failed login attempts in Django-powered sites.", long_description="\n".join( [ open("README.rst", encoding="utf-8").read(), open("CHANGES.rst", encoding="...
34.492537
87
0.581134
from setuptools import setup, find_packages setup( name="django-axes", description="Keep track of failed login attempts in Django-powered sites.", long_description="\n".join( [ open("README.rst", encoding="utf-8").read(), open("CHANGES.rst", encoding="utf-8").read(), ...
true
true
1c3085fd230c87ccfd30d9a8b6765ad6ffd8fc48
1,277
py
Python
Modeling_Scripts/my_utils.py
VolpeUSDOT/gtfs-measures
0530d3c7193f10d591edd446d7e4985d03a7c48a
[ "CC0-1.0" ]
3
2019-08-29T13:31:14.000Z
2021-06-18T06:10:06.000Z
Modeling_Scripts/my_utils.py
VolpeUSDOT/gtfs-measures
0530d3c7193f10d591edd446d7e4985d03a7c48a
[ "CC0-1.0" ]
null
null
null
Modeling_Scripts/my_utils.py
VolpeUSDOT/gtfs-measures
0530d3c7193f10d591edd446d7e4985d03a7c48a
[ "CC0-1.0" ]
null
null
null
#------------------------------------------------------------- # # Utility functions for printing progress and start/end timing. # # Stephen Zitzow-Childs # # Volpe National Transportation Systems Center, USDOT # # Last modified: 6/18/2017 # Note: Newer version of this needs to be loaded and incorporated (7/20/2017) #-...
29.022727
110
0.528583
import sys import datetime def update(): sys.stdout.write('.') sys.stdout.flush() return def final(): sys.stdout.write('\n') sys.stdout.flush() return def print_start_time(): start_time = datetime.datetime.now() print('') print('Start at {:%Y-%m-%d %H:%M:%S}'.fo...
true
true
1c308617feebe376013412816298504ee37251c6
314
py
Python
venv/Scripts/Ex 08.py
brunobendel/Exercicios-python-Pycharm
145ded6cb5533aeef1b89f0bce20f0a90e37216c
[ "MIT" ]
null
null
null
venv/Scripts/Ex 08.py
brunobendel/Exercicios-python-Pycharm
145ded6cb5533aeef1b89f0bce20f0a90e37216c
[ "MIT" ]
null
null
null
venv/Scripts/Ex 08.py
brunobendel/Exercicios-python-Pycharm
145ded6cb5533aeef1b89f0bce20f0a90e37216c
[ "MIT" ]
null
null
null
m = float(input('Digite um valor em m: ')) Valor = print("Em mm {:.2f}, em cm {}, em dm {}, em dam {}, em hm {}, em km {}".format((m*1000),(m*100),(m*10),(m/10),(m/100),(m/1000))) # {:.2f} seguinifica que todo numeoro vai ser representado 2 numeros flutuantes depois da virgula # 100*10/100= 10 >> 10% de 100 = 10
62.8
136
0.60828
m = float(input('Digite um valor em m: ')) Valor = print("Em mm {:.2f}, em cm {}, em dm {}, em dam {}, em hm {}, em km {}".format((m*1000),(m*100),(m*10),(m/10),(m/100),(m/1000)))
true
true
1c308856f546fd03749470355c1de9d5256d0fed
259
py
Python
exception handling in file.py
syed219/letsupgrade-pytho-essentials
3306fd23e30de3bced2ed5bb285f5399731d64b6
[ "Apache-2.0" ]
null
null
null
exception handling in file.py
syed219/letsupgrade-pytho-essentials
3306fd23e30de3bced2ed5bb285f5399731d64b6
[ "Apache-2.0" ]
null
null
null
exception handling in file.py
syed219/letsupgrade-pytho-essentials
3306fd23e30de3bced2ed5bb285f5399731d64b6
[ "Apache-2.0" ]
null
null
null
file=open("Myfile.txt","w") file.write("Hello") file.close() try: file=open("Myfile.txt","r") file.write("Hello....!!! This is Aishu") file.close() print("success") except Exception as e: print(e) finally: print("---END---")
21.583333
45
0.567568
file=open("Myfile.txt","w") file.write("Hello") file.close() try: file=open("Myfile.txt","r") file.write("Hello....!!! This is Aishu") file.close() print("success") except Exception as e: print(e) finally: print("---END---")
true
true
1c3088f84b738b7692343342b33b77d35fd52bab
1,385
py
Python
bin/translatedarb_to_pojson.py
tundak/kalium_wallet_flutter
87ab154d748d08bb8f90bb42c0fdebbe193f48d2
[ "MIT" ]
656
2019-03-09T02:50:38.000Z
2022-03-29T14:00:04.000Z
bin/translatedarb_to_pojson.py
tundak/kalium_wallet_flutter
87ab154d748d08bb8f90bb42c0fdebbe193f48d2
[ "MIT" ]
145
2019-03-08T18:19:09.000Z
2022-03-23T15:59:34.000Z
bin/translatedarb_to_pojson.py
tundak/kalium_wallet_flutter
87ab154d748d08bb8f90bb42c0fdebbe193f48d2
[ "MIT" ]
260
2019-03-09T23:37:56.000Z
2022-03-30T02:38:26.000Z
#!/usr/bin/env python import argparse import json import sys parser = argparse.ArgumentParser() parser.add_argument('-f', '--file', help='Path to arb file', required=True) options = parser.parse_args() if not options.file.endswith("arb"): print(f"Can't process {options.file}, file must be a .arb") parser.prin...
34.625
75
0.550903
import argparse import json import sys parser = argparse.ArgumentParser() parser.add_argument('-f', '--file', help='Path to arb file', required=True) options = parser.parse_args() if not options.file.endswith("arb"): print(f"Can't process {options.file}, file must be a .arb") parser.print_help() sys.exit...
true
true
1c30897b295b6b42f3872aeec1b687ceea9beb6b
925
py
Python
image_vision/extensions/visualizers/base.py
IvanKosik/ImageVision
038b2b3948a16adc4c2abb3bc8c1c32f62aa4319
[ "BSD-3-Clause" ]
null
null
null
image_vision/extensions/visualizers/base.py
IvanKosik/ImageVision
038b2b3948a16adc4c2abb3bc8c1c32f62aa4319
[ "BSD-3-Clause" ]
null
null
null
image_vision/extensions/visualizers/base.py
IvanKosik/ImageVision
038b2b3948a16adc4c2abb3bc8c1c32f62aa4319
[ "BSD-3-Clause" ]
null
null
null
from core import Data from extensions.mdi.windows import DataViewerSubWindow from PyQt5.QtCore import QObject, pyqtSignal import abc class DataVisualizerMeta(abc.ABCMeta, type(QObject)): _DATA_TYPES = () @property def data_types(cls) -> tuple: return cls._DATA_TYPES class Data...
23.717949
61
0.675676
from core import Data from extensions.mdi.windows import DataViewerSubWindow from PyQt5.QtCore import QObject, pyqtSignal import abc class DataVisualizerMeta(abc.ABCMeta, type(QObject)): _DATA_TYPES = () @property def data_types(cls) -> tuple: return cls._DATA_TYPES class Data...
true
true
1c3089b3a8364d43bf3095d1e1152f085836cfaf
741
py
Python
imapclient/test/test_version.py
maxiimou/imapclient
755936fb2ac4a3da9f898e504cd1a8f4b5da9b84
[ "BSD-3-Clause" ]
1
2017-05-12T23:54:10.000Z
2017-05-12T23:54:10.000Z
imapclient/test/test_version.py
maxiimou/imapclient
755936fb2ac4a3da9f898e504cd1a8f4b5da9b84
[ "BSD-3-Clause" ]
2
2019-05-01T08:41:02.000Z
2020-01-03T21:54:51.000Z
imapclient/test/test_version.py
maxiimou/imapclient
755936fb2ac4a3da9f898e504cd1a8f4b5da9b84
[ "BSD-3-Clause" ]
5
2015-12-03T03:17:52.000Z
2021-01-31T13:10:25.000Z
from __future__ import unicode_literals from imapclient import _imapclient_version_string from imapclient.test.util import unittest class TestVersionString(unittest.TestCase): def test_dot_oh(self): self.assertEqual(_imapclient_version_string((1, 0, 0, 'final')), '1.0') def test_minor(self): ...
33.681818
85
0.701754
from __future__ import unicode_literals from imapclient import _imapclient_version_string from imapclient.test.util import unittest class TestVersionString(unittest.TestCase): def test_dot_oh(self): self.assertEqual(_imapclient_version_string((1, 0, 0, 'final')), '1.0') def test_minor(self): ...
true
true
1c308a7fbdb910ad969a4423381b4d5c606d7b13
7,370
py
Python
examples/pybullet/gym/pybullet_envs/prediction/pybullet_sim_gym_env.py
foolyc/bullet3
f4f5f70886e8d85bb5c000fe0c443fbf958f45d8
[ "Zlib" ]
158
2016-11-17T19:37:51.000Z
2022-03-21T19:57:55.000Z
examples/pybullet/gym/pybullet_envs/prediction/pybullet_sim_gym_env.py
foolyc/bullet3
f4f5f70886e8d85bb5c000fe0c443fbf958f45d8
[ "Zlib" ]
94
2016-11-18T09:55:57.000Z
2021-01-14T08:50:40.000Z
examples/pybullet/gym/pybullet_envs/prediction/pybullet_sim_gym_env.py
foolyc/bullet3
f4f5f70886e8d85bb5c000fe0c443fbf958f45d8
[ "Zlib" ]
51
2017-05-24T10:20:25.000Z
2022-03-17T15:07:02.000Z
"""This file implements the gym environment of example PyBullet simulation. """ import os, inspect currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) parentdir = os.path.dirname(os.path.dirname(currentdir)) os.sys.path.insert(0, parentdir) import math import time import gym from g...
33.963134
98
0.695794
import os, inspect currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) parentdir = os.path.dirname(os.path.dirname(currentdir)) os.sys.path.insert(0, parentdir) import math import time import gym from gym import spaces from gym.utils import seeding import numpy as np import pybullet...
true
true
1c308b87287ef457b1cf66d441ccf8f1b70d1b0b
497
py
Python
dna_features_viewer/BiopythonTranslator/BlackBoxlessLabelTranslator.py
jbloom/DnaFeaturesViewer
4d6f31d7d8e5942e75d22915ce803ddc574c9d7e
[ "MIT" ]
null
null
null
dna_features_viewer/BiopythonTranslator/BlackBoxlessLabelTranslator.py
jbloom/DnaFeaturesViewer
4d6f31d7d8e5942e75d22915ce803ddc574c9d7e
[ "MIT" ]
null
null
null
dna_features_viewer/BiopythonTranslator/BlackBoxlessLabelTranslator.py
jbloom/DnaFeaturesViewer
4d6f31d7d8e5942e75d22915ce803ddc574c9d7e
[ "MIT" ]
null
null
null
from .BiopythonTranslator import BiopythonTranslator class BlackBoxlessLabelTranslator(BiopythonTranslator): """Translates Biopython records into GraphicRecords where annotations appear black on a white background with no box. Which can be cleaner.""" def compute_feature_box_linewidth(self, feature): ...
38.230769
77
0.72837
from .BiopythonTranslator import BiopythonTranslator class BlackBoxlessLabelTranslator(BiopythonTranslator): def compute_feature_box_linewidth(self, feature): return 0 def compute_feature_box_color(self, feature): return "white"
true
true
1c308bffa6643041581c3879d2aa9d8b6b93c638
121
py
Python
islandora7_rest/__init__.py
shorock/islandora7-rest
1dc9d3132f82671efe544ca4a6cd3b72b580e917
[ "BSD-3-Clause" ]
3
2019-11-01T18:52:14.000Z
2020-10-06T19:42:55.000Z
islandora7_rest/__init__.py
shorock/islandora7-rest
1dc9d3132f82671efe544ca4a6cd3b72b580e917
[ "BSD-3-Clause" ]
null
null
null
islandora7_rest/__init__.py
shorock/islandora7-rest
1dc9d3132f82671efe544ca4a6cd3b72b580e917
[ "BSD-3-Clause" ]
1
2019-07-14T21:57:44.000Z
2019-07-14T21:57:44.000Z
# islandora7_rest/__init__.py # Copyright (c) 2019 The University of Kansas from .IslandoraClient import IslandoraClient
30.25
45
0.826446
from .IslandoraClient import IslandoraClient
true
true
1c308c83b6ea9a33366dd805fb9691f3a9a11c0d
12,959
py
Python
test/functional/dbcrash.py
zentoshi/zentoshi
99ef65d56ac5d702556f2b718298c34f07168498
[ "MIT" ]
4
2019-12-08T19:54:02.000Z
2020-02-04T20:11:14.000Z
test/functional/dbcrash.py
zentoshi/zentoshi
99ef65d56ac5d702556f2b718298c34f07168498
[ "MIT" ]
1
2019-11-10T14:06:54.000Z
2019-11-10T14:06:54.000Z
test/functional/dbcrash.py
zentoshi/zentoshi
99ef65d56ac5d702556f2b718298c34f07168498
[ "MIT" ]
13
2019-11-09T17:09:35.000Z
2021-12-21T07:07:23.000Z
#!/usr/bin/env python3 # Copyright (c) 2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test recovery from a crash during chainstate writing.""" from test_framework.test_framework import BitcoinT...
47.819188
114
0.643491
from test_framework.test_framework import BitcoinTestFramework from test_framework.util import * from test_framework.script import * from test_framework.mininode import * import random try: import http.client as httplib except ImportError: import httplib import errno class ChainstateWriteCrashTest(Bitcoi...
true
true
1c308df7c40a004d46d64fd7a1620aaab5c9e207
1,295
py
Python
src/server.py
Azkel/Distributed-Matrix-Multiplication-In-Python
4b1edab32dcdf4ea1801e1e688d4c734cd57cb22
[ "MIT" ]
null
null
null
src/server.py
Azkel/Distributed-Matrix-Multiplication-In-Python
4b1edab32dcdf4ea1801e1e688d4c734cd57cb22
[ "MIT" ]
null
null
null
src/server.py
Azkel/Distributed-Matrix-Multiplication-In-Python
4b1edab32dcdf4ea1801e1e688d4c734cd57cb22
[ "MIT" ]
3
2020-06-09T17:58:57.000Z
2021-09-04T14:27:37.000Z
_author__ = 'Michal Smyk' import numpy.matlib import time import Pyro4 import sys class MatrixProcessing: def __init__(self): self.matrix = None self.matrix_a = None self.matrix_b = None def set_matrix_a(self, new_matrix_a): self.matrix_a = new_matrix_a def set_matrix_b...
21.949153
86
0.601544
_author__ = 'Michal Smyk' import numpy.matlib import time import Pyro4 import sys class MatrixProcessing: def __init__(self): self.matrix = None self.matrix_a = None self.matrix_b = None def set_matrix_a(self, new_matrix_a): self.matrix_a = new_matrix_a def set_matrix_b...
true
true
1c308eddea6c9cef23f7490ddb06787dcca40fb5
3,384
py
Python
unified_planning/plans/plan.py
aiplan4eu/unified-planning
d2fd18baa3a2110595e5dfdc3f55254df72c3016
[ "Apache-2.0" ]
9
2022-02-18T14:51:58.000Z
2022-03-31T06:02:43.000Z
unified_planning/plans/plan.py
aiplan4eu/unified-planning
d2fd18baa3a2110595e5dfdc3f55254df72c3016
[ "Apache-2.0" ]
37
2022-02-01T10:44:38.000Z
2022-03-31T09:13:42.000Z
unified_planning/plans/plan.py
aiplan4eu/unified-planning
d2fd18baa3a2110595e5dfdc3f55254df72c3016
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 AIPlan4EU project # # 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 wri...
35.25
126
0.6776
import unified_planning as up import unified_planning.model from unified_planning.environment import Environment, get_env from unified_planning.model import FNode, Action, InstantaneousAction, Expression, Effect from unified_planning.walkers import Substituter, Simplifier from typing import Callable, Di...
true
true
1c3090983794c2122f4c62e96544d9601689b8e5
2,428
py
Python
lib/coloraide/color/gamut/fit_lch_chroma.py
adaminfinitum/ColorHelper
d6ab02ccff01dd1e3a01dbc186b5ba3ff1fcca47
[ "MIT" ]
253
2015-03-04T06:48:43.000Z
2022-03-25T14:22:17.000Z
lib/coloraide/color/gamut/fit_lch_chroma.py
adaminfinitum/ColorHelper
d6ab02ccff01dd1e3a01dbc186b5ba3ff1fcca47
[ "MIT" ]
197
2015-03-04T21:40:47.000Z
2022-03-25T17:04:36.000Z
lib/coloraide/color/gamut/fit_lch_chroma.py
adaminfinitum/ColorHelper
d6ab02ccff01dd1e3a01dbc186b5ba3ff1fcca47
[ "MIT" ]
32
2015-03-21T03:28:01.000Z
2021-09-06T07:20:51.000Z
"""Fit by compressing chroma in Lch.""" from ..gamut import Fit EPSILON = 0.001 class LchChroma(Fit): """Lch chroma gamut mapping class.""" @staticmethod def name(): """Get plugin name.""" return "lch-chroma" @staticmethod def fit(color): """ Gamut mapping via c...
32.810811
97
0.605848
from ..gamut import Fit EPSILON = 0.001 class LchChroma(Fit): @staticmethod def name(): return "lch-chroma" @staticmethod def fit(color): space = color.space() # because there is no optimal compression. floor = color.clone().set('lch.chroma', 0) i...
true
true
1c3091f391a26f143d0600d84110df9d81a0ac47
127
py
Python
xlib/api/win32/winmm/winmm.py
jkennedyvz/DeepFaceLive
274c20808da089eb7fc0fc0e8abe649379a29ffe
[ "MIT" ]
null
null
null
xlib/api/win32/winmm/winmm.py
jkennedyvz/DeepFaceLive
274c20808da089eb7fc0fc0e8abe649379a29ffe
[ "MIT" ]
null
null
null
xlib/api/win32/winmm/winmm.py
jkennedyvz/DeepFaceLive
274c20808da089eb7fc0fc0e8abe649379a29ffe
[ "MIT" ]
null
null
null
from ..wintypes import DWORD, MMRESULT, dll_import @dll_import('Winmm') def timeBeginPeriod(uPeriod : DWORD) -> MMRESULT: ...
31.75
53
0.740157
from ..wintypes import DWORD, MMRESULT, dll_import @dll_import('Winmm') def timeBeginPeriod(uPeriod : DWORD) -> MMRESULT: ...
true
true
1c30938bc735f9a5f84678013884e0afa93553ea
51,188
py
Python
src/sage/rings/polynomial/skew_polynomial_ring.py
mkoeppe/sage-1
249fc903897809e1eb081fbacb94741e01b37e73
[ "BSL-1.0" ]
null
null
null
src/sage/rings/polynomial/skew_polynomial_ring.py
mkoeppe/sage-1
249fc903897809e1eb081fbacb94741e01b37e73
[ "BSL-1.0" ]
null
null
null
src/sage/rings/polynomial/skew_polynomial_ring.py
mkoeppe/sage-1
249fc903897809e1eb081fbacb94741e01b37e73
[ "BSL-1.0" ]
null
null
null
r""" Skew Univariate Polynomial Rings This module provides the :class:`~sage.rings.polynomial.skew_polynomial_ring.SkewPolynomialRing` which constructs a general dense skew univariate polynomials over commutative base rings with automorphisms over the base rings. This is the set of formal polynomials where the coeffic...
34.609872
193
0.569762
import sage from sage.structure.richcmp import op_EQ from sage.misc.prandom import randint from sage.misc.cachefunc import cached_method from sage.rings.infinity import Infinity from sage.structure.category_object import normalize_names from sage.structure.unique_representation import UniqueRepresentation f...
true
true
1c309391d4048d53049c80e82239e05e732f278d
7,540
py
Python
CreateTestbeds.py
itheodoridis/itheodoridis-createpyatstestbedsfromPrimeInfrastructure
a157f6fac40d6079a0399fdba01f8706db74e746
[ "MIT" ]
1
2020-06-01T11:15:58.000Z
2020-06-01T11:15:58.000Z
CreateTestbeds.py
itheodoridis/itheodoridis-createpyatstestbedsfromPrimeInfrastructure
a157f6fac40d6079a0399fdba01f8706db74e746
[ "MIT" ]
null
null
null
CreateTestbeds.py
itheodoridis/itheodoridis-createpyatstestbedsfromPrimeInfrastructure
a157f6fac40d6079a0399fdba01f8706db74e746
[ "MIT" ]
1
2020-07-04T12:54:54.000Z
2020-07-04T12:54:54.000Z
""" Create testbeds for Cisco PyATS from device groups (e.g. switches) managed by Cisco Prime Infrastructure The code in this repo is the result of common work from Ioannis Theodoridis and Katerina Dardoufa (https://github.com/kdardoufa), engineers, co-workers, and friends. The original code that contains the idea of ...
52.727273
544
0.621485
import requests import json import logging from requests.auth import HTTPBasicAuth import time import yaml from credentials import dev_username, dev_password, dev_enablepass from primeapidata import PI_ADDRESS, USERNAME, PASSWORD requests.packages.urllib3.disable_warnings() # this line as well as the ot...
true
true
1c3094b8f18a2b6367f245419720577ce0fd6595
765
py
Python
mealpy/swarm_based/__init__.py
lamto20132223/mealpy
b25bd7548299d490cf2f40d3ecfc5dc87cf60994
[ "MIT" ]
2
2020-06-06T10:28:55.000Z
2020-06-06T10:30:08.000Z
mealpy/swarm_based/__init__.py
lamto20132223/mealpy
b25bd7548299d490cf2f40d3ecfc5dc87cf60994
[ "MIT" ]
null
null
null
mealpy/swarm_based/__init__.py
lamto20132223/mealpy
b25bd7548299d490cf2f40d3ecfc5dc87cf60994
[ "MIT" ]
null
null
null
#!/usr/bin/env python # ------------------------------------------------------------------------------------------------------% # Created by "Thieu Nguyen" at 09:49, 17/03/2020 % # ...
76.5
105
0.213072
true
true
1c3094c476b34f8f266d4252f343e1581d58d74f
3,649
py
Python
package/tests/test_script_downloader.py
Omritk/CustomScript-Shell
9369eba9738943802e72680d05a4a8b371b3e6fa
[ "Apache-2.0" ]
null
null
null
package/tests/test_script_downloader.py
Omritk/CustomScript-Shell
9369eba9738943802e72680d05a4a8b371b3e6fa
[ "Apache-2.0" ]
null
null
null
package/tests/test_script_downloader.py
Omritk/CustomScript-Shell
9369eba9738943802e72680d05a4a8b371b3e6fa
[ "Apache-2.0" ]
null
null
null
from unittest import TestCase from cloudshell.cm.customscript.domain.script_executor import ExcutorConnectionError from mock import patch, Mock import mock from cloudshell.cm.customscript.customscript_shell import CustomScriptShell from cloudshell.cm.customscript.domain.reservation_output_writer import ReservationOutp...
49.986301
129
0.763223
from unittest import TestCase from cloudshell.cm.customscript.domain.script_executor import ExcutorConnectionError from mock import patch, Mock import mock from cloudshell.cm.customscript.customscript_shell import CustomScriptShell from cloudshell.cm.customscript.domain.reservation_output_writer import ReservationOutp...
true
true
1c3095385b8b49fb92617e32d3bf7877ae7b5bc6
1,966
py
Python
Coding Theory/Huffman Coding/huffdecode.py
bnjasim/algorithms
14dac34004118d5ed204bd33b26d5fac0c5f9c5a
[ "MIT" ]
null
null
null
Coding Theory/Huffman Coding/huffdecode.py
bnjasim/algorithms
14dac34004118d5ed204bd33b26d5fac0c5f9c5a
[ "MIT" ]
null
null
null
Coding Theory/Huffman Coding/huffdecode.py
bnjasim/algorithms
14dac34004118d5ed204bd33b26d5fac0c5f9c5a
[ "MIT" ]
null
null
null
#!/usr/bin/env python # coding: utf-8 import sys if len(sys.argv) < 2: print("Format: python huffdecode.py binaryfile") sys.exit(1) # Decoding: Read the binary file with open(sys.argv[1], 'rb') as fbin: encoded_bytes = fbin.read() if len(encoded_bytes) < 1: print('Empty file. Exiting!') sys.exit(0) ...
30.246154
146
0.700407
import sys if len(sys.argv) < 2: print("Format: python huffdecode.py binaryfile") sys.exit(1) with open(sys.argv[1], 'rb') as fbin: encoded_bytes = fbin.read() if len(encoded_bytes) < 1: print('Empty file. Exiting!') sys.exit(0) code_block_offset = encoded_bytes[0] code_block = encoded_bytes[1...
true
true
1c309551640b18802ccc35cf4c99806932297d4e
5,897
py
Python
aoc_2018/day_12/python/subterranean_sustainability.py
girip11/advent_of_code
b58f9a53d219bb3bef284af6b0ca59d2addd57bb
[ "MIT" ]
null
null
null
aoc_2018/day_12/python/subterranean_sustainability.py
girip11/advent_of_code
b58f9a53d219bb3bef284af6b0ca59d2addd57bb
[ "MIT" ]
1
2021-09-29T04:20:48.000Z
2021-09-29T04:20:48.000Z
aoc_2018/day_12/python/subterranean_sustainability.py
girip11/advent_of_code
b58f9a53d219bb3bef284af6b0ca59d2addd57bb
[ "MIT" ]
null
null
null
import re import sys from typing import Iterable, Iterator, List, Set, Tuple PLANT = "#" NO_PLANT = "." def read_initial_state(init_state: str) -> str: return init_state.replace("initial state:", "").strip() def read_rules(rules: Iterable[str]) -> Iterator[Tuple[str, str]]: """Read the rules for growing pl...
32.761111
96
0.652196
import re import sys from typing import Iterable, Iterator, List, Set, Tuple PLANT = "#" NO_PLANT = "." def read_initial_state(init_state: str) -> str: return init_state.replace("initial state:", "").strip() def read_rules(rules: Iterable[str]) -> Iterator[Tuple[str, str]]: pattern: re.Pattern = re.compile...
true
true
1c30957dda167a64596c82f721902da9f1f0b665
2,765
py
Python
ooobuild/lo/xml/dom/dom_exception.py
Amourspirit/ooo_uno_tmpl
64e0c86fd68f24794acc22d63d8d32ae05dd12b8
[ "Apache-2.0" ]
null
null
null
ooobuild/lo/xml/dom/dom_exception.py
Amourspirit/ooo_uno_tmpl
64e0c86fd68f24794acc22d63d8d32ae05dd12b8
[ "Apache-2.0" ]
null
null
null
ooobuild/lo/xml/dom/dom_exception.py
Amourspirit/ooo_uno_tmpl
64e0c86fd68f24794acc22d63d8d32ae05dd12b8
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 # # Copyright 2022 :Barry-Thomas-Paul: Moss # # 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...
33.313253
216
0.680651
from ooo.oenv.env_const import UNO_NONE import typing from ...uno.exception import Exception as Exception_85530a09 from ...uno.x_interface import XInterface as XInterface_8f010a43 from .dom_exception_type import DOMExceptionType as DOMExceptionType_5c70df8 class DOMException(Exception_85530a09): ...
true
true
1c3096042871a4a99b8f7ca6d1a29ce31831da69
6,318
py
Python
mbeddr2C_MM/transformation_from_eclipse/Hlayer4rule2.py
levilucio/SyVOLT
7526ec794d21565e3efcc925a7b08ae8db27d46a
[ "MIT" ]
3
2017-06-02T19:26:27.000Z
2021-06-14T04:25:45.000Z
mbeddr2C_MM/transformation_from_eclipse/Hlayer4rule2.py
levilucio/SyVOLT
7526ec794d21565e3efcc925a7b08ae8db27d46a
[ "MIT" ]
8
2016-08-24T07:04:07.000Z
2017-05-26T16:22:47.000Z
mbeddr2C_MM/transformation_from_eclipse/Hlayer4rule2.py
levilucio/SyVOLT
7526ec794d21565e3efcc925a7b08ae8db27d46a
[ "MIT" ]
1
2019-10-31T06:00:23.000Z
2019-10-31T06:00:23.000Z
from core.himesis import Himesis import uuid class Hlayer4rule2(Himesis): def __init__(self): """ Creates the himesis graph representing the DSLTrans rule layer4rule2. """ # Flag this instance as compiled now self.is_compiled = True ...
42.402685
241
0.56062
from core.himesis import Himesis import uuid class Hlayer4rule2(Himesis): def __init__(self): self.is_compiled = True super(Hlayer4rule2, self).__init__(name='Hlayer4rule2', num_nodes=0, edges=[]) self["mm__"] = ['HimesisM...
true
true
1c30964180cacfd3241c892dc582011aba093b85
629
py
Python
tests/test_helpers.py
elifesciences/elife-cleaner
886be5e0b5317729490a55a8661c1e00e5fc7226
[ "MIT" ]
null
null
null
tests/test_helpers.py
elifesciences/elife-cleaner
886be5e0b5317729490a55a8661c1e00e5fc7226
[ "MIT" ]
2
2021-02-25T01:48:00.000Z
2021-05-27T01:21:40.000Z
tests/test_helpers.py
elifesciences/elife-cleaner
886be5e0b5317729490a55a8661c1e00e5fc7226
[ "MIT" ]
null
null
null
import os import unittest from pathlib import Path from tests.helpers import delete_files_in_folder class TestHelpers(unittest.TestCase): def setUp(self): self.temp_dir = "tests/tmp" def test_delete_files_in_folder(self): "test helpers function to clean out tests temp directory" file_...
33.105263
69
0.707472
import os import unittest from pathlib import Path from tests.helpers import delete_files_in_folder class TestHelpers(unittest.TestCase): def setUp(self): self.temp_dir = "tests/tmp" def test_delete_files_in_folder(self): file_name = os.path.join(self.temp_dir, "test_file.txt") folder...
true
true
1c309673b40576448e9b9454ccb79860c08ec8ba
204
py
Python
examples/preforked_worker.py
keakon/delayed
1b7a90a7c579e77e8ac0d9e77c839334ae20944a
[ "MIT" ]
4
2019-06-03T10:33:01.000Z
2021-03-02T09:32:08.000Z
examples/preforked_worker.py
keakon/delayed
1b7a90a7c579e77e8ac0d9e77c839334ae20944a
[ "MIT" ]
null
null
null
examples/preforked_worker.py
keakon/delayed
1b7a90a7c579e77e8ac0d9e77c839334ae20944a
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from delayed.logger import setup_logger from delayed.worker import PreforkedWorker from .client import queue setup_logger() worker = PreforkedWorker(queue=queue) worker.run()
15.692308
42
0.764706
from delayed.logger import setup_logger from delayed.worker import PreforkedWorker from .client import queue setup_logger() worker = PreforkedWorker(queue=queue) worker.run()
true
true
1c3096c81131b37833d931187b739c047f52dafe
1,209
py
Python
BinaryToDecimal.py
ritik1234/Python
d8041001d646467c176f911d4b992edb347b43a2
[ "MIT" ]
1,340
2015-09-10T19:08:01.000Z
2022-03-31T01:31:29.000Z
BinaryToDecimal.py
ritik1234/Python
d8041001d646467c176f911d4b992edb347b43a2
[ "MIT" ]
33
2017-01-18T14:31:27.000Z
2022-03-23T19:57:37.000Z
BinaryToDecimal.py
ritik1234/Python
d8041001d646467c176f911d4b992edb347b43a2
[ "MIT" ]
1,382
2015-07-15T16:37:38.000Z
2022-03-30T12:46:34.000Z
# Python: Binary to Decimal Conversion # binToDec and decToBin functions are rendered obsolete by the universal convert function def binToDec(binNum): #function created to convert binary to decimal with parametere binNum decNum = 0 power = 0 while binNum > 0: #loop will run till binNum is greater than 0 decNum +=...
34.542857
96
0.709677
def binToDec(binNum): decNum = 0 power = 0 while binNum > 0: decNum += 2 ** power * (binNum % 10) binNum //= 10 power += 1 return decNum def decToBin(decNum): binNum = 0 power = 0 while decNum > 0: binNum += 10 ** power * (decNum % 2) decNum //= 2 power += 1 return binNum def convert(...
true
true
1c309732b86a01cf020b7f1662df64cf1dd0b845
6,494
py
Python
pkgs/conda-4.0.5-py27_0/lib/python2.7/site-packages/conda/cli/conda_argparse.py
wangyum/anaconda
6e5a0dbead3327661d73a61e85414cf92aa52be6
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
pkgs/conda-4.0.5-py27_0/lib/python2.7/site-packages/conda/cli/conda_argparse.py
wangyum/anaconda
6e5a0dbead3327661d73a61e85414cf92aa52be6
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
pkgs/conda-4.0.5-py27_0/lib/python2.7/site-packages/conda/cli/conda_argparse.py
wangyum/anaconda
6e5a0dbead3327661d73a61e85414cf92aa52be6
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
# (c) 2012-2013 Continuum Analytics, Inc. / http://continuum.io # All Rights Reserved # # conda is distributed under the terms of the BSD 3-clause license. # Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause. from __future__ import print_function, division, absolute_import import sys import argparse ...
38.886228
113
0.564213
from __future__ import print_function, division, absolute_import import sys import argparse import os import subprocess from difflib import get_close_matches from conda.cli.find_commands import find_commands, find_executable from conda.cli import common build_commands = {'build', 'index', 'skeleton', 'package...
true
true
1c30976f129d557c66c7e40fbd0edd5a264b59f8
1,508
py
Python
handlers/package_info_handler.py
m-j/ziprepo-server
35c1f40c3ba5489fb8731e8d66b301333dc9f8b0
[ "MIT" ]
1
2020-08-08T01:52:57.000Z
2020-08-08T01:52:57.000Z
handlers/package_info_handler.py
m-j/ziprepo-server
35c1f40c3ba5489fb8731e8d66b301333dc9f8b0
[ "MIT" ]
null
null
null
handlers/package_info_handler.py
m-j/ziprepo-server
35c1f40c3ba5489fb8731e8d66b301333dc9f8b0
[ "MIT" ]
2
2021-09-06T09:41:41.000Z
2022-03-27T19:51:32.000Z
from tornado.web import RequestHandler from errors.errors import PackageDoesntExistError from handlers.handler_utils import wrap_in_envelope from handlers.zippero_base_handler import ZipperoBaseHandler from package_management.package_manager import PackageManager from package_management.utils import package_link from ...
37.7
120
0.761273
from tornado.web import RequestHandler from errors.errors import PackageDoesntExistError from handlers.handler_utils import wrap_in_envelope from handlers.zippero_base_handler import ZipperoBaseHandler from package_management.package_manager import PackageManager from package_management.utils import package_link from ...
true
true
1c309785797e8ad05429ef332e41130f7ffa1021
4,203
py
Python
tests/test_plotting.py
sciris/sciris
a52a7a0d4bf2c3de7dde1dbca07c40341f9a18b0
[ "MIT" ]
5
2018-10-01T09:36:31.000Z
2021-08-03T14:34:48.000Z
tests/test_plotting.py
sciris/sciris
a52a7a0d4bf2c3de7dde1dbca07c40341f9a18b0
[ "MIT" ]
194
2018-09-21T06:21:07.000Z
2022-03-26T11:22:24.000Z
tests/test_plotting.py
sciris/sciris
a52a7a0d4bf2c3de7dde1dbca07c40341f9a18b0
[ "MIT" ]
5
2020-03-12T23:06:39.000Z
2020-09-30T10:38:17.000Z
""" Test color and plotting functions -- warning, opens up many windows! """ import os import numpy as np import pylab as pl import sciris as sc if 'doplot' not in locals(): doplot = True def test_colors(doplot=doplot): sc.heading('Testing colors') o = sc.objdict() print('Testing shifthue') o....
22.475936
97
0.583155
import os import numpy as np import pylab as pl import sciris as sc if 'doplot' not in locals(): doplot = True def test_colors(doplot=doplot): sc.heading('Testing colors') o = sc.objdict() print('Testing shifthue') o.hue = sc.shifthue(colors=[(1,0,0),(0,1,0)], hueshift=0.5) print('Testing...
true
true
1c309790d8e0056416eac7d558c301dbae2c539a
2,302
py
Python
Python problem solved.py
whoafridi/Python
4fea6f81ebfd94730b36b4d95669adcadacae5df
[ "MIT" ]
null
null
null
Python problem solved.py
whoafridi/Python
4fea6f81ebfd94730b36b4d95669adcadacae5df
[ "MIT" ]
null
null
null
Python problem solved.py
whoafridi/Python
4fea6f81ebfd94730b36b4d95669adcadacae5df
[ "MIT" ]
1
2019-07-09T06:34:29.000Z
2019-07-09T06:34:29.000Z
# coding: utf-8 # # Number 1 cm = float(input()) print('Meter: ',cm*0.01,'m') print('KiloMeter: ',cm*0.00001,'km') # # Number 2 c = float(input()) print('Fahrenheit: ',c * 9/5+32,'F') # # Number 3 a = int(input()) print(a**a,' ^') # # Number 4 num = int(input()) if num % 2 == 0: print(num,...
9.357724
127
0.57689
t(input()) print('Meter: ',cm*0.01,'m') print('KiloMeter: ',cm*0.00001,'km') oat(input()) print('Fahrenheit: ',c * 9/5+32,'F') t(input()) print(a**a,' ^') int(input()) if num % 2 == 0: print(num,'is even') else: print(num,'is odd') input() char.isalpha() int(input()) Num2 = int(input()) Num3...
false
true
1c30984db275b3d716ea21898e90ceeb85e57cde
1,588
py
Python
urls.py
hishamkaram/data_manager
c3430cb7132b67ef2e8635df7f70334167a78f0e
[ "MIT" ]
null
null
null
urls.py
hishamkaram/data_manager
c3430cb7132b67ef2e8635df7f70334167a78f0e
[ "MIT" ]
5
2020-07-16T18:54:21.000Z
2022-03-15T19:07:22.000Z
urls.py
hishamkaram/data_manager
c3430cb7132b67ef2e8635df7f70334167a78f0e
[ "MIT" ]
1
2020-11-13T14:13:13.000Z
2020-11-13T14:13:13.000Z
# -*- coding: utf-8 -*- from django.urls import include, re_path from tastypie.api import Api from . import APP_NAME from .rest import GpkgUploadResource, ManagerDownloadResource from .views import (UploadView, compare_to_geonode_layer, deleteUpload, download_layers, get_compatible_layers, publish_l...
42.918919
96
0.639169
from django.urls import include, re_path from tastypie.api import Api from . import APP_NAME from .rest import GpkgUploadResource, ManagerDownloadResource from .views import (UploadView, compare_to_geonode_layer, deleteUpload, download_layers, get_compatible_layers, publish_layer, ...
true
true
1c3099a8ee190b17fb946370adda20d68fdd911b
2,318
py
Python
cudarray/extra/array.py
gorenje/cudarray
a6d287fe371a93bcce2d3767925a5ea4e0a82e1a
[ "MIT" ]
228
2015-01-03T17:31:54.000Z
2021-01-21T22:23:17.000Z
cudarray/extra/array.py
maxosprojects/cudarray
a2cffbb1434db9a7e6ed83211300d23d47630d2e
[ "MIT" ]
77
2015-01-03T20:23:19.000Z
2022-03-23T11:56:27.000Z
cudarray/extra/array.py
maxosprojects/cudarray
a2cffbb1434db9a7e6ed83211300d23d47630d2e
[ "MIT" ]
74
2015-01-06T17:07:06.000Z
2021-05-14T12:41:05.000Z
import cudarray as ca from ..wrap import array_ops from ..helpers import prod def concatenate(a, b, axis=0, out=None): ndim = a.ndim a_shp = a.shape b_shp = b.shape d_concat = a_shp[axis] + b_shp[axis] out_shp = a_shp[:axis] + (d_concat,) + a_shp[axis+1:] if out is None: out = ca.empt...
30.103896
73
0.523296
import cudarray as ca from ..wrap import array_ops from ..helpers import prod def concatenate(a, b, axis=0, out=None): ndim = a.ndim a_shp = a.shape b_shp = b.shape d_concat = a_shp[axis] + b_shp[axis] out_shp = a_shp[:axis] + (d_concat,) + a_shp[axis+1:] if out is None: out = ca.empt...
true
true
1c309ac09232246e200a5518a2fe8365c7b2c8bc
8,529
py
Python
selfdrive/mapd/mapd.py
priuscom/openpilot
36b25d11c7e6f8c6d6402f4340d991bef315de98
[ "MIT" ]
5
2019-01-11T23:56:22.000Z
2019-04-13T12:20:59.000Z
selfdrive/mapd/mapd.py
hilariouss/openpilot
88246af4c7bc7be16fe3f72040dda0e51c42388c
[ "MIT" ]
null
null
null
selfdrive/mapd/mapd.py
hilariouss/openpilot
88246af4c7bc7be16fe3f72040dda0e51c42388c
[ "MIT" ]
null
null
null
#!/usr/bin/env python # Add phonelibs openblas to LD_LIBRARY_PATH if import fails try: from scipy import spatial except ImportError as e: import os import sys from common.basedir import BASEDIR openblas_path = os.path.join(BASEDIR, "phonelibs/openblas/") os.environ['LD_LIBRARY_PATH'] += ':' + openblas_pat...
28.814189
116
0.659397
try: from scipy import spatial except ImportError as e: import os import sys from common.basedir import BASEDIR openblas_path = os.path.join(BASEDIR, "phonelibs/openblas/") os.environ['LD_LIBRARY_PATH'] += ':' + openblas_path args = [sys.executable] args.extend(sys.argv) os.execv(sys.executable, ...
false
true
1c309b05898511f695f8311094b09136ee0e435d
1,765
py
Python
src/data_processing/OLD/create_lung_segmented_same_spacing_data.py
DataForces/CV_LUNA
adc76fdc580807742fee4c6453c728a2d6d76ed3
[ "BSD-2-Clause" ]
207
2016-07-25T07:27:11.000Z
2022-03-25T06:20:56.000Z
src/data_processing/OLD/create_lung_segmented_same_spacing_data.py
DataForces/CV_LUNA
adc76fdc580807742fee4c6453c728a2d6d76ed3
[ "BSD-2-Clause" ]
20
2016-12-07T02:36:14.000Z
2020-06-05T03:05:14.000Z
src/data_processing/OLD/create_lung_segmented_same_spacing_data.py
DataForces/CV_LUNA
adc76fdc580807742fee4c6453c728a2d6d76ed3
[ "BSD-2-Clause" ]
83
2016-08-27T01:35:23.000Z
2020-09-21T15:12:06.000Z
import glob import numpy as np import os import SimpleITK as sitk import skimage.transform import scipy.ndimage from joblib import Parallel, delayed RESIZE_SPACING = [1, 1, 1] SAVE_FOLDER = '1_1_1mm' def load_itk(filename): itkimage = sitk.ReadImage(filename) numpyImage = sitk.GetArrayFromImage(itkimage) ...
36.020408
97
0.695184
import glob import numpy as np import os import SimpleITK as sitk import skimage.transform import scipy.ndimage from joblib import Parallel, delayed RESIZE_SPACING = [1, 1, 1] SAVE_FOLDER = '1_1_1mm' def load_itk(filename): itkimage = sitk.ReadImage(filename) numpyImage = sitk.GetArrayFromImage(itkimage) ...
true
true
1c309b46bb2ad825ca24438b2fe20a68a15dd03d
192
py
Python
seldump/__main__.py
dvarrazzo/pg_seldump
43110c6073d2d21b7e836cb08e91fb27edb4075f
[ "BSD-3-Clause" ]
4
2020-04-14T12:57:47.000Z
2021-10-30T11:11:49.000Z
seldump/__main__.py
dvarrazzo/pg_seldump
43110c6073d2d21b7e836cb08e91fb27edb4075f
[ "BSD-3-Clause" ]
6
2020-02-19T17:06:30.000Z
2021-06-22T11:55:51.000Z
seldump/__main__.py
dvarrazzo/pg_seldump
43110c6073d2d21b7e836cb08e91fb27edb4075f
[ "BSD-3-Clause" ]
1
2021-03-12T21:47:29.000Z
2021-03-12T21:47:29.000Z
#!/usr/bin/env python3 """ Package entry point (can be executed with python -m seldump) This file is part of pg_seldump. """ from .cli import script if __name__ == "__main__": script()
16
60
0.692708
from .cli import script if __name__ == "__main__": script()
true
true
1c309bc23728ebc4192c53a8057fee494abca4ce
127
py
Python
src/napari_cryofibsem_monitor/_tests/test_function.py
jojoelfe/napari-cryofibsem-monitor
d315391a07f1ffc3bdfa0135f0dcd9b734235495
[ "MIT" ]
null
null
null
src/napari_cryofibsem_monitor/_tests/test_function.py
jojoelfe/napari-cryofibsem-monitor
d315391a07f1ffc3bdfa0135f0dcd9b734235495
[ "MIT" ]
null
null
null
src/napari_cryofibsem_monitor/_tests/test_function.py
jojoelfe/napari-cryofibsem-monitor
d315391a07f1ffc3bdfa0135f0dcd9b734235495
[ "MIT" ]
null
null
null
# from napari_cryofibsem_monitor import threshold, image_arithmetic # add your tests here... def test_something(): pass
15.875
67
0.76378
def test_something(): pass
true
true
1c309bcea6e7e4e6909ae85f188153eb14d9b7b8
193
py
Python
abc/abc130/abc130b.py
c-yan/atcoder
940e49d576e6a2d734288fadaf368e486480a948
[ "MIT" ]
1
2019-08-21T00:49:34.000Z
2019-08-21T00:49:34.000Z
abc/abc130/abc130b.py
c-yan/atcoder
940e49d576e6a2d734288fadaf368e486480a948
[ "MIT" ]
null
null
null
abc/abc130/abc130b.py
c-yan/atcoder
940e49d576e6a2d734288fadaf368e486480a948
[ "MIT" ]
null
null
null
N, X = map(int, input().split()) L = list(map(int, input().split())) d = 0 result = 1 for i in range(N): d += L[i] if d <= X: result += 1 else: break print(result)
14.846154
35
0.487047
N, X = map(int, input().split()) L = list(map(int, input().split())) d = 0 result = 1 for i in range(N): d += L[i] if d <= X: result += 1 else: break print(result)
true
true
1c309ca6369d5e2c28af11709b877d6c487f42d9
4,882
py
Python
InternalNode.py
matthew99carroll/VoronoiDiagram
354a6ff08bb0858972b542b4b90973ce31996978
[ "MIT" ]
null
null
null
InternalNode.py
matthew99carroll/VoronoiDiagram
354a6ff08bb0858972b542b4b90973ce31996978
[ "MIT" ]
null
null
null
InternalNode.py
matthew99carroll/VoronoiDiagram
354a6ff08bb0858972b542b4b90973ce31996978
[ "MIT" ]
null
null
null
import math from Breakpoint import Breakpoint from Node import Node class InternalNode(Node): def __init__(self, site1, site2, parent): self.parent = parent self.site1 = site1 self.site2 = site2 def IsLeaf(self): return False def SiteToString(self): return "S" + ...
32.765101
127
0.573535
import math from Breakpoint import Breakpoint from Node import Node class InternalNode(Node): def __init__(self, site1, site2, parent): self.parent = parent self.site1 = site1 self.site2 = site2 def IsLeaf(self): return False def SiteToString(self): return "S" + ...
true
true
1c309d8c5efe4639a8e02dcf6aefdaa31f8bb0ed
11,913
py
Python
rllib/policy/policy_map.py
willfrey/ray
288a81b42ef0186ab4db33b30191614a7bdb69f6
[ "Apache-2.0" ]
1
2019-06-19T02:23:43.000Z
2019-06-19T02:23:43.000Z
rllib/policy/policy_map.py
willfrey/ray
288a81b42ef0186ab4db33b30191614a7bdb69f6
[ "Apache-2.0" ]
73
2021-09-25T07:11:39.000Z
2022-03-26T07:10:59.000Z
rllib/policy/policy_map.py
willfrey/ray
288a81b42ef0186ab4db33b30191614a7bdb69f6
[ "Apache-2.0" ]
1
2019-09-24T16:24:49.000Z
2019-09-24T16:24:49.000Z
from collections import deque import gym import os import pickle import threading from typing import Callable, Dict, Optional, Set, Type, TYPE_CHECKING from ray.rllib.policy.policy import PolicySpec from ray.rllib.utils.annotations import override, PublicAPI from ray.rllib.utils.framework import try_import_tf from ray...
35.990937
88
0.589944
from collections import deque import gym import os import pickle import threading from typing import Callable, Dict, Optional, Set, Type, TYPE_CHECKING from ray.rllib.policy.policy import PolicySpec from ray.rllib.utils.annotations import override, PublicAPI from ray.rllib.utils.framework import try_import_tf from ray...
true
true
1c309e29fa3d3e00f8540843a8b0261a9e64bf26
92
py
Python
code/abc126_a_01.py
KoyanagiHitoshi/AtCoder
731892543769b5df15254e1f32b756190378d292
[ "MIT" ]
3
2019-08-16T16:55:48.000Z
2021-04-11T10:21:40.000Z
code/abc126_a_01.py
KoyanagiHitoshi/AtCoder
731892543769b5df15254e1f32b756190378d292
[ "MIT" ]
null
null
null
code/abc126_a_01.py
KoyanagiHitoshi/AtCoder
731892543769b5df15254e1f32b756190378d292
[ "MIT" ]
null
null
null
n,k=map(int,input().split()) s=input() print(s[:k-1].upper()+s[k-1:k].lower()+s[k:].upper())
30.666667
53
0.576087
n,k=map(int,input().split()) s=input() print(s[:k-1].upper()+s[k-1:k].lower()+s[k:].upper())
true
true
1c30a205b90f870420979848869282a055b6dbee
8,421
py
Python
appengine/findit/model/wf_swarming_task.py
allaparthi/monorail
e18645fc1b952a5a6ff5f06e0c740d75f1904473
[ "BSD-3-Clause" ]
2
2021-04-13T21:22:18.000Z
2021-09-07T02:11:57.000Z
appengine/findit/model/wf_swarming_task.py
allaparthi/monorail
e18645fc1b952a5a6ff5f06e0c740d75f1904473
[ "BSD-3-Clause" ]
21
2020-09-06T02:41:05.000Z
2022-03-02T04:40:01.000Z
appengine/findit/model/wf_swarming_task.py
allaparthi/monorail
e18645fc1b952a5a6ff5f06e0c740d75f1904473
[ "BSD-3-Clause" ]
null
null
null
# Copyright 2016 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from collections import defaultdict from google.appengine.ext import ndb from libs import time_util from model.base_build_model import BaseBuildModel from ...
35.23431
80
0.687329
from collections import defaultdict from google.appengine.ext import ndb from libs import time_util from model.base_build_model import BaseBuildModel from model.base_swarming_task import BaseSwarmingTask class _ResultCount(ndb.Model): status = ndb.StringProperty(indexed=False) count = ndb.IntegerProperty(in...
true
true
1c30a43320ab19b30bab87b06cd9e0b5a541adf3
541
py
Python
rofi_menu.py
Marble879/Rofi-Network-Manager
637cc6aa8b8a5d6981a36806a94a56614a25211c
[ "MIT" ]
17
2021-12-22T12:34:56.000Z
2021-12-30T10:58:40.000Z
rofi_menu.py
Marble879/Rofi-Network-Manager
637cc6aa8b8a5d6981a36806a94a56614a25211c
[ "MIT" ]
null
null
null
rofi_menu.py
Marble879/Rofi-Network-Manager
637cc6aa8b8a5d6981a36806a94a56614a25211c
[ "MIT" ]
null
null
null
from rofi import Rofi import os import subprocess def get_wifi_networks(): wifi_devices_raw = subprocess.check_output(['nmcli', 'device', 'wifi', 'list']) wifi_devices_decoded = wifi_devices_raw.decode("utf-8") wifi_list = wifi_devices_decoded.split('\n') return wifi_list def quick_options_test():...
25.761905
83
0.689464
from rofi import Rofi import os import subprocess def get_wifi_networks(): wifi_devices_raw = subprocess.check_output(['nmcli', 'device', 'wifi', 'list']) wifi_devices_decoded = wifi_devices_raw.decode("utf-8") wifi_list = wifi_devices_decoded.split('\n') return wifi_list def quick_options_test():...
true
true
1c30a4cfe5d3b3fce69fc274e2f7316b95ffb1f0
20,223
py
Python
dqn2.py
tierriminator/GraphQSat
9a356438d1dc68f28a14e71e3f5bd306bd8ce877
[ "Apache-2.0" ]
null
null
null
dqn2.py
tierriminator/GraphQSat
9a356438d1dc68f28a14e71e3f5bd306bd8ce877
[ "Apache-2.0" ]
null
null
null
dqn2.py
tierriminator/GraphQSat
9a356438d1dc68f28a14e71e3f5bd306bd8ce877
[ "Apache-2.0" ]
null
null
null
# Copyright 2019-2020 Nvidia Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
38.593511
122
0.571775
import numpy as np import torch import os from collections import deque, defaultdict import pickle import copy import yaml import time from gqsat.utils import build_argparser, evaluate, make_env from gqsat.models import EncoderCoreDecoder, SatModel from gqsat.agents import GraphAgent, MiniSATAgent from ...
true
true
1c30a4fe46f2ff75000dd34e34ae2c1263e1323e
3,053
py
Python
lib/webtest/compat.py
zenlambda/aeta
3781ac916be069a1d01eaa8b2a42375b689a82fe
[ "Apache-2.0" ]
1
2015-07-22T15:58:06.000Z
2015-07-22T15:58:06.000Z
lib/webtest/compat.py
agostodev/agar
66b7937a35ae93717d5e9683c7dc7c80c4bcc5d6
[ "MIT" ]
null
null
null
lib/webtest/compat.py
agostodev/agar
66b7937a35ae93717d5e9683c7dc7c80c4bcc5d6
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import sys if sys.version_info[0] > 2: PY3 = True string_types = (str,) text_type = str binary_type = bytes from json import loads from json import dumps from io import StringIO from io import BytesIO from urllib.parse import urlencode from urllib.parse i...
25.655462
57
0.633803
import sys if sys.version_info[0] > 2: PY3 = True string_types = (str,) text_type = str binary_type = bytes from json import loads from json import dumps from io import StringIO from io import BytesIO from urllib.parse import urlencode from urllib.parse import splittype fro...
true
true
1c30a558c1dc64b95621d88202a6ded61091aebf
14,428
py
Python
py/test/selenium/webdriver/common/alerts_tests.py
worldofwonders/selenium
f76d614534456f008eaf2b9f7bb32a4b4ab624a7
[ "Apache-2.0" ]
null
null
null
py/test/selenium/webdriver/common/alerts_tests.py
worldofwonders/selenium
f76d614534456f008eaf2b9f7bb32a4b4ab624a7
[ "Apache-2.0" ]
null
null
null
py/test/selenium/webdriver/common/alerts_tests.py
worldofwonders/selenium
f76d614534456f008eaf2b9f7bb32a4b4ab624a7
[ "Apache-2.0" ]
null
null
null
# Licensed to the Software Freedom Conservancy (SFC) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The SFC licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
38.889488
126
0.67667
import sys import pytest from selenium.webdriver.common.by import By from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.support.wait import WebDriverWait from selenium.common.exceptions import ( InvalidElementStateException, NoAlertPresentException, T...
true
true
1c30a56a1bb8eb9a1423caa15dc205466ded19e1
1,017
py
Python
mantrap_evaluation/scenarios/custom/surrounding.py
simon-schaefer/mantrap
9a2b3f32a0005cc0cb79bb78924f09da5a94587d
[ "MIT" ]
7
2020-05-11T18:13:27.000Z
2022-03-09T02:52:48.000Z
mantrap_evaluation/scenarios/custom/surrounding.py
StanfordASL/mantrap
9a2b3f32a0005cc0cb79bb78924f09da5a94587d
[ "MIT" ]
null
null
null
mantrap_evaluation/scenarios/custom/surrounding.py
StanfordASL/mantrap
9a2b3f32a0005cc0cb79bb78924f09da5a94587d
[ "MIT" ]
3
2020-12-09T00:03:26.000Z
2022-03-03T10:39:03.000Z
import typing import mantrap import torch import mantrap_evaluation.scenarios.api def custom_surrounding(env_type: mantrap.environment.base.GraphBasedEnvironment.__class__, **env_kwargs ) -> typing.Tuple[mantrap.environment.base.GraphBasedEnvironment, ...
33.9
103
0.633235
import typing import mantrap import torch import mantrap_evaluation.scenarios.api def custom_surrounding(env_type: mantrap.environment.base.GraphBasedEnvironment.__class__, **env_kwargs ) -> typing.Tuple[mantrap.environment.base.GraphBasedEnvironment, ...
true
true
1c30a7fb105f5128b1ebac9c1c478f4bf9029dae
3,196
py
Python
Products/GSSearch/tests/framework.py
groupserver/Products.GSSearch
2b843b688812cfd382ed0e8caf92a6eef287f4c4
[ "ZPL-2.1" ]
null
null
null
Products/GSSearch/tests/framework.py
groupserver/Products.GSSearch
2b843b688812cfd382ed0e8caf92a6eef287f4c4
[ "ZPL-2.1" ]
null
null
null
Products/GSSearch/tests/framework.py
groupserver/Products.GSSearch
2b843b688812cfd382ed0e8caf92a6eef287f4c4
[ "ZPL-2.1" ]
null
null
null
#@PydevCodeAnalysisIgnore ############################################################################## # # ZopeTestCase # # COPY THIS FILE TO YOUR 'tests' DIRECTORY. # # This version of framework.py will use the SOFTWARE_HOME # environment variable to locate Zope and the Testing package. # # If the tests are run in ...
29.321101
78
0.623279
false
true
1c30aa0c9fc62c15a39061bebfd6add5bbd695ab
3,425
py
Python
clients/python/generated/swaggyjenkins/models/link.py
PankTrue/swaggy-jenkins
aca35a7cca6e1fcc08bd399e05148942ac2f514b
[ "MIT" ]
23
2017-08-01T12:25:26.000Z
2022-01-25T03:44:11.000Z
clients/python/generated/swaggyjenkins/models/link.py
PankTrue/swaggy-jenkins
aca35a7cca6e1fcc08bd399e05148942ac2f514b
[ "MIT" ]
35
2017-06-14T03:28:15.000Z
2022-02-14T10:25:54.000Z
clients/python/generated/swaggyjenkins/models/link.py
PankTrue/swaggy-jenkins
aca35a7cca6e1fcc08bd399e05148942ac2f514b
[ "MIT" ]
11
2017-08-31T19:00:20.000Z
2021-12-19T12:04:12.000Z
# coding: utf-8 """ Swaggy Jenkins Jenkins API clients generated from Swagger / Open API specification # noqa: E501 OpenAPI spec version: 1.1.1 Contact: blah@cliffano.com Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six class Link(object): ...
24.464286
85
0.533431
import pprint import re import six class Link(object): openapi_types = { '_class': 'str', 'href': 'str' } attribute_map = { '_class': '_class', 'href': 'href' } def __init__(self, _class=None, href=None): self.__class = None self._href =...
true
true
1c30aa80c53775faa6404ce0a3b6f030e89215b5
1,420
py
Python
monk/tf_keras_1/training/callbacks.py
kshitij12345/monk_v1
9e2ccdd51f3c1335ed732cca5cc5fb7daea66139
[ "Apache-2.0" ]
2
2020-09-16T06:05:50.000Z
2021-04-07T12:05:20.000Z
monk/tf_keras_1/training/callbacks.py
kshitij12345/monk_v1
9e2ccdd51f3c1335ed732cca5cc5fb7daea66139
[ "Apache-2.0" ]
null
null
null
monk/tf_keras_1/training/callbacks.py
kshitij12345/monk_v1
9e2ccdd51f3c1335ed732cca5cc5fb7daea66139
[ "Apache-2.0" ]
1
2020-10-07T12:57:44.000Z
2020-10-07T12:57:44.000Z
from tf_keras_1.training.imports import * from system.imports import * class TimeHistory(krc.Callback): def __init__(self, log_dir=None): super().__init__() if(log_dir): self.log_file = log_dir + "times.txt"; self.f = open(self.log_file, 'a'); else: self...
26.792453
74
0.569014
from tf_keras_1.training.imports import * from system.imports import * class TimeHistory(krc.Callback): def __init__(self, log_dir=None): super().__init__() if(log_dir): self.log_file = log_dir + "times.txt"; self.f = open(self.log_file, 'a'); else: self...
true
true
1c30ab68eda7401a845ee15168466fe52d026520
341
py
Python
other/dingding/dingtalk/api/rest/OapiRhinoMosSpaceWorkerCheckOutRequest.py
hth945/pytest
83e2aada82a2c6a0fdd1721320e5bf8b8fd59abc
[ "Apache-2.0" ]
null
null
null
other/dingding/dingtalk/api/rest/OapiRhinoMosSpaceWorkerCheckOutRequest.py
hth945/pytest
83e2aada82a2c6a0fdd1721320e5bf8b8fd59abc
[ "Apache-2.0" ]
null
null
null
other/dingding/dingtalk/api/rest/OapiRhinoMosSpaceWorkerCheckOutRequest.py
hth945/pytest
83e2aada82a2c6a0fdd1721320e5bf8b8fd59abc
[ "Apache-2.0" ]
null
null
null
''' Created by auto_sdk on 2020.03.07 ''' from dingtalk.api.base import RestApi class OapiRhinoMosSpaceWorkerCheckOutRequest(RestApi): def __init__(self,url=None): RestApi.__init__(self,url) self.request = None def getHttpMethod(self): return 'POST' def getapiname(self): return 'dingtalk.oapi.rhino.mos.spa...
22.733333
57
0.762463
from dingtalk.api.base import RestApi class OapiRhinoMosSpaceWorkerCheckOutRequest(RestApi): def __init__(self,url=None): RestApi.__init__(self,url) self.request = None def getHttpMethod(self): return 'POST' def getapiname(self): return 'dingtalk.oapi.rhino.mos.space.worker.check.out'
true
true
1c30abf6f715a8a96fc50d02a1bfc55be0a33371
26,197
py
Python
deepspeed/runtime/pipe/module.py
olegklimov/DeepSpeed
cd7967d6b5465e0f1e52d1e111b98a04720e8f37
[ "MIT" ]
6,728
2020-02-07T23:53:18.000Z
2022-03-31T20:02:53.000Z
deepspeed/runtime/pipe/module.py
jfc4050/DeepSpeed
80e263c571599a93f412c850f0ff7a44a9051a90
[ "MIT" ]
1,104
2020-02-08T00:26:15.000Z
2022-03-31T22:33:56.000Z
deepspeed/runtime/pipe/module.py
jfc4050/DeepSpeed
80e263c571599a93f412c850f0ff7a44a9051a90
[ "MIT" ]
801
2020-02-10T15:33:42.000Z
2022-03-29T16:32:33.000Z
import os import glob import enum import re as regex from collections import defaultdict from functools import partial import torch import torch.nn as nn import torch.distributed as dist from deepspeed.utils import logger from .. import utils as ds_utils from ..activation_checkpointing import checkpointing from .to...
42.596748
167
0.586594
import os import glob import enum import re as regex from collections import defaultdict from functools import partial import torch import torch.nn as nn import torch.distributed as dist from deepspeed.utils import logger from .. import utils as ds_utils from ..activation_checkpointing import checkpointing from .to...
true
true
1c30ad6bcb7e56cf3e7b21d1b72d25952278c347
11,404
py
Python
python_developer_tools/cv/bases/attentions/SimAM-master/mmdetection/mmdet/models/backbones/resnet_simam.py
carlsummer/python_developer_tools
a8c4365b7cc601cda55648cdfd8c0cb1faae132f
[ "Apache-2.0" ]
32
2021-06-21T04:49:48.000Z
2022-03-29T05:46:59.000Z
python_developer_tools/cv/bases/attentions/SimAM-master/mmdetection/mmdet/models/backbones/resnet_simam.py
HonestyBrave/python_developer_tools
fc0dcf5c4ef088e2e535206dc82f09bbfd01f280
[ "Apache-2.0" ]
1
2021-11-12T03:45:55.000Z
2021-11-12T03:45:55.000Z
python_developer_tools/cv/bases/attentions/SimAM-master/mmdetection/mmdet/models/backbones/resnet_simam.py
HonestyBrave/python_developer_tools
fc0dcf5c4ef088e2e535206dc82f09bbfd01f280
[ "Apache-2.0" ]
10
2021-06-03T08:05:05.000Z
2021-12-13T03:10:42.000Z
import torch.nn as nn import functools from mmcv.cnn import constant_init, kaiming_init from mmcv.runner import load_checkpoint from mmdet.utils import get_root_logger from torch.nn.modules.batchnorm import _BatchNorm from ..builder import BACKBONES from .attentions import simam_module def conv3x3(in_planes, out_pla...
34.143713
97
0.55235
import torch.nn as nn import functools from mmcv.cnn import constant_init, kaiming_init from mmcv.runner import load_checkpoint from mmdet.utils import get_root_logger from torch.nn.modules.batchnorm import _BatchNorm from ..builder import BACKBONES from .attentions import simam_module def conv3x3(in_planes, out_pla...
true
true
1c30af1115be6d8b463a13f730dad74ecb43e278
11,483
py
Python
script/main.py
zementalist/Face-Landmarks-Detection-Highly-Improved
2dea823e2b496153fc3431007a1d4c3e3ea74c42
[ "Apache-2.0" ]
null
null
null
script/main.py
zementalist/Face-Landmarks-Detection-Highly-Improved
2dea823e2b496153fc3431007a1d4c3e3ea74c42
[ "Apache-2.0" ]
null
null
null
script/main.py
zementalist/Face-Landmarks-Detection-Highly-Improved
2dea823e2b496153fc3431007a1d4c3e3ea74c42
[ "Apache-2.0" ]
null
null
null
import cv2 import dlib from imutils import face_utils import numpy as np from scipy.spatial import Delaunay import matplotlib.pyplot as plt from matplotlib import transforms import os import math from geometry import slope def load_images_from_folder(folder): images = [] filenames = [] for filename in os.l...
40.15035
139
0.645476
import cv2 import dlib from imutils import face_utils import numpy as np from scipy.spatial import Delaunay import matplotlib.pyplot as plt from matplotlib import transforms import os import math from geometry import slope def load_images_from_folder(folder): images = [] filenames = [] for filename in os.l...
true
true
1c30af43c7f998ad0e53dfd81ea41da828f39911
7,130
py
Python
code/driver/servo_manager.py
eulerlab/spectral-scanner
3da291c16f408ce46d009ae63257606df4ed3230
[ "MIT" ]
1
2020-12-05T16:59:10.000Z
2020-12-05T16:59:10.000Z
code/driver/servo_manager.py
eulerlab/spectral-scanner
3da291c16f408ce46d009ae63257606df4ed3230
[ "MIT" ]
null
null
null
code/driver/servo_manager.py
eulerlab/spectral-scanner
3da291c16f408ce46d009ae63257606df4ed3230
[ "MIT" ]
null
null
null
# ---------------------------------------------------------------------------- # servo_manager.py # Class to manage and control a number of servos # # The MIT License (MIT) # Copyright (c) 2020 Thomas Euler # 2020-01-03, v1 # 2020-08-02, v1.1 ulab # ----------------------------------------------------------------------...
35.472637
79
0.534362
import time from machine import Timer import ulab as np from micropython import alloc_emergency_exception_buf alloc_emergency_exception_buf(100) __version__ = "0.1.1.0" RATE_MS = const(20) _STEP_ARRAY_MAX = const(500) class ServoManager(object): TYPE_NONE = const(0) TYPE_HORIZON...
true
true
1c30af73b4c1fe1408985171d2a518da80cf23fa
17,036
py
Python
cogdl/models/emb/gatne.py
xssstory/cogdl
ae8de495c365993f19f04774f083960fd282c2a3
[ "MIT" ]
1
2020-07-20T07:14:50.000Z
2020-07-20T07:14:50.000Z
cogdl/models/emb/gatne.py
xssstory/cogdl
ae8de495c365993f19f04774f083960fd282c2a3
[ "MIT" ]
null
null
null
cogdl/models/emb/gatne.py
xssstory/cogdl
ae8de495c365993f19f04774f083960fd282c2a3
[ "MIT" ]
1
2021-06-17T02:44:09.000Z
2021-06-17T02:44:09.000Z
import numpy as np import networkx as nx from collections import defaultdict from gensim.models.keyedvectors import Vocab from six import iteritems import random import math import tqdm import torch import torch.nn as nn import torch.nn.functional as F from torch.nn.parameter import Parameter from .. import BaseModel,...
36.169851
106
0.560343
import numpy as np import networkx as nx from collections import defaultdict from gensim.models.keyedvectors import Vocab from six import iteritems import random import math import tqdm import torch import torch.nn as nn import torch.nn.functional as F from torch.nn.parameter import Parameter from .. import BaseModel,...
true
true
1c30afb5fc363275db4e5235e079d59e4a8af4aa
1,074
py
Python
app/tests/conftest.py
philipph77/fifa_tournament_companion
e6d83405273170dbd1a653af2f179c1895bfecdf
[ "CC0-1.0" ]
null
null
null
app/tests/conftest.py
philipph77/fifa_tournament_companion
e6d83405273170dbd1a653af2f179c1895bfecdf
[ "CC0-1.0" ]
null
null
null
app/tests/conftest.py
philipph77/fifa_tournament_companion
e6d83405273170dbd1a653af2f179c1895bfecdf
[ "CC0-1.0" ]
null
null
null
import os import tempfile import pytest from ftc import create_app from ftc.db import get_db, init_db with open(os.path.join(os.path.dirname(__file__), 'data.sql'), 'rb') as f: _data_sql = f.read().decode('utf8') @pytest.fixture def app(): db_fd, db_path = tempfile.mkstemp() app = create_app({ ...
19.178571
74
0.638734
import os import tempfile import pytest from ftc import create_app from ftc.db import get_db, init_db with open(os.path.join(os.path.dirname(__file__), 'data.sql'), 'rb') as f: _data_sql = f.read().decode('utf8') @pytest.fixture def app(): db_fd, db_path = tempfile.mkstemp() app = create_app({ ...
true
true
1c30afdc9023b5d18c837fda9f7c402b8d18b3cb
8,786
py
Python
ixnetwork_restpy/testplatform/sessions/ixnetwork/globals/protocolstack/fcfportglobals/fcfportglobals.py
Vibaswan/ixnetwork_restpy
239fedc7050890746cbabd71ea1e91c68d9e5cad
[ "MIT" ]
null
null
null
ixnetwork_restpy/testplatform/sessions/ixnetwork/globals/protocolstack/fcfportglobals/fcfportglobals.py
Vibaswan/ixnetwork_restpy
239fedc7050890746cbabd71ea1e91c68d9e5cad
[ "MIT" ]
null
null
null
ixnetwork_restpy/testplatform/sessions/ixnetwork/globals/protocolstack/fcfportglobals/fcfportglobals.py
Vibaswan/ixnetwork_restpy
239fedc7050890746cbabd71ea1e91c68d9e5cad
[ "MIT" ]
null
null
null
# MIT LICENSE # # Copyright 1997 - 2020 by IXIA Keysight # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify,...
46
271
0.699636
from ixnetwork_restpy.base import Base from ixnetwork_restpy.files import Files class FcFportGlobals(Base): __slots__ = () _SDM_NAME = 'fcFportGlobals' _SDM_ATT_MAP = { 'AcceptPartialConfig': 'acceptPartialConfig', 'MaxPacketsPerSecond': 'maxPacketsPerSecond', ...
true
true
1c30b0a5945d99a0d9ec01db7440cfdee3da7965
68,626
py
Python
mock_icd_generator.py
nyorain/vkmockicd
08a31a1fcd6239bc7f7a81233a9c2827b09e2d5c
[ "Apache-2.0" ]
null
null
null
mock_icd_generator.py
nyorain/vkmockicd
08a31a1fcd6239bc7f7a81233a9c2827b09e2d5c
[ "Apache-2.0" ]
null
null
null
mock_icd_generator.py
nyorain/vkmockicd
08a31a1fcd6239bc7f7a81233a9c2827b09e2d5c
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python3 -i # # Copyright (c) 2015-2021 The Khronos Group Inc. # Copyright (c) 2015-2021 Valve Corporation # Copyright (c) 2015-2021 LunarG, Inc. # Copyright (c) 2015-2021 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the ...
45.4778
233
0.668435
# can be copied and customized to assist in creation of a new layer. import os,re,sys from generator import * from common_codegen import * # Mock header code HEADER_C_CODE = ''' using mutex_t = std::mutex; using lock_guard_t = std::lock_guard<mutex_t>; using unique_lock_t = std::unique_lock<...
true
true
1c30b0b0b2dd41db25f62e5e8c870bf536a3300b
2,172
py
Python
Project_2.py
jainrachit1008/Titans-of-Wall-Street-Program-Projects
2d71499a0942ed506330c412eae3b0822c837aa7
[ "MIT" ]
null
null
null
Project_2.py
jainrachit1008/Titans-of-Wall-Street-Program-Projects
2d71499a0942ed506330c412eae3b0822c837aa7
[ "MIT" ]
null
null
null
Project_2.py
jainrachit1008/Titans-of-Wall-Street-Program-Projects
2d71499a0942ed506330c412eae3b0822c837aa7
[ "MIT" ]
null
null
null
import datetime as dt import pandas as pd import numpy as np from pandas.plotting import table import matplotlib.pyplot as plt def ann_return(DF): "function to calculate the Annualized return from monthly prices of a fund/sript" df = DF.copy() df["mon_ret"] = df["NAV"].pct_change() df["cum_return"] = (...
40.222222
138
0.706722
import datetime as dt import pandas as pd import numpy as np from pandas.plotting import table import matplotlib.pyplot as plt def ann_return(DF): df = DF.copy() df["mon_ret"] = df["NAV"].pct_change() df["cum_return"] = (1 + df["mon_ret"]).cumprod() n = len(df)/12 ann_ret = (df["cum_return"][-1])**...
true
true
1c30b0fd99c82818b7c1ab9e9be37e6f7376425f
28,374
py
Python
nova/virt/powervm/driver.py
wangchencom/nova
34e595f2a7ac1cd16ea13d0e3a14899b89f94998
[ "Apache-2.0" ]
null
null
null
nova/virt/powervm/driver.py
wangchencom/nova
34e595f2a7ac1cd16ea13d0e3a14899b89f94998
[ "Apache-2.0" ]
null
null
null
nova/virt/powervm/driver.py
wangchencom/nova
34e595f2a7ac1cd16ea13d0e3a14899b89f94998
[ "Apache-2.0" ]
null
null
null
# Copyright 2014, 2018 IBM Corp. # # 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 ag...
41.482456
79
0.644252
import os_resource_classes as orc from oslo_log import log as logging from oslo_utils import excutils from oslo_utils import importutils from pypowervm import adapter as pvm_apt from pypowervm import const as pvm_const from pypowervm import exceptions as pvm_exc from pypowervm.helpers import log_helper as...
true
true
1c30b22f755d32919b8be5d7721daf340cd3874b
7,416
py
Python
Figure_8.py
vincentpun/ConformanceConstraintsReproducibility
fc5df4ec9a3702a1837ffe6f3c05216523e8a1c5
[ "MIT" ]
null
null
null
Figure_8.py
vincentpun/ConformanceConstraintsReproducibility
fc5df4ec9a3702a1837ffe6f3c05216523e8a1c5
[ "MIT" ]
1
2021-12-09T09:30:49.000Z
2021-12-09T09:30:49.000Z
Figure_8.py
vincentpun/ConformanceConstraintsReproducibility
fc5df4ec9a3702a1837ffe6f3c05216523e8a1c5
[ "MIT" ]
1
2021-12-09T05:22:18.000Z
2021-12-09T05:22:18.000Z
import prose.datainsights as di import os import pandas as pd import numpy as np import matplotlib.pyplot as plt import subprocess from sklearn.decomposition import PCA import numpy as np import numpy.random as rnd import matplotlib.pyplot as plt import os import sys import warnings from matplotlib import rc from matpl...
34.175115
144
0.567422
import prose.datainsights as di import os import pandas as pd import numpy as np import matplotlib.pyplot as plt import subprocess from sklearn.decomposition import PCA import numpy as np import numpy.random as rnd import matplotlib.pyplot as plt import os import sys import warnings from matplotlib import rc from matpl...
true
true
1c30b2a2341a327a30c56419156b38d7140393cf
3,576
py
Python
csscompressor/tests/test_partition.py
sprymix/csscompressor
0857438db725d5c1d2672f45d9cf3e7dc14646a4
[ "BSD-3-Clause" ]
38
2015-05-22T18:55:52.000Z
2022-03-05T21:18:58.000Z
csscompressor/tests/test_partition.py
sprymix/csscompressor
0857438db725d5c1d2672f45d9cf3e7dc14646a4
[ "BSD-3-Clause" ]
8
2015-08-18T04:31:11.000Z
2022-01-28T16:55:33.000Z
venv/Lib/site-packages/csscompressor/tests/test_partition.py
FZJ-INM5/JuHPLC
efaf9b8f5d7f0c9a8ad687d0f143e161f523db7c
[ "Unlicense" ]
10
2015-01-04T14:14:05.000Z
2020-09-03T18:32:02.000Z
## # Copyright (c) 2013 Sprymix Inc. # All rights reserved. # # See LICENSE for details. ## from csscompressor.tests.base import BaseTest from csscompressor import compress_partitioned import unittest class Tests(unittest.TestCase): def test_partition_1(self): input = '' output = compress_parti...
25.726619
81
0.39038
from csscompressor.tests.base import BaseTest from csscompressor import compress_partitioned import unittest class Tests(unittest.TestCase): def test_partition_1(self): input = '' output = compress_partitioned(input, max_rules_per_file=2) assert output == [''] def test_partitio...
true
true
1c30b383d1bf94598ddc72b74f9c1bbed1aa8523
3,350
py
Python
yuanrl/nn/QMIXBackbone.py
yuanmingqi/YuanRL
b0e6cdb0207d23ec9c883191f9ca13a6a08f9769
[ "MIT" ]
1
2021-03-07T08:19:45.000Z
2021-03-07T08:19:45.000Z
yuanrl/nn/QMIXBackbone.py
yuanmingqi/YuanRL
b0e6cdb0207d23ec9c883191f9ca13a6a08f9769
[ "MIT" ]
null
null
null
yuanrl/nn/QMIXBackbone.py
yuanmingqi/YuanRL
b0e6cdb0207d23ec9c883191f9ca13a6a08f9769
[ "MIT" ]
null
null
null
from torch import nn from torch.nn import functional as F import torch class SingleAgent(nn.Module): def __init__(self, kwargs): super(SingleAgent, self).__init__() self.fc1 = nn.Linear(kwargs['input_dim'], 64) self.fc2 = nn.Linear(64, 128) self.rnn = nn.GRUCell(128, kwargs['hidden...
34.895833
95
0.58597
from torch import nn from torch.nn import functional as F import torch class SingleAgent(nn.Module): def __init__(self, kwargs): super(SingleAgent, self).__init__() self.fc1 = nn.Linear(kwargs['input_dim'], 64) self.fc2 = nn.Linear(64, 128) self.rnn = nn.GRUCell(128, kwargs['hidden...
true
true
1c30b6562e9aee66d3c3a55d6a91ed7a1553a9be
9,135
py
Python
mmdet/models/detectors/two_stage.py
xwuShirley/mmdetection
f9b9eaad9f58e90862997b90a034aad1518baf2f
[ "Apache-2.0" ]
null
null
null
mmdet/models/detectors/two_stage.py
xwuShirley/mmdetection
f9b9eaad9f58e90862997b90a034aad1518baf2f
[ "Apache-2.0" ]
null
null
null
mmdet/models/detectors/two_stage.py
xwuShirley/mmdetection
f9b9eaad9f58e90862997b90a034aad1518baf2f
[ "Apache-2.0" ]
null
null
null
import torch import torch.nn as nn # from mmdet.core import bbox2result, bbox2roi, build_assigner, build_sampler from ..builder import DETECTORS, build_backbone, build_head, build_neck from .base import BaseDetector @DETECTORS.register_module() class TwoStageDetector(BaseDetector): """Base class for two-stage de...
35.964567
80
0.555446
import torch import torch.nn as nn from ..builder import DETECTORS, build_backbone, build_head, build_neck from .base import BaseDetector @DETECTORS.register_module() class TwoStageDetector(BaseDetector): def __init__(self, backbone, neck=None, rpn_head=None, ...
true
true
1c30b781ec2bce688a731c1d15464a679af1ca9a
5,341
py
Python
mlmodels/model_tch/vae/network_test.py
gitter-badger/mlmodels
f08cc9b6ec202d4ad25ecdda2f44487da387569d
[ "MIT" ]
1
2022-03-11T07:57:48.000Z
2022-03-11T07:57:48.000Z
mlmodels/model_tch/vae/network_test.py
whitetiger1002/mlmodels
f70f1da7434e8855eed50adc67b49cc169f2ea24
[ "MIT" ]
null
null
null
mlmodels/model_tch/vae/network_test.py
whitetiger1002/mlmodels
f70f1da7434e8855eed50adc67b49cc169f2ea24
[ "MIT" ]
null
null
null
from torchsummary import summary import torch import torch.nn as nn import torch.nn.init as init from torch.autograd import Variable def reparametrize(mu, logvar): std = logvar.div(2).exp() eps = Variable(std.data.new(std.size()).normal_()) return mu + std*eps class View(nn.Module): def __init__(self,...
32.766871
79
0.491668
from torchsummary import summary import torch import torch.nn as nn import torch.nn.init as init from torch.autograd import Variable def reparametrize(mu, logvar): std = logvar.div(2).exp() eps = Variable(std.data.new(std.size()).normal_()) return mu + std*eps class View(nn.Module): def __init__(self,...
true
true
1c30b82f79db62f5392d32243d4efc209399e2c4
794
py
Python
stdplugins/alive.py
sheikhnabil/Pornhub
2699dbb72d714fdbe3985a0dd1876f59eeca627e
[ "Apache-2.0" ]
null
null
null
stdplugins/alive.py
sheikhnabil/Pornhub
2699dbb72d714fdbe3985a0dd1876f59eeca627e
[ "Apache-2.0" ]
null
null
null
stdplugins/alive.py
sheikhnabil/Pornhub
2699dbb72d714fdbe3985a0dd1876f59eeca627e
[ "Apache-2.0" ]
null
null
null
""".alive Plugin for @UniBorg""" import asyncio from telethon import events from telethon.tl.types import ChannelParticipantsAdmins from uniborg.util import admin_cmd @borg.on(admin_cmd("alive")) async def _(event): if event.fwd_from: return mentions = "`I AM ALIVE🐸 NO NEED TO cry\n\nTelethon version...
34.521739
164
0.717884
import asyncio from telethon import events from telethon.tl.types import ChannelParticipantsAdmins from uniborg.util import admin_cmd @borg.on(admin_cmd("alive")) async def _(event): if event.fwd_from: return mentions = "`I AM ALIVE🐸 NO NEED TO cry\n\nTelethon version: 1.10.6\nPython: 3.7.4\nUser: @r...
true
true
1c30b8334c4a893e73a3805247e22ea67575d2b8
1,940
py
Python
tests/test_merge.py
squireg/PyRate
ef603067cd6e183a0f7290cd4598aab816ab94a5
[ "Apache-2.0" ]
null
null
null
tests/test_merge.py
squireg/PyRate
ef603067cd6e183a0f7290cd4598aab816ab94a5
[ "Apache-2.0" ]
null
null
null
tests/test_merge.py
squireg/PyRate
ef603067cd6e183a0f7290cd4598aab816ab94a5
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 # This Python module is part of the PyRate software package. # # Copyright 2020 Geoscience Australia # # 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:/...
35.272727
98
0.714433
import os import unittest from pathlib import Path from pyrate.merge import create_png_from_tif from tests.common import TESTDIR class MergingTest(unittest.TestCase): def test_png_creation(self): output_folder_path = Path(TESTDIR).joinpath("test_data", "merge") create_png_from_t...
true
true
1c30b92bef986729fa531b8608a49e8288ecbd39
1,792
py
Python
993.cousins-in-binary-tree.py
Lonitch/hackerRank
84991b8340e725422bc47eec664532cc84a3447e
[ "MIT" ]
null
null
null
993.cousins-in-binary-tree.py
Lonitch/hackerRank
84991b8340e725422bc47eec664532cc84a3447e
[ "MIT" ]
null
null
null
993.cousins-in-binary-tree.py
Lonitch/hackerRank
84991b8340e725422bc47eec664532cc84a3447e
[ "MIT" ]
null
null
null
# # @lc app=leetcode id=993 lang=python3 # # [993] Cousins in Binary Tree # # https://leetcode.com/problems/cousins-in-binary-tree/description/ # # algorithms # Easy (51.85%) # Likes: 480 # Dislikes: 29 # Total Accepted: 43.6K # Total Submissions: 83.5K # Testcase Example: '[1,2,3,4]\n4\n3' # # In a binary tree,...
18.285714
78
0.584263
from collections import defaultdict class Solution: def isCousins(self, root: TreeNode, x: int, y: int) -> bool: pd = defaultdict(list) def util(node, d, p): if node is not None: pd[node.val] ...
true
true
1c30b93f9f02b50cae32c7e11eebb7bff9ec6d66
4,289
py
Python
aiohttp/web_middlewares.py
adamko147/aiohttp
3250c5d75a54e19e2825d0a609f9d9cd4bf62087
[ "Apache-2.0" ]
1
2021-01-19T09:47:03.000Z
2021-01-19T09:47:03.000Z
aiohttp/web_middlewares.py
adamko147/aiohttp
3250c5d75a54e19e2825d0a609f9d9cd4bf62087
[ "Apache-2.0" ]
102
2020-12-27T22:15:13.000Z
2022-03-01T08:08:48.000Z
aiohttp/web_middlewares.py
adamko147/aiohttp
3250c5d75a54e19e2825d0a609f9d9cd4bf62087
[ "Apache-2.0" ]
null
null
null
import re import warnings from typing import TYPE_CHECKING, Awaitable, Callable, Tuple, Type, TypeVar from .web_exceptions import HTTPMove, HTTPPermanentRedirect from .web_request import Request from .web_response import StreamResponse from .web_urldispatcher import SystemRoute __all__ = ( "middleware", "norm...
34.039683
87
0.666356
import re import warnings from typing import TYPE_CHECKING, Awaitable, Callable, Tuple, Type, TypeVar from .web_exceptions import HTTPMove, HTTPPermanentRedirect from .web_request import Request from .web_response import StreamResponse from .web_urldispatcher import SystemRoute __all__ = ( "middleware", "norm...
true
true
1c30ba3a1c9043eb7ed6e22de92fb59ddc738c90
2,062
py
Python
python/lvmnps/switch/outlet.py
sdss/npsactor
45377dff33bf37c92c4b4524d9de60697a5392bc
[ "BSD-3-Clause" ]
1
2021-06-03T04:00:34.000Z
2021-06-03T04:00:34.000Z
python/lvmnps/switch/outlet.py
sdss/npsactor
45377dff33bf37c92c4b4524d9de60697a5392bc
[ "BSD-3-Clause" ]
11
2021-07-01T17:40:36.000Z
2021-11-02T04:37:21.000Z
python/lvmnps/switch/outlet.py
sdss/npsactor
45377dff33bf37c92c4b4524d9de60697a5392bc
[ "BSD-3-Clause" ]
2
2021-08-03T04:15:58.000Z
2021-10-05T11:16:00.000Z
# -*- coding: utf-8 -*- # # @Author: Florian Briegel (briegel@mpia.de) # @Date: 2021-06-22 # @Filename: lvmnps/switch/outlet.py # @License: BSD 3-clause (http://www.opensource.org/licenses/BSD-3-Clause) class Outlet(object): """Outlet class to manage the power switch. Parameters ---------- swname ...
27.864865
85
0.576625
class Outlet(object): def __init__(self, swname, name, portnum, description, state): self.swname = swname self.name = name if name else f"{swname}.port{portnum}" self.portnum = portnum self.description = description if description else f"{swname} Port {portnum}" sel...
true
true
1c30ba60a1d36039802e3cc1dc1016fd00d8e8fb
6,922
py
Python
tools/test/topos/attmplsfast.py
wuwenbin2/onos_1.6_update
f49cc2440a613c1ec95be0eea9af941b777b3641
[ "Apache-2.0" ]
13
2017-08-04T02:16:10.000Z
2019-11-27T16:18:50.000Z
tools/test/topos/attmplsfast.py
maheshraju-Huawei/actn
8402c2a73758f84daac597958abfd9546cb198be
[ "Apache-2.0" ]
10
2017-10-04T08:29:08.000Z
2020-03-06T21:02:30.000Z
tools/test/topos/attmplsfast.py
maheshraju-Huawei/actn
8402c2a73758f84daac597958abfd9546cb198be
[ "Apache-2.0" ]
9
2018-06-27T09:22:36.000Z
2021-06-29T12:06:24.000Z
#!/usr/bin/env python """ """ from mininet.topo import Topo from mininet.net import Mininet from mininet.node import RemoteController from mininet.node import Node from mininet.node import CPULimitedHost from mininet.link import TCLink from mininet.cli import CLI from mininet.log import setLogLevel from mininet.util i...
38.032967
63
0.572811
from mininet.topo import Topo from mininet.net import Mininet from mininet.node import RemoteController from mininet.node import Node from mininet.node import CPULimitedHost from mininet.link import TCLink from mininet.cli import CLI from mininet.log import setLogLevel from mininet.util import dumpNodeConnections cl...
true
true
1c30bacf1d335c67d4a55a7a573794f559720b25
17,581
py
Python
lib/python2.7/site-packages/openopt/solvers/UkrOpt/lincher_oo.py
wangyum/anaconda
6e5a0dbead3327661d73a61e85414cf92aa52be6
[ "Apache-2.0", "BSD-3-Clause" ]
5
2017-01-23T16:23:43.000Z
2022-01-20T16:14:06.000Z
lib/python2.7/site-packages/openopt/solvers/UkrOpt/lincher_oo.py
wangyum/anaconda
6e5a0dbead3327661d73a61e85414cf92aa52be6
[ "Apache-2.0", "BSD-3-Clause" ]
1
2015-04-24T06:46:25.000Z
2015-04-24T06:46:25.000Z
lib/python2.7/site-packages/openopt/solvers/UkrOpt/lincher_oo.py
wangyum/anaconda
6e5a0dbead3327661d73a61e85414cf92aa52be6
[ "Apache-2.0", "BSD-3-Clause" ]
8
2016-05-30T13:35:17.000Z
2021-06-15T22:24:29.000Z
__docformat__ = "restructuredtext en" from numpy import diag, ones, inf, any, copy, sqrt, vstack, concatenate, asarray, nan, where, array, zeros, exp, isfinite from openopt.kernel.baseSolver import * from openopt import LP, QP, NLP, LLSP, NSP from openopt.kernel.ooMisc import WholeRepr2LinConst #from scipy.optimize i...
39.155902
169
0.505204
__docformat__ = "restructuredtext en" from numpy import diag, ones, inf, any, copy, sqrt, vstack, concatenate, asarray, nan, where, array, zeros, exp, isfinite from openopt.kernel.baseSolver import * from openopt import LP, QP, NLP, LLSP, NSP from openopt.kernel.ooMisc import WholeRepr2LinConst from numpy import ar...
false
true
1c30bad2d352bf9d602223667dd3a7db097949ed
4,347
py
Python
src/sage/server/notebook/colorize.py
bopopescu/sage-5
9d85b34956ca2edd55af307f99c5d3859acd30bf
[ "BSL-1.0" ]
2
2021-08-20T00:30:35.000Z
2021-11-17T10:54:00.000Z
src/sage/server/notebook/colorize.py
bopopescu/sage-5
9d85b34956ca2edd55af307f99c5d3859acd30bf
[ "BSL-1.0" ]
null
null
null
src/sage/server/notebook/colorize.py
bopopescu/sage-5
9d85b34956ca2edd55af307f99c5d3859acd30bf
[ "BSL-1.0" ]
null
null
null
# This file is part of the OLD Sage notebook and is NOT actively developed, # maintained, or supported. As of Sage v4.1.2, all notebook development has # moved to the separate Sage Notebook project: # # http://nb.sagemath.org/ # # The new notebook is installed in Sage as an spkg (e.g., sagenb-0.3.spkg). # # Please vis...
30.1875
84
0.576259
# obtaining the latest source code. For notebook-related development and support, # please consult the sage-notebook discussion group: # # http://groups.google.com/group/sage-notebook """nodoctest """ # -*- coding: utf-8 -*- ############################################################################# # ...
false
true
1c30bade337263b732d8b603b46dd7115aea1503
22,923
gyp
Python
electron.gyp
yuit/electron
0732329a387badc9e7cd5473e84fc696f0ec8f24
[ "MIT" ]
1
2021-04-04T20:41:11.000Z
2021-04-04T20:41:11.000Z
electron.gyp
ezaruba/electron
dfab1043d98067b43b45d8dcbe9d0b84d4820555
[ "MIT" ]
null
null
null
electron.gyp
ezaruba/electron
dfab1043d98067b43b45d8dcbe9d0b84d4820555
[ "MIT" ]
null
null
null
{ 'variables': { 'project_name%': 'electron', 'product_name%': 'Electron', 'company_name%': 'GitHub, Inc', 'company_abbr%': 'github', 'version%': '1.7.2', 'js2c_input_dir': '<(SHARED_INTERMEDIATE_DIR)/js2c', }, 'includes': [ 'filenames.gypi', 'vendor/native_mate/native_mate_files.g...
33.513158
115
0.466344
{ 'variables': { 'project_name%': 'electron', 'product_name%': 'Electron', 'company_name%': 'GitHub, Inc', 'company_abbr%': 'github', 'version%': '1.7.2', 'js2c_input_dir': '<(SHARED_INTERMEDIATE_DIR)/js2c', }, 'includes': [ 'filenames.gypi', 'vendor/native_mate/native_mate_files.g...
true
true
1c30bb1b26f525b8a9396a9874bf4a1073fc38c1
2,674
py
Python
Contrib/fraggle/fraggle.py
docking-org/rdk
6eb710254f027b348a8e3089e6a92c3d40de0949
[ "PostgreSQL" ]
1
2019-01-23T06:02:24.000Z
2019-01-23T06:02:24.000Z
Contrib/fraggle/fraggle.py
Mike575/rdkit
373a89021e478f878c6011a201e3fb8f4a122093
[ "PostgreSQL" ]
null
null
null
Contrib/fraggle/fraggle.py
Mike575/rdkit
373a89021e478f878c6011a201e3fb8f4a122093
[ "PostgreSQL" ]
2
2017-12-04T02:28:18.000Z
2018-11-29T01:18:46.000Z
# Copyright (c) 2013, GlaxoSmithKline Research & Development Ltd. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # ...
41.138462
102
0.727749
from __future__ import print_function from rdkit import Chem from rdkit.Chem.Fraggle import FraggleSim if __name__ == '__main__': import sys, re if (len(sys.argv) >= 2): print( "Program to run the first part of Fraggle. Program splits the molecule\nready for the search\n") ...
true
true
1c30bb80b43261276a5ace772b9f2200beeadedf
1,253
py
Python
test/functional/rpc_deprecated.py
vipcore/VIP-2
b5328c58076ee13fc44a58ff7229629546310bee
[ "MIT" ]
41
2015-02-25T20:29:32.000Z
2021-05-10T11:54:32.000Z
test/functional/rpc_deprecated.py
vipcore/VIP-2
b5328c58076ee13fc44a58ff7229629546310bee
[ "MIT" ]
42
2017-09-12T03:09:56.000Z
2021-01-27T18:43:28.000Z
test/functional/rpc_deprecated.py
vipcore/VIP-2
b5328c58076ee13fc44a58ff7229629546310bee
[ "MIT" ]
37
2015-10-02T19:33:04.000Z
2021-04-21T22:26:23.000Z
#!/usr/bin/env python3 # Copyright (c) 2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test deprecation of RPC calls.""" from test_framework.test_framework import PivxTestFramework from test_fram...
44.75
123
0.729449
from test_framework.test_framework import PivxTestFramework from test_framework.util import assert_raises_rpc_error class DeprecatedRpcTest(PivxTestFramework): def set_test_params(self): self.num_nodes = 2 self.setup_clean_chain = True self.extra_args = [[], ["-deprecatedrpc=estimatefee...
true
true
1c30bc9d855f28bcd1881acd9ddb9e5ac731c364
286
py
Python
flash/text/seq2seq/__init__.py
Isaac-Flath/lightning-flash
320f87707587d92a13c8831778864b33af4fe421
[ "Apache-2.0" ]
2
2021-04-23T11:02:21.000Z
2021-04-23T11:22:19.000Z
flash/text/seq2seq/__init__.py
Isaac-Flath/lightning-flash
320f87707587d92a13c8831778864b33af4fe421
[ "Apache-2.0" ]
1
2021-06-16T14:46:06.000Z
2021-06-16T14:46:06.000Z
flash/text/seq2seq/__init__.py
Isaac-Flath/lightning-flash
320f87707587d92a13c8831778864b33af4fe421
[ "Apache-2.0" ]
3
2021-06-03T10:03:04.000Z
2021-08-08T21:49:16.000Z
from flash.text.seq2seq.core import Seq2SeqData, Seq2SeqFreezeEmbeddings, Seq2SeqTask # noqa: F401 from flash.text.seq2seq.summarization import SummarizationData, SummarizationTask # noqa: F401 from flash.text.seq2seq.translation import TranslationData, TranslationTask # noqa: F401
71.5
99
0.835664
from flash.text.seq2seq.core import Seq2SeqData, Seq2SeqFreezeEmbeddings, Seq2SeqTask from flash.text.seq2seq.summarization import SummarizationData, SummarizationTask from flash.text.seq2seq.translation import TranslationData, TranslationTask
true
true
1c30bd8249fa9f37d5092c64eaf31f35ff3b5262
2,372
py
Python
menu.py
melancholiaque/GLaDOS-voice-db
53af158ef1114a6a58f29abf16980bb91d53a190
[ "BSD-2-Clause" ]
1
2020-05-24T02:56:08.000Z
2020-05-24T02:56:08.000Z
menu.py
melancholiaque/GLaDOS-voice-db
53af158ef1114a6a58f29abf16980bb91d53a190
[ "BSD-2-Clause" ]
null
null
null
menu.py
melancholiaque/GLaDOS-voice-db
53af158ef1114a6a58f29abf16980bb91d53a190
[ "BSD-2-Clause" ]
null
null
null
from os import system, name import curses import threading from cursesmenu.items import SubmenuItem as SubmenuItem_, FunctionItem from cursesmenu import SelectionMenu as SelectionMenu_, CursesMenu as CursesMenu_ from utils import get_audio, play, save root = None class SubmenuItem(SubmenuItem_): def action(se...
25.505376
81
0.62774
from os import system, name import curses import threading from cursesmenu.items import SubmenuItem as SubmenuItem_, FunctionItem from cursesmenu import SelectionMenu as SelectionMenu_, CursesMenu as CursesMenu_ from utils import get_audio, play, save root = None class SubmenuItem(SubmenuItem_): def action(se...
true
true
1c30be9d589430eabcc5dc5c3f24789c6ab46895
798
py
Python
test/types/deformable_mirror_status_test.py
lbusoni/palpao
95ffeb3733437ab9d96ea47c4a266f73142acca6
[ "MIT" ]
null
null
null
test/types/deformable_mirror_status_test.py
lbusoni/palpao
95ffeb3733437ab9d96ea47c4a266f73142acca6
[ "MIT" ]
2
2022-02-24T23:03:47.000Z
2022-02-25T00:31:52.000Z
test/types/deformable_mirror_status_test.py
lbusoni/palpao
95ffeb3733437ab9d96ea47c4a266f73142acca6
[ "MIT" ]
null
null
null
#!/usr/bin/env python import unittest from plico_dm.types.deformable_mirror_status import DeformableMirrorStatus class DeformableMirrorStatusTest(unittest.TestCase): def testHappyPath(self): numberOfActs = 10 numberOfModes = 8 commandCounter = 42 reference_command_tag = 'sadf' ...
29.555556
77
0.709273
import unittest from plico_dm.types.deformable_mirror_status import DeformableMirrorStatus class DeformableMirrorStatusTest(unittest.TestCase): def testHappyPath(self): numberOfActs = 10 numberOfModes = 8 commandCounter = 42 reference_command_tag = 'sadf' status = Deforma...
true
true
1c30bed552339a9de7078dde6af3ecf321c8d5ac
925
py
Python
src/orders/admin/orders/filters.py
boochamoocha/education-backend
c6ffb0c00bc066c8f1e0a8c0ffe4d0215c7c416a
[ "MIT" ]
null
null
null
src/orders/admin/orders/filters.py
boochamoocha/education-backend
c6ffb0c00bc066c8f1e0a8c0ffe4d0215c7c416a
[ "MIT" ]
103
2021-05-02T15:04:14.000Z
2021-07-27T00:20:08.000Z
src/orders/admin/orders/filters.py
boochamoocha/education-backend
c6ffb0c00bc066c8f1e0a8c0ffe4d0215c7c416a
[ "MIT" ]
null
null
null
from django.utils.translation import gettext_lazy as _ from django.utils.translation import pgettext_lazy from app.admin import admin from orders.models.order import OrderQuerySet class OrderStatusFilter(admin.SimpleListFilter): title = pgettext_lazy('orders', 'status') parameter_name = 'status' def loo...
28.030303
74
0.632432
from django.utils.translation import gettext_lazy as _ from django.utils.translation import pgettext_lazy from app.admin import admin from orders.models.order import OrderQuerySet class OrderStatusFilter(admin.SimpleListFilter): title = pgettext_lazy('orders', 'status') parameter_name = 'status' def loo...
true
true
1c30bf4abaa673b92d7feef0e811a129cea14372
3,740
py
Python
utility_functions.py
StarryPy/StarryPy-Historic
b9dbd552b8c4631a5a8e9dda98b7ba447eca59da
[ "WTFPL" ]
38
2015-02-12T11:57:59.000Z
2018-11-15T16:03:45.000Z
utility_functions.py
StarryPy/StarryPy-Historic
b9dbd552b8c4631a5a8e9dda98b7ba447eca59da
[ "WTFPL" ]
68
2015-02-05T23:29:47.000Z
2017-12-27T08:26:25.000Z
utility_functions.py
StarryPy/StarryPy-Historic
b9dbd552b8c4631a5a8e9dda98b7ba447eca59da
[ "WTFPL" ]
21
2015-02-06T18:58:21.000Z
2017-12-24T20:08:59.000Z
import collections import logging import os import errno from construct import Container from twisted.python.filepath import FilePath import packets path = FilePath(os.path.dirname(os.path.abspath(__file__))) logger = logging.getLogger('starrypy.utility_functions') class Singleton(type): _instances = {} ...
25.100671
75
0.559358
import collections import logging import os import errno from construct import Container from twisted.python.filepath import FilePath import packets path = FilePath(os.path.dirname(os.path.abspath(__file__))) logger = logging.getLogger('starrypy.utility_functions') class Singleton(type): _instances = {} ...
true
true
1c30bf60fe627958914fb6eff5675a7d40d2cd1a
8,056
py
Python
checkio/Scientific Expedition/Network Attack/test_network_attack.py
KenMercusLai/checkio
c7702221e1bc0b0b30425859ffa6c09722949d65
[ "MIT" ]
39
2015-02-09T13:24:12.000Z
2019-05-16T17:51:19.000Z
checkio/Scientific Expedition/Network Attack/test_network_attack.py
KenMercusLai/checkio
c7702221e1bc0b0b30425859ffa6c09722949d65
[ "MIT" ]
1
2019-10-21T16:18:14.000Z
2019-10-21T16:18:14.000Z
checkio/Scientific Expedition/Network Attack/test_network_attack.py
KenMercusLai/checkio
c7702221e1bc0b0b30425859ffa6c09722949d65
[ "MIT" ]
22
2015-01-30T18:00:05.000Z
2021-05-22T02:57:23.000Z
import unittest from network_attack import capture class Tests(unittest.TestCase): TESTS = { "Basics": [ { "input": [ [0, 1, 0, 1, 0, 1], [1, 8, 1, 0, 0, 0], [0, 1, 2, 0, 0, 1], [1, 0, 0, 1, 1, 0],...
34.135593
87
0.204071
import unittest from network_attack import capture class Tests(unittest.TestCase): TESTS = { "Basics": [ { "input": [ [0, 1, 0, 1, 0, 1], [1, 8, 1, 0, 0, 0], [0, 1, 2, 0, 0, 1], [1, 0, 0, 1, 1, 0],...
true
true
1c30c025cb5c20abc6f86555d6f65128044329b4
91,665
py
Python
darwinpush/xb/raw/binding_.py
fasteroute/darwinpush
c919049e076cbdf61007fc9cc1c5a0271cde7929
[ "Apache-2.0" ]
3
2015-08-15T15:38:06.000Z
2019-08-06T11:09:32.000Z
darwinpush/xb/raw/binding_.py
grundleborg/darwinpush
c919049e076cbdf61007fc9cc1c5a0271cde7929
[ "Apache-2.0" ]
34
2015-07-22T13:47:16.000Z
2015-08-12T17:40:23.000Z
darwinpush/xb/raw/binding_.py
grundleborg/darwinpush
c919049e076cbdf61007fc9cc1c5a0271cde7929
[ "Apache-2.0" ]
1
2015-08-30T15:26:24.000Z
2015-08-30T15:26:24.000Z
# ./darwinpush/xb/raw/binding_.py # -*- coding: utf-8 -*- # PyXB bindings for NM:0b338ff90207234600b9b9432e9e9a2f47008914 # Generated 2015-04-23 16:42:14.515862 by PyXB version 1.2.4 using Python 3.4.1.final.0 # Namespace http://www.thalesgroup.com/rtti/XmlTimetable/v8 from __future__ import unicode_literals import py...
64.056604
353
0.75741
from __future__ import unicode_literals import pyxb import pyxb.binding import pyxb.binding.saxer import io import pyxb.utils.utility import pyxb.utils.domutils import sys import pyxb.utils.six as _six _GenerationUID = pyxb.utils.utility.UniqueIdentifier('urn:uuid:5049f1de-e9cf-11e4-bb50-a0481ca50ab0') _PyXBV...
true
true