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
1c418c2e5c01c544657d9dfe132516af41943430
3,027
py
Python
survey_app_repo/survey/tests/factory.py
devbkhadka/survey_app
51c4a4844e57f771d1157be8a8307552d390df67
[ "Apache-1.1" ]
1
2020-01-12T06:48:28.000Z
2020-01-12T06:48:28.000Z
survey_app_repo/survey/tests/factory.py
devbkhadka/survey_app
51c4a4844e57f771d1157be8a8307552d390df67
[ "Apache-1.1" ]
null
null
null
survey_app_repo/survey/tests/factory.py
devbkhadka/survey_app
51c4a4844e57f771d1157be8a8307552d390df67
[ "Apache-1.1" ]
null
null
null
'''Utility function to populate data needed for tests''' from ..models import Survey, Question, QuestionTypes, SurveyResponse, ResponseText RAW_SURVEYS = [ { 'title': 'Your favourite candidate', 'summary': 'Answer questions like who is your favourite candidate and why', 'published_date': '...
31.863158
109
0.648827
from ..models import Survey, Question, QuestionTypes, SurveyResponse, ResponseText RAW_SURVEYS = [ { 'title': 'Your favourite candidate', 'summary': 'Answer questions like who is your favourite candidate and why', 'published_date': '2019-4-20 00:00+0545', }, { 'title': 'You...
true
true
1c418cfcc6d1ee460a06ff697a614c2418050041
393
py
Python
yatube/yatube/urls.py
themasterid/hw02_community
8e9980df3f10bb00ee521d92079313dafa9af066
[ "MIT" ]
null
null
null
yatube/yatube/urls.py
themasterid/hw02_community
8e9980df3f10bb00ee521d92079313dafa9af066
[ "MIT" ]
null
null
null
yatube/yatube/urls.py
themasterid/hw02_community
8e9980df3f10bb00ee521d92079313dafa9af066
[ "MIT" ]
null
null
null
# yatube/urls.py from django.contrib import admin from django.urls import include, path urlpatterns = [ path('auth/', include('users.urls', namespace='users')), path('auth/', include('django.contrib.auth.urls')), path('admin/', admin.site.urls), path('', include('posts.urls', namespace='index')), #...
32.75
75
0.659033
from django.contrib import admin from django.urls import include, path urlpatterns = [ path('auth/', include('users.urls', namespace='users')), path('auth/', include('django.contrib.auth.urls')), path('admin/', admin.site.urls), path('', include('posts.urls', namespace='index')), ]
true
true
1c418d5da30c5843481756efb37736bb9b1e5529
621
py
Python
problems/general_abbr.py
stachenov/PyLeetCode
cb13700d428854eff46a762542a63d691578d5b6
[ "Unlicense" ]
null
null
null
problems/general_abbr.py
stachenov/PyLeetCode
cb13700d428854eff46a762542a63d691578d5b6
[ "Unlicense" ]
null
null
null
problems/general_abbr.py
stachenov/PyLeetCode
cb13700d428854eff46a762542a63d691578d5b6
[ "Unlicense" ]
null
null
null
class Solution(object): def generateAbbreviations(self, word): """ :type word: str :rtype: List[str] """ def generate(abbr, pos): if pos == len(word): yield abbr else: if not abbr or not abbr[-1].isdigit(): ...
34.5
71
0.431562
class Solution(object): def generateAbbreviations(self, word): def generate(abbr, pos): if pos == len(word): yield abbr else: if not abbr or not abbr[-1].isdigit(): for i in xrange(pos + 1, len(word) + 1): fo...
true
true
1c418d6be54f413656434d3aadc217088071f2b0
535
py
Python
main_app/migrations/0002_alter_golfgroup_members.py
makmizi15/golfhub
9073a990e2ddebf1bc346d3d49ccd6c4dd8d79ce
[ "MIT" ]
null
null
null
main_app/migrations/0002_alter_golfgroup_members.py
makmizi15/golfhub
9073a990e2ddebf1bc346d3d49ccd6c4dd8d79ce
[ "MIT" ]
null
null
null
main_app/migrations/0002_alter_golfgroup_members.py
makmizi15/golfhub
9073a990e2ddebf1bc346d3d49ccd6c4dd8d79ce
[ "MIT" ]
null
null
null
# Generated by Django 3.2.9 on 2021-11-19 08:47 from django.conf import settings from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('main_app', '0001_initial'), ] operations = [ ...
25.47619
105
0.657944
from django.conf import settings from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('main_app', '0001_initial'), ] operations = [ migrations.AlterField( model_n...
true
true
1c418e20e64c922867e06acee53a789cc13d54f7
2,416
py
Python
alien_fullfunction/scoreboard.py
yiyidhuang/PythonCrashCrouse2nd
3512f9ab8fcf32c6145604a37e2a62feddf174d1
[ "MIT" ]
null
null
null
alien_fullfunction/scoreboard.py
yiyidhuang/PythonCrashCrouse2nd
3512f9ab8fcf32c6145604a37e2a62feddf174d1
[ "MIT" ]
null
null
null
alien_fullfunction/scoreboard.py
yiyidhuang/PythonCrashCrouse2nd
3512f9ab8fcf32c6145604a37e2a62feddf174d1
[ "MIT" ]
null
null
null
import pygame.font from pygame.sprite import Group from ship import Ship class Scoreboard: def __init__(self, ai_game): self.ai_game = ai_game self.screen = ai_game.screen self.screen_rect = self.screen.get_rect() self.settings = ai_game.settings self.stats = ai_game.stats...
35.529412
111
0.647351
import pygame.font from pygame.sprite import Group from ship import Ship class Scoreboard: def __init__(self, ai_game): self.ai_game = ai_game self.screen = ai_game.screen self.screen_rect = self.screen.get_rect() self.settings = ai_game.settings self.stats = ai_game.stats...
true
true
1c418e5cf2168c58612ee32837893a2edc13243f
23,804
py
Python
python/tvm/target/target.py
embodyme/tvm
3c05eb6a4bc026b7b194e6708d96b2dc9eea070a
[ "Apache-2.0" ]
8
2021-08-02T14:17:39.000Z
2021-11-16T12:37:51.000Z
python/tvm/target/target.py
redbopo/tvm
b54beed37ca2baad6002990b014a2119223e0900
[ "Apache-2.0" ]
null
null
null
python/tvm/target/target.py
redbopo/tvm
b54beed37ca2baad6002990b014a2119223e0900
[ "Apache-2.0" ]
7
2021-08-03T14:24:00.000Z
2021-11-11T04:34:37.000Z
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
35.528358
100
0.596286
import json import os import re import warnings import tvm._ffi from tvm._ffi import register_func as _register_func from tvm.runtime import Object from . import _ffi_api @tvm._ffi.register_object class TargetKind(Object): @property def options(self): return dict(_ffi_api.ListTarget...
true
true
1c418edd52415a476c4b7126f0a4eb8c8d888556
3,345
py
Python
source/position/position.py
homeoffice-ys/EliteQuant_Python
4384494b9abe2b2622752bd59532efcdc034bc1c
[ "Apache-2.0" ]
51
2019-02-01T19:43:37.000Z
2022-03-16T09:07:03.000Z
source/position/position.py
ajmal017/EliteQuant_Python
28ed64d742d9f010836d4070cd26bab78d9623d0
[ "Apache-2.0" ]
2
2019-02-23T18:54:22.000Z
2019-11-09T01:30:32.000Z
source/position/position.py
ajmal017/EliteQuant_Python
28ed64d742d9f010836d4070cd26bab78d9623d0
[ "Apache-2.0" ]
35
2019-02-08T02:00:31.000Z
2022-03-01T23:17:00.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- from ..util.util_func import retrieve_multiplier_from_full_symbol class Position(object): def __init__(self, full_symbol, average_price, size, realized_pnl=0): """ Position includes zero/closed security """ ## TODO: add cumulative_commis...
51.461538
115
0.560837
from ..util.util_func import retrieve_multiplier_from_full_symbol class Position(object): def __init__(self, full_symbol, average_price, size, realized_pnl=0): = average_price self.size = size self.realized_pnl = 0 self.unrealized_pnl = 0 self.api = '' self.account...
true
true
1c418f004546888f8db9ad78d063e787719b2295
798
py
Python
hypervector/scripts/get.py
ploomber/posts
5f739cf04ff77932c34d5d3ad8d6d94dfe97f051
[ "Apache-2.0" ]
15
2020-11-30T19:31:30.000Z
2022-01-16T15:09:16.000Z
hypervector/scripts/get.py
ploomber/posts
5f739cf04ff77932c34d5d3ad8d6d94dfe97f051
[ "Apache-2.0" ]
3
2022-01-13T03:51:14.000Z
2022-03-12T01:01:41.000Z
hypervector/scripts/get.py
ploomber/posts
5f739cf04ff77932c34d5d3ad8d6d94dfe97f051
[ "Apache-2.0" ]
8
2021-07-28T02:19:00.000Z
2022-02-06T16:03:24.000Z
# --- # jupyter: # jupytext: # text_representation: # extension: .py # format_name: light # format_version: '1.5' # jupytext_version: 1.11.4 # kernelspec: # display_name: Python 3 (ipykernel) # language: python # name: python3 # --- import pandas as pd from sklearn.datasets ...
22.8
78
0.681704
import pandas as pd from sklearn.datasets import load_iris upstream = None product = None df = load_iris(as_frame=True)['frame'] df.head() df.to_csv(product['data'], index=False)
true
true
1c418f3ddc2e63804d591924c6ec31465718f551
19,596
py
Python
python/ccxt/bitforex.py
lottaeouss/ccxt
694fd3dc30154057f6c2310920552329df973031
[ "MIT" ]
null
null
null
python/ccxt/bitforex.py
lottaeouss/ccxt
694fd3dc30154057f6c2310920552329df973031
[ "MIT" ]
2
2019-06-24T02:24:54.000Z
2019-07-03T01:43:45.000Z
python/ccxt/bitforex.py
lottaeouss/ccxt
694fd3dc30154057f6c2310920552329df973031
[ "MIT" ]
1
2019-08-07T15:44:10.000Z
2019-08-07T15:44:10.000Z
# -*- coding: utf-8 -*- # PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN: # https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code from ccxt.base.exchange import Exchange # ----------------------------------------------------------------------------- try: basestri...
36.022059
126
0.414676
ge import Exchange try: basestring except NameError: basestring = str from ccxt.base.errors import ExchangeError from ccxt.base.errors import AuthenticationError from ccxt.base.errors import InsufficientFunds from ccxt.base.errors import OrderNotFound from ccxt.base.errors import DDoSProtection clas...
true
true
1c41907c50737308182a896121ca20a6a7ad4dda
28,565
py
Python
iasi/evaluation.py
Peter42/iasi
fc799d542c2bb80c3f559bc2f9e833ac330a5506
[ "MIT" ]
null
null
null
iasi/evaluation.py
Peter42/iasi
fc799d542c2bb80c3f559bc2f9e833ac330a5506
[ "MIT" ]
3
2019-05-02T12:49:21.000Z
2019-06-12T09:11:00.000Z
iasi/evaluation.py
Peter42/iasi
fc799d542c2bb80c3f559bc2f9e833ac330a5506
[ "MIT" ]
1
2019-10-18T21:33:33.000Z
2019-10-18T21:33:33.000Z
from functools import partial import math import os import luigi import numpy as np import pandas as pd from netCDF4 import Dataset, Group, Variable from sklearn.model_selection import ParameterGrid from iasi.composition import Composition from iasi.compression import CompressDataset, SelectSingleVariable, Decompress...
41.278902
160
0.572729
from functools import partial import math import os import luigi import numpy as np import pandas as pd from netCDF4 import Dataset, Group, Variable from sklearn.model_selection import ParameterGrid from iasi.composition import Composition from iasi.compression import CompressDataset, SelectSingleVariable, Decompress...
true
true
1c4190c63cbc40bfd1c9d373ca0d6076c0b40b36
2,082
py
Python
migrations/0002_pymbawallpage_pymbawallpagelayers.py
andywar65/pymba
119cbab973638c127e6e736b08fdb8235a7537a6
[ "BSD-2-Clause" ]
3
2020-04-20T05:34:30.000Z
2020-11-04T07:25:26.000Z
migrations/0002_pymbawallpage_pymbawallpagelayers.py
andywar65/pymba
119cbab973638c127e6e736b08fdb8235a7537a6
[ "BSD-2-Clause" ]
null
null
null
migrations/0002_pymbawallpage_pymbawallpagelayers.py
andywar65/pymba
119cbab973638c127e6e736b08fdb8235a7537a6
[ "BSD-2-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.11.4 on 2018-02-04 19:28 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion import modelcluster.fields class Migration(migrations.Migration): dependencies = [ ('wagtailimages', '0019_delete_fil...
42.489796
191
0.595581
from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion import modelcluster.fields class Migration(migrations.Migration): dependencies = [ ('wagtailimages', '0019_delete_filter'), ('wagtailcore', '0040_page_draft_title'), ('pymb...
true
true
1c4191007d0a6c4b0419d38678ca62d430bd0f52
184
py
Python
Scripts/django-admin.py
dragonrathony/zed_market
c73f17501608c8fe86692c3c4f6e03fc8ba03286
[ "bzip2-1.0.6" ]
1
2020-06-17T13:45:54.000Z
2020-06-17T13:45:54.000Z
Scripts/django-admin.py
Honey4251996/zed_market
c73f17501608c8fe86692c3c4f6e03fc8ba03286
[ "bzip2-1.0.6" ]
11
2021-03-19T07:55:39.000Z
2022-03-12T00:34:55.000Z
Scripts/django-admin.py
Honey4251996/zed_market
c73f17501608c8fe86692c3c4f6e03fc8ba03286
[ "bzip2-1.0.6" ]
null
null
null
#!d:\projects\eric\python\django\zed-market\dev\zed-market\scripts\python.exe from django.core import management if __name__ == "__main__": management.execute_from_command_line()
30.666667
77
0.788043
from django.core import management if __name__ == "__main__": management.execute_from_command_line()
true
true
1c41911f837ca62f3884f8c0ec85b9f5430f4763
298
py
Python
tests/enums/test_service_module_name.py
jbpratt78/mypy_boto3_builder
be4020782369b34e35f3b6a2117f00d947f3ae24
[ "MIT" ]
null
null
null
tests/enums/test_service_module_name.py
jbpratt78/mypy_boto3_builder
be4020782369b34e35f3b6a2117f00d947f3ae24
[ "MIT" ]
null
null
null
tests/enums/test_service_module_name.py
jbpratt78/mypy_boto3_builder
be4020782369b34e35f3b6a2117f00d947f3ae24
[ "MIT" ]
null
null
null
from mypy_boto3_builder.enums.service_module_name import ServiceModuleName class TestServiceModuleName: def test_properties(self) -> None: assert ServiceModuleName.paginator.file_name == "paginator.py" assert ServiceModuleName.paginator.template_name == "paginator.py.jinja2"
37.25
81
0.788591
from mypy_boto3_builder.enums.service_module_name import ServiceModuleName class TestServiceModuleName: def test_properties(self) -> None: assert ServiceModuleName.paginator.file_name == "paginator.py" assert ServiceModuleName.paginator.template_name == "paginator.py.jinja2"
true
true
1c419190ff52c84309e46af3e38f91362aba2c9c
2,072
py
Python
clients/gui/gui.py
adlerweb/pyprologix
818ec301aee5ff051c415f03308acee96d3c5cd8
[ "MIT" ]
1
2021-01-22T14:35:29.000Z
2021-01-22T14:35:29.000Z
clients/gui/gui.py
adlerweb/pyprologix
818ec301aee5ff051c415f03308acee96d3c5cd8
[ "MIT" ]
null
null
null
clients/gui/gui.py
adlerweb/pyprologix
818ec301aee5ff051c415f03308acee96d3c5cd8
[ "MIT" ]
null
null
null
# helloworld.py import tkinter as tk import pygubu #Folder with hp3478a.py/prologix.py must be in PYTHONPATH #Alternatively copy them to this folder from hp3478a import hp3478a from time import sleep port = "/dev/ttyACM0" test = hp3478a(23, port, debug=True) test.getStatus() class HelloWorldApp: def __ini...
28.383562
74
0.53668
import tkinter as tk import pygubu from hp3478a import hp3478a from time import sleep port = "/dev/ttyACM0" test = hp3478a(23, port, debug=True) test.getStatus() class HelloWorldApp: def __init__(self): self.builder = builder = pygubu.Builder() builder.add_from_file(...
true
true
1c4191c1d2a32493fac86efbe6f1aa2a6fee1ce3
203
py
Python
cassiopeia/datastores/__init__.py
mertkutay/cassiopeia
1c4005f78f216322d179f3465303d105261beab2
[ "MIT" ]
null
null
null
cassiopeia/datastores/__init__.py
mertkutay/cassiopeia
1c4005f78f216322d179f3465303d105261beab2
[ "MIT" ]
null
null
null
cassiopeia/datastores/__init__.py
mertkutay/cassiopeia
1c4005f78f216322d179f3465303d105261beab2
[ "MIT" ]
null
null
null
from .cache import Cache from .riotapi import RiotAPI from .ddragon import DDragon from .ghost import UnloadedGhostStore from .merakianalyticscdn import MerakiAnalyticsCDN from .lolwikia import LolWikia
29
50
0.852217
from .cache import Cache from .riotapi import RiotAPI from .ddragon import DDragon from .ghost import UnloadedGhostStore from .merakianalyticscdn import MerakiAnalyticsCDN from .lolwikia import LolWikia
true
true
1c41931e27ca720f8e8be0a8a09a2bbb093b36d0
11,055
py
Python
cert_tools.py
fizyr/ca-scripts
2b558a04f51392f0884c4c9abf3df9dc0dcf4a7a
[ "BSD-3-Clause" ]
null
null
null
cert_tools.py
fizyr/ca-scripts
2b558a04f51392f0884c4c9abf3df9dc0dcf4a7a
[ "BSD-3-Clause" ]
null
null
null
cert_tools.py
fizyr/ca-scripts
2b558a04f51392f0884c4c9abf3df9dc0dcf4a7a
[ "BSD-3-Clause" ]
null
null
null
# Copyright 2017-2019 Fizyr B.V. - https://fizyr.com # # Redistribution and use in source and binary forms, with or without modification, # are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions and the fol...
30.793872
147
0.739213
import os from datetime import datetime, timedelta from pathlib import Path from typing import Iterable, List, Tuple, Optional, Generator from cryptography import x509 from cryptography.x509.oid import NameOID, ExtendedKeyUsageOID from cryptography.hazmat.primitives import hashes from crypt...
true
true
1c4193c598a6936a19a00092d44a1b489fef5b33
13,515
py
Python
tests/test_seerpy.py
matias-seer/seer-py
fbb018e683817d108f2e1ee3162680de06ce110c
[ "MIT" ]
null
null
null
tests/test_seerpy.py
matias-seer/seer-py
fbb018e683817d108f2e1ee3162680de06ce110c
[ "MIT" ]
null
null
null
tests/test_seerpy.py
matias-seer/seer-py
fbb018e683817d108f2e1ee3162680de06ce110c
[ "MIT" ]
null
null
null
# Copyright 2017,2018 Seer Medical Pty Ltd, Inc. or its affiliates. All Rights Reserved. import json import pathlib from unittest import mock import pytest import pandas as pd from seerpy.seerpy import SeerConnect # having a class is useful to allow patches to be shared across mutliple test functions, but then # p...
36.527027
100
0.658454
import json import pathlib from unittest import mock import pytest import pandas as pd from seerpy.seerpy import SeerConnect TEST_DATA_DIR = pathlib.Path(__file__).parent / "test_data" @mock.patch('seerpy.seerpy.SeerAuth', autospec=True) class TestSeerConnect: def test_success(self, seer_auth): ...
true
true
1c4193dd25e08f5ede3d53f5443722355b2807e2
2,972
py
Python
CalibTracker/SiStripESProducers/test/python/templateCheckAllIOVs_cfg.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
852
2015-01-11T21:03:51.000Z
2022-03-25T21:14:00.000Z
CalibTracker/SiStripESProducers/test/python/templateCheckAllIOVs_cfg.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
30,371
2015-01-02T00:14:40.000Z
2022-03-31T23:26:05.000Z
CalibTracker/SiStripESProducers/test/python/templateCheckAllIOVs_cfg.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
3,240
2015-01-02T05:53:18.000Z
2022-03-31T17:24:21.000Z
from __future__ import print_function def pack(high,low): """pack high,low 32bit unsigned int to one unsigned 64bit long long Note:the print value of result number may appear signed, if the sign bit is used. """ h=high<<32 return (h|low) def secondsFromString(i): """convert from a string in ...
35.380952
105
0.688762
from __future__ import print_function def pack(high,low): h=high<<32 return (h|low) def secondsFromString(i): import time return int(time.mktime(time.strptime(i, "%d/%m/%Y %H:%M:%S"))) def packFromString(i): return pack(secondsFromString(i), 0) def intervalSinceEpoch(i): return( packFromStrin...
true
true
1c419467f0489fbf76fb84c4e1abbc3e19d99fa2
4,519
py
Python
test/test_planner.py
liespace/pyRRTs
11bfefad99218bc9eccd97040355c61d34a1181d
[ "MIT" ]
2
2021-01-22T09:12:49.000Z
2021-05-06T14:22:05.000Z
test/test_planner.py
liespace/pyRRTs
11bfefad99218bc9eccd97040355c61d34a1181d
[ "MIT" ]
null
null
null
test/test_planner.py
liespace/pyRRTs
11bfefad99218bc9eccd97040355c61d34a1181d
[ "MIT" ]
null
null
null
#!/usr/bin/env python from copy import deepcopy import numpy as np import matplotlib.pyplot as plt import cv2 from matplotlib.patches import Polygon from rrts import BiRRTStar, RRTStar from rrts.debugger import Debugger def center2rear(node, wheelbase=2.96): """calculate the coordinate of rear track center accord...
37.658333
117
0.610976
from copy import deepcopy import numpy as np import matplotlib.pyplot as plt import cv2 from matplotlib.patches import Polygon from rrts import BiRRTStar, RRTStar from rrts.debugger import Debugger def center2rear(node, wheelbase=2.96): if not isinstance(node, RRTStar.StateNode): theta, r = node[2] + np....
true
true
1c4194c7656fce73d5fad96f635e541689d9d119
5,576
py
Python
pp/components/mzi.py
flaport/gdsfactory
1f2e844c1fe27b9c6340e2d51500fd3358fa16e5
[ "MIT" ]
8
2020-08-25T11:25:18.000Z
2022-03-27T11:32:11.000Z
pp/components/mzi.py
flaport/gdsfactory
1f2e844c1fe27b9c6340e2d51500fd3358fa16e5
[ "MIT" ]
null
null
null
pp/components/mzi.py
flaport/gdsfactory
1f2e844c1fe27b9c6340e2d51500fd3358fa16e5
[ "MIT" ]
1
2022-03-04T07:03:29.000Z
2022-03-04T07:03:29.000Z
from typing import Callable, Optional import pp from pp.component import Component from pp.components.bend_circular import bend_circular as bend_circular_function from pp.components.mmi1x2 import mmi1x2 as mmi1x2_function from pp.components.waveguide import waveguide as waveguide_function from pp.port import deco_rena...
28.44898
82
0.610294
from typing import Callable, Optional import pp from pp.component import Component from pp.components.bend_circular import bend_circular as bend_circular_function from pp.components.mmi1x2 import mmi1x2 as mmi1x2_function from pp.components.waveguide import waveguide as waveguide_function from pp.port import deco_rena...
true
true
1c419683f0766e2e4f3d5773217d2f84c05adb42
19,486
py
Python
code/apps/Managed Software Center/Managed Software Center/AlertController.py
erikng/munki
24dc96512f41fa3fa7a5cf064fbbedc9f2d71e14
[ "Apache-2.0" ]
1
2018-07-25T21:29:43.000Z
2018-07-25T21:29:43.000Z
code/apps/Managed Software Center/Managed Software Center/AlertController.py
bruienne/munki
55936d96ed2f45ede1469873836d61596486020a
[ "Apache-2.0" ]
null
null
null
code/apps/Managed Software Center/Managed Software Center/AlertController.py
bruienne/munki
55936d96ed2f45ede1469873836d61596486020a
[ "Apache-2.0" ]
null
null
null
# encoding: utf-8 # # AlertController.py # Managed Software Center # # Created by Greg Neagle on 2/25/14. # import os #import sys import munki import msclog import MunkiItems from objc import nil from AppKit import * from Foundation import * from PyObjCTools import AppHelper # Disable PyLint complaining about 'i...
48.232673
122
0.605563
import os import munki import msclog import MunkiItems from objc import nil from AppKit import * from Foundation import * from PyObjCTools import AppHelper class AlertController(NSObject): def setWindow_(self, the_window): self.window = the_window def forcedLogoutWarning(self, notificat...
true
true
1c4196b797c7b2af1a73d65d76478c267982039c
2,093
py
Python
dpkt/aoe.py
sergedroz/dpkt
90928c5baaf36e76d8b62a973924af3c96b9e160
[ "BSD-3-Clause" ]
null
null
null
dpkt/aoe.py
sergedroz/dpkt
90928c5baaf36e76d8b62a973924af3c96b9e160
[ "BSD-3-Clause" ]
null
null
null
dpkt/aoe.py
sergedroz/dpkt
90928c5baaf36e76d8b62a973924af3c96b9e160
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """ATA over Ethernet Protocol.""" from __future__ import absolute_import import struct from . import dpkt from .compat import iteritems class AOE(dpkt.Packet): """ATA over Ethernet Protocol. See more about the AOE on https://en.wikipedia.org/wiki/ATA_over_Ethernet Attribute...
22.265957
75
0.553273
from __future__ import absolute_import import struct from . import dpkt from .compat import iteritems class AOE(dpkt.Packet): __hdr__ = ( ('ver_fl', 'B', 0x10), ('err', 'B', 0), ('maj', 'H', 0), ('min', 'B', 0), ('cmd', 'B', 0), ('tag', 'I', 0), ) _cmdsw...
true
true
1c419735e1b86b5592261ddb7ee7d85c8a498907
8,576
py
Python
python/smqtk/representation/data_set/memory_set.py
joshanderson-kw/SMQTK
594e7c733fe7f4e514a1a08a7343293a883a41fc
[ "BSD-3-Clause" ]
82
2015-01-07T15:33:29.000Z
2021-08-11T18:34:05.000Z
python/smqtk/representation/data_set/memory_set.py
joshanderson-kw/SMQTK
594e7c733fe7f4e514a1a08a7343293a883a41fc
[ "BSD-3-Clause" ]
230
2015-04-08T14:36:51.000Z
2022-03-14T17:55:30.000Z
python/smqtk/representation/data_set/memory_set.py
joshanderson-kw/SMQTK
594e7c733fe7f4e514a1a08a7343293a883a41fc
[ "BSD-3-Clause" ]
65
2015-01-04T15:00:16.000Z
2021-11-19T18:09:11.000Z
import threading from six.moves import cPickle as pickle from smqtk.exceptions import ReadOnlyError from smqtk.representation import DataElement, DataSet from smqtk.utils import SimpleTimer from smqtk.utils.configuration import ( from_config_dict, make_default_config, to_config_dict ) from smqtk.utils.dic...
34.304
80
0.626049
import threading from six.moves import cPickle as pickle from smqtk.exceptions import ReadOnlyError from smqtk.representation import DataElement, DataSet from smqtk.utils import SimpleTimer from smqtk.utils.configuration import ( from_config_dict, make_default_config, to_config_dict ) from smqtk.utils.dic...
true
true
1c419981242a0c02bdf3b073d38a4aae22d392bb
11,458
py
Python
openfl/component/director/director.py
katerina-merkulova/openfl
acee1877f7dfc0bf22db60a4eda51040b5b46f47
[ "Apache-2.0" ]
1
2022-03-29T17:17:05.000Z
2022-03-29T17:17:05.000Z
openfl/component/director/director.py
eceisik/openfl
050b8354b698a34b5ef01f0f55f968f52f63f84d
[ "Apache-2.0" ]
null
null
null
openfl/component/director/director.py
eceisik/openfl
050b8354b698a34b5ef01f0f55f968f52f63f84d
[ "Apache-2.0" ]
null
null
null
# Copyright (C) 2020-2021 Intel Corporation # SPDX-License-Identifier: Apache-2.0 """Director module.""" import asyncio import logging import time from collections import defaultdict from pathlib import Path from typing import Iterable from typing import List from typing import Union from .experiment import Experime...
36.724359
99
0.615902
import asyncio import logging import time from collections import defaultdict from pathlib import Path from typing import Iterable from typing import List from typing import Union from .experiment import Experiment from .experiment import ExperimentsRegistry from .experiment import Status logger = logging.getLogg...
true
true
1c419a04555d4fdaff326fd6472ff1513b1436f9
893
py
Python
bukber/admin.py
ppabcd/django-bukber
8a5d272e988a63082977deb5ba026876d4c70ee4
[ "BSD-3-Clause" ]
null
null
null
bukber/admin.py
ppabcd/django-bukber
8a5d272e988a63082977deb5ba026876d4c70ee4
[ "BSD-3-Clause" ]
null
null
null
bukber/admin.py
ppabcd/django-bukber
8a5d272e988a63082977deb5ba026876d4c70ee4
[ "BSD-3-Clause" ]
null
null
null
from admin_totals.admin import ModelAdminTotals from django.contrib import admin from django.db.models import Sum from django.db.models.functions import Coalesce from .models import Kelas, Peserta # Register your models here. class PesertaAdmin(ModelAdminTotals): exclude = ['created_at', 'updated_at'] list_d...
24.805556
71
0.668533
from admin_totals.admin import ModelAdminTotals from django.contrib import admin from django.db.models import Sum from django.db.models.functions import Coalesce from .models import Kelas, Peserta class PesertaAdmin(ModelAdminTotals): exclude = ['created_at', 'updated_at'] list_display = [ 'nama', ...
true
true
1c419a0af3fb5953370a1109197f3b4f8405af08
5,357
py
Python
simpleppt/SimplePPT.py
LouisFaure/simpleppt
466c73fc64b9c4e3bf14b2c46c11d69de31c8a9b
[ "BSD-3-Clause" ]
null
null
null
simpleppt/SimplePPT.py
LouisFaure/simpleppt
466c73fc64b9c4e3bf14b2c46c11d69de31c8a9b
[ "BSD-3-Clause" ]
null
null
null
simpleppt/SimplePPT.py
LouisFaure/simpleppt
466c73fc64b9c4e3bf14b2c46c11d69de31c8a9b
[ "BSD-3-Clause" ]
null
null
null
from typing import Any, Union, Optional, Mapping, Iterable # Meta from typing import Mapping import numpy as np import igraph from sklearn.metrics import pairwise_distances from scipy.sparse import csr_matrix from scipy.sparse.csgraph import shortest_path import pandas as pd import itertools class SimplePPT: """...
32.271084
85
0.550308
from typing import Any, Union, Optional, Mapping, Iterable from typing import Mapping import numpy as np import igraph from sklearn.metrics import pairwise_distances from scipy.sparse import csr_matrix from scipy.sparse.csgraph import shortest_path import pandas as pd import itertools class SimplePPT: def __in...
true
true
1c419a9890ffa661f4b93e3f7cb17869f69aa93e
5,814
py
Python
py/parseMidi.py
Lazersmoke/idawator-hacking
12db250afa6f0192041a233339db535edbc72f86
[ "MIT" ]
null
null
null
py/parseMidi.py
Lazersmoke/idawator-hacking
12db250afa6f0192041a233339db535edbc72f86
[ "MIT" ]
null
null
null
py/parseMidi.py
Lazersmoke/idawator-hacking
12db250afa6f0192041a233339db535edbc72f86
[ "MIT" ]
null
null
null
import numpy as np import matplotlib.pyplot as plt from scipy.optimize import minimize from scipy.io import wavfile from scipy.signal import hilbert from scipy.special import binom from mido import MidiFile import itertools import nonlin fockSize = 10 # Pitch class, octave sizeOfNoteSpec = 12 + 1 sizeOfFockNoteSpec =...
31.770492
128
0.697282
import numpy as np import matplotlib.pyplot as plt from scipy.optimize import minimize from scipy.io import wavfile from scipy.signal import hilbert from scipy.special import binom from mido import MidiFile import itertools import nonlin fockSize = 10 sizeOfNoteSpec = 12 + 1 sizeOfFockNoteSpec = 0 fockOffsets = [] f...
true
true
1c419b03436ca7714cc145a58d60b72d08249e0b
9,376
py
Python
src/software/parse/testall.py
intel/RAAD
9cca9e72ff61658191e30756bb260173d5600102
[ "Intel", "Apache-2.0" ]
null
null
null
src/software/parse/testall.py
intel/RAAD
9cca9e72ff61658191e30756bb260173d5600102
[ "Intel", "Apache-2.0" ]
null
null
null
src/software/parse/testall.py
intel/RAAD
9cca9e72ff61658191e30756bb260173d5600102
[ "Intel", "Apache-2.0" ]
null
null
null
#!/usr/bin/python3 # -*- coding: utf-8 -*- # *****************************************************************************/ # * Authors: Joseph Tarango, Randal Eike # *****************************************************************************/ # @file: testAll.py # This file is based on testSetup.py from Phuong...
40.943231
159
0.620307
from __future__ import absolute_import, division, print_function, unicode_literals import re, os, sys from optparse import OptionParser re.parse.internal.drive_utility import ScanDrives from src.software.parse.internal.drive_utility import driveList elemetry_util import openReadFile from src.software...
true
true
1c419b871f3fff1ebd2e35764f5e998c4986bced
3,951
py
Python
importio2/extractor_util.py
import-io/import-io-api-python
5c838a357742233e714b2ccfd19d25c18531cfa3
[ "Apache-2.0" ]
1
2021-08-18T03:27:40.000Z
2021-08-18T03:27:40.000Z
importio2/extractor_util.py
import-io/import-io-api-python
5c838a357742233e714b2ccfd19d25c18531cfa3
[ "Apache-2.0" ]
null
null
null
importio2/extractor_util.py
import-io/import-io-api-python
5c838a357742233e714b2ccfd19d25c18531cfa3
[ "Apache-2.0" ]
2
2021-09-13T14:28:50.000Z
2021-09-27T17:56:21.000Z
# # Copyright 2017 Import.io # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
37.273585
118
0.586434
import logging from datetime import datetime from time import sleep from importio2 import CrawlRunAPI from importio2 import ExtractorAPI logger = logging.getLogger(__name__) class ExtractorUtilities(object): def __init__(self): self.api = ExtractorAPI() def crawl_run_active(self, ext...
true
true
1c419baebb28d70b2d3ce8be1c6f2f65b0b07eef
821
py
Python
runtests.py
funkybob/django-reformation
8c6ae3f6091c48ba4079e017663b2c9a15a91b9f
[ "BSD-3-Clause" ]
1
2019-06-27T13:24:08.000Z
2019-06-27T13:24:08.000Z
runtests.py
funkybob/django-reformation
8c6ae3f6091c48ba4079e017663b2c9a15a91b9f
[ "BSD-3-Clause" ]
null
null
null
runtests.py
funkybob/django-reformation
8c6ae3f6091c48ba4079e017663b2c9a15a91b9f
[ "BSD-3-Clause" ]
null
null
null
import os, sys from django.conf import settings DIRNAME = os.path.dirname(__file__) settings.configure( DEBUG = True, DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': os.path.join(DIRNAME, 'reformation-test.db'), } }, INSTALLED_APPS = ('...
24.878788
91
0.638246
import os, sys from django.conf import settings DIRNAME = os.path.dirname(__file__) settings.configure( DEBUG = True, DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': os.path.join(DIRNAME, 'reformation-test.db'), } }, INSTALLED_APPS = ('...
true
true
1c419db96e522d6532947c03991186fa54405f97
7,079
py
Python
rest_api/simple_supply_rest_api/database.py
elyssa12/education-sawtooth-simple-supply
52a669db2b30a6a506ceac278378a8161a1c6718
[ "Apache-2.0" ]
null
null
null
rest_api/simple_supply_rest_api/database.py
elyssa12/education-sawtooth-simple-supply
52a669db2b30a6a506ceac278378a8161a1c6718
[ "Apache-2.0" ]
null
null
null
rest_api/simple_supply_rest_api/database.py
elyssa12/education-sawtooth-simple-supply
52a669db2b30a6a506ceac278378a8161a1c6718
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 Intel 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 in wri...
34.871921
80
0.573527
import asyncio import logging import aiopg import psycopg2 from psycopg2.extras import RealDictCursor LATEST_BLOCK_NUM = """ SELECT max(block_num) FROM blocks """ LOGGER = logging.getLogger(__name__) class Database(object): def __init__(self, host, port, name, user, password, loop): self...
true
true
1c419de856ffae73049f83b1158780a2791cd626
1,129
py
Python
sherlockpipe/objectinfo/MissionFfiCoordsObjectInfo.py
martindevora/SHERLOCK
5e7492552cbce29e960684a44fd6ad875c8cf60e
[ "MIT" ]
1
2021-01-14T16:44:48.000Z
2021-01-14T16:44:48.000Z
sherlockpipe/objectinfo/MissionFfiCoordsObjectInfo.py
martindevora/SHERLOCK
5e7492552cbce29e960684a44fd6ad875c8cf60e
[ "MIT" ]
null
null
null
sherlockpipe/objectinfo/MissionFfiCoordsObjectInfo.py
martindevora/SHERLOCK
5e7492552cbce29e960684a44fd6ad875c8cf60e
[ "MIT" ]
null
null
null
from sherlockpipe.objectinfo.ObjectInfo import ObjectInfo class MissionFfiCoordsObjectInfo(ObjectInfo): """ Implementation of ObjectInfo to be used to characterize long-cadence objects from TESS by providing the RA and Dec. """ def __init__(self, ra, dec, sectors, initial_mask=None, initial_detrend_per...
40.321429
119
0.693534
from sherlockpipe.objectinfo.ObjectInfo import ObjectInfo class MissionFfiCoordsObjectInfo(ObjectInfo): def __init__(self, ra, dec, sectors, initial_mask=None, initial_detrend_period=None): super().__init__(initial_mask, initial_detrend_period) self.ra = ra self.dec = dec self.secto...
true
true
1c419f1406e615e605e48a658688ee756341eb09
2,316
py
Python
domintell/messages/dio_status.py
yaccri/python-domintell
e8a17c9f25ef071a58dd0656746bde9105ba5f01
[ "MIT" ]
1
2021-12-03T04:29:21.000Z
2021-12-03T04:29:21.000Z
domintell/messages/dio_status.py
yaccri/python-domintell
e8a17c9f25ef071a58dd0656746bde9105ba5f01
[ "MIT" ]
3
2020-09-20T11:50:28.000Z
2021-08-13T10:16:14.000Z
domintell/messages/dio_status.py
yaccri/python-domintell
e8a17c9f25ef071a58dd0656746bde9105ba5f01
[ "MIT" ]
6
2020-10-05T20:23:06.000Z
2021-09-14T07:18:31.000Z
""" DIO (Input / Output) status (to be inherited) :author: Zilvinas Binisevicius <zilvinas@binis.me> """ import json import domintell DIO_COMMAND_CODE = "DIO" class GenericDIOStatusMessage(domintell.Message): """ Generic Digital input & output hybrid module status """ def __init__(self, pinCount=1, a...
26.930233
78
0.567789
import json import domintell DIO_COMMAND_CODE = "DIO" class GenericDIOStatusMessage(domintell.Message): def __init__(self, pinCount=1, address=None): domintell.Message.__init__(self) self.moduleType = DIO_COMMAND_CODE self.pinCount = pinCount self.serialNumber = None self....
true
true
1c419f420ff290d6c2c95b8df409a0fbd916bfc3
221
py
Python
docs/components_page/components/table/kwargs_source.py
benpgreen/dash-bootstrap-components
7853b1db5ea39b1eec52ea42fe90db851b509b02
[ "Apache-2.0" ]
null
null
null
docs/components_page/components/table/kwargs_source.py
benpgreen/dash-bootstrap-components
7853b1db5ea39b1eec52ea42fe90db851b509b02
[ "Apache-2.0" ]
null
null
null
docs/components_page/components/table/kwargs_source.py
benpgreen/dash-bootstrap-components
7853b1db5ea39b1eec52ea42fe90db851b509b02
[ "Apache-2.0" ]
null
null
null
import dash_bootstrap_components as dbc from .simple import table as simple_table table = dbc.Table( simple_table.children, bordered=True, dark=True, hover=True, responsive=True, striped=True, )
17
41
0.714932
import dash_bootstrap_components as dbc from .simple import table as simple_table table = dbc.Table( simple_table.children, bordered=True, dark=True, hover=True, responsive=True, striped=True, )
true
true
1c41a1158d31e47e487665b061224f0ec1c7515f
763
py
Python
srilm/helper.py
tetsuok/py-srilm-interpolator
063d87be16e6c7ec8f9b3b0e4f97e2616ec46b46
[ "BSD-3-Clause" ]
3
2016-05-03T19:05:54.000Z
2017-09-29T03:05:57.000Z
srilm/helper.py
tetsuok/py-srilm-interpolator
063d87be16e6c7ec8f9b3b0e4f97e2616ec46b46
[ "BSD-3-Clause" ]
null
null
null
srilm/helper.py
tetsuok/py-srilm-interpolator
063d87be16e6c7ec8f9b3b0e4f97e2616ec46b46
[ "BSD-3-Clause" ]
null
null
null
# Copyright 2012 Tetsuo Kiso. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. import subprocess def redirect(cmd, out_file): """Emulate redirection. $ cmd > out_file """ try: process = subprocess.Popen(cmd, stdout=subprocess.PIP...
23.84375
59
0.626474
import subprocess def redirect(cmd, out_file): """Emulate redirection. $ cmd > out_file """ try: process = subprocess.Popen(cmd, stdout=subprocess.PIPE, universal_newlines=True) except: print 'ERROR: %s' % ' '.join(cmd) raise (stdout_content, _) = process....
false
true
1c41a26f61032f6198f2787aacb6012cc8cd56f6
1,800
py
Python
setup.py
jonathaneunice/combomethod
554a3ae1c45f156f4bde9b71365ff8fb21c50a13
[ "Apache-2.0" ]
1
2015-10-12T01:42:11.000Z
2015-10-12T01:42:11.000Z
setup.py
jonathaneunice/combomethod
554a3ae1c45f156f4bde9b71365ff8fb21c50a13
[ "Apache-2.0" ]
null
null
null
setup.py
jonathaneunice/combomethod
554a3ae1c45f156f4bde9b71365ff8fb21c50a13
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python from setuptools import setup from codecs import open def lines(text): """ Returns each non-blank line in text enclosed in a list. See https://pypi.org/project/textdata for more sophisticated version. """ return [l.strip() for l in text.strip().splitlines() if l.strip()] se...
35.294118
87
0.651667
from setuptools import setup from codecs import open def lines(text): return [l.strip() for l in text.strip().splitlines() if l.strip()] setup( name='combomethod', version='1.0.12', author='Jonathan Eunice', author_email='jonathan.eunice@gmail.com', description="Decorator indicating a meth...
true
true
1c41a402ce1ea5d220dd14bb8c5656b8c61a0fd9
27,943
py
Python
reactiondataextractor/extractors/conditions.py
dmw51/reactiondataextractor
f7d2ee9a2a7df17ffcf9b33efee2bcb49dfdcbae
[ "MIT" ]
3
2021-09-29T01:33:35.000Z
2022-03-19T09:04:23.000Z
reactiondataextractor/extractors/conditions.py
dmw51/reactiondataextractor
f7d2ee9a2a7df17ffcf9b33efee2bcb49dfdcbae
[ "MIT" ]
4
2021-10-05T06:11:28.000Z
2022-02-23T21:18:32.000Z
reactiondataextractor/extractors/conditions.py
dmw51/reactiondataextractor
f7d2ee9a2a7df17ffcf9b33efee2bcb49dfdcbae
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Conditions ======= This module contains classes and methods for extracting conditions, as well as directly related functions. author: Damian Wilary email: dmw51@cam.ac.uk """ from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals f...
46.963025
123
0.637655
from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals from collections import Counter from itertools import chain import logging from matplotlib.patches import Rectangle import numpy as np import os import re from chemdataextractor.doc import Span from chemda...
true
true
1c41a46a988da3d4e057e2e594df382646f14b9c
24,352
py
Python
nsl/stac/utils.py
nearspacelabs/stac-client-python
d23eb3d991b97f23ea835bf5f9834a7e86886048
[ "Apache-2.0" ]
19
2019-12-09T15:04:40.000Z
2021-12-09T21:46:21.000Z
nsl/stac/utils.py
nearspacelabs/stac-client-python
d23eb3d991b97f23ea835bf5f9834a7e86886048
[ "Apache-2.0" ]
16
2019-11-25T16:54:11.000Z
2021-12-16T15:35:40.000Z
nsl/stac/utils.py
nearspacelabs/stac-client-python
d23eb3d991b97f23ea835bf5f9834a7e86886048
[ "Apache-2.0" ]
3
2019-12-12T08:34:12.000Z
2021-04-13T22:49:59.000Z
# Copyright 2019-20 Near Space Labs # # 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...
45.348231
120
0.650583
import os import datetime import http.client import re from urllib.parse import urlparse from typing import List, Iterator, IO, Union, Dict, Any import boto3 import botocore import botocore.exceptions import botocore.client from google.cloud import storage from google.protobuf import timestamp_pb2, du...
true
true
1c41a62dff4399c2ae042990b71a295d06bd7539
604
py
Python
setup.py
kablekompany/kable-kogs
3fa0937281a9610aa4c10d389d1ae30d61d1fd15
[ "MIT" ]
18
2020-08-25T07:30:22.000Z
2021-12-19T18:46:41.000Z
setup.py
KingPanda0/kable
3679029bc8698033d6bc853a64f8470e3a4d9c54
[ "MIT" ]
24
2020-08-27T06:07:32.000Z
2021-06-20T18:00:38.000Z
setup.py
KingPanda0/kable
3679029bc8698033d6bc853a64f8470e3a4d9c54
[ "MIT" ]
21
2020-08-27T04:33:37.000Z
2021-12-31T12:33:50.000Z
import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="Kable-Kogs", version="1.0.1", author="Trent Kable", author_email="trent@kablekompany.com", description="Cogs for Kr0nos", long_description=long_description, long_description_conten...
27.454545
50
0.660596
import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="Kable-Kogs", version="1.0.1", author="Trent Kable", author_email="trent@kablekompany.com", description="Cogs for Kr0nos", long_description=long_description, long_description_conten...
true
true
1c41a71998f79cd5f6bfbd2b18d1da537dfd7684
65,792
py
Python
gpMgmt/bin/gpmfr.py
lintzc/GPDB
b48c8b97da18f495c10065d0853db87960aebae2
[ "PostgreSQL", "Apache-2.0" ]
null
null
null
gpMgmt/bin/gpmfr.py
lintzc/GPDB
b48c8b97da18f495c10065d0853db87960aebae2
[ "PostgreSQL", "Apache-2.0" ]
null
null
null
gpMgmt/bin/gpmfr.py
lintzc/GPDB
b48c8b97da18f495c10065d0853db87960aebae2
[ "PostgreSQL", "Apache-2.0" ]
1
2018-12-04T09:13:57.000Z
2018-12-04T09:13:57.000Z
#!/usr/bin/env python # # Copyright (c) Greenplum Inc 2013. All Rights Reserved. # # Program for DD Boost Managed File Replication related operations. # The program does not need GPDB running. from datetime import datetime import os import re import signal import subprocess import sys from threading import Event, Thr...
42.917156
116
0.572197
from datetime import datetime import os import re import signal import subprocess import sys from threading import Event, Thread, Timer from decimal import Decimal import time try: from gppylib import gplog, gpsubprocess from gppylib.commands.base import Command from gppylib.db import dbconn from...
false
true
1c41a9a44ac033df15f98746e9d31323224a73a3
2,461
py
Python
setup.py
miigotu/pymediainfo
0ec662b0e2f5d34123e65e01c4c3af92acb91825
[ "MIT" ]
null
null
null
setup.py
miigotu/pymediainfo
0ec662b0e2f5d34123e65e01c4c3af92acb91825
[ "MIT" ]
null
null
null
setup.py
miigotu/pymediainfo
0ec662b0e2f5d34123e65e01c4c3af92acb91825
[ "MIT" ]
null
null
null
#!/usr/bin/env python import os from setuptools import find_packages, setup with open("README.rst") as f: long_description = f.read() data_files = [] bin_files = [] cmdclass = {} bin_license = 'docs/License.html' if os.path.exists(bin_license): data_files.append(('docs', [bin_license])) bin_files.extend...
33.712329
70
0.628606
import os from setuptools import find_packages, setup with open("README.rst") as f: long_description = f.read() data_files = [] bin_files = [] cmdclass = {} bin_license = 'docs/License.html' if os.path.exists(bin_license): data_files.append(('docs', [bin_license])) bin_files.extend(['MediaInfo.dll', 'l...
true
true
1c41a9d2514c2ce9d2e5fb9a3e6c44b1be4b246f
1,407
py
Python
applied_python/applied_python/lib/python2.7/site-packages/pylint/test/functional/redefined_variable_type.py
mith1979/ansible_automation
013dfa67c6d91720b787fadb21de574b6e023a26
[ "Apache-2.0" ]
null
null
null
applied_python/applied_python/lib/python2.7/site-packages/pylint/test/functional/redefined_variable_type.py
mith1979/ansible_automation
013dfa67c6d91720b787fadb21de574b6e023a26
[ "Apache-2.0" ]
1
2016-03-22T13:36:30.000Z
2016-03-22T13:36:30.000Z
applied_python/applied_python/lib/python2.7/site-packages/pylint/test/functional/redefined_variable_type.py
mith1979/ansible_automation
013dfa67c6d91720b787fadb21de574b6e023a26
[ "Apache-2.0" ]
null
null
null
"""Checks variable types aren't redefined within a method or a function""" # pylint: disable=too-few-public-methods, missing-docstring, unused-variable _OK = True class MyClass(object): class Klass(object): def __init__(self): self.var2 = 'var' def __init__(self): self.var = Tru...
25.125
94
0.599147
_OK = True class MyClass(object): class Klass(object): def __init__(self): self.var2 = 'var' def __init__(self): self.var = True self.var1 = 2 self.var2 = 1. self.var1 = 2. self.a_str = "hello" a_str = False (a_str, b_str) = (1,...
true
true
1c41aa776db58a7a73cab29edf0dae007400da3d
14,366
py
Python
Workflow_Scripts/hidata4gxp.py
USGS-Astrogeology/APPL-Tools
ee050355251377c512578f15c541929cd52b0acb
[ "Unlicense" ]
null
null
null
Workflow_Scripts/hidata4gxp.py
USGS-Astrogeology/APPL-Tools
ee050355251377c512578f15c541929cd52b0acb
[ "Unlicense" ]
12
2021-05-19T20:59:23.000Z
2021-07-29T14:45:17.000Z
Workflow_Scripts/hidata4gxp.py
USGS-Astrogeology/APPL-Tools
ee050355251377c512578f15c541929cd52b0acb
[ "Unlicense" ]
2
2022-02-15T17:00:03.000Z
2022-02-23T00:50:22.000Z
#!/usr/bin/env python import sys import os from os import path import argparse import subprocess from pysis import isis from pysis.exceptions import ProcessError import pandas as pd import numpy as np from osgeo import gdal, ogr, osr import xml.etree.ElementTree as ET from xml.etree.ElementTree import ElementTree from...
37.905013
137
0.626062
import sys import os from os import path import argparse import subprocess from pysis import isis from pysis.exceptions import ProcessError import pandas as pd import numpy as np from osgeo import gdal, ogr, osr import xml.etree.ElementTree as ET from xml.etree.ElementTree import ElementTree from appl_tools.config im...
true
true
1c41aab6b9af6332cfe07944e760c6130c5d4b4e
27,609
py
Python
processMapWithOriginalResolution.py
thp-comnets/zyxt
c7cddb917ba225a677fb6101d155537f56e16ea0
[ "Apache-2.0" ]
2
2019-04-07T10:23:36.000Z
2020-09-22T22:17:36.000Z
processMapWithOriginalResolution.py
thp-comnets/zyxt
c7cddb917ba225a677fb6101d155537f56e16ea0
[ "Apache-2.0" ]
null
null
null
processMapWithOriginalResolution.py
thp-comnets/zyxt
c7cddb917ba225a677fb6101d155537f56e16ea0
[ "Apache-2.0" ]
1
2020-09-22T22:18:42.000Z
2020-09-22T22:18:42.000Z
import srtm import os from tqdm import tqdm import json import sys import subprocess from math import cos, sin, asin, sqrt, radians, floor import myGrass import time import math class coordinate: def __init__(self, lat, lng, demand): self.lat = float(lat) self.lng = float(lng) self.demand =...
46.794915
379
0.665182
import srtm import os from tqdm import tqdm import json import sys import subprocess from math import cos, sin, asin, sqrt, radians, floor import myGrass import time import math class coordinate: def __init__(self, lat, lng, demand): self.lat = float(lat) self.lng = float(lng) self.demand =...
false
true
1c41ab16d8d7931058760b239bdd280c786fa723
1,707
py
Python
nerodia/locators/text_field/selector_builder.py
harsh183/nerodia
69c5e4408432e85b5af0b2da03015f729809dac4
[ "MIT" ]
83
2017-11-20T08:41:09.000Z
2022-02-09T21:01:47.000Z
nerodia/locators/text_field/selector_builder.py
harsh183/nerodia
69c5e4408432e85b5af0b2da03015f729809dac4
[ "MIT" ]
28
2017-11-21T02:25:03.000Z
2021-04-15T15:26:30.000Z
nerodia/locators/text_field/selector_builder.py
harsh183/nerodia
69c5e4408432e85b5af0b2da03015f729809dac4
[ "MIT" ]
14
2017-11-29T06:44:12.000Z
2021-09-06T04:53:44.000Z
from nerodia.exception import LocatorException from ..element.selector_builder import SelectorBuilder as ElementSelectorBuilder, \ XPath as ElementXPath from ..element.xpath_support import XpathSupport from ...elements.text_field import TextField class SelectorBuilder(ElementSelectorBuilder): pass class XPa...
32.207547
99
0.636204
from nerodia.exception import LocatorException from ..element.selector_builder import SelectorBuilder as ElementSelectorBuilder, \ XPath as ElementXPath from ..element.xpath_support import XpathSupport from ...elements.text_field import TextField class SelectorBuilder(ElementSelectorBuilder): pass class XPa...
true
true
1c41ab67fea8e67611315e3f3e543bc86e667282
7,840
py
Python
contrib/bitrpc/bitrpc.py
cvagalia/kumulcoin1
ceb8fdeefd471d0a749e6ef46a774ebb7eed41c8
[ "MIT" ]
null
null
null
contrib/bitrpc/bitrpc.py
cvagalia/kumulcoin1
ceb8fdeefd471d0a749e6ef46a774ebb7eed41c8
[ "MIT" ]
null
null
null
contrib/bitrpc/bitrpc.py
cvagalia/kumulcoin1
ceb8fdeefd471d0a749e6ef46a774ebb7eed41c8
[ "MIT" ]
null
null
null
from jsonrpc import ServiceProxy import sys import string # ===== BEGIN USER SETTINGS ===== # if you do not set these you will be prompted for a password for every command rpcuser = "" rpcpass = "" # ====== END USER SETTINGS ====== if rpcpass == "": access = ServiceProxy("http://127.0.0.1:2332") else: access = Ser...
24.123077
79
0.668367
from jsonrpc import ServiceProxy import sys import string rpcuser = "" rpcpass = "" if rpcpass == "": access = ServiceProxy("http://127.0.0.1:2332") else: access = ServiceProxy("http://"+rpcuser+":"+rpcpass+"@127.0.0.1:2332") cmd = sys.argv[1].lower() if cmd == "backupwallet": try: path = raw_input("Enter d...
false
true
1c41ab714ae677b4582248ecbcdc9ff139b239e2
37
py
Python
src/py2_em/__init__.py
chrisBrookes93/Py2Em
92f659a88609a26bcfe02c203d9b8d961e3c24fd
[ "MIT" ]
null
null
null
src/py2_em/__init__.py
chrisBrookes93/Py2Em
92f659a88609a26bcfe02c203d9b8d961e3c24fd
[ "MIT" ]
null
null
null
src/py2_em/__init__.py
chrisBrookes93/Py2Em
92f659a88609a26bcfe02c203d9b8d961e3c24fd
[ "MIT" ]
null
null
null
from .py2emulator import Py2Emulator
18.5
36
0.864865
from .py2emulator import Py2Emulator
true
true
1c41abcbd4cac69e273cbc8ae777627a6034afae
2,521
py
Python
ee_mapper/map/ee_analysis.py
dgketchum/IrrMapper
37b692e91e20bc0f34b1fb0116402990510a1e21
[ "Apache-2.0" ]
6
2018-03-20T21:32:00.000Z
2020-07-20T16:07:04.000Z
ee_mapper/map/ee_analysis.py
dgketchum/IrrMapper
37b692e91e20bc0f34b1fb0116402990510a1e21
[ "Apache-2.0" ]
9
2018-12-22T19:15:28.000Z
2021-08-25T14:40:15.000Z
ee_mapper/map/ee_analysis.py
dgketchum/IrrMapper
37b692e91e20bc0f34b1fb0116402990510a1e21
[ "Apache-2.0" ]
7
2018-03-15T06:08:39.000Z
2021-04-13T07:52:01.000Z
# =============================================================================== # Copyright 2018 dgketchum # # 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...
36.536232
109
0.563269
import os from pprint import pprint import ee from map.assets import list_assets from map.call_ee import is_authorized ASSET_ROOT = 'users/dgketchum/classy' STATES = ['AZ', 'CA', 'CO', 'ID', 'MT', 'NM', 'NV', 'OR', 'UT', 'WA', 'WY'] TARGET_STATES = ['OR'] BOUNDARIES = 'users/dgketchum/boundaries' ASS...
true
true
1c41ac8c28e95e2fd967b7b3abf9f6e5e46581e5
360
py
Python
Python/B7-Klatschschalter/02 Klatsch-Schalter.py
frankyhub/Calliope
335f0ef5ca9bcf57e14166319501ec9086bc09bf
[ "MIT" ]
null
null
null
Python/B7-Klatschschalter/02 Klatsch-Schalter.py
frankyhub/Calliope
335f0ef5ca9bcf57e14166319501ec9086bc09bf
[ "MIT" ]
null
null
null
Python/B7-Klatschschalter/02 Klatsch-Schalter.py
frankyhub/Calliope
335f0ef5ca9bcf57e14166319501ec9086bc09bf
[ "MIT" ]
null
null
null
LED = 0 def on_forever(): global LED if input.sound_level() > 20: if LED == 1: LED = 0 if LED == 0: basic.turn_rgb_led_off() elif LED == 0: LED = 1 if LED == 1: basic.set_led_color(0xff0000) bas...
24
46
0.45
LED = 0 def on_forever(): global LED if input.sound_level() > 20: if LED == 1: LED = 0 if LED == 0: basic.turn_rgb_led_off() elif LED == 0: LED = 1 if LED == 1: basic.set_led_color(0xff0000) bas...
true
true
1c41ad4f30724a7a81f6d60c2522b7bdc7a72915
1,511
py
Python
qtrio/_tests/examples/test_emissions.py
nodeselector/qtrio
4bc25ef97d7e6e01a9751de9c84a4214e637e9d4
[ "Apache-2.0", "MIT" ]
null
null
null
qtrio/_tests/examples/test_emissions.py
nodeselector/qtrio
4bc25ef97d7e6e01a9751de9c84a4214e637e9d4
[ "Apache-2.0", "MIT" ]
1
2021-03-30T21:14:20.000Z
2021-03-30T21:14:20.000Z
qtrio/_tests/examples/test_emissions.py
nodeselector/qtrio
4bc25ef97d7e6e01a9751de9c84a4214e637e9d4
[ "Apache-2.0", "MIT" ]
null
null
null
import functools import typing import pytestqt.qtbot import trio import trio.testing import qtrio import qtrio.examples.emissions async def test_main( qtbot: pytestqt.qtbot.QtBot, optional_hold_event: typing.Optional[trio.Event], ) -> None: async with trio.open_nursery() as nursery: start = func...
27.981481
79
0.612839
import functools import typing import pytestqt.qtbot import trio import trio.testing import qtrio import qtrio.examples.emissions async def test_main( qtbot: pytestqt.qtbot.QtBot, optional_hold_event: typing.Optional[trio.Event], ) -> None: async with trio.open_nursery() as nursery: start = func...
true
true
1c41ad8a0e57bc585224e96a4a5ca9f78f10405e
657
py
Python
manage.py
dongtianyi/xiaomubiao
0768273515e117dfcbe9c311fa91079599bc40ac
[ "MIT" ]
null
null
null
manage.py
dongtianyi/xiaomubiao
0768273515e117dfcbe9c311fa91079599bc40ac
[ "MIT" ]
null
null
null
manage.py
dongtianyi/xiaomubiao
0768273515e117dfcbe9c311fa91079599bc40ac
[ "MIT" ]
null
null
null
#!/usr/bin/env python """Django's command-line utility for administrative tasks.""" import os import sys def main(): """Run administrative tasks.""" os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'xiaomubiao.settings') try: from django.core.management import execute_from_command_line except I...
28.565217
74
0.678843
import os import sys def main(): os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'xiaomubiao.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: raise ImportError( "Couldn't import Django. Are you sure it's installed and " ...
true
true
1c41aed5304b3f0610dbabc70a4fb8f987fe843a
3,081
py
Python
pyembed/markdown/test/pattern_test.py
wamonite/pyembed-markdown
64f9766ff705ee9c0402958cb33aa1e3561e9315
[ "MIT" ]
11
2015-06-09T20:59:15.000Z
2021-01-04T09:32:54.000Z
pyembed/markdown/test/pattern_test.py
wamonite/pyembed-markdown
64f9766ff705ee9c0402958cb33aa1e3561e9315
[ "MIT" ]
4
2015-12-14T05:10:23.000Z
2020-02-18T02:24:34.000Z
pyembed/markdown/test/pattern_test.py
wamonite/pyembed-markdown
64f9766ff705ee9c0402958cb33aa1e3561e9315
[ "MIT" ]
3
2015-12-21T19:10:55.000Z
2018-01-02T03:25:15.000Z
# The MIT License(MIT) # Copyright (c) 2013-2014 Matt Thomson # 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, mo...
33.129032
79
0.733853
from pyembed.markdown.pattern import PyEmbedPattern from mock import patch, Mock def test_should_match_pyembed_link(): md = Mock() re = PyEmbedPattern(None, md).getCompiledRegExp() match = re.match('[!embed](http://www.example.com)') assert match def test_should_match_pyembe...
true
true
1c41aef9cbe11360eaf50b77cff3b01f26e45823
11,794
py
Python
filebrowser/functions.py
naltimari/filebrowser
57263ae88549d382ab39dcc9112a183a739cac84
[ "BSD-3-Clause" ]
null
null
null
filebrowser/functions.py
naltimari/filebrowser
57263ae88549d382ab39dcc9112a183a739cac84
[ "BSD-3-Clause" ]
null
null
null
filebrowser/functions.py
naltimari/filebrowser
57263ae88549d382ab39dcc9112a183a739cac84
[ "BSD-3-Clause" ]
null
null
null
# coding: utf-8 # imports import os, re, decimal from time import gmtime, strftime, localtime, mktime, time from urlparse import urlparse # django imports from django.utils.translation import ugettext as _ from django.utils.safestring import mark_safe from django.core.files import File from django.core.files.storage ...
31.789757
173
0.61455
import os, re, decimal from time import gmtime, strftime, localtime, mktime, time from urlparse import urlparse from django.utils.translation import ugettext as _ from django.utils.safestring import mark_safe from django.core.files import File from django.core.files.storage import default_storage from filebrowse...
false
true
1c41af2c668e04c2ab96aaa7cf8b39d914a30ec4
12,962
py
Python
espnet/nets/pytorch_backend/lm/default.py
Hertin/espnet
a0f2175df08b4750a9f0305c20b8c11f6e941867
[ "Apache-2.0" ]
3
2021-05-27T13:33:37.000Z
2021-10-06T05:52:20.000Z
espnet/nets/pytorch_backend/lm/default.py
Hertin/espnet
a0f2175df08b4750a9f0305c20b8c11f6e941867
[ "Apache-2.0" ]
2
2020-10-26T15:22:48.000Z
2021-01-15T10:17:57.000Z
espnet/nets/pytorch_backend/lm/default.py
Hertin/espnet
a0f2175df08b4750a9f0305c20b8c11f6e941867
[ "Apache-2.0" ]
2
2021-11-30T07:42:44.000Z
2021-12-01T07:10:01.000Z
"""Default Recurrent Neural Network Languge Model in `lm_train.py`.""" from typing import Any from typing import List from typing import Tuple import torch import torch.nn as nn import torch.nn.functional as F from espnet.nets.lm_interface import LMInterface from espnet.nets.pytorch_backend.e2e_asr import to_device ...
34.565333
88
0.554004
from typing import Any from typing import List from typing import Tuple import torch import torch.nn as nn import torch.nn.functional as F from espnet.nets.lm_interface import LMInterface from espnet.nets.pytorch_backend.e2e_asr import to_device from espnet.nets.scorer_interface import BatchScorerInterface class D...
true
true
1c41b07b12f06d5178ee919761cfff1e7f50f924
171
py
Python
Exercícios/ex030.py
JefterV/Cursoemvideo.py
e65ac53a4e38793be3039d360e7127e1c5d51030
[ "MIT" ]
3
2020-11-24T17:20:34.000Z
2020-12-03T01:19:31.000Z
Exercícios/ex030.py
JefterV/Cursoemvideo.py
e65ac53a4e38793be3039d360e7127e1c5d51030
[ "MIT" ]
null
null
null
Exercícios/ex030.py
JefterV/Cursoemvideo.py
e65ac53a4e38793be3039d360e7127e1c5d51030
[ "MIT" ]
1
2021-01-03T00:48:48.000Z
2021-01-03T00:48:48.000Z
num = int(input('Digite um numero: ')) resultado = num % 2 if resultado == 0: print('O numero {} é PAR'.format(num)) else: print('O numero {} é IMPAR'.format(num))
28.5
44
0.619883
num = int(input('Digite um numero: ')) resultado = num % 2 if resultado == 0: print('O numero {} é PAR'.format(num)) else: print('O numero {} é IMPAR'.format(num))
true
true
1c41b0dd46bde5deecd1784f1c58b70fbada87c2
30,602
py
Python
qiskit/providers/aer/backends/qasm_simulator.py
paulineollitrault/qiskit-aer
7f9ad2ea93698813901b345f7ee6eee8e02ebce9
[ "Apache-2.0" ]
null
null
null
qiskit/providers/aer/backends/qasm_simulator.py
paulineollitrault/qiskit-aer
7f9ad2ea93698813901b345f7ee6eee8e02ebce9
[ "Apache-2.0" ]
null
null
null
qiskit/providers/aer/backends/qasm_simulator.py
paulineollitrault/qiskit-aer
7f9ad2ea93698813901b345f7ee6eee8e02ebce9
[ "Apache-2.0" ]
null
null
null
# This code is part of Qiskit. # # (C) Copyright IBM 2018, 2019. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivat...
43.968391
92
0.644664
import copy import logging from warnings import warn from qiskit.providers.options import Options from qiskit.providers.models import QasmBackendConfiguration from ..version import __version__ from ..aererror import AerError from .aerbackend import AerBackend from .backend_utils import (cpp_execute, availa...
true
true
1c41b17f7bb836d14623cc4a397356afafd65cf3
1,512
py
Python
haystack/nodes/summarizer/base.py
ArzelaAscoIi/haystack
be8f50c9e3de4e264b3f345f5f4b9c9ec518ed08
[ "Apache-2.0" ]
1
2022-03-06T02:13:15.000Z
2022-03-06T02:13:15.000Z
haystack/nodes/summarizer/base.py
ArzelaAscoIi/haystack
be8f50c9e3de4e264b3f345f5f4b9c9ec518ed08
[ "Apache-2.0" ]
null
null
null
haystack/nodes/summarizer/base.py
ArzelaAscoIi/haystack
be8f50c9e3de4e264b3f345f5f4b9c9ec518ed08
[ "Apache-2.0" ]
1
2022-03-23T18:17:02.000Z
2022-03-23T18:17:02.000Z
from typing import List, Dict, Optional from abc import abstractmethod from haystack.schema import Document from haystack.nodes.base import BaseComponent class BaseSummarizer(BaseComponent): """ Abstract class for Summarizer """ outgoing_edges = 1 @abstractmethod def predict(self, document...
38.769231
123
0.653439
from typing import List, Dict, Optional from abc import abstractmethod from haystack.schema import Document from haystack.nodes.base import BaseComponent class BaseSummarizer(BaseComponent): outgoing_edges = 1 @abstractmethod def predict(self, documents: List[Document], generate_single_summary: Option...
true
true
1c41b19962ca40e88a19220ebf2fcd6921d38be5
12,224
py
Python
chainer/functions/activation/lstm.py
pyotr777/chainer
8532edbd921ab0ea98c9447957565777e4601662
[ "MIT" ]
null
null
null
chainer/functions/activation/lstm.py
pyotr777/chainer
8532edbd921ab0ea98c9447957565777e4601662
[ "MIT" ]
null
null
null
chainer/functions/activation/lstm.py
pyotr777/chainer
8532edbd921ab0ea98c9447957565777e4601662
[ "MIT" ]
null
null
null
import numpy import six import chainer from chainer.backends import cuda from chainer.backends import intel64 from chainer import function from chainer import function_node from chainer.utils import type_check def _extract_gates(x): r = x.reshape((len(x), x.shape[1] // 4, 4) + x.shape[2:]) return [r[:, :, i]...
33.307902
79
0.558082
import numpy import six import chainer from chainer.backends import cuda from chainer.backends import intel64 from chainer import function from chainer import function_node from chainer.utils import type_check def _extract_gates(x): r = x.reshape((len(x), x.shape[1] // 4, 4) + x.shape[2:]) return [r[:, :, i]...
true
true
1c41b2b1ff17ba4ae909b0fcd1716087670f269c
32,333
py
Python
Integrations/Active_Directory_Query/Active_Directory_Query.py
danikdanik/content
6749affdb6d3567440ab4d7b60180fdde1486cb3
[ "MIT" ]
1
2020-08-02T18:00:00.000Z
2020-08-02T18:00:00.000Z
Integrations/Active_Directory_Query/Active_Directory_Query.py
danikdanik/content
6749affdb6d3567440ab4d7b60180fdde1486cb3
[ "MIT" ]
4
2021-03-26T00:33:20.000Z
2021-12-13T20:48:36.000Z
Integrations/Active_Directory_Query/Active_Directory_Query.py
danikdanik/content
6749affdb6d3567440ab4d7b60180fdde1486cb3
[ "MIT" ]
1
2020-07-22T09:09:26.000Z
2020-07-22T09:09:26.000Z
import demistomock as demisto from CommonServerPython import * from ldap3 import Server, Connection, NTLM, SUBTREE, ALL_ATTRIBUTES, Tls from ldap3.core.exceptions import LDAPSocketOpenError from ldap3.extend import microsoft import ssl from datetime import datetime # global connection conn = None ''' GLOBAL VARS '''...
32.044599
120
0.638759
import demistomock as demisto from CommonServerPython import * from ldap3 import Server, Connection, NTLM, SUBTREE, ALL_ATTRIBUTES, Tls from ldap3.core.exceptions import LDAPSocketOpenError from ldap3.extend import microsoft import ssl from datetime import datetime conn = None COOMON_ACCOUNT_CONTROL_FLAGS = { ...
true
true
1c41b2c3fd85c3158634955ff714604086a1bca8
854
py
Python
imageclassifierapp/services/classifier.py
onl1ner/django-image-classifier
6bb0726fbd61bb60bd245356ca85d7030ced131e
[ "MIT" ]
null
null
null
imageclassifierapp/services/classifier.py
onl1ner/django-image-classifier
6bb0726fbd61bb60bd245356ca85d7030ced131e
[ "MIT" ]
null
null
null
imageclassifierapp/services/classifier.py
onl1ner/django-image-classifier
6bb0726fbd61bb60bd245356ca85d7030ced131e
[ "MIT" ]
1
2022-02-26T17:50:12.000Z
2022-02-26T17:50:12.000Z
import os import numpy as np import tensorflow as tf from PIL import Image from django.conf import settings from keras.preprocessing import image from keras.models import load_model class Classifier: IMG_SIZE = (32, 32) LABELS = ['airplane', 'automobile', 'bird', 'cat', 'deer', 'dog', 'frog', 'horse', 'sh...
24.4
103
0.653396
import os import numpy as np import tensorflow as tf from PIL import Image from django.conf import settings from keras.preprocessing import image from keras.models import load_model class Classifier: IMG_SIZE = (32, 32) LABELS = ['airplane', 'automobile', 'bird', 'cat', 'deer', 'dog', 'frog', 'horse', 'sh...
true
true
1c41b3489aa516f6ce1d161f96d86415ed8d1718
11,407
py
Python
analyseUsage.py
shenyuanv/powerAnalysis
8ebd4c9ad79c1bfe7ac13008fe39a74b00d64805
[ "MIT" ]
null
null
null
analyseUsage.py
shenyuanv/powerAnalysis
8ebd4c9ad79c1bfe7ac13008fe39a74b00d64805
[ "MIT" ]
null
null
null
analyseUsage.py
shenyuanv/powerAnalysis
8ebd4c9ad79c1bfe7ac13008fe39a74b00d64805
[ "MIT" ]
null
null
null
import sys import sqlite3 from datetime import datetime from datetime import timedelta import numpy as np import argparse from collections import namedtuple def contiguous_regions(condition): d = np.diff(condition) idx, = d.nonzero() idx += 1 if condition[0]: idx = np.r_[0, idx] if cond...
34.152695
166
0.656877
import sys import sqlite3 from datetime import datetime from datetime import timedelta import numpy as np import argparse from collections import namedtuple def contiguous_regions(condition): d = np.diff(condition) idx, = d.nonzero() idx += 1 if condition[0]: idx = np.r_[0, idx] if cond...
true
true
1c41b353fc7188837b5aed9c63eaf270d8a72a87
962
py
Python
Python/DFS/med_course_schedule.py
animeshramesh/interview-prep
882e8bc8b4653a713754ab31a3b08e05505be2bc
[ "Apache-2.0" ]
null
null
null
Python/DFS/med_course_schedule.py
animeshramesh/interview-prep
882e8bc8b4653a713754ab31a3b08e05505be2bc
[ "Apache-2.0" ]
null
null
null
Python/DFS/med_course_schedule.py
animeshramesh/interview-prep
882e8bc8b4653a713754ab31a3b08e05505be2bc
[ "Apache-2.0" ]
null
null
null
""" Trick is to keep track of current path. Time: O(V+E) Space: O(V+E) """ from collections import defaultdict class Solution: def dfs_cycle(self, node): self.visited[node]=True self.current_path[node]=True for neighbour in list(self.graph[node]): if not self.visited[neighbo...
23.463415
57
0.582121
from collections import defaultdict class Solution: def dfs_cycle(self, node): self.visited[node]=True self.current_path[node]=True for neighbour in list(self.graph[node]): if not self.visited[neighbour]: if self.dfs_cycle(neighbour): retur...
true
true
1c41b5c3a6b112b35c678de3ddff2b80cb09f9b3
7,391
py
Python
codewars/robotic_tatoo_removal.py
davidlukac/codekata-python
e4a9297fa658d2d36de43b3547353be85c08e990
[ "MIT" ]
null
null
null
codewars/robotic_tatoo_removal.py
davidlukac/codekata-python
e4a9297fa658d2d36de43b3547353be85c08e990
[ "MIT" ]
null
null
null
codewars/robotic_tatoo_removal.py
davidlukac/codekata-python
e4a9297fa658d2d36de43b3547353be85c08e990
[ "MIT" ]
null
null
null
# Robotic Tattoo Removal # http://www.codewars.com/kata/robotic-tattoo-removal import unittest from typing import List def robot(skin_scan: List[List[chr]]) -> List[List[chr]]: for row_num, row in enumerate(skin_scan): for val_key, val in enumerate(row): if val == "X": skin_sc...
49.273333
99
0.111487
import unittest from typing import List def robot(skin_scan: List[List[chr]]) -> List[List[chr]]: for row_num, row in enumerate(skin_scan): for val_key, val in enumerate(row): if val == "X": skin_scan[row_num][val_key] = '*' return skin_scan def robot_2(skin_scan: List...
true
true
1c41b5c3e1f7c2822909254a498a98b9ade8a129
2,083
py
Python
NLP/UNIMO/src/utils/args.py
zhangyimi/Research
866f91d9774a38d205d6e9a3b1ee6293748261b3
[ "Apache-2.0" ]
1,319
2020-02-14T10:42:07.000Z
2022-03-31T15:42:18.000Z
NLP/UNIMO/src/utils/args.py
green9989/Research
94519a72e7936c77f62a31709634b72c09aabf74
[ "Apache-2.0" ]
192
2020-02-14T02:53:34.000Z
2022-03-31T02:25:48.000Z
NLP/UNIMO/src/utils/args.py
green9989/Research
94519a72e7936c77f62a31709634b72c09aabf74
[ "Apache-2.0" ]
720
2020-02-14T02:12:38.000Z
2022-03-31T12:21:15.000Z
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
33.063492
81
0.647144
from __future__ import absolute_import from __future__ import division from __future__ import print_function import six import argparse def str2bool(v): return v.lower() in ("true", "t", "1") class ArgumentGroup(object): def __init__(self, parser, title, des): self._group = ...
true
true
1c41b6346b45ffe3f201d87ca218fc6252c634a6
36,353
py
Python
HoganPA04.py
MicahHogan/HoganPythonPA04
62f3e32acba921aae9795e9a109177aac242311c
[ "Apache-2.0" ]
null
null
null
HoganPA04.py
MicahHogan/HoganPythonPA04
62f3e32acba921aae9795e9a109177aac242311c
[ "Apache-2.0" ]
null
null
null
HoganPA04.py
MicahHogan/HoganPythonPA04
62f3e32acba921aae9795e9a109177aac242311c
[ "Apache-2.0" ]
null
null
null
#Week 4 Programming Assignment #North Seattle College, CSC 110 #Author: Micah Hogan #Email: hogan.micah.j@gmail.com #Constants #Initial User Input name = str(input("Please select a name: ")) print("") mount = str(input("Please select an animal to ride: ")) print("") weapon = str(input("Please select a wea...
97.723118
1,178
0.706764
name = str(input("Please select a name: ")) print("") mount = str(input("Please select an animal to ride: ")) print("") weapon = str(input("Please select a weapon: ")) print("") role = str(input("Please select a role; (Sorcerer), (Brawler), or (Priest): ")) print("") while not(role == "Sorcerer" or ro...
true
true
1c41b672f8df9b9fd7792551d1a2974e70223fa4
1,330
py
Python
tests/test_convert_units.py
timcera/tstoolbox
a32fa399d96082f01b7eedfd6c8893bdb881845c
[ "BSD-3-Clause" ]
5
2016-10-13T18:06:41.000Z
2021-06-29T19:47:36.000Z
tests/test_convert_units.py
timcera/tstoolbox
a32fa399d96082f01b7eedfd6c8893bdb881845c
[ "BSD-3-Clause" ]
21
2016-04-28T16:48:03.000Z
2021-12-16T18:07:07.000Z
tests/test_convert_units.py
timcera/tstoolbox
a32fa399d96082f01b7eedfd6c8893bdb881845c
[ "BSD-3-Clause" ]
3
2018-03-21T21:07:52.000Z
2021-01-22T20:07:49.000Z
# -*- coding: utf-8 -*- from unittest import TestCase import pint_pandas import pytest from pandas.testing import assert_frame_equal from tstoolbox import tstoolbox class TestConvertUnits(TestCase): @staticmethod def test_convert_units(): a = tstoolbox.read("tests/data_gainesville_daily_precip.csv"...
32.439024
88
0.642857
from unittest import TestCase import pint_pandas import pytest from pandas.testing import assert_frame_equal from tstoolbox import tstoolbox class TestConvertUnits(TestCase): @staticmethod def test_convert_units(): a = tstoolbox.read("tests/data_gainesville_daily_precip.csv", target_units="in") ...
true
true
1c41b6a02f1c62ace1a896acf571367c51dcd8de
10,511
py
Python
kubernetes/test/test_apps_v1beta2_api.py
anemerovsky-essextec/python
6e40b9169b27c3f1f9422c0f6dd1cd9caef8d57c
[ "Apache-2.0" ]
null
null
null
kubernetes/test/test_apps_v1beta2_api.py
anemerovsky-essextec/python
6e40b9169b27c3f1f9422c0f6dd1cd9caef8d57c
[ "Apache-2.0" ]
null
null
null
kubernetes/test/test_apps_v1beta2_api.py
anemerovsky-essextec/python
6e40b9169b27c3f1f9422c0f6dd1cd9caef8d57c
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.12.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import os import sys i...
19.72045
105
0.597755
from __future__ import absolute_import import os import sys import unittest import kubernetes.client from kubernetes.client.rest import ApiException from kubernetes.client.apis.apps_v1beta2_api import AppsV1beta2Api class TestAppsV1beta2Api(unittest.TestCase): def setUp(self): self.api = kubernetes...
true
true
1c41b7adadfa8fa732c4d2ec2617a5980c1b03cc
3,783
py
Python
frappe/desk/page/messages/messages.py
kardmode/frappe
d8f46daa7157545e4d302a2d54c059419d0113f3
[ "MIT" ]
null
null
null
frappe/desk/page/messages/messages.py
kardmode/frappe
d8f46daa7157545e4d302a2d54c059419d0113f3
[ "MIT" ]
null
null
null
frappe/desk/page/messages/messages.py
kardmode/frappe
d8f46daa7157545e4d302a2d54c059419d0113f3
[ "MIT" ]
5
2016-11-12T12:14:58.000Z
2018-03-21T15:45:45.000Z
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe from frappe.desk.notifications import delete_notification_count_for from frappe.core.doctype.user.user import STANDARD_USERS from frappe.utils.user import get_enable...
32.333333
98
0.731959
from __future__ import unicode_literals import frappe from frappe.desk.notifications import delete_notification_count_for from frappe.core.doctype.user.user import STANDARD_USERS from frappe.utils.user import get_enabled_system_users from frappe.utils import cint, get_fullname @frappe.whitelist() def get_list(arg=N...
true
true
1c41b83e466645e23e02647f5200a2a956032b65
1,098
py
Python
nipype/interfaces/dipy/tests/test_auto_DTI.py
moloney/nipype
a7a9c85c79cb1412ba03406074f83200447ef50b
[ "Apache-2.0" ]
7
2017-02-17T08:54:26.000Z
2022-03-10T20:57:23.000Z
nipype/interfaces/dipy/tests/test_auto_DTI.py
moloney/nipype
a7a9c85c79cb1412ba03406074f83200447ef50b
[ "Apache-2.0" ]
1
2016-04-25T15:07:09.000Z
2016-04-25T15:07:09.000Z
nipype/interfaces/dipy/tests/test_auto_DTI.py
moloney/nipype
a7a9c85c79cb1412ba03406074f83200447ef50b
[ "Apache-2.0" ]
2
2017-09-23T16:22:00.000Z
2019-08-01T14:18:52.000Z
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT from __future__ import unicode_literals from ..tensors import DTI def test_DTI_inputs(): input_map = dict( b0_thres=dict(usedefault=True, ), ignore_exception=dict( deprecated='1.0.0', nohash=True, usedefault=...
28.894737
67
0.598361
from __future__ import unicode_literals from ..tensors import DTI def test_DTI_inputs(): input_map = dict( b0_thres=dict(usedefault=True, ), ignore_exception=dict( deprecated='1.0.0', nohash=True, usedefault=True, ), in_bval=dict(mandatory=True,...
true
true
1c41b978de96a66633f186c828e64a2297200373
7,955
py
Python
src/app/modules/a3dc_interface.py
KatonaLab/Build3D
f1430080d5bee9febfbc83c9b2cb2ebf345037ee
[ "MIT" ]
null
null
null
src/app/modules/a3dc_interface.py
KatonaLab/Build3D
f1430080d5bee9febfbc83c9b2cb2ebf345037ee
[ "MIT" ]
5
2021-03-19T09:28:07.000Z
2022-03-12T00:09:14.000Z
src/app/modules/a3dc_interface.py
KatonaLab/Build3D
f1430080d5bee9febfbc83c9b2cb2ebf345037ee
[ "MIT" ]
1
2019-12-23T16:44:49.000Z
2019-12-23T16:44:49.000Z
import time import collections from modules.packages.a3dc.ImageClass import ImageClass from modules.packages.a3dc.segmentation import tag_image import modules.packages.a3dc.core as core def tagImage(image): ''' Function that runs ITK connected components on input image :param image: nd Arra...
33.707627
194
0.674921
import time import collections from modules.packages.a3dc.ImageClass import ImageClass from modules.packages.a3dc.segmentation import tag_image import modules.packages.a3dc.core as core def tagImage(image): tstart = time.process_time() logText = '\nRunning connected components on : ...
true
true
1c41ba1d5c8d38fd5e567d508126d7895d87d08b
8,978
py
Python
donkeycar/parts/lidar.py
BillyCheung10botics/donkeycar
a3278818367e65250a381e59458b5be13b7d2b7c
[ "MIT" ]
null
null
null
donkeycar/parts/lidar.py
BillyCheung10botics/donkeycar
a3278818367e65250a381e59458b5be13b7d2b7c
[ "MIT" ]
null
null
null
donkeycar/parts/lidar.py
BillyCheung10botics/donkeycar
a3278818367e65250a381e59458b5be13b7d2b7c
[ "MIT" ]
null
null
null
""" Lidar """ # requies glob to be installed: "pip3 install glob2" # requires rplidar to be installed: "pip3 install rplidar" import time import math import pickle import serial import numpy as np from donkeycar.utils import norm_deg, dist, deg2rad, arr_to_img from PIL import Image, ImageDraw class RPLidar(object): ...
33.251852
125
0.583538
import time import math import pickle import serial import numpy as np from donkeycar.utils import norm_deg, dist, deg2rad, arr_to_img from PIL import Image, ImageDraw class RPLidar(object): def __init__(self, lower_limit = 0, upper_limit = 360, debug=False): from rplidar import RPLidar import ...
true
true
1c41ba43a17d398946ed978dc080c422fb4fbbb7
11,818
py
Python
src/models/inception_resnet_v1.py
zixia/python-facenet
d86e0c49a9ce413bef6e58a19a9f723aadcef968
[ "MIT" ]
4
2018-06-11T03:02:49.000Z
2018-07-11T07:18:52.000Z
src/models/inception_resnet_v1.py
zixia/python-facenet
d86e0c49a9ce413bef6e58a19a9f723aadcef968
[ "MIT" ]
null
null
null
src/models/inception_resnet_v1.py
zixia/python-facenet
d86e0c49a9ce413bef6e58a19a9f723aadcef968
[ "MIT" ]
2
2017-08-31T05:35:36.000Z
2018-10-11T16:42:15.000Z
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
46.527559
90
0.568793
from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow as tf import tensorflow.contrib.slim as slim def block35(net, scale=1.0, activation_fn=tf.nn.relu, scope=None, reuse=None): with tf.variable_scope(scope, 'Block35', [net],...
true
true
1c41ba9a88a9a6100fa3a7a2c84bc0485c4bbb57
870
py
Python
main.py
h4ck3rk3y/Amicus-Scraping-Challenge
b4bebc62c118429e1d4730a140673f5949f9675c
[ "MIT" ]
8
2017-12-12T09:11:26.000Z
2022-02-13T01:46:57.000Z
main.py
h4ck3rk3y/Amicus-Scraping-Challenge
b4bebc62c118429e1d4730a140673f5949f9675c
[ "MIT" ]
1
2020-09-03T14:25:15.000Z
2020-09-03T14:25:15.000Z
main.py
wasimakh2/ScrapeCommerce
b4bebc62c118429e1d4730a140673f5949f9675c
[ "MIT" ]
7
2017-12-28T10:57:38.000Z
2020-09-03T14:25:07.000Z
from eby import ebay from amzn import amazon from fk import flipkart from sdeal import snapdeal def banner(): print""" ### ## ## #### ###### ## ## ###### ## ## ### ### ## ## ## ## ## ## ## ## ## #### #### ## ## ## ## ## ## ## ## ### ## ## ## ## ...
22.307692
62
0.371264
from eby import ebay from amzn import amazon from fk import flipkart from sdeal import snapdeal def banner(): print""" ### ## ## #### ###### ## ## ###### ## ## ### ### ## ## ## ## ## ## ## ## ## #### #### ## ## ## ## ## ## ## ## ### ## ## ## ## ...
false
true
1c41bac1991930d3ffc2130cc34e9dcae42d3d11
539
py
Python
output/models/nist_data/list_pkg/date_time/schema_instance/nistschema_sv_iv_list_date_time_min_length_2_xsd/nistschema_sv_iv_list_date_time_min_length_2.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
1
2021-08-14T17:59:21.000Z
2021-08-14T17:59:21.000Z
output/models/nist_data/list_pkg/date_time/schema_instance/nistschema_sv_iv_list_date_time_min_length_2_xsd/nistschema_sv_iv_list_date_time_min_length_2.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
4
2020-02-12T21:30:44.000Z
2020-04-15T20:06:46.000Z
output/models/nist_data/list_pkg/date_time/schema_instance/nistschema_sv_iv_list_date_time_min_length_2_xsd/nistschema_sv_iv_list_date_time_min_length_2.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
null
null
null
from dataclasses import dataclass, field from typing import List from xsdata.models.datatype import XmlDateTime __NAMESPACE__ = "NISTSchema-SV-IV-list-dateTime-minLength-2-NS" @dataclass class NistschemaSvIvListDateTimeMinLength2: class Meta: name = "NISTSchema-SV-IV-list-dateTime-minLength-2" na...
25.666667
67
0.679035
from dataclasses import dataclass, field from typing import List from xsdata.models.datatype import XmlDateTime __NAMESPACE__ = "NISTSchema-SV-IV-list-dateTime-minLength-2-NS" @dataclass class NistschemaSvIvListDateTimeMinLength2: class Meta: name = "NISTSchema-SV-IV-list-dateTime-minLength-2" na...
true
true
1c41bd9504b778ac59180a5355284db104a5351c
1,723
py
Python
src/main/resources/pytz/zoneinfo/America/Eirunepe.py
TheEin/swagger-maven-plugin
cf93dce2d5c8d3534f4cf8c612b11e2d2313871b
[ "Apache-2.0" ]
65
2015-11-14T13:46:01.000Z
2021-08-14T05:54:04.000Z
lib/pytz/zoneinfo/America/Eirunepe.py
tjsavage/polymer-dashboard
19bc467f1206613f8eec646b6f2bc43cc319ef75
[ "CNRI-Python", "Linux-OpenIB" ]
13
2016-03-31T20:00:17.000Z
2021-08-20T14:52:31.000Z
lib/pytz/zoneinfo/America/Eirunepe.py
tjsavage/polymer-dashboard
19bc467f1206613f8eec646b6f2bc43cc319ef75
[ "CNRI-Python", "Linux-OpenIB" ]
20
2015-03-18T08:41:37.000Z
2020-12-18T02:58:30.000Z
'''tzinfo timezone information for America/Eirunepe.''' from pytz.tzinfo import DstTzInfo from pytz.tzinfo import memorized_datetime as d from pytz.tzinfo import memorized_ttinfo as i class Eirunepe(DstTzInfo): '''America/Eirunepe timezone definition. See datetime.tzinfo for details''' zone = 'America/Eirunep...
20.759036
79
0.597214
from pytz.tzinfo import DstTzInfo from pytz.tzinfo import memorized_datetime as d from pytz.tzinfo import memorized_ttinfo as i class Eirunepe(DstTzInfo): zone = 'America/Eirunepe' _utc_transition_times = [ d(1,1,1,0,0,0), d(1914,1,1,4,39,28), d(1931,10,3,16,0,0), d(1932,4,1,4,0,0), d(1932,10,3,5,0,0), d(193...
true
true
1c41bea762f109d22971558c3e9a1108e0c44bbd
419
py
Python
EM-beamer/image/bessel.py
xfli376/Lecture
4ee193769df089053726ec6e7792718e30f633a4
[ "Apache-2.0" ]
null
null
null
EM-beamer/image/bessel.py
xfli376/Lecture
4ee193769df089053726ec6e7792718e30f633a4
[ "Apache-2.0" ]
null
null
null
EM-beamer/image/bessel.py
xfli376/Lecture
4ee193769df089053726ec6e7792718e30f633a4
[ "Apache-2.0" ]
null
null
null
from scipy import optimize, special from numpy import * from matplotlib import pyplot as pb x = arange(0,20,0.01) for k in arange(0.5,5.5): y = special.jv(k,x) pb.plot(x,y) f = lambda x: -special.jv(k,x) x_max = optimize.fminbound(f,0,6) pb.plot([x_max], [special.jv(k,x_max)],'ro') pb...
27.933333
66
0.644391
from scipy import optimize, special from numpy import * from matplotlib import pyplot as pb x = arange(0,20,0.01) for k in arange(0.5,5.5): y = special.jv(k,x) pb.plot(x,y) f = lambda x: -special.jv(k,x) x_max = optimize.fminbound(f,0,6) pb.plot([x_max], [special.jv(k,x_max)],'ro') pb...
true
true
1c41c0dd3400c46c01883be0652a07078deef3cb
2,616
py
Python
pydoc_fork/__main__.py
matthewdeanmartin/pydoc_fork
174475b15be966f3751d5563b4db0beecc3ab1f9
[ "MIT" ]
null
null
null
pydoc_fork/__main__.py
matthewdeanmartin/pydoc_fork
174475b15be966f3751d5563b4db0beecc3ab1f9
[ "MIT" ]
1
2022-01-17T16:28:45.000Z
2022-01-17T16:28:45.000Z
pydoc_fork/__main__.py
matthewdeanmartin/pydoc_fork
174475b15be966f3751d5563b4db0beecc3ab1f9
[ "MIT" ]
null
null
null
# noinspection PyPep8 """pydoc_fork A fork of pydoc that is optimized for generating html documentation in a CI context Usage: pydoc_fork <package>... [options] pydoc_fork (-h | --help) pydoc_fork --version Options: -h --help Show this screen. -v --version Show version. ...
31.518072
86
0.64526
import logging import sys import docopt from pydoc_fork import commands, settings from pydoc_fork.settings import load_config LOGGER = logging.getLogger(__name__) LOGGERS = [] __version__ = "3.0.0" def main() -> int: arguments = docopt.docopt(__doc__, version=f"pydoc_fork {__version__}") config_pat...
true
true
1c41c120c75f8f421df964a15f8054a414382c3e
608
py
Python
tests/test_cross_validation.py
ezietsman/lightfm
59303f4436fc31adc569a277b94b07e4509a6ab2
[ "Apache-2.0" ]
null
null
null
tests/test_cross_validation.py
ezietsman/lightfm
59303f4436fc31adc569a277b94b07e4509a6ab2
[ "Apache-2.0" ]
null
null
null
tests/test_cross_validation.py
ezietsman/lightfm
59303f4436fc31adc569a277b94b07e4509a6ab2
[ "Apache-2.0" ]
1
2020-10-07T01:29:32.000Z
2020-10-07T01:29:32.000Z
import pytest from lightfm.cross_validation import random_train_test_split from lightfm.datasets import fetch_movielens def _assert_disjoint(x, y): x = x.tocsr() y = y.tocoo() for (i, j) in zip(y.row, y.col): assert x[i, j] == 0.0 @pytest.mark.parametrize('test_percentage', ...
23.384615
80
0.682566
import pytest from lightfm.cross_validation import random_train_test_split from lightfm.datasets import fetch_movielens def _assert_disjoint(x, y): x = x.tocsr() y = y.tocoo() for (i, j) in zip(y.row, y.col): assert x[i, j] == 0.0 @pytest.mark.parametrize('test_percentage', ...
true
true
1c41c1db6305da2a3a38f35d262b4e376d92fd5d
3,935
py
Python
lib/pathfinding.py
Dogeek/codevo
690d161b4099d37597246f1ca3164f60a350e662
[ "MIT" ]
null
null
null
lib/pathfinding.py
Dogeek/codevo
690d161b4099d37597246f1ca3164f60a350e662
[ "MIT" ]
null
null
null
lib/pathfinding.py
Dogeek/codevo
690d161b4099d37597246f1ca3164f60a350e662
[ "MIT" ]
null
null
null
import collections import heapq #http://www.redblobgames.com/pathfinding/a-star/implementation.html class PriorityQueue: def __init__(self): self.elements = [] def empty(self): return len(self.elements) == 0 def put(self, item, priority): heapq.heappush(self.elements, (pr...
26.587838
71
0.574333
import collections import heapq class PriorityQueue: def __init__(self): self.elements = [] def empty(self): return len(self.elements) == 0 def put(self, item, priority): heapq.heappush(self.elements, (priority, item)) def get(self): return heapq.heappop...
true
true
1c41c2313befada08cc1f3c0337c864c6f92a845
296
py
Python
MergeQuerySet/Query/models.py
FalseG0d/AdvancedDjango
52715ffea132e591f98f94b781960fc12a8613e4
[ "MIT" ]
9
2020-10-17T14:03:35.000Z
2022-01-12T17:51:14.000Z
MergeQuerySet/Query/models.py
bharathjinka09/AdvancedDjango
f06e1a0621e182ea6015b06e79eae99ddb04affb
[ "MIT" ]
null
null
null
MergeQuerySet/Query/models.py
bharathjinka09/AdvancedDjango
f06e1a0621e182ea6015b06e79eae99ddb04affb
[ "MIT" ]
4
2020-10-20T06:52:26.000Z
2022-01-07T23:51:59.000Z
from django.db import models # Create your models here. class Employee(models.Model): name=models.CharField(max_length=20) age=models.IntegerField(max_length=20) dept=models.CharField(max_length=20) exp_score=models.IntegerField() def __str__(self): return self.name
26.909091
42
0.736486
from django.db import models class Employee(models.Model): name=models.CharField(max_length=20) age=models.IntegerField(max_length=20) dept=models.CharField(max_length=20) exp_score=models.IntegerField() def __str__(self): return self.name
true
true
1c41c2a4190c485859621b998eae372cf364499f
250
py
Python
python/637.average-of-levels-in-binary-tree.py
stavanmehta/leetcode
1224e43ce29430c840e65daae3b343182e24709c
[ "Apache-2.0" ]
null
null
null
python/637.average-of-levels-in-binary-tree.py
stavanmehta/leetcode
1224e43ce29430c840e65daae3b343182e24709c
[ "Apache-2.0" ]
null
null
null
python/637.average-of-levels-in-binary-tree.py
stavanmehta/leetcode
1224e43ce29430c840e65daae3b343182e24709c
[ "Apache-2.0" ]
null
null
null
# Definition for a binary tree node. # class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None class Solution: def averageOfLevels(self, root: TreeNode) -> List[float]:
22.727273
61
0.584
class Solution: def averageOfLevels(self, root: TreeNode) -> List[float]:
false
true
1c41c2d37e53d00e0314729750dcfaf1d5b000f1
2,175
py
Python
test/sagemaker_tests/tensorflow/tensorflow2_training/integration/sagemaker/test_tuning_model_dir.py
Elizaaaaa/deep-learning-containers
6274ecb264645070d11b27e5c7e60d2e4110537d
[ "Apache-2.0" ]
1
2021-07-14T20:13:12.000Z
2021-07-14T20:13:12.000Z
test/sagemaker_tests/tensorflow/tensorflow2_training/integration/sagemaker/test_tuning_model_dir.py
Elizaaaaa/deep-learning-containers
6274ecb264645070d11b27e5c7e60d2e4110537d
[ "Apache-2.0" ]
null
null
null
test/sagemaker_tests/tensorflow/tensorflow2_training/integration/sagemaker/test_tuning_model_dir.py
Elizaaaaa/deep-learning-containers
6274ecb264645070d11b27e5c7e60d2e4110537d
[ "Apache-2.0" ]
null
null
null
# Copyright 2019-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" fil...
43.5
106
0.652874
from __future__ import absolute_import import os import pytest from sagemaker.tensorflow import TensorFlow from sagemaker.tuner import HyperparameterTuner, IntegerParameter from ...integration.utils import processor, py_version, unique_name_from_base @pytest.mark.integration("hpo") @pytest.mark.mode...
true
true
1c41c39880779cec8cbf1aca7a5a8ae07a48c33f
1,797
py
Python
dominio/dao.py
MinisterioPublicoRJ/api-cadg
a8998c4c234a65192f1dca8ea9a17a1d4a496556
[ "MIT" ]
6
2020-02-11T18:45:58.000Z
2020-05-26T12:37:28.000Z
dominio/dao.py
MinisterioPublicoRJ/api-cadg
a8998c4c234a65192f1dca8ea9a17a1d4a496556
[ "MIT" ]
120
2019-07-01T14:45:32.000Z
2022-01-25T19:10:16.000Z
dominio/dao.py
MinisterioPublicoRJ/apimpmapas
196ad25a4922448b8ae7a66012a2843c7b7194ad
[ "MIT" ]
null
null
null
from dominio.db_connectors import execute as impala_execute from dominio.exceptions import APIEmptyResultError class GenericDAO: """Classe que implementa métodos genéricos de execução de query no impala a partir de um arquivo, e posterior serialização. Atributos: - QUERIES_DIR (path): Caminho da past...
30.457627
77
0.676683
from dominio.db_connectors import execute as impala_execute from dominio.exceptions import APIEmptyResultError class GenericDAO: QUERIES_DIR = "" query_file = "" columns = [] serializer = None table_namespaces = {} @classmethod def query(cls): with open(cls.QUERIES_DIR.child(cls....
true
true
1c41c3a314dc20b529589530e61b8e7ca6be8160
2,875
py
Python
scripts/tools/maf/check_loc_file.py
blankenberg/galaxy-data-resource
ca32a1aafd64948f489a4e5cf88096f32391b1d9
[ "CC-BY-3.0" ]
2
2016-02-23T00:09:14.000Z
2019-02-11T07:48:44.000Z
scripts/tools/maf/check_loc_file.py
blankenberg/galaxy-data-resource
ca32a1aafd64948f489a4e5cf88096f32391b1d9
[ "CC-BY-3.0" ]
1
2015-02-21T18:48:19.000Z
2015-02-27T15:50:32.000Z
scripts/tools/maf/check_loc_file.py
blankenberg/galaxy-data-resource
ca32a1aafd64948f489a4e5cf88096f32391b1d9
[ "CC-BY-3.0" ]
6
2015-05-27T13:09:50.000Z
2019-02-11T07:48:46.000Z
#Dan Blankenberg #This script checks maf_index.loc file for inconsistencies between what is listed as available and what is really available. #Make sure that required dependencies (e.g. galaxy_root/lib and galaxy_root/eggs) are included in your PYTHONPATH from galaxy import eggs import pkg_resources; pkg_resources.requ...
51.339286
124
0.589565
from galaxy import eggs import pkg_resources; pkg_resources.require( "bx-python" ) import bx.align.maf from galaxy.tools.util import maf_utilities import sys assert sys.version_info[:2] >= ( 2, 4 ) def __main__(): index_location_file = sys.argv[ 1 ] for i, line in enumerate( open( index_location_file ) ): ...
false
true
1c41c4e8eedb6f685d8668a37578173dbb3c3525
4,707
py
Python
xlsxwriter/test/worksheet/test_sparkline10.py
yxwlr995/-Python-Pandas-XlsxWriter
cd28c1b968795b67f3013c49a0e02ffda5898163
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
xlsxwriter/test/worksheet/test_sparkline10.py
yxwlr995/-Python-Pandas-XlsxWriter
cd28c1b968795b67f3013c49a0e02ffda5898163
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
xlsxwriter/test/worksheet/test_sparkline10.py
yxwlr995/-Python-Pandas-XlsxWriter
cd28c1b968795b67f3013c49a0e02ffda5898163
[ "BSD-2-Clause-FreeBSD" ]
1
2020-04-12T16:44:58.000Z
2020-04-12T16:44:58.000Z
############################################################################### # # Tests for XlsxWriter. # # Copyright (c), 2013, John McNamara, jmcnamara@cpan.org # import unittest from ..compatibility import StringIO from ..helperfunctions import _xml_to_list from ...worksheet import Worksheet class TestAssembleW...
42.026786
337
0.4215
<x14:sparklineGroups xmlns:xm="http://schemas.microsoft.com/office/excel/2006/main"> <x14:sparklineGroup displayEmptyCellsAs="gap" markers="1" high="1" low="1" first="1" last="1" negative="1"> <x14:colorSeries rgb="FFC00000"/> ...
true
true
1c41c619c9ab1c1348ec5a6a9f77ef5b1fa70dda
2,439
py
Python
oblique/nxutils.py
blais/oblique
8cf9932b20b9d82a29f072d7c69c746e4643a77c
[ "Apache-2.0" ]
1
2020-06-20T13:41:29.000Z
2020-06-20T13:41:29.000Z
oblique/nxutils.py
blais/oblique
8cf9932b20b9d82a29f072d7c69c746e4643a77c
[ "Apache-2.0" ]
null
null
null
oblique/nxutils.py
blais/oblique
8cf9932b20b9d82a29f072d7c69c746e4643a77c
[ "Apache-2.0" ]
null
null
null
"""Test program for rendering of a NetworkX graph of the databased.""" import argparse import collections import random import time import webbrowser from typing import Text import colour import networkx as nx from oblique import extmodule _COLORS = """ aliceblue antiquewhite aqua aquamarine azure beige bisque bla...
39.33871
96
0.812218
import argparse import collections import random import time import webbrowser from typing import Text import colour import networkx as nx from oblique import extmodule _COLORS = """ aliceblue antiquewhite aqua aquamarine azure beige bisque black blanchedalmond blue blueviolet brown burlywood cadetblue chartreuse ...
true
true
1c41c738875cce571738f3457940bf419e33844e
1,328
py
Python
src/constant.py
zeabusTeam/zeabus_vision
bc58872ae4f02656bc153f32968e61a8f3d7cf15
[ "MIT" ]
1
2019-05-28T12:59:21.000Z
2019-05-28T12:59:21.000Z
src/constant.py
zeabusTeam/zeabus_vision
bc58872ae4f02656bc153f32968e61a8f3d7cf15
[ "MIT" ]
2
2019-04-30T11:35:10.000Z
2019-10-22T10:00:18.000Z
src/constant.py
zeabusTeam/zeabus_vision
bc58872ae4f02656bc153f32968e61a8f3d7cf15
[ "MIT" ]
null
null
null
""" File name: ansi_color_code.py Maintainer: AyumiizZ Python Version: 2.7 About: ansi code for printing color text """ class AnsiCode: """ Class name: AnsiCode Maintainer: AyumiizZ About: ansi code for printing color text """ DEFAULT = '\033[0m' BOLD = '\033[1m' LIGHT ...
24.145455
44
0.568524
class AnsiCode: DEFAULT = '\033[0m' BOLD = '\033[1m' LIGHT = '\033[2m' ITALIC = '\033[3m' UNDERLINE = '\033[4m' HL = '\033[7m' INVISIBLE = '\033[8m' CROSS = '\033[9m' BLACK = '\033[30m' LIGHT_RED = '\033[31m' LIGHT_GREEN = '\033[32m' LIGHT_YELLOW = '\033[33m' LIGHT_...
true
true
1c41c96b4fb065a49ecc4b698ded32cd58c99a42
94
py
Python
demo/__init__.py
JiangFeng07/NLPIK
bacd52e24690e8ba706895b54a076ee05d785d7b
[ "Apache-2.0" ]
null
null
null
demo/__init__.py
JiangFeng07/NLPIK
bacd52e24690e8ba706895b54a076ee05d785d7b
[ "Apache-2.0" ]
null
null
null
demo/__init__.py
JiangFeng07/NLPIK
bacd52e24690e8ba706895b54a076ee05d785d7b
[ "Apache-2.0" ]
null
null
null
#!/usr/local/bin/ python3 # -*- coding: utf-8 -*- # @Time : 2022-03-14 13:58 # @Author : Leo
23.5
27
0.56383
true
true
1c41c991a06c33be3766ae390ff2eb872ce7d1f6
7,875
py
Python
tensorflow/python/keras/layers/pooling_test.py
alvinlin-pn/tensorflow
c9cd1784bf287543d89593ca1432170cdbf694de
[ "Apache-2.0" ]
2
2021-10-10T23:52:17.000Z
2022-01-22T00:24:39.000Z
tensorflow/python/keras/layers/pooling_test.py
alvinlin-pn/tensorflow
c9cd1784bf287543d89593ca1432170cdbf694de
[ "Apache-2.0" ]
null
null
null
tensorflow/python/keras/layers/pooling_test.py
alvinlin-pn/tensorflow
c9cd1784bf287543d89593ca1432170cdbf694de
[ "Apache-2.0" ]
1
2020-06-07T22:42:37.000Z
2020-06-07T22:42:37.000Z
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
35.472973
80
0.629968
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np from tensorflow.python import keras from tensorflow.python.eager import context from tensorflow.python.framework import test_util as tf_test_util from tensorflow.python.keras ...
true
true
1c41c9d5321b033ba8af5cef0b26ef8e0efec614
273
py
Python
tpc-ds/load_db.py
ambient-docker/ora2postgres
bde236f1cfed625cff718378bfaeea2f07e889f0
[ "MIT" ]
2
2018-12-03T07:53:44.000Z
2018-12-03T07:54:15.000Z
tpc-ds/load_db.py
ambient-docker/ora2postgres
bde236f1cfed625cff718378bfaeea2f07e889f0
[ "MIT" ]
1
2018-12-02T07:36:41.000Z
2018-12-02T07:36:41.000Z
tpc-ds/load_db.py
ambient-docker/ora2postgres
bde236f1cfed625cff718378bfaeea2f07e889f0
[ "MIT" ]
15
2018-12-03T07:54:59.000Z
2019-06-12T13:53:40.000Z
#! /usr/bin/python3 import glob, os for file in glob.glob("*.ctl"): if file == "dbgen_version.ctl" : pass else: logfile = file.replace(".ctl",".log") cmd = 'sqlldr userid=tpcds/p4ssw0rd control={} log={}'.format(file,logfile) os.system(cmd)
22.75
80
0.604396
import glob, os for file in glob.glob("*.ctl"): if file == "dbgen_version.ctl" : pass else: logfile = file.replace(".ctl",".log") cmd = 'sqlldr userid=tpcds/p4ssw0rd control={} log={}'.format(file,logfile) os.system(cmd)
true
true
1c41ca0f80c0c8744f19e9559fad60259042fc7e
1,095
py
Python
turbo_transformers/python/turbo_transformers/utils.py
chengduoZH/TurboTransformers
a47bbf14c8ec2637375863ebc8d2c41a8b91a7ea
[ "BSD-3-Clause" ]
1
2020-06-07T06:24:41.000Z
2020-06-07T06:24:41.000Z
turbo_transformers/python/turbo_transformers/utils.py
chengduoZH/TurboTransformers
a47bbf14c8ec2637375863ebc8d2c41a8b91a7ea
[ "BSD-3-Clause" ]
null
null
null
turbo_transformers/python/turbo_transformers/utils.py
chengduoZH/TurboTransformers
a47bbf14c8ec2637375863ebc8d2c41a8b91a7ea
[ "BSD-3-Clause" ]
1
2021-01-04T11:10:40.000Z
2021-01-04T11:10:40.000Z
# Copyright (C) 2020 THL A29 Limited, a Tencent company. # All rights reserved. # Licensed under the BSD 3-Clause License (the "License"); you may # not use this file except in compliance with the License. You may # obtain a copy of the License at # https://opensource.org/licenses/BSD-3-Clause # Unless required by appl...
35.322581
69
0.778995
try: import turbo_transformers.turbo_transformers_cxxd as cxx except ImportError: import turbo_transformers.turbo_transformers_cxx as cxx import contextlib __all__ = ['gperf_guard', 'set_num_threads'] set_num_threads = cxx.set_num_threads @contextlib.contextmanager def gperf_guard(filename...
true
true
1c41ca6089625826646913378f1acdafab3f3824
4,499
py
Python
huaweicloud-sdk-meeting/huaweicloudsdkmeeting/v1/model/validate_token_req_dto.py
Adek06/huaweicloud-sdk-python-v3
3d13b27d089e04a1ae567cd649b3c5509e0391d2
[ "Apache-2.0" ]
null
null
null
huaweicloud-sdk-meeting/huaweicloudsdkmeeting/v1/model/validate_token_req_dto.py
Adek06/huaweicloud-sdk-python-v3
3d13b27d089e04a1ae567cd649b3c5509e0391d2
[ "Apache-2.0" ]
null
null
null
huaweicloud-sdk-meeting/huaweicloudsdkmeeting/v1/model/validate_token_req_dto.py
Adek06/huaweicloud-sdk-python-v3
3d13b27d089e04a1ae567cd649b3c5509e0391d2
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 import pprint import re import six class ValidateTokenReqDTO: """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the valu...
27.601227
86
0.592354
import pprint import re import six class ValidateTokenReqDTO: sensitive_list = [] openapi_types = { 'token': 'str', 'need_gen_new_token': 'bool', 'need_account_info': 'bool' } attribute_map = { 'token': 'token', 'need_gen_new_token': 'needGenNewToken'...
true
true
1c41cb73d4ca00348ce7eb58476501f5896b8338
2,807
py
Python
examples/search_as_you_type.py
miff2000/elasticsearch-dsl-py
4e1260f547e3a1803b2eac154db9d1f89688990c
[ "Apache-2.0" ]
1
2021-04-14T08:05:53.000Z
2021-04-14T08:05:53.000Z
examples/search_as_you_type.py
miff2000/elasticsearch-dsl-py
4e1260f547e3a1803b2eac154db9d1f89688990c
[ "Apache-2.0" ]
2
2021-01-23T03:04:26.000Z
2021-05-25T04:53:18.000Z
examples/search_as_you_type.py
miff2000/elasticsearch-dsl-py
4e1260f547e3a1803b2eac154db9d1f89688990c
[ "Apache-2.0" ]
4
2021-01-22T21:49:57.000Z
2021-11-23T12:00:20.000Z
# -*- coding: utf-8 -*- # Licensed to Elasticsearch B.V. under one or more contributor # license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright # ownership. Elasticsearch B.V. licenses this file to you under # the Apache License, Version 2.0 (the "Licens...
29.547368
87
0.686498
from __future__ import print_function, unicode_literals from elasticsearch_dsl import ( Document, SearchAsYouType, analyzer, connections, token_filter, ) from elasticsearch_dsl.query import MultiMatch ascii_fold = analyzer( "ascii_fold", tokenizer="whitespace", ...
true
true
1c41cbf7a1c5550f9ff29fc46ff03b3b658fbc32
4,461
py
Python
hummingbird/ml/operator_converters/_one_hot_encoder_implementations.py
rathijit/hummingbird
b634a4e5152757af2ff7a41059b3e52c8140fc04
[ "MIT" ]
2,772
2020-05-04T21:03:40.000Z
2022-03-30T11:00:03.000Z
hummingbird/ml/operator_converters/_one_hot_encoder_implementations.py
hsaputra/hummingbird
0ebd6be58880615bc86eab3648056682b40de614
[ "MIT" ]
486
2020-05-05T00:45:44.000Z
2022-03-15T01:02:31.000Z
hummingbird/ml/operator_converters/_one_hot_encoder_implementations.py
hsaputra/hummingbird
0ebd6be58880615bc86eab3648056682b40de614
[ "MIT" ]
232
2019-11-02T22:06:38.000Z
2022-03-25T07:36:17.000Z
# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- """ Base ...
40.926606
125
0.623403
import numpy as np import torch from ._physical_operator import PhysicalOperator from . import constants class OneHotEncoderString(PhysicalOperator, torch.nn.Module): def __init__(self, logical_operator, categories, device, extra_config={}): super(OneHotEncoderString, self).__init__(logical_opera...
true
true
1c41cc803343fff646d710a5045a6865f79cf7d8
5,722
py
Python
vega/algorithms/nas/sr_ea/sr_mutate.py
wnov/vega
bf51cbe389d41033c4ae4bc02e5078c3c247c845
[ "MIT" ]
6
2020-11-13T15:44:47.000Z
2021-12-02T08:14:06.000Z
vega/algorithms/nas/sr_ea/sr_mutate.py
JacobLee121/vega
19256aca4d047bfad3b461f0a927e1c2abb9eb03
[ "MIT" ]
null
null
null
vega/algorithms/nas/sr_ea/sr_mutate.py
JacobLee121/vega
19256aca4d047bfad3b461f0a927e1c2abb9eb03
[ "MIT" ]
2
2021-06-25T09:42:32.000Z
2021-08-06T18:00:09.000Z
# -*- coding:utf-8 -*- # Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved. # This program is free software; you can redistribute it and/or modify # it under the terms of the MIT License. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the ...
35.104294
102
0.623908
import logging import random from copy import deepcopy from .conf import SRConfig from zeus.common import ClassFactory, ClassType from zeus.report import Report from vega.core.search_algs import SearchAlgorithm @ClassFactory.register(ClassType.SEARCH_ALGORITHM) class SRMutate(SearchAlgorithm): config ...
true
true
1c41ccbd1adbac5ceee2a27e87170b2ab18c39b9
2,342
py
Python
sorting/selection_sorting_string_with_special_chars.py
salemalem/algorithms
f020e7b8f5a48c9a1962f7df041ea2820228ec86
[ "MIT" ]
1
2021-11-23T05:52:37.000Z
2021-11-23T05:52:37.000Z
sorting/selection_sorting_string_with_special_chars.py
salemalem/algorithms
f020e7b8f5a48c9a1962f7df041ea2820228ec86
[ "MIT" ]
1
2021-11-25T02:19:47.000Z
2021-11-29T10:09:22.000Z
sorting/selection_sorting_string_with_special_chars.py
salemalem/algorithms
f020e7b8f5a48c9a1962f7df041ea2820228ec86
[ "MIT" ]
null
null
null
from ast import literal_eval as make_tuple from string import punctuation # Selection Sorting string with special characters def swapPositions(list_argument, pos1, pos2): list_argument[pos1], list_argument[pos2] = list_argument[pos2], list_argument[pos1] return list_argument string_with_special_chars = ...
34.955224
87
0.781383
from ast import literal_eval as make_tuple from string import punctuation def swapPositions(list_argument, pos1, pos2): list_argument[pos1], list_argument[pos2] = list_argument[pos2], list_argument[pos1] return list_argument string_with_special_chars = "i@mksw)84*#~\'\"<1xb" print("Original string:", s...
true
true
1c41ccc60fb8ccff50994d49dc3596bd07ff8214
4,008
py
Python
utils.py
PeaKend/pychain
40b5f6ce572b64abd7d5a788045732306679dd02
[ "MIT" ]
1
2019-08-15T20:37:46.000Z
2019-08-15T20:37:46.000Z
utils.py
PeaKend/PyChain
40b5f6ce572b64abd7d5a788045732306679dd02
[ "MIT" ]
null
null
null
utils.py
PeaKend/PyChain
40b5f6ce572b64abd7d5a788045732306679dd02
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import hashlib import codecs import time import random import os # declare beginning and end of byte values version_position = { "begin" : 0, "end" : 8 } prev_block_position = { "begin" : 8, "end" : 72 } merkle_root_position = { "begin" : 72, "end" : 136 } timestamp_position = { ...
34.25641
107
0.669411
import hashlib import codecs import time import random import os version_position = { "begin" : 0, "end" : 8 } prev_block_position = { "begin" : 8, "end" : 72 } merkle_root_position = { "begin" : 72, "end" : 136 } timestamp_position = { "begin" : 136, "end" : 144 } bits_position = { "begin" : ...
true
true
1c41cea3ae5095de385ae9afc5ffbbde420efcbb
2,837
py
Python
toontown/coghq/DistributedBattleFactoryAI.py
AnonymousDeveloper65535/open-toontown
3d05c22a7d960ad843dde231140447c46973dba5
[ "BSD-3-Clause" ]
1
2019-11-23T21:54:23.000Z
2019-11-23T21:54:23.000Z
toontown/coghq/DistributedBattleFactoryAI.py
AnonymousDeveloper65535/open-toontown
3d05c22a7d960ad843dde231140447c46973dba5
[ "BSD-3-Clause" ]
null
null
null
toontown/coghq/DistributedBattleFactoryAI.py
AnonymousDeveloper65535/open-toontown
3d05c22a7d960ad843dde231140447c46973dba5
[ "BSD-3-Clause" ]
null
null
null
from toontown.coghq import DistributedLevelBattleAI from direct.directnotify import DirectNotifyGlobal from direct.fsm import State from direct.fsm import ClassicFSM, State from toontown.battle.BattleBase import * import CogDisguiseGlobals from direct.showbase.PythonUtil import addListsByValue class DistributedBattleF...
50.660714
194
0.721889
from toontown.coghq import DistributedLevelBattleAI from direct.directnotify import DirectNotifyGlobal from direct.fsm import State from direct.fsm import ClassicFSM, State from toontown.battle.BattleBase import * import CogDisguiseGlobals from direct.showbase.PythonUtil import addListsByValue class DistributedBattleF...
true
true
1c41cf0961a83e6d398240f56c98e5411cb9fca6
311
py
Python
info.py
morrisjh/Basic-Text-Analyzer
db2cdd8f974c690397b789b154da7a9fbec10ff8
[ "MIT" ]
2
2019-07-02T13:12:04.000Z
2019-07-10T18:39:18.000Z
info.py
morrisjh/Basic-Text-Analyzer
db2cdd8f974c690397b789b154da7a9fbec10ff8
[ "MIT" ]
null
null
null
info.py
morrisjh/Basic-Text-Analyzer
db2cdd8f974c690397b789b154da7a9fbec10ff8
[ "MIT" ]
null
null
null
""" BasicTextAnalyzer Information """ __author__ = "James Morris" __maintainer__ = "James Morris" __email__ = "morrisjamesharry@gmail.com" __license__ = "MIT" __version__ = "0.0.1" __credits__ = ["Tyler Barrus and Peter Norvig (for pyspellchecker"] __url__ = "https://github.com/morrisjh/Basic-Text-Analyzer"
28.272727
67
0.752412
__author__ = "James Morris" __maintainer__ = "James Morris" __email__ = "morrisjamesharry@gmail.com" __license__ = "MIT" __version__ = "0.0.1" __credits__ = ["Tyler Barrus and Peter Norvig (for pyspellchecker"] __url__ = "https://github.com/morrisjh/Basic-Text-Analyzer"
true
true
1c41cf4d92f49bda11f0c1320a11c8c39ba223ba
3,500
py
Python
lib/surface/compute/instances/get_screenshot.py
google-cloud-sdk-unofficial/google-cloud-sdk
2a48a04df14be46c8745050f98768e30474a1aac
[ "Apache-2.0" ]
2
2019-11-10T09:17:07.000Z
2019-12-18T13:44:08.000Z
lib/surface/compute/instances/get_screenshot.py
google-cloud-sdk-unofficial/google-cloud-sdk
2a48a04df14be46c8745050f98768e30474a1aac
[ "Apache-2.0" ]
null
null
null
lib/surface/compute/instances/get_screenshot.py
google-cloud-sdk-unofficial/google-cloud-sdk
2a48a04df14be46c8745050f98768e30474a1aac
[ "Apache-2.0" ]
1
2020-07-25T01:40:19.000Z
2020-07-25T01:40:19.000Z
# -*- coding: utf-8 -*- # # Copyright 2019 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
35.353535
84
0.715143
from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals import base64 import sys from googlecloudsdk.api_lib.compute import base_classes from googlecloudsdk.calliope import base from googlecloudsdk.command_lib.compute.instances import flags from goo...
true
true