hexsha stringlengths 40 40 | size int64 6 1.04M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 247 | max_stars_repo_name stringlengths 4 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 368k ⌀ | 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 247 | max_issues_repo_name stringlengths 4 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 247 | max_forks_repo_name stringlengths 4 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.04M | avg_line_length float64 1.53 618k | max_line_length int64 1 1.02M | alphanum_fraction float64 0 1 | original_content stringlengths 6 1.04M | filtered:remove_non_ascii int64 0 538k | filtered:remove_decorators int64 0 917k | filtered:remove_async int64 0 722k | filtered:remove_classes int64 -45 1M | filtered:remove_generators int64 0 814k | filtered:remove_function_no_docstring int64 -102 850k | filtered:remove_class_no_docstring int64 -3 5.46k | filtered:remove_unused_imports int64 -1,350 52.4k | filtered:remove_delete_markers int64 0 59.6k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
d97b1009737b55084d7dd0d05054d3ac010967a7 | 371 | py | Python | exam/myMusicApp/myMusicApp/albums/urls.py | M0673N/Python-Web-Basics | cecc27f7a12f990756edcc8885290eb3b2e487b7 | [
"MIT"
] | null | null | null | exam/myMusicApp/myMusicApp/albums/urls.py | M0673N/Python-Web-Basics | cecc27f7a12f990756edcc8885290eb3b2e487b7 | [
"MIT"
] | null | null | null | exam/myMusicApp/myMusicApp/albums/urls.py | M0673N/Python-Web-Basics | cecc27f7a12f990756edcc8885290eb3b2e487b7 | [
"MIT"
] | null | null | null | from django.urls import path
from myMusicApp.albums.views import add_album, edit_album, delete_album, album_details
urlpatterns = [
path('add/', add_album, name='add album'),
path('edit/<int:pk>', edit_album, name='edit album'),
path('delete/<int:pk>', delete_album, name='delete album'),
path('details... | 33.727273 | 86 | 0.703504 | from django.urls import path
from myMusicApp.albums.views import add_album, edit_album, delete_album, album_details
urlpatterns = [
path('add/', add_album, name='add album'),
path('edit/<int:pk>', edit_album, name='edit album'),
path('delete/<int:pk>', delete_album, name='delete album'),
path('details... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
5d1859826db53878385f91a6d101ddc246d567ad | 272 | py | Python | _draft/x_7_7-a.py | ofl/kuku2 | 7247fb1862d917d23258ebe7a93dca5939433225 | [
"MIT"
] | null | null | null | _draft/x_7_7-a.py | ofl/kuku2 | 7247fb1862d917d23258ebe7a93dca5939433225 | [
"MIT"
] | 1 | 2021-11-13T08:03:04.000Z | 2021-11-13T08:03:04.000Z | _draft/x_7_7-a.py | ofl/kuku2 | 7247fb1862d917d23258ebe7a93dca5939433225 | [
"MIT"
] | null | null | null | # x_7_7
#
#
pin = '1234' #
pattern1 = r'[0-9]{4}'
pattern2 = r'[2-9]{4}'
pattern3 = r'[0-9]{3}'
pattern4 = r'[0-9]{3, 5}'
print(is_match(r'[0-9]{4}', pin))
| 12.363636 | 39 | 0.591912 | # x_7_7
#
#
from ast import pattern
import re
def is_match(pattern, pin):
return bool(re.match(pattern, pin))
pin = '1234' # 暗証番号
pattern1 = r'[0-9]{4}'
pattern2 = r'[2-9]{4}'
pattern3 = r'[0-9]{3}'
pattern4 = r'[0-9]{3, 5}'
print(is_match(r'[0-9]{4}', pin))
| 12 | 0 | 0 | 0 | 0 | 46 | 0 | -10 | 68 |
3feb7052451d8c4074dbc671afc9e927c7a36f92 | 1,850 | py | Python | blog/admin.py | crazyZSShuo/blog_site | 7f16eac9737f386c11094c3b38f070ad4065a9ff | [
"Apache-2.0"
] | null | null | null | blog/admin.py | crazyZSShuo/blog_site | 7f16eac9737f386c11094c3b38f070ad4065a9ff | [
"Apache-2.0"
] | null | null | null | blog/admin.py | crazyZSShuo/blog_site | 7f16eac9737f386c11094c3b38f070ad4065a9ff | [
"Apache-2.0"
] | null | null | null | from django.contrib import admin
# Register your models here.
from .models import UserProfile, Article, Category, Siteinfo, Acimage
admin.site.register(UserProfile,UserProfileAdmin)
admin.site.register(Category,CategoryAdmin)
admin.site.register(Article,ArticleAdmin)
admin.site.register(Siteinfo,SiteinfoAdmin... | 31.355932 | 132 | 0.737297 | from django.contrib import admin
from django.utils.safestring import mark_safe
# Register your models here.
from .models import UserProfile,Article,Category,Siteinfo,Acimage
class UserProfileAdmin(admin.ModelAdmin):
# 后台显示字段
list_display = ['username','user_nick_name','user_detail','email','user_gender','us... | 186 | 0 | 0 | 1,268 | 0 | 0 | 0 | 20 | 137 |
1a9fd842fe647bf4cf424d22c4ea3d6ce43f8708 | 1,577 | py | Python | imagemks/filters/fftgaussian.py | SvenPVoigt/ImageMKS | 7daa8329171c8e3e9cfe379043c7bf3d02950733 | [
"MIT"
] | null | null | null | imagemks/filters/fftgaussian.py | SvenPVoigt/ImageMKS | 7daa8329171c8e3e9cfe379043c7bf3d02950733 | [
"MIT"
] | null | null | null | imagemks/filters/fftgaussian.py | SvenPVoigt/ImageMKS | 7daa8329171c8e3e9cfe379043c7bf3d02950733 | [
"MIT"
] | null | null | null | from ._fftconvolve import fftconvolve2d
from ..structures.weights import gauss
from math import ceil
def fftgauss(img, sigma, theta=0, pad_type=None, **kwargs):
'''
Smooths the input image with a gaussian kernel. Uses the fft method and allows
specifying a custom pad type with **kwargs from numpy.pad docu... | 33.553191 | 86 | 0.674065 | from ._fftconvolve import fftconvolve2d
from ..structures.weights import gauss
from math import ceil
def fftgauss(img, sigma, theta=0, pad_type=None, **kwargs):
'''
Smooths the input image with a gaussian kernel. Uses the fft method and allows
specifying a custom pad type with **kwargs from numpy.pad docu... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
a0d112fcb00d022605f6083da06c816f86920b58 | 1,622 | py | Python | Folder/GPSServer.py | Kuailun/Zhengdong_Survey | 595dba03fa447aa992cd68ed09592ace55003c8c | [
"MIT"
] | null | null | null | Folder/GPSServer.py | Kuailun/Zhengdong_Survey | 595dba03fa447aa992cd68ed09592ace55003c8c | [
"MIT"
] | 1 | 2020-04-22T14:04:30.000Z | 2020-04-22T14:04:30.000Z | Folder/GPSServer.py | Kuailun/Zhengdong_Survey | 595dba03fa447aa992cd68ed09592ace55003c8c | [
"MIT"
] | null | null | null | from flask import Flask
import os
from flask_apscheduler import APScheduler
import xlrd
app = Flask(__name__)
if not os.path.exists("Database"):
os.mkdir("Database")
if not os.path.exists("Backup"):
os.mkdir("Backup")
mData={}
mID={}
xls=xlrd.open_workbook('commuting distance and time.xls')
sheet=xls.sheet_b... | 19.082353 | 57 | 0.637485 | from flask import Flask,jsonify,request
import os
import json
import codecs
import xlwt
from flask_apscheduler import APScheduler
import time
import random
import math
import xlrd
app = Flask(__name__)
if not os.path.exists("Database"):
os.mkdir("Database")
if not os.path.exists("Backup"):
os.mkdir("Backup")
... | 6 | 523 | 0 | 0 | 0 | 303 | 0 | -40 | 224 |
2d0964059393b81d50a76e5198f2cc39df5e7fae | 2,456 | py | Python | retro/tables/pexp_xyz.py | ellohfin/retro | 58ec8f5b698e6140acd215717f051d99e407c4e5 | [
"Apache-2.0"
] | 1 | 2018-03-02T01:05:52.000Z | 2018-03-02T01:05:52.000Z | retro/tables/pexp_xyz.py | ellohfin/retro | 58ec8f5b698e6140acd215717f051d99e407c4e5 | [
"Apache-2.0"
] | 30 | 2018-01-30T21:03:28.000Z | 2019-11-07T16:42:07.000Z | retro/tables/pexp_xyz.py | ellohfin/retro | 58ec8f5b698e6140acd215717f051d99e407c4e5 | [
"Apache-2.0"
] | 6 | 2017-07-27T19:49:13.000Z | 2019-11-19T13:38:27.000Z | # -*- coding: utf-8 -*-
# pylint: disable=wrong-import-position
"""
Function for computing expected number of photons to survive from a
time-independent Cartesian-binned table.
"""
from __future__ import absolute_import, division, print_function
__all__ = ['pexp_xyz']
__author__ = 'P. Eller, J.L. Lanfranchi'
__lice... | 31.088608 | 77 | 0.687296 | # -*- coding: utf-8 -*-
# pylint: disable=wrong-import-position
"""
Function for computing expected number of photons to survive from a
time-independent Cartesian-binned table.
"""
from __future__ import absolute_import, division, print_function
__all__ = ['pexp_xyz']
__author__ = 'P. Eller, J.L. Lanfranchi'
__lice... | 0 | 1,217 | 0 | 0 | 0 | 0 | 0 | 26 | 68 |
0ef13dc67dc19f36a03236b125584c776361b5e5 | 6,959 | py | Python | conveyoragent/engine/api/contrib/migration.py | Hybrid-Cloud/conveyor-agent | 034f683fc194669301e185260fb4082478bc83a0 | [
"Apache-2.0"
] | null | null | null | conveyoragent/engine/api/contrib/migration.py | Hybrid-Cloud/conveyor-agent | 034f683fc194669301e185260fb4082478bc83a0 | [
"Apache-2.0"
] | null | null | null | conveyoragent/engine/api/contrib/migration.py | Hybrid-Cloud/conveyor-agent | 034f683fc194669301e185260fb4082478bc83a0 | [
"Apache-2.0"
] | null | null | null | # Copyright 2011 OpenStack Foundation
# Copyright 2011 Justin Santa Barbara
# 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/l... | 34.795 | 78 | 0.599943 | # Copyright 2011 OpenStack Foundation
# Copyright 2011 Justin Santa Barbara
# 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/l... | 0 | 4,349 | 0 | 1,569 | 0 | 0 | 0 | 77 | 135 |
0a2ef2bff53ca82f1c2d9d380cd0412b82d2d538 | 15,096 | py | Python | earth_enterprise/src/fusion/portableglobe/servers/portable_server.py | ezeeyahoo/earthenterprise | b6cac9e6228946f2f17d1edb75e118aeb3e8e8c9 | [
"Apache-2.0"
] | 2,661 | 2017-03-20T22:12:50.000Z | 2022-03-30T09:43:19.000Z | earth_enterprise/src/fusion/portableglobe/servers/portable_server.py | ezeeyahoo/earthenterprise | b6cac9e6228946f2f17d1edb75e118aeb3e8e8c9 | [
"Apache-2.0"
] | 1,531 | 2017-03-24T17:20:32.000Z | 2022-03-16T18:11:14.000Z | earth_enterprise/src/fusion/portableglobe/servers/portable_server.py | ezeeyahoo/earthenterprise | b6cac9e6228946f2f17d1edb75e118aeb3e8e8c9 | [
"Apache-2.0"
] | 990 | 2017-03-24T11:54:28.000Z | 2022-03-22T11:51:47.000Z | #!/usr/bin/env python2.7
#
# Copyright 2017 Google Inc, 2019 Open GEE Contributors.
#
# 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
#
# Unl... | 34.78341 | 78 | 0.678458 | #!/usr/bin/env python2.7
#
# Copyright 2017 Google Inc, 2019 Open GEE Contributors.
#
# 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
#
# Unl... | 0 | 9,175 | 0 | 2,398 | 0 | 0 | 0 | 0 | 391 |
9e3b04c387e2d782f322458fda8ec7701c1d7f0c | 8,405 | py | Python | pysnmp/HH3C-DLDP2-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 11 | 2021-02-02T16:27:16.000Z | 2021-08-31T06:22:49.000Z | pysnmp/HH3C-DLDP2-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 75 | 2021-02-24T17:30:31.000Z | 2021-12-08T00:01:18.000Z | pysnmp/HH3C-DLDP2-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 10 | 2019-04-30T05:51:36.000Z | 2022-02-16T03:33:41.000Z | #
# PySNMP MIB module HH3C-DLDP2-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/HH3C-DLDP2-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 19:13:05 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2... | 127.348485 | 1,240 | 0.767519 | #
# PySNMP MIB module HH3C-DLDP2-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/HH3C-DLDP2-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 19:13:05 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
6fbcb112e3cbf7b7ec5221eb2478ad7087c4499d | 7,248 | py | Python | app/math_functions.py | cchenzi/INE5420 | b14b22b1400e21b4b722d427e1f1375778c5929c | [
"MIT"
] | 2 | 2021-06-24T04:31:37.000Z | 2021-06-24T19:35:15.000Z | app/math_functions.py | cchenzi/INE5420 | b14b22b1400e21b4b722d427e1f1375778c5929c | [
"MIT"
] | null | null | null | app/math_functions.py | cchenzi/INE5420 | b14b22b1400e21b4b722d427e1f1375778c5929c | [
"MIT"
] | 1 | 2021-06-24T21:26:36.000Z | 2021-06-24T21:26:36.000Z | import numpy as np
from functools import reduce
from app.utils import get_reflection_indexes
def build_translation_matrix(Tx, Ty, Tz):
"""
Build translation matrix as:
[1 0 0 0]
[0 1 0 0]
[0 0 1 0]
[Tx Ty Tz 1]
"""
matrix = np.identity(4)
matrix[3][0]... | 23.763934 | 87 | 0.55436 | import numpy as np
from functools import reduce
from app.utils import get_reflection_indexes, transformations_codes
from app.config import (
X_MAX_TRANSLATED,
X_MIN_TRANSLATED,
Y_MAX_TRANSLATED,
Y_MIN_TRANSLATED,
MAX_NORMALIZED_VALUE,
MIN_NORMALIZED_VALUE,
)
def x_viewport_transform(
x_win... | 34 | 0 | 0 | 0 | 0 | 2,883 | 0 | 168 | 298 |
0a2958118b8db956dd2ee11d7db9251548a92702 | 1,486 | py | Python | planning_system/db/schema/views/finance/v_calc_staff_period.py | jehboyes/planning_system | a415f1408ef344732498d2ffb111dfd187b9b50f | [
"MIT"
] | null | null | null | planning_system/db/schema/views/finance/v_calc_staff_period.py | jehboyes/planning_system | a415f1408ef344732498d2ffb111dfd187b9b50f | [
"MIT"
] | null | null | null | planning_system/db/schema/views/finance/v_calc_staff_period.py | jehboyes/planning_system | a415f1408ef344732498d2ffb111dfd187b9b50f | [
"MIT"
] | null | null | null | """
Alternative calculation to the v_calc_staff_monthly set of views.
This one differs by having period as a column. There is not a significant
performance difference beteween the two until
it comes to aggregation (which for the other, could require an unpivot).
"""
from planning_system.db.schema.views.finance.v_c... | 38.102564 | 102 | 0.668237 | """
Alternative calculation to the v_calc_staff_monthly set of views.
This one differs by having period as a column. There is not a significant
performance difference beteween the two until
it comes to aggregation (which for the other, could require an unpivot).
"""
from planning_system.db.schema.views.finance.v_c... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
08f523c4abe909ef500adec76786ecc682e7f3ad | 1,051 | py | Python | Two Pointers/019. Remove Nth Node From End of List.py | beckswu/Leetcode | 480e8dc276b1f65961166d66efa5497d7ff0bdfd | [
"MIT"
] | 138 | 2020-02-08T05:25:26.000Z | 2021-11-04T11:59:28.000Z | Two Pointers/019. Remove Nth Node From End of List.py | beckswu/Leetcode | 480e8dc276b1f65961166d66efa5497d7ff0bdfd | [
"MIT"
] | null | null | null | Two Pointers/019. Remove Nth Node From End of List.py | beckswu/Leetcode | 480e8dc276b1f65961166d66efa5497d7ff0bdfd | [
"MIT"
] | 24 | 2021-01-02T07:18:43.000Z | 2022-03-20T08:17:54.000Z | """
19. Remove Nth Node From End of List
Given linked list: 1->2->3->4->5, and n = 2.
After removing the second node from the end, the linked list becomes 1->2->3->5.
"""
# Definition for singly-linked list.
# class ListNode:
# def __init__(self, x):
# self.val = x
# self.next = None
... | 25.634146 | 122 | 0.52902 | """
19. Remove Nth Node From End of List
Given linked list: 1->2->3->4->5, and n = 2.
After removing the second node from the end, the linked list becomes 1->2->3->5.
"""
# Definition for singly-linked list.
# class ListNode:
# def __init__(self, x):
# self.val = x
# self.next = None
... | 90 | 0 | 0 | 632 | 0 | 0 | 0 | 0 | 50 |
025c4d7441b98a62c194d9ead223718491d7e529 | 9,159 | py | Python | convlab2/dst/rule/multiwoz/dst.py | ljw23/ConvLab-2 | 13d48ea0e441701bd66100689b6c25b561f15525 | [
"Apache-2.0"
] | 339 | 2020-03-04T09:43:22.000Z | 2022-03-26T17:27:38.000Z | convlab2/dst/rule/multiwoz/dst.py | ljw23/ConvLab-2 | 13d48ea0e441701bd66100689b6c25b561f15525 | [
"Apache-2.0"
] | 122 | 2020-04-12T04:19:06.000Z | 2022-03-23T14:20:57.000Z | convlab2/dst/rule/multiwoz/dst.py | ljw23/ConvLab-2 | 13d48ea0e441701bd66100689b6c25b561f15525 | [
"Apache-2.0"
] | 138 | 2020-02-18T16:48:04.000Z | 2022-03-26T17:27:43.000Z |
if __name__ == '__main__':
# from convlab2.dst.rule.multiwoz import RuleDST
dst = RuleDST()
# Action is a dict. Its keys are strings(domain-type pairs, both uppercase and lowercase is OK) and its values are list of lists.
# The domain may be one of ('Attraction', 'Hospital', 'Booking', 'Hotel', 'Re... | 56.888199 | 291 | 0.398188 | import json
import os
from convlab2.util.multiwoz.state import default_state
from convlab2.dst.rule.multiwoz.dst_util import normalize_value
from convlab2.dst.dst import DST
from convlab2.util.multiwoz.multiwoz_slot_trans import REF_SYS_DA
class RuleDST(DST):
"""Rule based DST which trivially updates new values ... | 0 | 0 | 0 | 3,123 | 0 | 0 | 0 | 108 | 156 |
158997cdc6825b7103282f3d12014097e98b55e1 | 2,163 | py | Python | toontown/coghq/LawbotOfficeDiamondRoom_Trap00_Cogs.py | LittleNed/toontown-stride | 1252a8f9a8816c1810106006d09c8bdfe6ad1e57 | [
"Apache-2.0"
] | 3 | 2020-01-02T08:43:36.000Z | 2020-07-05T08:59:02.000Z | toontown/coghq/LawbotOfficeDiamondRoom_Trap00_Cogs.py | NoraTT/Historical-Commits-Project-Altis-Source | fe88e6d07edf418f7de6ad5b3d9ecb3d0d285179 | [
"Apache-2.0"
] | null | null | null | toontown/coghq/LawbotOfficeDiamondRoom_Trap00_Cogs.py | NoraTT/Historical-Commits-Project-Altis-Source | fe88e6d07edf418f7de6ad5b3d9ecb3d0d285179 | [
"Apache-2.0"
] | 4 | 2019-06-20T23:45:23.000Z | 2020-10-14T20:30:15.000Z | from toontown.toonbase import ToontownGlobals
CogParent = 100007
CogParent1 = 100009
BattlePlace1 = 100004
BattlePlace2 = 100005
BattleCellId = 0
BattleCellId1 = 1
BattleCells = {BattleCellId: {'parentEntId': BattlePlace1,
'pos': Point3(0, 0, 0)},
BattleCellId1: {'parentEntId': BattlePlace2,
... | 25.151163 | 58 | 0.630606 | from toontown.coghq.SpecImports import *
from toontown.toonbase import ToontownGlobals
CogParent = 100007
CogParent1 = 100009
BattlePlace1 = 100004
BattlePlace2 = 100005
BattleCellId = 0
BattleCellId1 = 1
BattleCells = {BattleCellId: {'parentEntId': BattlePlace1,
'pos': Point3(0, 0, 0)},
BattleCellId1:... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 19 | 22 |
728e2b2cdd3da6ce82622492cfcd44f328297a42 | 968 | py | Python | build/openwisp_websocket/module_settings.py | tkaefer/docker-openwisp | 93e162ccb44382b5b2d0092d10cac236d0069516 | [
"BSD-3-Clause"
] | 127 | 2019-07-12T15:41:20.000Z | 2022-03-29T18:50:37.000Z | build/openwisp_websocket/module_settings.py | tkaefer/docker-openwisp | 93e162ccb44382b5b2d0092d10cac236d0069516 | [
"BSD-3-Clause"
] | 138 | 2019-05-14T19:38:30.000Z | 2022-03-31T20:33:56.000Z | build/openwisp_websocket/module_settings.py | tkaefer/docker-openwisp | 93e162ccb44382b5b2d0092d10cac236d0069516 | [
"BSD-3-Clause"
] | 69 | 2019-05-16T18:56:41.000Z | 2022-03-23T05:41:55.000Z | INSTALLED_APPS = [
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.gis',
# all-auth
'django.contrib.sites',
'allauth',
'allauth.account',
'allauth.socialaccount',
# o... | 22 | 37 | 0.646694 | INSTALLED_APPS = [
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.gis',
# all-auth
'django.contrib.sites',
'allauth',
'allauth.account',
'allauth.socialaccount',
# o... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
ff84cc53d95a666037cb6e3407c5b81895ed51d7 | 140 | py | Python | src/amuse/support/data/core.py | rknop/amuse | 85d5bdcc29cfc87dc69d91c264101fafd6658aec | [
"Apache-2.0"
] | 131 | 2015-06-04T09:06:57.000Z | 2022-02-01T12:11:29.000Z | src/amuse/support/data/core.py | rknop/amuse | 85d5bdcc29cfc87dc69d91c264101fafd6658aec | [
"Apache-2.0"
] | 690 | 2015-10-17T12:18:08.000Z | 2022-03-31T16:15:58.000Z | src/amuse/support/data/core.py | rieder/amuse | 3ac3b6b8f922643657279ddee5c8ab3fc0440d5e | [
"Apache-2.0"
] | 102 | 2015-01-22T10:00:29.000Z | 2022-02-09T13:29:43.000Z | import warnings
warnings.warn("amuse.support.data.core has moved to amuse.datamodel", DeprecationWarning)
| 17.5 | 89 | 0.8 | import warnings
from amuse.datamodel import *
warnings.warn("amuse.support.data.core has moved to amuse.datamodel", DeprecationWarning)
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8 | 23 |
0f366542032fb61dd89f4a087dbe245ab3cc9b19 | 1,220 | py | Python | source/pkgsrc/lang/python37/patches/patch-Lib_ctypes_macholib_dyld.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 1 | 2021-11-20T22:46:39.000Z | 2021-11-20T22:46:39.000Z | source/pkgsrc/lang/python37/patches/patch-Lib_ctypes_macholib_dyld.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | source/pkgsrc/lang/python37/patches/patch-Lib_ctypes_macholib_dyld.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | $NetBSD: patch-Lib_ctypes_macholib_dyld.py,v 1.1 2020/11/17 19:33:26 sjmulder Exp $
Support for macOS 11 and Apple Silicon (ARM). Mostly backported from:
https://github.com/python/cpython/pull/22855
--- Lib/ctypes/macholib/dyld.py.orig 2020-08-15 05:20:16.000000000 +0000
+++ Lib/ctypes/macholib/dyld.py
@@ -6,6 +6,11 ... | 33.888889 | 83 | 0.67623 | $NetBSD: patch-Lib_ctypes_macholib_dyld.py,v 1.1 2020/11/17 19:33:26 sjmulder Exp $
Support for macOS 11 and Apple Silicon (ARM). Mostly backported from:
https://github.com/python/cpython/pull/22855
--- Lib/ctypes/macholib/dyld.py.orig 2020-08-15 05:20:16.000000000 +0000
+++ Lib/ctypes/macholib/dyld.py
@@ -6,6 +6,11 ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 23 |
47d603195b3dd04da5450dec1a13304a09a60378 | 1,958 | py | Python | OrchardVision/orchardMap/views.py | Michalas-Jomi/Orchard-Vision | cc07c4195d527563f232b03831d79a824bb43d05 | [
"MIT"
] | null | null | null | OrchardVision/orchardMap/views.py | Michalas-Jomi/Orchard-Vision | cc07c4195d527563f232b03831d79a824bb43d05 | [
"MIT"
] | null | null | null | OrchardVision/orchardMap/views.py | Michalas-Jomi/Orchard-Vision | cc07c4195d527563f232b03831d79a824bb43d05 | [
"MIT"
] | null | null | null |
import OrchardVision.settings as settings
import broker.models as models | 30.123077 | 80 | 0.644535 | from django.http import request
from django.views import generic
import OrchardVision.settings as settings
import broker.models as models
from broker.models import Tree
from html import escape
import json
class MapView(generic.TemplateView):
template_name = "orchardMap/map.html"
def get_context_data(self, *... | 0 | 0 | 0 | 1,660 | 0 | 0 | 0 | 22 | 203 |
ce6ebe8604df48f97f24099f183578496e15d0fd | 458 | py | Python | main.py | trampfox/nimbus-phantom-rest-client | f0559b48bd47dfe66d39c33c39015468785790fb | [
"Apache-2.0"
] | null | null | null | main.py | trampfox/nimbus-phantom-rest-client | f0559b48bd47dfe66d39c33c39015468785790fb | [
"Apache-2.0"
] | null | null | null | main.py | trampfox/nimbus-phantom-rest-client | f0559b48bd47dfe66d39c33c39015468785790fb | [
"Apache-2.0"
] | null | null | null | __author__ = 'Davide Monfrecola'
from phantomrestclient import sites
# only for testing purpouse
if __name__ == "__main__":
#d = domains.Domains()
#d.get_all()
#lc = launchconfigurations.LaunchConfigurations()
#lc.get_all()
lc = sites.Sites()
print(lc.get_all()) | 28.625 | 53 | 0.768559 | __author__ = 'Davide Monfrecola'
from phantomrestclient import auth
from phantomrestclient import launchconfigurations
from phantomrestclient import domains
from phantomrestclient import sites
from phantomrestclient import phantomrequests
# only for testing purpouse
if __name__ == "__main__":
#d = domains.Domains... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 82 | 89 |
fa1d1d19d8f79e38e0ed816bc8d8035e84d8d1cd | 1,455 | py | Python | Python3-GUI/QuickStart-Tkinter/Tkinter_04_grid_Entry.py | anliven/Reading-Code-Learning-Python | a814cab207bbaad6b5c69b9feeb8bf2f459baf2b | [
"Apache-2.0"
] | null | null | null | Python3-GUI/QuickStart-Tkinter/Tkinter_04_grid_Entry.py | anliven/Reading-Code-Learning-Python | a814cab207bbaad6b5c69b9feeb8bf2f459baf2b | [
"Apache-2.0"
] | null | null | null | Python3-GUI/QuickStart-Tkinter/Tkinter_04_grid_Entry.py | anliven/Reading-Code-Learning-Python | a814cab207bbaad6b5c69b9feeb8bf2f459baf2b | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import tkinter
root = tkinter.Tk()
root.wm_title("Tkinter04 Demo")
label1 = tkinter.Label(root, text=u":").grid(row=0, sticky="w")
label2 = tkinter.Label(root, text=u":").grid(row=1, sticky="w")
label3 = tkinter.Label(root, text=u"")
var = tkinter.Variable()
var.set("tester")
en... | 25.982143 | 72 | 0.636426 | # -*- coding: utf-8 -*-
import tkinter
root = tkinter.Tk()
root.wm_title("Tkinter04 Demo")
label1 = tkinter.Label(root, text=u"账号:").grid(row=0, sticky="w")
label2 = tkinter.Label(root, text=u"密码:").grid(row=1, sticky="w")
label3 = tkinter.Label(root, text=u"")
var = tkinter.Variable()
var.set("tester")
... | 747 | 0 | 0 | 0 | 0 | 235 | 0 | 0 | 25 |
4961797e3e55b4d0b3285f57e8cf405242dc635b | 824 | py | Python | tests/test_jhb.py | dapu/femagtools | 95eaf750adc2013232cdf482e523b3900ac6eb08 | [
"BSD-2-Clause"
] | 21 | 2016-09-07T12:17:21.000Z | 2022-01-08T11:43:24.000Z | tests/test_jhb.py | dapu/femagtools | 95eaf750adc2013232cdf482e523b3900ac6eb08 | [
"BSD-2-Clause"
] | 63 | 2016-09-11T12:04:48.000Z | 2022-03-28T13:22:16.000Z | tests/test_jhb.py | dapu/femagtools | 95eaf750adc2013232cdf482e523b3900ac6eb08 | [
"BSD-2-Clause"
] | 8 | 2017-07-12T13:05:57.000Z | 2022-01-08T11:43:26.000Z | #!/usr/bin/env python
#
| 27.466667 | 69 | 0.595874 | #!/usr/bin/env python
#
import os
import femagtools.jhb
def test_read_jhb():
testPath = os.path.split(__file__)[0]
if not testPath:
testPath = '.'
filename = "data/M270-50A_1000Hz_L.jhb"
jhb = femagtools.jhb.Reader('{0}/{1}'.format(testPath, filename))
assert jhb['name'] == 'M270-50A_1000H... | 0 | 0 | 0 | 0 | 0 | 719 | 0 | -12 | 90 |
5cb51cc7cf3c23cb66d568666e6dc636c413aa03 | 2,882 | py | Python | QuantTorch/layers/xnor_layers.py | Enderdead/BinaryConnect_PyTorch | 990e970b1fbd299ff88200db21a9cc3fe44706d3 | [
"MIT"
] | 75 | 2019-03-19T07:36:56.000Z | 2021-12-23T02:34:59.000Z | QuantTorch/layers/xnor_layers.py | Enderdead/BinaryConnect_PyTorch | 990e970b1fbd299ff88200db21a9cc3fe44706d3 | [
"MIT"
] | 10 | 2019-03-19T21:16:56.000Z | 2019-04-16T15:05:37.000Z | QuantTorch/layers/xnor_layers.py | Enderdead/BinaryConnect_PyTorch | 990e970b1fbd299ff88200db21a9cc3fe44706d3 | [
"MIT"
] | 9 | 2019-08-12T10:33:55.000Z | 2021-07-23T02:10:06.000Z | import warnings
warnings.simplefilter("always",DeprecationWarning)
warnings.warn("Module not finished due to gradient implementation on conv layer !", ImportWarning)
| 40.027778 | 122 | 0.653019 | import torch
from .common import QLayer
from ..functions import xnor_connect
import warnings
warnings.simplefilter("always",DeprecationWarning)
warnings.warn("Module not finished due to gradient implementation on conv layer !", ImportWarning)
class LinearXNOR(torch.nn.Linear, QLayer):
@staticmethod
def conve... | 0 | 784 | 0 | 1,805 | 0 | 0 | 0 | 11 | 113 |
e6dfa4e39472fd6034ac5499ccd65e3b9f918aa8 | 935 | py | Python | tests/molecular/molecules/molecule/test_dump_molecular_structures.py | stevenkbennett/stk | a8311fa6110adc0ea593a24d9a0c064597b1b174 | [
"MIT"
] | 21 | 2018-04-12T16:25:24.000Z | 2022-02-14T23:05:43.000Z | tests/molecular/molecules/molecule/test_dump_molecular_structures.py | stevenkbennett/stk | a8311fa6110adc0ea593a24d9a0c064597b1b174 | [
"MIT"
] | 8 | 2019-03-19T12:36:36.000Z | 2020-11-11T12:46:00.000Z | tests/molecular/molecules/molecule/test_dump_molecular_structures.py | stevenkbennett/stk | a8311fa6110adc0ea593a24d9a0c064597b1b174 | [
"MIT"
] | 5 | 2018-08-07T13:00:16.000Z | 2021-11-01T00:55:10.000Z | def test_dump_molecular_structures(
request,
tmp_path,
molecule_db,
name_db,
case_data,
):
"""
Dump molecular structures.
This test dumps molecules to files and to a MongoDB database
so that they can be visually inspected.
Parameters
----------
request : :class:`pytest.... | 25.27027 | 70 | 0.668449 | def test_dump_molecular_structures(
request,
tmp_path,
molecule_db,
name_db,
case_data,
):
"""
Dump molecular structures.
This test dumps molecules to files and to a MongoDB database
so that they can be visually inspected.
Parameters
----------
request : :class:`pytest.... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
6e7ef4889ec0856753fdc799a4f1a7beee999fbf | 961 | py | Python | app/conversations/models.py | gurnitha/2022-django4-clone-airbnb | 169060e3da0abf91f4ba25740c7bf6d2bea01750 | [
"Unlicense"
] | null | null | null | app/conversations/models.py | gurnitha/2022-django4-clone-airbnb | 169060e3da0abf91f4ba25740c7bf6d2bea01750 | [
"Unlicense"
] | null | null | null | app/conversations/models.py | gurnitha/2022-django4-clone-airbnb | 169060e3da0abf91f4ba25740c7bf6d2bea01750 | [
"Unlicense"
] | null | null | null | # app/conversations/models.py
# Django modules
# Locals
# Create your models here.
# NAMA MODEL/TABEL: Conversation
# NAMA MODEL/TABEL: Message
| 22.348837 | 50 | 0.766909 | # app/conversations/models.py
# Django modules
from django.db import models
# Locals
from app.users.models import MyCustomUser
# Create your models here.
# NAMA MODEL/TABEL: Conversation
class Conversation(models.Model):
participans = models.ManyToManyField(
"users.MyCustomUser", blank=True)
created = models.... | 0 | 0 | 0 | 695 | 0 | 0 | 0 | 27 | 88 |
b8bf26ec2ce6a033aaa38387d0f109b0f1a76f17 | 918 | py | Python | scrappers/plugins/foxnews/__init__.py | nathanIL/openews | 17f07de528342944f26855192db8019a0dbcc3a0 | [
"Apache-2.0"
] | 2 | 2016-01-10T08:45:29.000Z | 2019-10-25T06:53:39.000Z | scrappers/plugins/foxnews/__init__.py | nathanIL/openews | 17f07de528342944f26855192db8019a0dbcc3a0 | [
"Apache-2.0"
] | 3 | 2016-01-07T15:43:40.000Z | 2016-01-09T14:44:08.000Z | scrappers/plugins/foxnews/__init__.py | nathanIL/openews | 17f07de528342944f26855192db8019a0dbcc3a0 | [
"Apache-2.0"
] | null | null | null | import scrappers
| 36.72 | 101 | 0.59695 | import scrappers
import scrappers.mixins
class FoxNews(scrappers.mixins.RSSScrapper, scrappers.Scrapper):
"""The Fox News RSS feeds scrapper.
"""
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
def should_translate(self):
return False
def encoding(self):
... | 0 | 0 | 0 | 853 | 0 | 0 | 0 | 2 | 45 |
39239c0cbe321e1e0c50301232271a8f5a6b8d08 | 4,467 | py | Python | seashells/__init__.py | anishathalye/conch | 878da872ff010dac44fa933edf565da3f7ed1bee | [
"MIT"
] | 651 | 2017-07-06T09:10:36.000Z | 2022-03-20T04:26:30.000Z | seashells/__init__.py | anishathalye/conch | 878da872ff010dac44fa933edf565da3f7ed1bee | [
"MIT"
] | 20 | 2017-07-11T02:06:13.000Z | 2021-08-22T09:27:07.000Z | seashells/__init__.py | anishathalye/conch | 878da872ff010dac44fa933edf565da3f7ed1bee | [
"MIT"
] | 23 | 2017-07-10T20:01:44.000Z | 2022-01-31T22:22:52.000Z | #!/usr/bin/env python
# Copyright (c) 2018 Anish Athalye (me@anishathalye.com)
#
# 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
... | 33.586466 | 81 | 0.60197 | #!/usr/bin/env python
# Copyright (c) 2018 Anish Athalye (me@anishathalye.com)
#
# 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
... | 0 | 0 | 0 | 0 | 0 | 2,993 | 0 | -55 | 202 |
6460202dd69850f1791d42f5cdbd6f37acc6169a | 2,048 | py | Python | complex_relations.py | SebaLenny/DataGeneration | dbb92ec1cebd661d7e1d8ba06c97dc8900cfecb0 | [
"MIT"
] | null | null | null | complex_relations.py | SebaLenny/DataGeneration | dbb92ec1cebd661d7e1d8ba06c97dc8900cfecb0 | [
"MIT"
] | null | null | null | complex_relations.py | SebaLenny/DataGeneration | dbb92ec1cebd661d7e1d8ba06c97dc8900cfecb0 | [
"MIT"
] | null | null | null | from faker import Faker
from generators.random_relation_gen import RandomRelationGen
from base.field_base import FieldBase
from generators.universal_function_generator import UniversalFunctionGenerator
from generators.print_relations_generator import PrintRelationsGenerator
from base.model_base import ModelBase
from ba... | 31.030303 | 78 | 0.689941 | from faker import Faker
from generators.uniform_distribution_gen import UniformDistributionGen
from generators.random_relation_gen import RandomRelationGen
from base.field_base import FieldBase
from generators.normal_distribution_gen import NormalDistributionGen
from generators.first_name_generator import FirstNameGene... | 0 | 0 | 0 | 280 | 0 | 0 | 0 | 176 | 157 |
576b5d0ffd656d923b719f6f39f44366df52d2e7 | 45,723 | py | Python | devtest/devices/android/adb.py | pycopia/devtest | 9ec93045ba4bab5b20ce99dc61cebd5b5a234d01 | [
"Apache-2.0"
] | null | null | null | devtest/devices/android/adb.py | pycopia/devtest | 9ec93045ba4bab5b20ce99dc61cebd5b5a234d01 | [
"Apache-2.0"
] | null | null | null | devtest/devices/android/adb.py | pycopia/devtest | 9ec93045ba4bab5b20ce99dc61cebd5b5a234d01 | [
"Apache-2.0"
] | null | null | null | # 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, software
# distributed under the ... | 34.983168 | 97 | 0.58487 | # 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, software
# distributed under the ... | 0 | 221 | 27,407 | 13,557 | 0 | 517 | 0 | 86 | 838 |
4928be4151cd434441ae17f011c08dddb5da8fa7 | 2,857 | py | Python | build_wmc.py | giulia-berto/app-classifyber | c25543bfae915e3ab732e5e9beb22bc60759b9ec | [
"MIT"
] | 3 | 2019-12-17T09:52:05.000Z | 2021-01-15T00:47:45.000Z | build_wmc.py | giulia-berto/app-classifyber | c25543bfae915e3ab732e5e9beb22bc60759b9ec | [
"MIT"
] | null | null | null | build_wmc.py | giulia-berto/app-classifyber | c25543bfae915e3ab732e5e9beb22bc60759b9ec | [
"MIT"
] | 1 | 2019-12-09T14:50:30.000Z | 2019-12-09T14:50:30.000Z | import os
import sys
import json
import argparse
import numpy as np
import nibabel as nib
import scipy.io as sio
from json import encoder
from matplotlib import colors as mcolors
encoder.FLOAT_REPR = lambda o: format(o, '.2f')
def build_wmc(tck_file, tractID_list):
"""
Build the wmc structure.
"""
p... | 31.395604 | 94 | 0.645782 | import os
import sys
import json
import argparse
import numpy as np
import nibabel as nib
import scipy.io as sio
from matplotlib import cm
from json import encoder
from matplotlib import colors as mcolors
encoder.FLOAT_REPR = lambda o: format(o, '.2f')
def build_wmc(tck_file, tractID_list):
"""
Build the wm... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 | 22 |
4494ce25eb6a925df570942e279f006207ebd024 | 95 | py | Python | gerapy_auto_extractor/settings.py | zanachka/GerapyAutoExtractor | 152007f31e6cf2a7c08f07be95b24043976b2ce0 | [
"Apache-2.0"
] | 214 | 2020-06-27T23:23:04.000Z | 2022-03-28T04:34:40.000Z | Engine/gerapy_auto_extractor/settings.py | Justin3go/xiu-search | 3f42d946c98e312fa2eb3397824758465b959518 | [
"MulanPSL-1.0"
] | 16 | 2020-07-07T06:47:16.000Z | 2022-01-19T05:27:55.000Z | Engine/gerapy_auto_extractor/settings.py | Justin3go/xiu-search | 3f42d946c98e312fa2eb3397824758465b959518 | [
"MulanPSL-1.0"
] | 60 | 2020-06-29T07:37:55.000Z | 2022-02-25T03:07:16.000Z | import environs
env = environs.Env()
env.read_env()
APP_DEBUG = env.bool('APP_DEBUG', False)
| 13.571429 | 40 | 0.726316 | import environs
env = environs.Env()
env.read_env()
APP_DEBUG = env.bool('APP_DEBUG', False)
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
dee680aa095f3c45ca322d788702ef8a34d37f78 | 714 | py | Python | prog.py | AdarshK1/FDAnalysis | 202514bfd25429d24c311dac65c8f1f467257f7a | [
"Apache-2.0"
] | null | null | null | prog.py | AdarshK1/FDAnalysis | 202514bfd25429d24c311dac65c8f1f467257f7a | [
"Apache-2.0"
] | null | null | null | prog.py | AdarshK1/FDAnalysis | 202514bfd25429d24c311dac65c8f1f467257f7a | [
"Apache-2.0"
] | null | null | null |
#Todo functions
punctuation = ",./?'|}{[]=+-_;:<>!@#$%^&*()`~"
fd = open("FDText.txt")
hf = open("huckfinn.txt")
fdText=fd.read()
hfText=hf.read()
fdArray = fdText.split()
hfArray = hfText.split()
fdArray2 = cleantext(fdArray)
hfArray2 = cleantext(hfArray)
fd.close()
hf.close()
print(hfArray2)
| 17 | 63 | 0.564426 |
#Todo functions
def cleantext(txt): #get rid of html markup and punctuation
arr = []
temp = ""
for word in txt:
for char in word:
if (char not in punctuation):
temp = temp + char
temp = temp.rstrip()
temp = temp.lower()
arr . append (temp)
... | 0 | 0 | 0 | 0 | 0 | 361 | 0 | 0 | 45 |
08b7ffe60631d75ef4f1fe0ebe59526b6a975f53 | 6,566 | py | Python | word_generator.py | jpinsonault/language_generator | 3668fdd68122d3ba646648b1d94684348e2ba942 | [
"MIT"
] | null | null | null | word_generator.py | jpinsonault/language_generator | 3668fdd68122d3ba646648b1d94684348e2ba942 | [
"MIT"
] | null | null | null | word_generator.py | jpinsonault/language_generator | 3668fdd68122d3ba646648b1d94684348e2ba942 | [
"MIT"
] | null | null | null | from collections import namedtuple
_Options = namedtuple("Options",
["vowels",
"consonants",
"max_initial_consonants",
"max_vowels",
"max_final_consonants",
"max_syllables",
... | 34.925532 | 114 | 0.68276 | from random import randint
from random import choice
from random import uniform
from collections import namedtuple
from typing import List, Dict
_Options = namedtuple("Options",
["vowels",
"consonants",
"max_initial_consonants",
"m... | 0 | 0 | 0 | 1,492 | 0 | 3,805 | 0 | 22 | 341 |
85c899b2ecba9e23ee235890cd083f654f65dfb0 | 659 | py | Python | libs/langfromchars/LangFromCharsModel.py | surfmachine/language-detection | b44fbb4c7b59fc70388197653060cee67b5a2ee7 | [
"MIT"
] | null | null | null | libs/langfromchars/LangFromCharsModel.py | surfmachine/language-detection | b44fbb4c7b59fc70388197653060cee67b5a2ee7 | [
"MIT"
] | null | null | null | libs/langfromchars/LangFromCharsModel.py | surfmachine/language-detection | b44fbb4c7b59fc70388197653060cee67b5a2ee7 | [
"MIT"
] | null | null | null | import os
import sys
sys.path.append(os.path.dirname(__file__))
| 27.458333 | 78 | 0.742033 | import os
import sys
sys.path.append(os.path.dirname(__file__))
from libs.AbstractLanguageDetectionModel import AbstractLanguageDetectionModel
from libs.langfromchars.mobi.LangFromChars import LangFromChars
class LangFromCharsModel(AbstractLanguageDetectionModel):
def __init__(self):
AbstractLanguageDet... | 0 | 0 | 0 | 427 | 0 | 0 | 0 | 99 | 68 |
a10212ebffbaa0eb97667f57ab12bf1e2cf565c0 | 17,202 | py | Python | core/domain/beam_job_services_test.py | WebFlakyTest/oppia | 520e35490eae8171beb035fbafc2948983abec75 | [
"Apache-2.0"
] | 1 | 2021-08-17T20:33:12.000Z | 2021-08-17T20:33:12.000Z | core/domain/beam_job_services_test.py | WebFlakyTest/oppia | 520e35490eae8171beb035fbafc2948983abec75 | [
"Apache-2.0"
] | null | null | null | core/domain/beam_job_services_test.py | WebFlakyTest/oppia | 520e35490eae8171beb035fbafc2948983abec75 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
#
# Copyright 2021 The Oppia 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 requi... | 45.387863 | 89 | 0.690036 | # coding: utf-8
#
# Copyright 2021 The Oppia 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 requi... | 0 | 0 | 0 | 15,983 | 0 | 0 | 0 | 26 | 247 |
84624031aeb2c0a0410ae4a16dc2db8ad6e1f6af | 1,715 | py | Python | motion-record.py | antanasbruzas/motion-record | da62a9f900237751d431210afcb49e8da82617cd | [
"MIT"
] | null | null | null | motion-record.py | antanasbruzas/motion-record | da62a9f900237751d431210afcb49e8da82617cd | [
"MIT"
] | null | null | null | motion-record.py | antanasbruzas/motion-record | da62a9f900237751d431210afcb49e8da82617cd | [
"MIT"
] | null | null | null | import sys
import gpiod
import time
import liblo
with gpiod.Chip('gpiochip0') as chip:
if (len(sys.argv) > 1):
# Use arg specified line
line = chip.get_line(int(sys.argv[1]))
else:
# TXD1 (GPIO14)
line = chip.get_line(14)
line.request(consumer=sys.argv[0], type=gpiod.LINE_RE... | 34.3 | 72 | 0.501458 | import sys
import gpiod
import time
import liblo
with gpiod.Chip('gpiochip0') as chip:
if (len(sys.argv) > 1):
# Use arg specified line
line = chip.get_line(int(sys.argv[1]))
else:
# TXD1 (GPIO14)
line = chip.get_line(14)
line.request(consumer=sys.argv[0], type=gpiod.LINE_RE... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
822c69bf9eab24739af5458d65e525a57048eea2 | 1,933 | py | Python | zmk/nyokaserver/tests.py | frenebo/ZMOD | 58159fcbf61200c1ec2d6b92fca0cd9d4e83a208 | [
"Apache-2.0"
] | 2 | 2021-02-22T18:36:21.000Z | 2021-06-12T20:28:43.000Z | zmk/nyokaserver/tests.py | frenebo/ZMOD | 58159fcbf61200c1ec2d6b92fca0cd9d4e83a208 | [
"Apache-2.0"
] | 12 | 2019-12-09T13:38:30.000Z | 2022-02-10T00:31:27.000Z | zmk/nyokaserver/tests.py | frenebo/ZMOD | 58159fcbf61200c1ec2d6b92fca0cd9d4e83a208 | [
"Apache-2.0"
] | null | null | null | # from django.test import TestCase
| 33.327586 | 78 | 0.747025 | # from django.test import TestCase
import unittest
import requests, os, json, sys, logging
from django.http import JsonResponse
from nyokaserver.nyokaServerClass import NyokaServer
class TestNyokaServer(unittest.TestCase):
@classmethod
def setUpClass(self):
logging.info("******* Running Test Cases for Nyoka Serve... | 0 | 186 | 0 | 1,543 | 0 | 0 | 0 | 58 | 111 |
21068aa008855ea9e31285aea780e013cff3be02 | 13,830 | py | Python | datalogger/old/DataLoggerWeb.py | gunny26/datalogger | 7bd29ab88f2e2749284d80a6a834c94c0955a7e0 | [
"Apache-2.0"
] | null | null | null | datalogger/old/DataLoggerWeb.py | gunny26/datalogger | 7bd29ab88f2e2749284d80a6a834c94c0955a7e0 | [
"Apache-2.0"
] | null | null | null | datalogger/old/DataLoggerWeb.py | gunny26/datalogger | 7bd29ab88f2e2749284d80a6a834c94c0955a7e0 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
from collections import OrderedDict as OrderedDict
# own modules
from datalogger import Timeseries as Timeseries
from datalogger import TimeseriesArray as TimeseriesArray
from datalogger import TimeseriesArrayStats as TimeseriesArrayStats
from datalogger import TimeseriesStats as TimeseriesStats
from ... | 30.395604 | 108 | 0.584382 | #!/usr/bin/python
import urllib
import urllib2
from collections import OrderedDict as OrderedDict
import json
import base64
import logging
import os
# own modules
from datalogger import Timeseries as Timeseries
from datalogger import TimeseriesArray as TimeseriesArray
from datalogger import TimeseriesArrayStats as Tim... | 0 | 0 | 0 | 13,356 | 0 | 0 | 0 | -52 | 156 |
f59b0f3a7c8ba393f35d719cd42bf672b3b7575e | 832 | py | Python | Term2/Session 6/16-6-string-methods.py | theseana/apondaone | 7cbf3572a86c73220329804fee1f3d03842ae902 | [
"MIT"
] | null | null | null | Term2/Session 6/16-6-string-methods.py | theseana/apondaone | 7cbf3572a86c73220329804fee1f3d03842ae902 | [
"MIT"
] | null | null | null | Term2/Session 6/16-6-string-methods.py | theseana/apondaone | 7cbf3572a86c73220329804fee1f3d03842ae902 | [
"MIT"
] | null | null | null | # lower, upper, title, capitalize, isupper, islower
# istitle, swapcase
g = "HI"
"HI".lower() # firsth method
g.lower() # second method
print(g.lower())
print(g)
g = g.lower()
print(g)
# ######################################################## #
g = "Python"
print(g.lower()) # "Python" >> "python"
print(g.upper(... | 22.486486 | 72 | 0.538462 | # lower, upper, title, capitalize, isupper, islower
# istitle, swapcase
g = "HI"
"HI".lower() # firsth method
g.lower() # second method
print(g.lower())
print(g)
g = g.lower()
print(g)
# ######################################################## #
g = "Python"
print(g.lower()) # "Python" >> "python"
print(g.upper(... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
ff98e0dda3b302d8e3e572ebdb0b29892b48ab9c | 3,110 | py | Python | dogepartylib/lib/config.py | coinwarp/dogeparty-lib | 1823db21b25de723448fb50957fbfe9ff8d092c9 | [
"MIT"
] | 2 | 2016-01-31T18:13:11.000Z | 2020-05-08T23:54:55.000Z | dogepartylib/lib/config.py | coinwarp/dogeparty-lib | 1823db21b25de723448fb50957fbfe9ff8d092c9 | [
"MIT"
] | 1 | 2015-11-07T10:17:05.000Z | 2015-11-07T10:17:05.000Z | dogepartylib/lib/config.py | coinwarp/dogeparty-lib | 1823db21b25de723448fb50957fbfe9ff8d092c9 | [
"MIT"
] | 2 | 2015-11-03T19:12:02.000Z | 2021-12-18T04:48:52.000Z | """Variables prefixed with `DEFAULT` should be able to be overridden by
configuration file and command-line arguments."""
UNIT = 100000000 # The same across assets.
# Versions
VERSION_MAJOR = 9
VERSION_MINOR = 59
VERSION_REVISION = 4
VERSION_STRING = str(VERSION_MAJOR) + '.' + str(VERSION_MINOR) + '.' + str(V... | 29.903846 | 128 | 0.789389 | """Variables prefixed with `DEFAULT` should be able to be overridden by
configuration file and command-line arguments."""
UNIT = 100000000 # The same across assets.
# Versions
VERSION_MAJOR = 9
VERSION_MINOR = 59
VERSION_REVISION = 4
VERSION_STRING = str(VERSION_MAJOR) + '.' + str(VERSION_MINOR) + '.' + str(V... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
e5d2f331e1e6589c398bf24a44120178923fb711 | 5,099 | py | Python | examples/combo_box_example.py | muyr/dayu_widgets3 | a319cc719d84c031829893c45b8f20e87cbbabc8 | [
"MIT"
] | 5 | 2020-10-16T03:46:47.000Z | 2022-03-21T07:10:37.000Z | examples/combo_box_example.py | muyr/dayu_widgets3 | a319cc719d84c031829893c45b8f20e87cbbabc8 | [
"MIT"
] | null | null | null | examples/combo_box_example.py | muyr/dayu_widgets3 | a319cc719d84c031829893c45b8f20e87cbbabc8 | [
"MIT"
] | 1 | 2022-02-16T14:18:43.000Z | 2022-02-16T14:18:43.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
###################################################################
# Author: Mu yanru
# Date : 2019.2
# Email : muyanru345@163.com
###################################################################
from dayu_widgets3 import dayu_theme
if __name__ == '__main__':
im... | 37.77037 | 107 | 0.569916 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
###################################################################
# Author: Mu yanru
# Date : 2019.2
# Email : muyanru345@163.com
###################################################################
import random
from dayu_widgets3.combo_box import MComboBox
from dayu_w... | 213 | 0 | 0 | 4,241 | 0 | 0 | 0 | 106 | 179 |
e95ddc71807c879afd64601d6b2e52a76de7171b | 14,886 | py | Python | data/utils.py | jefflai108/VGNSL | 0edc3db3691abbad2a505b2165bd99e7a62d784f | [
"MIT"
] | 1 | 2022-03-08T16:09:03.000Z | 2022-03-08T16:09:03.000Z | data/utils.py | jefflai108/VGNSL | 0edc3db3691abbad2a505b2165bd99e7a62d784f | [
"MIT"
] | null | null | null | data/utils.py | jefflai108/VGNSL | 0edc3db3691abbad2a505b2165bd99e7a62d784f | [
"MIT"
] | null | null | null | import numpy as np
import scipy.signal
import torch
import pickle
import torch
import s3prl.hub as hub
WINDOWS = {'hamming': scipy.signal.hamming,
'hann': scipy.signal.hann,
'blackman': scipy.signal.blackman,
'bartlett': scipy.signal.bartlett}
if __name__ == '__main__':
wav_file... | 49.45515 | 471 | 0.6359 | import librosa
import numpy as np
import scipy.signal
import torch
import textgrid
import pickle
import os
import torch
import torch.nn.functional as F
import s3prl.hub as hub
import w2v2_model_jeff
WINDOWS = {'hamming': scipy.signal.hamming,
'hann': scipy.signal.hann,
'blackman': scipy.signal... | 0 | 0 | 0 | 0 | 0 | 8,516 | 0 | -14 | 276 |
dc3cc4dcd2d3aceb1ae6f5204ddf272b195b8e80 | 9,479 | py | Python | python/akg/ops/array/strided_slice.py | KnowingNothing/akg-test | 114d8626b824b9a31af50a482afc07ab7121862b | [
"Apache-2.0"
] | 1 | 2020-08-31T02:43:43.000Z | 2020-08-31T02:43:43.000Z | python/akg/ops/array/strided_slice.py | KnowingNothing/akg-test | 114d8626b824b9a31af50a482afc07ab7121862b | [
"Apache-2.0"
] | null | null | null | python/akg/ops/array/strided_slice.py | KnowingNothing/akg-test | 114d8626b824b9a31af50a482afc07ab7121862b | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# coding: utf-8
# Copyright 2019 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless ... | 38.848361 | 113 | 0.619791 | #!/usr/bin/env python3
# coding: utf-8
# Copyright 2019 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless ... | 0 | 2,403 | 0 | 0 | 0 | 0 | 0 | 21 | 67 |
45a86ad55e9de74d2e64af53b590738fb5b9a3fe | 9,148 | py | Python | gramtools/commands/genotype/seq_region_map.py | bricoletc/gramtools | 1ce06178b7b26f42d72e47d3d7b8a7a606e6f256 | [
"MIT"
] | null | null | null | gramtools/commands/genotype/seq_region_map.py | bricoletc/gramtools | 1ce06178b7b26f42d72e47d3d7b8a7a606e6f256 | [
"MIT"
] | null | null | null | gramtools/commands/genotype/seq_region_map.py | bricoletc/gramtools | 1ce06178b7b26f42d72e47d3d7b8a7a606e6f256 | [
"MIT"
] | null | null | null | from typing import List, Dict, Iterable
from pysam import VariantRecord
VariantRecords = Iterable[VariantRecord]
Chrom = str
ChromSizes = Dict[Chrom, int]
SeqRegions = List[SeqRegion]
SeqRegionsMap = Dict[Chrom, SeqRegions]
| 34.916031 | 90 | 0.631504 | from typing import List, Dict, Iterable, Union, Callable
from enum import Enum, auto
import json
from pathlib import Path
from pysam import VariantRecord
VariantRecords = Iterable[VariantRecord]
Chrom = str
ChromSizes = Dict[Chrom, int]
class SeqRegion:
"""Mapping between vcf records in two coordinate spaces
... | 0 | 665 | 0 | 8,053 | 0 | 0 | 0 | 16 | 181 |
745786911fb18cea8818bca88a76e9eb06fe4164 | 1,690 | py | Python | setup.py | vishwesh-vishwesh/HiWi-job | 8953eb744f6e03191b94869e833b44efe74f7bd8 | [
"MIT"
] | null | null | null | setup.py | vishwesh-vishwesh/HiWi-job | 8953eb744f6e03191b94869e833b44efe74f7bd8 | [
"MIT"
] | null | null | null | setup.py | vishwesh-vishwesh/HiWi-job | 8953eb744f6e03191b94869e833b44efe74f7bd8 | [
"MIT"
] | null | null | null | from setuptools import setup, find_packages
__version__ = "unknown"
# "import" __version__
for line in open("sfs/__init__.py"):
if line.startswith("__version__"):
exec(line)
break
# See http://pytest.org/latest/goodpractises.html
setup(
name="sfs",
version=__version__,
packages=fin... | 26.825397 | 78 | 0.645562 | import sys
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand
__version__ = "unknown"
# "import" __version__
for line in open("sfs/__init__.py"):
if line.startswith("__version__"):
exec(line)
break
# See http://pytest.org/latest/goodpractises.html... | 0 | 0 | 0 | 503 | 0 | 0 | 0 | 23 | 66 |
1197b0b460bc0ebc958f8300a0f336ec4ff36ff1 | 2,180 | py | Python | PyBank/main.py | mhchopade/python-challenge | 59067e45366bc70e0c7cb583a9714396d7c293a6 | [
"ADSL"
] | null | null | null | PyBank/main.py | mhchopade/python-challenge | 59067e45366bc70e0c7cb583a9714396d7c293a6 | [
"ADSL"
] | null | null | null | PyBank/main.py | mhchopade/python-challenge | 59067e45366bc70e0c7cb583a9714396d7c293a6 | [
"ADSL"
] | null | null | null | import csv
import os
from statistics import mean
csvpath = os.path.join('resources', 'budget_data.csv')
output_file = os.path.join('resources', 'Financial_Analysis.txt')
with open(csvpath, 'r', newline='') as csvfile:
csvreader = csv.reader(csvfile, delimiter=",")
# Defining our dictionaries and lists
da... | 36.333333 | 105 | 0.65 | import csv
import os
from statistics import mean
csvpath = os.path.join('resources', 'budget_data.csv')
output_file = os.path.join('resources', 'Financial_Analysis.txt')
with open(csvpath, 'r', newline='') as csvfile:
csvreader = csv.reader(csvfile, delimiter=",")
# Defining our dictionaries and lists
da... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
93f5e6457524ab4e00a5a10a693541d08ba7cf4b | 749 | py | Python | examples/health_service_examples.py | Sensory-Cloud/python-sdk | 1457987481a7fbddaa6dff6b5b935c1a2c0d7213 | [
"Apache-2.0"
] | 2 | 2022-01-11T21:49:33.000Z | 2022-02-15T23:53:41.000Z | examples/health_service_examples.py | Sensory-Cloud/python-sdk | 1457987481a7fbddaa6dff6b5b935c1a2c0d7213 | [
"Apache-2.0"
] | null | null | null | examples/health_service_examples.py | Sensory-Cloud/python-sdk | 1457987481a7fbddaa6dff6b5b935c1a2c0d7213 | [
"Apache-2.0"
] | null | null | null |
if __name__ == "__main__":
server_health = health_service_example()
| 25.827586 | 74 | 0.76235 | import helpers
from sensory_cloud.config import Config
from sensory_cloud.generated.common.common_pb2 import ServerHealthResponse
from sensory_cloud.services.health_service import HealthService
def health_service_example() -> ServerHealthResponse:
config: Config = Config(
fully_qualified_domain_name=hel... | 0 | 0 | 0 | 0 | 0 | 456 | 0 | 106 | 112 |
575177fc3df4be8720cec71a0b88012981c5e7c4 | 1,772 | py | Python | scripts/workset_validation.py | ssjunnebo/LIMS2DB | 37345ab7a4f6a28bf77c6ece4b69b672b01441e4 | [
"MIT"
] | null | null | null | scripts/workset_validation.py | ssjunnebo/LIMS2DB | 37345ab7a4f6a28bf77c6ece4b69b672b01441e4 | [
"MIT"
] | null | null | null | scripts/workset_validation.py | ssjunnebo/LIMS2DB | 37345ab7a4f6a28bf77c6ece4b69b672b01441e4 | [
"MIT"
] | null | null | null | from genologics.config import BASEURI, USERNAME, PASSWORD
from genologics_sql.tables import Process
from pprint import pprint
import genologics.entities as gent
import LIMS2DB.utils as lutils
import LIMS2DB.classes as lclasses
if __name__ == "__main__":
print '24-188975'
main('24-188975')
print '24-185... | 26.447761 | 111 | 0.572799 |
from genologics.lims import *
from genologics_sql.utils import *
from genologics.config import BASEURI, USERNAME, PASSWORD
from genologics_sql.tables import Process
from pprint import pprint
import genologics.entities as gent
import LIMS2DB.utils as lutils
import LIMS2DB.classes as lclasses
def main(ws_id):
log... | 0 | 0 | 0 | 0 | 0 | 1,137 | 0 | 21 | 91 |
0ffae1173ad09a4c808b81d25ab8e38146700078 | 6,542 | py | Python | api/coverage.py | pic-ed/LibrarySimplifies | 16dd6459b794fb805b7a5e10758b3c151356908a | [
"Apache-2.0"
] | null | null | null | api/coverage.py | pic-ed/LibrarySimplifies | 16dd6459b794fb805b7a5e10758b3c151356908a | [
"Apache-2.0"
] | null | null | null | api/coverage.py | pic-ed/LibrarySimplifies | 16dd6459b794fb805b7a5e10758b3c151356908a | [
"Apache-2.0"
] | null | null | null | """Base classes for CoverageProviders.
The CoverageProviders themselves are in the file corresponding to the
service that needs coverage -- overdrive.py, metadata_wrangler.py, and
so on.
"""
| 33.721649 | 83 | 0.682513 | """Base classes for CoverageProviders.
The CoverageProviders themselves are in the file corresponding to the
service that needs coverage -- overdrive.py, metadata_wrangler.py, and
so on.
"""
import logging
from lxml import etree
from nose.tools import set_trace
from StringIO import StringIO
from core.coverage import (... | 0 | 143 | 0 | 5,431 | 0 | 0 | 0 | 482 | 290 |
92a79538d3b6eeba306f7fd549cc7f4743b22fbc | 10,841 | py | Python | Algorithm.Python/stubs/QuantConnect/Data/__Fundamental_5.py | gaoxiaojun/Lean | 9dca43bccb720d0df91e4bfc1d363b71e3a36cb5 | [
"Apache-2.0"
] | 2 | 2020-08-29T11:37:29.000Z | 2020-09-09T14:46:48.000Z | Algorithm.Python/stubs/QuantConnect/Data/__Fundamental_5.py | gaoxiaojun/Lean | 9dca43bccb720d0df91e4bfc1d363b71e3a36cb5 | [
"Apache-2.0"
] | null | null | null | Algorithm.Python/stubs/QuantConnect/Data/__Fundamental_5.py | gaoxiaojun/Lean | 9dca43bccb720d0df91e4bfc1d363b71e3a36cb5 | [
"Apache-2.0"
] | 1 | 2020-10-13T00:49:17.000Z | 2020-10-13T00:49:17.000Z | import System.IO
import System.Collections.Generic
import QuantConnect.Data.Fundamental.MultiPeriodField
import QuantConnect.Data.Fundamental
import QuantConnect.Data
| 30.624294 | 171 | 0.731206 | from .__Fundamental_6 import *
import typing
import System.IO
import System.Collections.Generic
import System
import QuantConnect.Data.Fundamental.MultiPeriodField
import QuantConnect.Data.Fundamental
import QuantConnect.Data
import QuantConnect
import datetime
class BeginningCashPositionCashFlowStatement(QuantConnec... | 0 | 0 | 0 | 10,267 | 0 | 0 | 0 | -15 | 409 |
8362dfe4ca13727fd2af4c0f69bc5560e5277526 | 231 | py | Python | board/imx6sl/ucube.py | jinlongliu/AliOS-Things | ce051172a775f987183e7aca88bb6f3b809ea7b0 | [
"Apache-2.0"
] | 4 | 2019-03-12T11:04:48.000Z | 2019-10-22T06:06:53.000Z | board/imx6sl/ucube.py | IamBaoMouMou/AliOS-Things | 195a9160b871b3d78de6f8cf6c2ab09a71977527 | [
"Apache-2.0"
] | 3 | 2018-12-17T13:06:46.000Z | 2018-12-28T01:40:59.000Z | board/imx6sl/ucube.py | IamBaoMouMou/AliOS-Things | 195a9160b871b3d78de6f8cf6c2ab09a71977527 | [
"Apache-2.0"
] | 2 | 2018-01-23T07:54:08.000Z | 2018-01-23T11:38:59.000Z | linux_only_targets="blink bluetooth.ble_bqb netmgrapp bluetooth.blemesh_srv bluetooth.blemesh uDataapp bluetooth.blemesh_cli bluetooth.bleadv wifihalapp hdlcapp.hdlcserver acapp helloworld bluetooth.bleperipheral helloworld_nocli"
| 115.5 | 230 | 0.896104 | linux_only_targets="blink bluetooth.ble_bqb netmgrapp bluetooth.blemesh_srv bluetooth.blemesh uDataapp bluetooth.blemesh_cli bluetooth.bleadv wifihalapp hdlcapp.hdlcserver acapp helloworld bluetooth.bleperipheral helloworld_nocli"
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
76d0908000b90be304a42544e3a9a63bf20f9612 | 6,291 | py | Python | homeassistant/components/zha/entity.py | tubalainen/core | 2ba514253c4981062853f3e1981903d3e4aa803c | [
"Apache-2.0"
] | 4 | 2016-12-23T10:36:36.000Z | 2021-04-22T12:38:16.000Z | homeassistant/components/zha/entity.py | tubalainen/core | 2ba514253c4981062853f3e1981903d3e4aa803c | [
"Apache-2.0"
] | 9 | 2022-01-27T06:32:10.000Z | 2022-03-31T07:07:51.000Z | homeassistant/components/zha/entity.py | tubalainen/core | 2ba514253c4981062853f3e1981903d3e4aa803c | [
"Apache-2.0"
] | 1 | 2020-02-24T16:17:42.000Z | 2020-02-24T16:17:42.000Z | """Entity for Zigbee Home Automation."""
import logging
_LOGGER = logging.getLogger(__name__)
ENTITY_SUFFIX = "entity_suffix"
RESTART_GRACE_PERIOD = 7200 # 2 hours
| 32.595855 | 88 | 0.631855 | """Entity for Zigbee Home Automation."""
import asyncio
import logging
import time
from homeassistant.core import callback
from homeassistant.helpers import entity
from homeassistant.helpers.device_registry import CONNECTION_ZIGBEE
from homeassistant.helpers.dispatcher import async_dispatcher_connect
from homeassista... | 0 | 1,755 | 2,342 | 1,506 | 0 | 0 | 0 | 296 | 224 |
0f86fde6926356f76d6719bd63ffbfe6fd5c0107 | 4,597 | py | Python | qiniuyun/qiniustorage.py | chuangkee/mygithub | a3742d45002de55378987eea551776a3168acc17 | [
"MIT"
] | null | null | null | qiniuyun/qiniustorage.py | chuangkee/mygithub | a3742d45002de55378987eea551776a3168acc17 | [
"MIT"
] | null | null | null | qiniuyun/qiniustorage.py | chuangkee/mygithub | a3742d45002de55378987eea551776a3168acc17 | [
"MIT"
] | null | null | null | #coding=utf-8
from __future__ import absolute_import, unicode_literals
# https://github.com/qiniu/python-sdk/blob/master/qiniu/services/storage/uploader.py
# https://developer.qiniu.com/kodo/sdk/python
| 35.361538 | 104 | 0.501631 | #coding=utf-8
from __future__ import absolute_import, unicode_literals
# https://github.com/qiniu/python-sdk/blob/master/qiniu/services/storage/uploader.py
# https://developer.qiniu.com/kodo/sdk/python
from qiniu import Auth,put_file,put_data,BucketManager
from .utils import QiniuError, bucket_lister
from os.path impor... | 1,017 | 0 | 0 | 3,844 | 0 | 0 | 0 | 80 | 113 |
92538b4f3e6f4b70478fde9b50a525f28b979464 | 2,815 | py | Python | qstrader/strategy/intraday_ml_strategy.py | zhengshouzhi/qstrader-master | 5dc888f72a2ddde8497ff7ae44af68524ec8696c | [
"MIT"
] | 1 | 2018-08-27T07:44:39.000Z | 2018-08-27T07:44:39.000Z | qstrader/strategy/intraday_ml_strategy.py | zhengshouzhi/qstrader-master | 5dc888f72a2ddde8497ff7ae44af68524ec8696c | [
"MIT"
] | null | null | null | qstrader/strategy/intraday_ml_strategy.py | zhengshouzhi/qstrader-master | 5dc888f72a2ddde8497ff7ae44af68524ec8696c | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
| 35.1875 | 79 | 0.557726 | # -*- coding: utf-8 -*-
import numpy as np
import pandas as pd
from sklearn.externals import joblib
from qstrader.price_parser import PriceParser
from qstrader.event import (SignalEvent, EventType)
from qstrader.strategy.base import AbstractStrategy
class IntradayMachineLearningPredictionStrategy(AbstractStrategy):
... | 0 | 0 | 0 | 2,541 | 0 | 0 | 0 | 94 | 156 |
355f0fe9ca296523f85e7b6cb88bd15d74b861dc | 1,795 | py | Python | junit.py | sunilkr/elf-tests | 9401d26aa5ae2778db236297c30e51aeb30c1eec | [
"MIT"
] | null | null | null | junit.py | sunilkr/elf-tests | 9401d26aa5ae2778db236297c30e51aeb30c1eec | [
"MIT"
] | null | null | null | junit.py | sunilkr/elf-tests | 9401d26aa5ae2778db236297c30e51aeb30c1eec | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import argparse
if __name__ == "__main__":
ap = argparse.ArgumentParser(add_help=True)
ap.add_argument("-o", "--out", default=None, help="Output file.")
ap.add_argument("input", help="input file")
args = ap.parse_args()
if args.input is None:
print("Input file req... | 30.948276 | 103 | 0.545404 | #!/usr/bin/env python3
import argparse
import os
from junit_xml import TestSuite, TestCase
def generate_junit_xml(inputfile):
target = None
suite = None
infos = []
errors = []
testcases = []
for line in inputfile:
tag = line[0:3]
props = line[3:].split(':')
if tag == "... | 0 | 0 | 0 | 0 | 0 | 1,121 | 0 | 8 | 67 |
1328a1ede1073f87ae628632c526c94e1ddb3ade | 1,992 | py | Python | server_normal_Flask_beautiful/models/comment.py | KiwiShow/PythonWeb | a489bc2ab16f06f7cc4524bab6b45b2653bfb1bd | [
"MIT"
] | 7 | 2018-02-24T13:41:21.000Z | 2022-02-06T04:59:13.000Z | server_normal_Flask_beautiful/models/comment.py | KiwiShow/PythonWeb | a489bc2ab16f06f7cc4524bab6b45b2653bfb1bd | [
"MIT"
] | 6 | 2018-02-25T11:50:42.000Z | 2021-12-13T19:55:13.000Z | server_normal_Flask_beautiful/models/comment.py | KiwiShow/PythonWeb | a489bc2ab16f06f7cc4524bab6b45b2653bfb1bd | [
"MIT"
] | 1 | 2018-03-01T02:43:15.000Z | 2018-03-01T02:43:15.000Z | # from models.user import User
import models.user
# from models.tweet import Tweet #
# class Comment(Model):
# def __init__(self, form, user_id=-1):
# self.id = form.get('id', None)
# self.content = form.get('content', '')
# self.user_id = form.get('user_id', user_id)
# # int
# ... | 28.457143 | 80 | 0.565763 | from models import MonModel, change_time
# from models.user import User
import models.user
# from models.tweet import Tweet # 这样不行
import models.tweet # 为了避免和comment交叉引用
import time
class Comment(MonModel):
"""
__fields__ = [
'_id',
('id', int, -1),
('type', str, ''),
('deleted', bool, False)... | 81 | 239 | 0 | 1,057 | 0 | 0 | 0 | 7 | 100 |
944e9efa841b118b98e620c68fce5f7ed3af6c93 | 4,502 | py | Python | config_srv.py | IcardS-13/PythTTP | 6717a6c2b6593e74d41e1b328a889169a6433fbb | [
"MIT"
] | null | null | null | config_srv.py | IcardS-13/PythTTP | 6717a6c2b6593e74d41e1b328a889169a6433fbb | [
"MIT"
] | null | null | null | config_srv.py | IcardS-13/PythTTP | 6717a6c2b6593e74d41e1b328a889169a6433fbb | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Fri Feb 21 14:04:11 2020
@author: ICARD
"""
#module systeme :
import os.path
import os
import threading
import configparser
Config = configparser.ConfigParser()
verrou = threading.Lock()
def creer_config_defaut():
'''
Ici dans la fonction creer_con... | 35.448819 | 153 | 0.601733 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Fri Feb 21 14:04:11 2020
@author: ICARD
"""
#module systeme :
import os.path
import os
import threading
import configparser
Config = configparser.ConfigParser()
verrou = threading.Lock()
def creer_config_defaut():
'''
Ici dans la fonction creer_con... | 52 | 0 | 0 | 0 | 0 | 184 | 0 | 0 | 46 |
796fedd9adc4e2939cb94325c4f5c7779990c235 | 488 | py | Python | Chapter_15_Generating_Data/try_15.1/five_cubic.py | charliealpha094/Project_Data_Visualization | ccd55db58927dbbcfd57ab750fe7b21754c2b2dc | [
"MIT"
] | null | null | null | Chapter_15_Generating_Data/try_15.1/five_cubic.py | charliealpha094/Project_Data_Visualization | ccd55db58927dbbcfd57ab750fe7b21754c2b2dc | [
"MIT"
] | null | null | null | Chapter_15_Generating_Data/try_15.1/five_cubic.py | charliealpha094/Project_Data_Visualization | ccd55db58927dbbcfd57ab750fe7b21754c2b2dc | [
"MIT"
] | null | null | null | #Done by Carlos Amaral (19/07/2020)
#Try 15.1- Cubes
import matplotlib.pyplot as plt
x_values = [1, 2, 3, 4, 5]
y_values = [1, 8, 27, 64, 125]
plt.style.use('seaborn')
fig, ax = plt.subplots()
ax.plot(x_values, y_values, linewidth = 3)
#Set chart title and label axes
ax.set_title("Cubic Numbers", fontsize = 24)
... | 21.217391 | 47 | 0.690574 | #Done by Carlos Amaral (19/07/2020)
#Try 15.1- Cubes
import matplotlib.pyplot as plt
x_values = [1, 2, 3, 4, 5]
y_values = [1, 8, 27, 64, 125]
plt.style.use('seaborn')
fig, ax = plt.subplots()
ax.plot(x_values, y_values, linewidth = 3)
#Set chart title and label axes
ax.set_title("Cubic Numbers", fontsize = 24)
... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
6e8980b182687a4077c70c0b48b5464531808ef0 | 681 | py | Python | WoodworkingCalculations/CalcBoardFeet.py | savvysteve/UnitTestingPractice | a0ad1327f13809e61bd1e9434011b843408afe07 | [
"MIT"
] | null | null | null | WoodworkingCalculations/CalcBoardFeet.py | savvysteve/UnitTestingPractice | a0ad1327f13809e61bd1e9434011b843408afe07 | [
"MIT"
] | null | null | null | WoodworkingCalculations/CalcBoardFeet.py | savvysteve/UnitTestingPractice | a0ad1327f13809e61bd1e9434011b843408afe07 | [
"MIT"
] | null | null | null | ## https://github.com/bast/somepackage
## https://github.com/navdeep-G/samplemod
if __name__ == '__main__':
BoardFeet = CalcBoardFeet(8,1,LengthInFeet=8)
print(BoardFeet)
BoardFeet = CalcBoardFeet(7,2,LengthInInches=120)
print(BoardFeet) | 28.375 | 91 | 0.715125 | ## https://github.com/bast/somepackage
## https://github.com/navdeep-G/samplemod
def CalcBoardFeet(WidthInInches, ThicknesInInches, LengthInInches=0, LengthInFeet=0):
if LengthInInches > 0:
BoardFeet = (WidthInInches * LengthInInches * ThicknesInInches) / 144
elif LengthInFeet > 0:
BoardFee... | 0 | 0 | 0 | 0 | 0 | 399 | 0 | 0 | 23 |
3fd0e85217b81464b89832edb31dee814bd076d3 | 65 | py | Python | Chapter 2/printRandom.py | Miillky/automate_the_boring_stuff_with_python | 284b074b0738c66f38b54fe0fc5f69b3446e7e43 | [
"MIT"
] | 4 | 2018-09-07T15:35:24.000Z | 2019-03-27T09:48:12.000Z | Chapter 2/printRandom.py | Miillky/automate_the_boring_stuff_with_python | 284b074b0738c66f38b54fe0fc5f69b3446e7e43 | [
"MIT"
] | 371 | 2020-03-04T21:51:56.000Z | 2022-03-31T20:59:11.000Z | Chapter 2/printRandom.py | Miillky/automate_the_boring_stuff_with_python | 284b074b0738c66f38b54fe0fc5f69b3446e7e43 | [
"MIT"
] | 3 | 2019-06-18T19:57:17.000Z | 2020-11-06T03:55:08.000Z | import random
for i in range(5):
print(random.randint(1, 10)) | 21.666667 | 32 | 0.692308 | import random
for i in range(5):
print(random.randint(1, 10)) | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d11002b3f6a8dde28221e43fb310e01f5fb438b2 | 2,962 | py | Python | lambda/automations/ec2_quarantine_instance.py | hyperglance/aws-rule-automations | b770b2687ffa04a6bad857f3ed6505cf57985022 | [
"MIT"
] | null | null | null | lambda/automations/ec2_quarantine_instance.py | hyperglance/aws-rule-automations | b770b2687ffa04a6bad857f3ed6505cf57985022 | [
"MIT"
] | null | null | null | lambda/automations/ec2_quarantine_instance.py | hyperglance/aws-rule-automations | b770b2687ffa04a6bad857f3ed6505cf57985022 | [
"MIT"
] | 3 | 2021-06-14T04:31:42.000Z | 2021-12-05T23:56:37.000Z | """
This automation Quarantines and EC2 Instance, identified as above or below the configured threshold
by Hyperglance Rule(s)
This automation will operate across accounts, where the appropriate IAM Role exists.
"""
import logging
logger = logging.getLogger()
logger.setLevel(logging.INFO)
def hyperglance_automati... | 29.326733 | 128 | 0.593856 | """
This automation Quarantines and EC2 Instance, identified as above or below the configured threshold
by Hyperglance Rule(s)
This automation will operate across accounts, where the appropriate IAM Role exists.
"""
import logging
logger = logging.getLogger()
logger.setLevel(logging.INFO)
def hyperglance_automati... | 0 | 0 | 0 | 0 | 0 | 506 | 0 | 0 | 23 |
418aa7b0a6b37cdd5ba3a63824e3a19f9c35765b | 8,784 | py | Python | arrview/tools/roi.py | jthacker/arrview | 93d5d0a17a33dbbc7098eb4e5eac92d84d9ba04c | [
"MIT"
] | 1 | 2016-07-25T15:17:17.000Z | 2016-07-25T15:17:17.000Z | arrview/tools/roi.py | jthacker/arrview | 93d5d0a17a33dbbc7098eb4e5eac92d84d9ba04c | [
"MIT"
] | null | null | null | arrview/tools/roi.py | jthacker/arrview | 93d5d0a17a33dbbc7098eb4e5eac92d84d9ba04c | [
"MIT"
] | null | null | null | import logging
import numpy as np
#TODO: Remove this line
from PySide.QtGui import QImage
from PySide.QtGui import QPixmap
from arrview.colormapper import ArrayPixmap
log = logging.getLogger(__name__)
_paintbrush_z = 100
_foreground_roi_z = 11
_background_roi_z = 10
def _pixmap_to_ndarray(pixmap, alpha_threshol... | 34.719368 | 110 | 0.651867 | import logging
import math
import numpy as np
#TODO: Remove this line
from PySide.QtGui import QGraphicsPolygonItem, QImage
from PySide.QtGui import QColor, QGraphicsPixmapItem, QPixmap
from PySide.QtCore import QPoint, QPointF, Qt
from traits.api import Bool, Enum, DelegatesTo, Dict, HasTraits, Instance, Int, List... | 0 | 2,831 | 0 | 3,446 | 0 | 160 | 0 | 276 | 293 |
615829f9a1f47b67e5e70b292d445e4e7ae3d72f | 2,881 | py | Python | Project/script/03_detect_cities_in_2gram.py | mmewen/UTSEUS-DataScience | 179f0f069385cbdd767654df013ca26a59ac3496 | [
"MIT"
] | null | null | null | Project/script/03_detect_cities_in_2gram.py | mmewen/UTSEUS-DataScience | 179f0f069385cbdd767654df013ca26a59ac3496 | [
"MIT"
] | null | null | null | Project/script/03_detect_cities_in_2gram.py | mmewen/UTSEUS-DataScience | 179f0f069385cbdd767654df013ca26a59ac3496 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Use Python 3 !
# Filter 2gram files to keep cities that really exist
# In :
# "../_data/2gram-to/" directory
# "../_out/inverted_cities.json"
# Out :
# "../_out/2gram-to-cities/" directory
# Prerequisite:
# 01, 02
import csv
import time
import os
conj = "to"
dirIn = "... | 22.507813 | 107 | 0.652204 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Use Python 3 !
# Filter 2gram files to keep cities that really exist
# In :
# "../_data/2gram-to/" directory
# "../_out/inverted_cities.json"
# Out :
# "../_out/2gram-to-cities/" directory
# Prerequisite:
# 01, 02
import csv
import json
import time
import os
conj = "t... | 0 | 0 | 0 | 0 | 0 | 743 | 0 | -10 | 114 |
956e8d95c3de4178e6ee40e6880bced7f885c745 | 4,340 | py | Python | pyobs/vfs/gzippipe.py | pyobs/pyobs-core | e3401e63eb31587c2bc535f7346b7e4ef69d64ab | [
"MIT"
] | 4 | 2020-02-14T10:50:03.000Z | 2022-03-25T04:15:06.000Z | pyobs/vfs/gzippipe.py | pyobs/pyobs-core | e3401e63eb31587c2bc535f7346b7e4ef69d64ab | [
"MIT"
] | 60 | 2020-09-14T09:10:20.000Z | 2022-03-25T17:51:42.000Z | pyobs/vfs/gzippipe.py | pyobs/pyobs-core | e3401e63eb31587c2bc535f7346b7e4ef69d64ab | [
"MIT"
] | 2 | 2020-10-14T09:34:57.000Z | 2021-04-27T09:35:57.000Z | import logging
log = logging.getLogger(__name__)
__all__ = ['GzipReader', 'GzipWriter']
| 25.833333 | 116 | 0.550461 | import io
import subprocess
import logging
import os
import gzip
from .vfs import VFSFile
log = logging.getLogger(__name__)
class GzipReader(VFSFile, io.RawIOBase):
"""A pipe object that takes a file-like object as input and acts itself like a stream,
decompressing data on the fly."""
__module__ = 'pyo... | 0 | 0 | 0 | 4,124 | 0 | 0 | 0 | -35 | 157 |
4058daca87082dc47cf7dca366f609a0c88dae32 | 123 | py | Python | models/__init__.py | Ramesh-X/ModelViewer | e1d67d5ca1bc71db6c1c67b5bc6d4ac13be16799 | [
"MIT"
] | 1 | 2019-11-19T22:06:36.000Z | 2019-11-19T22:06:36.000Z | models/__init__.py | Ramesh-X/ModelViewer | e1d67d5ca1bc71db6c1c67b5bc6d4ac13be16799 | [
"MIT"
] | null | null | null | models/__init__.py | Ramesh-X/ModelViewer | e1d67d5ca1bc71db6c1c67b5bc6d4ac13be16799 | [
"MIT"
] | null | null | null | from __future__ import absolute_import
| 30.75 | 42 | 0.886179 | from __future__ import absolute_import
from .densenet161 import densenet_no_top
from .resnet50_notop import resnet50_notop
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 40 | 44 |
bc5c080b1ad38e2fd53cb0ea5d680765be63873d | 30,096 | py | Python | pymdwizard/gui/ui_files/UI_vertdef.py | ennsk/fort-pymdwizard | 74a16d5333cd599537af1e55448327e3cfcced5a | [
"CC-BY-4.0"
] | null | null | null | pymdwizard/gui/ui_files/UI_vertdef.py | ennsk/fort-pymdwizard | 74a16d5333cd599537af1e55448327e3cfcced5a | [
"CC-BY-4.0"
] | null | null | null | pymdwizard/gui/ui_files/UI_vertdef.py | ennsk/fort-pymdwizard | 74a16d5333cd599537af1e55448327e3cfcced5a | [
"CC-BY-4.0"
] | 2 | 2017-03-16T21:18:11.000Z | 2019-06-03T14:25:16.000Z | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'vertdef.ui'
#
# Created by: PyQt5 UI code generator 5.6
#
# WARNING! All changes made in this file will be lost!
| 57.655172 | 149 | 0.712221 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'vertdef.ui'
#
# Created by: PyQt5 UI code generator 5.6
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_Form(object):
def setupUi(self, Form):
Form.setObjectName("For... | 0 | 0 | 0 | 29,836 | 0 | 0 | 0 | 21 | 46 |
e54490626b2502d8a826034a1c3ead0fa66f93f6 | 1,033 | py | Python | 2020/day06/day06.py | oaguy1/advent-of-code | 8ac08bdf18b59a34116900abe2b312993a15dd3d | [
"MIT"
] | null | null | null | 2020/day06/day06.py | oaguy1/advent-of-code | 8ac08bdf18b59a34116900abe2b312993a15dd3d | [
"MIT"
] | null | null | null | 2020/day06/day06.py | oaguy1/advent-of-code | 8ac08bdf18b59a34116900abe2b312993a15dd3d | [
"MIT"
] | null | null | null | import sys
if __name__ == '__main__':
file_name = sys.argv[1]
with open(file_name) as f:
raw_lst = f.read()
lst = raw_lst.splitlines()
print(day06(lst))
print(day06_prime(lst)) | 21.520833 | 92 | 0.461762 | import sys
def day06(lst):
total = 0
ans = []
for idx, ln in enumerate(lst):
if ln != '':
ans += list(ln)
if ln == '' or idx == len(lst) - 1:
total += len(set(ans))
ans = []
return total
def day06_prime(lst):
total = 0
ans_count ... | 0 | 0 | 0 | 0 | 0 | 770 | 0 | 0 | 46 |
98739ad4590e8edcfcc3438f4fd88c315c168210 | 222 | py | Python | main.py | ytZhang99/NHDRRNet-PyTorch | 4516922794d0b1e68b7aff7366aafc141d686092 | [
"MIT"
] | 3 | 2021-12-18T06:49:44.000Z | 2022-02-10T11:12:54.000Z | main.py | ytZhang99/NHDRRNet-PyTorch | 4516922794d0b1e68b7aff7366aafc141d686092 | [
"MIT"
] | null | null | null | main.py | ytZhang99/NHDRRNet-PyTorch | 4516922794d0b1e68b7aff7366aafc141d686092 | [
"MIT"
] | null | null | null |
if __name__ == '__main__':
main() | 14.8 | 26 | 0.554054 | from train import Trainer
from option import args
def main():
if args.test_only:
t = Trainer()
t.test(args.ep)
else:
t = Trainer()
t.train()
if __name__ == '__main__':
main() | 0 | 0 | 0 | 0 | 0 | 109 | 0 | 6 | 67 |
f495865c9fe2ade77f5e422604b9e8be50145761 | 7,210 | py | Python | postprocessing/visualization/tools/extractDataFromUnstructuredOutput.py | fabian-kutschera/SeisSol | d5656cd38e9eb1d91c05ebcbf173acbc3083da57 | [
"BSD-3-Clause"
] | null | null | null | postprocessing/visualization/tools/extractDataFromUnstructuredOutput.py | fabian-kutschera/SeisSol | d5656cd38e9eb1d91c05ebcbf173acbc3083da57 | [
"BSD-3-Clause"
] | null | null | null | postprocessing/visualization/tools/extractDataFromUnstructuredOutput.py | fabian-kutschera/SeisSol | d5656cd38e9eb1d91c05ebcbf173acbc3083da57 | [
"BSD-3-Clause"
] | null | null | null | import os
import os.path
import shutil
import recreateXdmf
import numpy as np
import argparse
parser = argparse.ArgumentParser(description="resample output file and write as binary files")
parser.add_argument("xdmfFilename", help="xdmf output file")
parser.add_argument("--add2prefix", help="string to append to prefix ... | 34.009434 | 143 | 0.648405 | import os
import os.path
import seissolxdmf
import shutil
import recreateXdmf
import numpy as np
import argparse
parser = argparse.ArgumentParser(description="resample output file and write as binary files")
parser.add_argument("xdmfFilename", help="xdmf output file")
parser.add_argument("--add2prefix", help="string t... | 0 | 0 | 0 | 308 | 0 | 180 | 0 | -3 | 72 |
e491a2989dc05f751a9b8ead06d99012d361d385 | 4,782 | py | Python | apps/story/tests/test_mappers.py | tuanquanghpvn/rest_exam | 134f5e7bf44f8e5b0c601e04410693067aef6c4e | [
"MIT"
] | null | null | null | apps/story/tests/test_mappers.py | tuanquanghpvn/rest_exam | 134f5e7bf44f8e5b0c601e04410693067aef6c4e | [
"MIT"
] | null | null | null | apps/story/tests/test_mappers.py | tuanquanghpvn/rest_exam | 134f5e7bf44f8e5b0c601e04410693067aef6c4e | [
"MIT"
] | null | null | null | from contracts.base import (LIMIT_NAME, OFFSET_NAME, SORT_NAME, COUNT_NAME, CURRENT_NAME, PREV_NAME, NEXT_NAME)
from contracts.story import (STORY_ID, NAME, SLUG, DESCRIPTION, CONTENT, CATEGORY_ID)
TEST_COUNT = 10
TEST_CURRENT = "http://sample"
TEST_PREV = "http://sample/prev"
TEST_NEXT = "http://sample/next"
TEST_LIM... | 33.440559 | 120 | 0.695316 | from apps.base.mappers import (PagingRequestSchema, PagingResponseSchema)
from apps.story.mappers import (StorySchema, GetStoryRequestSchema, PostStoryRequestSchema,
PutStoryRequestSchema, DeleteStoryRequestSchema)
from contracts.base import (LIMIT_NAME, OFFSET_NAME, SORT_NAME, COUNT_NAM... | 0 | 0 | 0 | 2,219 | 0 | 564 | 0 | 333 | 228 |
854d12c55c72a3b48e016871afbefc82d8ff9d10 | 1,223 | py | Python | leasing/migrations/0005_change_zone_as_enumfield_in_leasebasisofrent.py | suutari-ai/mvj | c39dbc692afcb3b26366783414c2d5a88a57b25a | [
"MIT"
] | 1 | 2021-01-12T08:14:10.000Z | 2021-01-12T08:14:10.000Z | leasing/migrations/0005_change_zone_as_enumfield_in_leasebasisofrent.py | suutari-ai/mvj | c39dbc692afcb3b26366783414c2d5a88a57b25a | [
"MIT"
] | 249 | 2017-04-18T14:00:13.000Z | 2022-03-30T12:18:03.000Z | leasing/migrations/0005_change_zone_as_enumfield_in_leasebasisofrent.py | suutari-ai/mvj | c39dbc692afcb3b26366783414c2d5a88a57b25a | [
"MIT"
] | 7 | 2017-04-18T08:43:54.000Z | 2021-07-28T07:29:30.000Z | # Generated by Django 2.2.6 on 2020-03-11 13:09
| 31.358974 | 77 | 0.590352 | # Generated by Django 2.2.6 on 2020-03-11 13:09
from django.db import migrations
import enumfields.fields
import leasing.enums
class Migration(migrations.Migration):
dependencies = [
("leasing", "0004_change_area_unit_as_required_to_leasebasisofrent")
]
operations = [
migrations.AlterFi... | 0 | 0 | 0 | 1,071 | 0 | 0 | 0 | 13 | 90 |
6b742f2d50b33f39b52a36202d3c010cec2cddd6 | 3,034 | py | Python | json2model/services/dynamic_model/dynamic_data_instances.py | Grusinator/django-json2model | fe06f4feb60b8a02859530556f91ca6a5978d6d1 | [
"MIT"
] | null | null | null | json2model/services/dynamic_model/dynamic_data_instances.py | Grusinator/django-json2model | fe06f4feb60b8a02859530556f91ca6a5978d6d1 | [
"MIT"
] | null | null | null | json2model/services/dynamic_model/dynamic_data_instances.py | Grusinator/django-json2model | fe06f4feb60b8a02859530556f91ca6a5978d6d1 | [
"MIT"
] | null | null | null | import logging
from django.conf import settings
logger = logging.getLogger(__name__)
RELATE_TO_USER = getattr(settings, 'RELATE_TO_USER', False)
| 43.342857 | 108 | 0.720171 | import logging
from abc import ABC
from django.conf import settings
from django.db.models.base import Model
from json2model.services import data_type_transform
from json2model.services.dynamic_model import dynamic_model_utils as dm_utils
from json2model.services.dynamic_model.i_json_iterator import IJsonIterator
log... | 0 | 0 | 0 | 2,595 | 0 | 0 | 0 | 156 | 134 |
4e861f03572ed86332331faac78cdce861abd0b8 | 2,261 | py | Python | grodddroid/BranchExplorer/grodd-coverage.py | demirdagemir/thesis | 4a48bddf815c91729e27484548bb7bbf7ddeda64 | [
"MIT"
] | null | null | null | grodddroid/BranchExplorer/grodd-coverage.py | demirdagemir/thesis | 4a48bddf815c91729e27484548bb7bbf7ddeda64 | [
"MIT"
] | null | null | null | grodddroid/BranchExplorer/grodd-coverage.py | demirdagemir/thesis | 4a48bddf815c91729e27484548bb7bbf7ddeda64 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import os
import sys
import subprocess
from androguard.core.bytecodes.apk import APK as APK
if (len(sys.argv) < 5):
print("main.py <apk_dir> <result dir> <device_serial_number>"
"<device_codename>")
exit(0)
apk_dir = os.path.abspath(sys.argv[1])
res_dir = os.path.abspath(sys.a... | 29.363636 | 77 | 0.542238 | #!/usr/bin/env python
import os
import sys
import subprocess
from androguard.core.bytecodes.apk import APK as APK
if (len(sys.argv) < 5):
print("main.py <apk_dir> <result dir> <device_serial_number>"
"<device_codename>")
exit(0)
apk_dir = os.path.abspath(sys.argv[1])
res_dir = os.path.abspath(sys.a... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
13add0818754ff71cad1503fe6c51b1b4bad012a | 4,037 | py | Python | imdb_manager.py | teSill/temflix | 31d40265fa71695966c6178145a1057cd2aeda27 | [
"MIT"
] | 3 | 2020-12-21T20:51:56.000Z | 2022-01-04T11:55:45.000Z | imdb_manager.py | teSill/temflix | 31d40265fa71695966c6178145a1057cd2aeda27 | [
"MIT"
] | null | null | null | imdb_manager.py | teSill/temflix | 31d40265fa71695966c6178145a1057cd2aeda27 | [
"MIT"
] | null | null | null | from imdb import IMDb
instance = IMDb()
| 27.462585 | 91 | 0.629923 | from imdb import IMDb
instance = IMDb()
def search_movie(title):
return instance.search_movie(title)[0]
def get_movie(movie_id):
return instance.get_movie(movie_id)
def get_movie_url(title):
movie = instance.search_movie(title)[0]
return instance.get_imdbURL(movie)
def get_director(movie):
... | 0 | 153 | 0 | 2,998 | 0 | 629 | 0 | 0 | 207 |
03fffcad8247834945e3d2779f75c765c14d408e | 1,379 | py | Python | data/normalization.py | wondervictor/Tianchi-ElectricityConsumption | 2a9cf05428f367e855da6b035f203d8b1ed09e96 | [
"MIT"
] | 1 | 2017-11-14T15:39:35.000Z | 2017-11-14T15:39:35.000Z | data/normalization.py | wondervictor/Tianchi-ElectricityConsumption | 2a9cf05428f367e855da6b035f203d8b1ed09e96 | [
"MIT"
] | null | null | null | data/normalization.py | wondervictor/Tianchi-ElectricityConsumption | 2a9cf05428f367e855da6b035f203d8b1ed09e96 | [
"MIT"
] | 1 | 2018-03-19T17:32:18.000Z | 2018-03-19T17:32:18.000Z | # -*- coding:utf-8 -*-
# 4293
"""
299
200
333
340
399
443
531
504
461
536
493
562
503
423
516
316
554
500
543
491
537
509
459
467
551
489
519
614
576
510
498
542
"""
"""
425.3813
339.3123
425.4084
426.7195
346.5619
342.1731
346.4786
389.6992
427.9460
426.4859
393.6239
428.2821
329.8853
... | 10.944444 | 54 | 0.580856 | # -*- coding:utf-8 -*-
def normalization(filename):
data = []
maxValue = 0
with open(filename, 'r') as f:
lines = f.readlines()
for line in lines:
elements = line.rstrip('\r\n').split(',')
maxValue = max(int(elements[1]), maxValue)
data.append(elements)
... | 0 | 0 | 0 | 0 | 0 | 486 | 0 | 0 | 23 |
96c4d681739136dc5342c8df0678736acad11414 | 11,249 | py | Python | sim_objs_wrelaunch.py | mfatihaktas/deep-scheduler | ad567465399620ec379cfdaa67fbcd94ded03c75 | [
"MIT"
] | 11 | 2018-03-28T02:55:12.000Z | 2021-07-12T15:21:38.000Z | sim_objs_wrelaunch.py | mfatihaktas/deep-scheduler | ad567465399620ec379cfdaa67fbcd94ded03c75 | [
"MIT"
] | null | null | null | sim_objs_wrelaunch.py | mfatihaktas/deep-scheduler | ad567465399620ec379cfdaa67fbcd94ded03c75 | [
"MIT"
] | 5 | 2018-03-16T01:36:46.000Z | 2019-10-17T03:23:20.000Z |
# ############################################ Scher ########################################### #
| 32.14 | 118 | 0.598009 | import collections
from sim_objs import *
from mapper import *
class Task_wrelaunch():
def __init__(self, _id, jid, reqed, lifetime, k):
self._id = _id
self.jid = jid
self.reqed = reqed
self.lifetime = lifetime
self.k = k
self.rem_lifetime = None
self.prev_hop_id = None
self.bin... | 0 | 0 | 0 | 10,946 | 0 | 0 | 0 | -3 | 204 |
f37550b5e9a72c354417da5a9b606fbad151607c | 13,123 | py | Python | bootcamp/confcreator/views.py | davismathew/netbot-django | 5a46368ba7c16790e1b96292eecfde6f8f35d2e5 | [
"MIT"
] | null | null | null | bootcamp/confcreator/views.py | davismathew/netbot-django | 5a46368ba7c16790e1b96292eecfde6f8f35d2e5 | [
"MIT"
] | null | null | null | bootcamp/confcreator/views.py | davismathew/netbot-django | 5a46368ba7c16790e1b96292eecfde6f8f35d2e5 | [
"MIT"
] | null | null | null |
# @login_required
# def createconfinstance(request):
# if request.method == 'POST':
# # id=3
# id = request.POST.get('confid')
# variableinjson = str(get_variables(id).variable)
# variables = json.loads(variableinjson)
# form = ConfForm(request.POST or None, variables=v... | 40.503086 | 657 | 0.624857 | from django.shortcuts import render, redirect, get_object_or_404
from django.http import HttpResponseBadRequest, HttpResponse
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
from bootcamp.confcreator.forms import ConfCreatorForm
from bootcamp.confcreator.models import ConfCreator
from django.co... | 0 | 2,519 | 0 | 0 | 0 | 2,923 | 0 | 330 | 447 |
f88dc564eb1aa7a33eb0a11b1c58e2b1c4402ace | 6,954 | py | Python | causticTools/analytic.py | marwahaha/CausticFrog | 333fb3491f88e2f303913cd9268d2ea92132b28f | [
"MIT"
] | null | null | null | causticTools/analytic.py | marwahaha/CausticFrog | 333fb3491f88e2f303913cd9268d2ea92132b28f | [
"MIT"
] | null | null | null | causticTools/analytic.py | marwahaha/CausticFrog | 333fb3491f88e2f303913cd9268d2ea92132b28f | [
"MIT"
] | 1 | 2019-04-29T09:24:11.000Z | 2019-04-29T09:24:11.000Z | import numpy as np
#analytic soln
G=1
m=1
M=1
mu=1
t=1
eps=1
turn=np.zeros(1) | 34.597015 | 167 | 0.593471 | import scipy.optimize
import numpy as np
#analytic soln
G=1
m=1
M=1
mu=1
t=1
eps=1
turn=np.zeros(1)
def densProfile(minR,maxR,nR,M,m,t,nTurn=100000,G=4.96e-15,returnGradient=0,evenSpaced=1): #updates parameters and finds density profile (and optionally it's gradient)
setGlobals(m,M,t,nTurn,G)
if evenSpaced==0:
... | 0 | 0 | 0 | 0 | 0 | 6,349 | 0 | 0 | 528 |
f830fcfe13c315f8067f775395b9e0d3f6be82cf | 8,447 | py | Python | minkit/minimization/minuit_api.py | mramospe/minkit | fa6808a6ca8063751da92f683f2b810a0690a462 | [
"MIT-0"
] | null | null | null | minkit/minimization/minuit_api.py | mramospe/minkit | fa6808a6ca8063751da92f683f2b810a0690a462 | [
"MIT-0"
] | 5 | 2020-01-30T18:30:33.000Z | 2020-11-10T09:13:47.000Z | minkit/minimization/minuit_api.py | mramospe/minkit | fa6808a6ca8063751da92f683f2b810a0690a462 | [
"MIT-0"
] | 1 | 2020-02-03T22:59:00.000Z | 2020-02-03T22:59:00.000Z | ########################################
# MIT License
#
# Copyright (c) 2020 Miguel Ramos Pernas
########################################
'''
Definition of the interface functions and classes with :mod:`iminuit`.
'''
__all__ = ['MinuitMinimizer']
# Definition of the errors. This is given from the nature of the FCNs.... | 35.64135 | 130 | 0.610276 | ########################################
# MIT License
#
# Copyright (c) 2020 Miguel Ramos Pernas
########################################
'''
Definition of the interface functions and classes with :mod:`iminuit`.
'''
from ..base import data_types
from ..base import parameters
from . import core
import contextlib
impo... | 0 | 4,440 | 0 | 2,537 | 0 | 0 | 0 | -3 | 182 |
3dc21be12a42c5d6d729c681b9dfecb4b262dcdb | 49,623 | py | Python | launcher/openpype/style/pyqt5_resources.py | MoonShineVFX/pype-launcher | 86d6ffaedd9138340f6991da0983d2ffcf5d25da | [
"MIT"
] | 1 | 2020-09-21T14:55:33.000Z | 2020-09-21T14:55:33.000Z | openpype/style/pyqt5_resources.py | jrsndl/pype | f9d80ef2c0663921291c5f47d24bea51fc43bac7 | [
"MIT"
] | null | null | null | openpype/style/pyqt5_resources.py | jrsndl/pype | f9d80ef2c0663921291c5f47d24bea51fc43bac7 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Resource object code
#
# Created by: The Resource Compiler for PyQt5 (Qt v5.15.2)
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore
qt_resource_data = b"\
\x00\x00\x00\xa0\
\x89\
\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
\x00\x00\x06\... | 56.325766 | 129 | 0.7241 | # -*- coding: utf-8 -*-
# Resource object code
#
# Created by: The Resource Compiler for PyQt5 (Qt v5.15.2)
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore
qt_resource_data = b"\
\x00\x00\x00\xa0\
\x89\
\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
\x00\x00\x06\... | 0 | 0 | 0 | 0 | 0 | 237 | 0 | 0 | 46 |
1fbc724faaab3d387637719cee7348a5567df291 | 7,686 | py | Python | tests/unit/old_test_cases.py | pylhc/regresspy | e6a6546d8df4609a789b8c3a5090e6cfa9f7d24e | [
"MIT"
] | null | null | null | tests/unit/old_test_cases.py | pylhc/regresspy | e6a6546d8df4609a789b8c3a5090e6cfa9f7d24e | [
"MIT"
] | 1 | 2021-02-04T22:52:27.000Z | 2021-02-04T22:52:27.000Z | tests/unit/old_test_cases.py | pylhc/regresspy | e6a6546d8df4609a789b8c3a5090e6cfa9f7d24e | [
"MIT"
] | null | null | null | import os
import filecmp
from os.path import join, abspath, dirname, pardir
from regresspy import compare_utils, regression
ABS_ROOT = abspath(join(dirname(__file__), pardir, pardir))
REGR_DIR = join("tests", "regression")
TBTS = join("tests", "inputs", "tbt_files")
MODELS = join("tests", "inputs", "models")
OPTICS ... | 41.545946 | 151 | 0.595628 | import os
import filecmp
import argparse
from os.path import join, abspath, dirname, pardir
from regresspy import compare_utils, regression
ABS_ROOT = abspath(join(dirname(__file__), pardir, pardir))
REGR_DIR = join("tests", "regression")
TBTS = join("tests", "inputs", "tbt_files")
MODELS = join("tests", "inputs", "... | 0 | 0 | 0 | 0 | 0 | 211 | 0 | -6 | 45 |
fe4d1d311bd963f1b9a6642ce2ef0b59f06b637b | 751 | py | Python | ch06/batch_norm_gradient_check.py | junhaoim/deep-learning-from-scratch | 26d26ca6182733af2bc2dfd079a268a4fc6196a1 | [
"MIT"
] | null | null | null | ch06/batch_norm_gradient_check.py | junhaoim/deep-learning-from-scratch | 26d26ca6182733af2bc2dfd079a268a4fc6196a1 | [
"MIT"
] | null | null | null | ch06/batch_norm_gradient_check.py | junhaoim/deep-learning-from-scratch | 26d26ca6182733af2bc2dfd079a268a4fc6196a1 | [
"MIT"
] | null | null | null | # coding: utf-8
import os
import sys
sys.path.append(os.pardir) #
import numpy as np
from dataset.mnist import load_mnist
from common.multi_layer_net_extend import MultiLayerNetExtend
#
(x_train, t_train), (x_test, t_test) = load_mnist(normalize=True, one_hot_label=True)
network = MultiLayerNetExtend(input_size=7... | 30.04 | 90 | 0.744341 | # coding: utf-8
import os
import sys
sys.path.append(os.pardir) # 親ディレクトリのファイルをインポートするための設定
import numpy as np
from dataset.mnist import load_mnist
from common.multi_layer_net_extend import MultiLayerNetExtend
# データの読み込み
(x_train, t_train), (x_test, t_test) = load_mnist(normalize=True, one_hot_label=True)
network =... | 99 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
e9f44df7eaf75259e321f0e7a92d8364b1b9982e | 1,694 | py | Python | src/preprocess_crosseval.py | palonso/musicnn-training | 7dd9f28f221c2f2d53b48d0e768093a4f707d6f9 | [
"0BSD"
] | 1 | 2020-11-13T10:07:19.000Z | 2020-11-13T10:07:19.000Z | src/preprocess_crosseval.py | palonso/musicnn-training | 7dd9f28f221c2f2d53b48d0e768093a4f707d6f9 | [
"0BSD"
] | 9 | 2020-11-19T11:59:15.000Z | 2022-03-28T09:49:58.000Z | src/preprocess_crosseval.py | palonso/musicnn-training | 7dd9f28f221c2f2d53b48d0e768093a4f707d6f9 | [
"0BSD"
] | 2 | 2020-11-02T16:46:29.000Z | 2022-02-24T11:50:41.000Z | from pathlib import Path
import argparse
from preprocess import process_files
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument('index_file', help='index file')
parser.add_argument('audio_dir', help='input audio folder')
parser.add_argument('data_dir', help='output dat... | 33.88 | 82 | 0.55608 | from pathlib import Path
import argparse
from preprocess import process_files
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument('index_file', help='index file')
parser.add_argument('audio_dir', help='input audio folder')
parser.add_argument('data_dir', help='output dat... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
0c7ffe3e6845a0e8ef98de9fb0fbab465b5fed20 | 2,138 | py | Python | components/isceobj/Util/geo/__init__.py | vincentschut/isce2 | 1557a05b7b6a3e65abcfc32f89c982ccc9b65e3c | [
"ECL-2.0",
"Apache-2.0"
] | 1,133 | 2022-01-07T21:24:57.000Z | 2022-01-07T21:33:08.000Z | components/isceobj/Util/geo/__init__.py | vincentschut/isce2 | 1557a05b7b6a3e65abcfc32f89c982ccc9b65e3c | [
"ECL-2.0",
"Apache-2.0"
] | 276 | 2019-02-10T07:18:28.000Z | 2022-03-31T21:45:55.000Z | components/isceobj/Util/geo/__init__.py | vincentschut/isce2 | 1557a05b7b6a3e65abcfc32f89c982ccc9b65e3c | [
"ECL-2.0",
"Apache-2.0"
] | 235 | 2019-02-10T05:00:53.000Z | 2022-03-18T07:37:24.000Z | #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Copyright 2012 California Institute of Technology. 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 th... | 41.921569 | 81 | 0.681478 | #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Copyright 2012 California Institute of Technology. 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 th... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
2f73b79b2daea60c3eb938922ad5983b139d334b | 12,015 | py | Python | nbdler/download.py | ZSAIm/downloader | b7cda1fc26fc65be3aa0ee7e31effc67b770babd | [
"Apache-2.0"
] | 33 | 2019-04-12T15:20:16.000Z | 2021-07-14T08:29:53.000Z | nbdler/download.py | zackmark29/Nbdler | b7cda1fc26fc65be3aa0ee7e31effc67b770babd | [
"Apache-2.0"
] | 3 | 2019-05-13T11:39:08.000Z | 2021-08-04T04:53:36.000Z | nbdler/download.py | zackmark29/Nbdler | b7cda1fc26fc65be3aa0ee7e31effc67b770babd | [
"Apache-2.0"
] | 10 | 2019-05-07T06:35:32.000Z | 2021-06-08T18:53:56.000Z |
__all__ = (
'Downloader',
)
| 31.370757 | 109 | 0.606575 |
from concurrent.futures.thread import ThreadPoolExecutor
from nbdler.handler import (
SpeedAdjuster,
AIOReaderWriter,
BlockSlicer,
FileTempData,
ClientWorker,
URIStatusManager,
GatherException,
h, Handlers)
from .client import get_policy, ClientPolicy
from .version import VERSION
from .... | 1,344 | 569 | 3,291 | 7,177 | 0 | 0 | 0 | 226 | 267 |
dd976cdda5e5f0053e1fa78fbec5e4ed77678bcb | 796 | py | Python | .ci/build.py | zayigo/dasshio | 9a46bd8e21af4c37dbbe46d56540b69534abc550 | [
"Apache-2.0"
] | 156 | 2017-07-11T20:12:34.000Z | 2022-03-20T20:33:03.000Z | .ci/build.py | zayigo/dasshio | 9a46bd8e21af4c37dbbe46d56540b69534abc550 | [
"Apache-2.0"
] | 93 | 2017-07-11T09:33:10.000Z | 2022-03-12T01:24:39.000Z | .ci/build.py | zayigo/dasshio | 9a46bd8e21af4c37dbbe46d56540b69534abc550 | [
"Apache-2.0"
] | 82 | 2017-07-12T01:46:46.000Z | 2022-03-13T13:38:52.000Z | #! /usr/bin/env python
import os
travis_tag = os.getenv("TRAVIS_TAG")
addon = os.getenv("ADDON")
docker_build = "docker run --rm --privileged " \
"-v /var/run/docker.sock:/var/run/docker.sock " \
"-v ~/.docker:/root/.docker " \
"-v $(pwd):/docker " \
"hassi... | 29.481481 | 64 | 0.527638 | #! /usr/bin/env python
import os
def run(cmd, message=None):
msg = message or cmd
print("\n%s\n" % msg)
ret = os.system(cmd)
if ret != 0:
raise Exception("Error running: %s" % msg)
travis_tag = os.getenv("TRAVIS_TAG")
addon = os.getenv("ADDON")
docker_build = "docker run --rm --privileged " ... | 0 | 0 | 0 | 0 | 0 | 150 | 0 | 0 | 23 |
67f75a9d85590323838fec58a75ff6a3420f26b0 | 1,247 | py | Python | saleor/discount/migrations/0037_rewrite_discount_order_relations.py | siyoola/saleor | 4e52b8655a5570a8ce0a3b1484b4d8b46fbd0ad0 | [
"CC-BY-4.0"
] | null | null | null | saleor/discount/migrations/0037_rewrite_discount_order_relations.py | siyoola/saleor | 4e52b8655a5570a8ce0a3b1484b4d8b46fbd0ad0 | [
"CC-BY-4.0"
] | 86 | 2021-11-01T04:51:55.000Z | 2022-03-30T16:30:16.000Z | saleor/discount/migrations/0037_rewrite_discount_order_relations.py | siyoola/saleor | 4e52b8655a5570a8ce0a3b1484b4d8b46fbd0ad0 | [
"CC-BY-4.0"
] | null | null | null | # Generated by Django 3.2.12 on 2022-02-25 11:08
| 27.108696 | 60 | 0.524459 | # Generated by Django 3.2.12 on 2022-02-25 11:08
import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("order", "0129_change_pk_to_uuid"),
("discount", "0036_save_discocunt_order_token"),
]
operations = [
... | 0 | 0 | 0 | 1,099 | 0 | 0 | 0 | 30 | 68 |
71dd82f6b05a1357c01139e7ce2ad2b4a3921551 | 2,738 | py | Python | eth/rlp/transactions.py | manfr3d/py-evm | 36aefcc95346541a33896250250e2d8b46af4a77 | [
"MIT"
] | 1 | 2020-05-03T18:05:11.000Z | 2020-05-03T18:05:11.000Z | eth/rlp/transactions.py | dariusdv/py-evm | bfdf695ca3f0bf6e4be273cd91f9a953818f4e77 | [
"MIT"
] | null | null | null | eth/rlp/transactions.py | dariusdv/py-evm | bfdf695ca3f0bf6e4be273cd91f9a953818f4e77 | [
"MIT"
] | 1 | 2021-09-13T21:14:10.000Z | 2021-09-13T21:14:10.000Z | from rlp.sedes import (big_endian_int, binary)
from .sedes import address
BASE_TRANSACTION_FIELDS = [
('nonce', big_endian_int),
('gas_price', big_endian_int),
('gas', big_endian_int),
('to', address),
('value', big_endian_int),
('data', binary),
('v', big_endian_int),
('r', big_endi... | 25.119266 | 105 | 0.636596 | from cached_property import cached_property
import rlp
from rlp.sedes import (
big_endian_int,
binary,
)
from eth_typing import (
Address
)
from eth_hash.auto import keccak
from eth_utils import (
ValidationError,
)
from eth.abc import (
BaseTransactionAPI,
ComputationAPI,
SignedTransacti... | 0 | 512 | 0 | 1,437 | 0 | 0 | 0 | 201 | 227 |
c8ccd886e5c2af51ed658f464f97ed59ad2bf676 | 838 | py | Python | core/migrations/0004_auto_20180417_1311.py | araceli24/TimeWorking | 75e25d3710ff58701d844c57686540ffa7a11604 | [
"MIT"
] | null | null | null | core/migrations/0004_auto_20180417_1311.py | araceli24/TimeWorking | 75e25d3710ff58701d844c57686540ffa7a11604 | [
"MIT"
] | 17 | 2018-04-30T08:01:36.000Z | 2021-06-10T20:25:13.000Z | core/migrations/0004_auto_20180417_1311.py | araceli24/TimeWorking | 75e25d3710ff58701d844c57686540ffa7a11604 | [
"MIT"
] | 2 | 2018-05-02T10:29:03.000Z | 2018-05-02T13:02:30.000Z | # Generated by Django 2.0.4 on 2018-04-17 11:11
| 27.933333 | 97 | 0.609785 | # Generated by Django 2.0.4 on 2018-04-17 11:11
from django.db import migrations, models
import django.utils.timezone
class Migration(migrations.Migration):
dependencies = [
('core', '0003_auto_20180417_1308'),
]
operations = [
migrations.AlterField(
model_name='activityjour... | 0 | 0 | 0 | 695 | 0 | 0 | 0 | 26 | 68 |
09b4ea330908b3fa86b3cb0f963c0ecb26bc25b1 | 19,659 | py | Python | venv/Lib/site-packages/pyrogram/raw/types/config.py | D1ne2021/jjhhhjj | a090da30983b3ef276dfe4cef2ded4526f36002a | [
"MIT"
] | 2 | 2021-12-13T07:09:55.000Z | 2022-01-12T12:15:20.000Z | venv/Lib/site-packages/pyrogram/raw/types/config.py | hoangkiet1906/Botcie_ver1 | c133b915edde06dac690a7dc6ca160f6792fc4c8 | [
"MIT"
] | null | null | null | venv/Lib/site-packages/pyrogram/raw/types/config.py | hoangkiet1906/Botcie_ver1 | c133b915edde06dac690a7dc6ca160f6792fc4c8 | [
"MIT"
] | null | null | null | # Pyrogram - Telegram MTProto API Client Library for Python
# Copyright (C) 2017-2021 Dan <https://github.com/delivrance>
#
# This file is part of Pyrogram.
#
# Pyrogram is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published
# by the Free... | 52.705094 | 2,004 | 0.678214 | # Pyrogram - Telegram MTProto API Client Library for Python
# Copyright (C) 2017-2021 Dan <https://github.com/delivrance>
#
# This file is part of Pyrogram.
#
# Pyrogram is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published
# by the Free... | 0 | 5,097 | 0 | 13,253 | 0 | 0 | 0 | 117 | 135 |
f067367736e84950cecdc41962db5d8218617876 | 98 | py | Python | fmcapi/api_objects/device_services/vlaninterfaces.py | realvitya/fmcapi | 38fb9a8da2d9ebbadf4ed4cb559244646b3bf3be | [
"BSD-3-Clause"
] | null | null | null | fmcapi/api_objects/device_services/vlaninterfaces.py | realvitya/fmcapi | 38fb9a8da2d9ebbadf4ed4cb559244646b3bf3be | [
"BSD-3-Clause"
] | null | null | null | fmcapi/api_objects/device_services/vlaninterfaces.py | realvitya/fmcapi | 38fb9a8da2d9ebbadf4ed4cb559244646b3bf3be | [
"BSD-3-Clause"
] | null | null | null | """
Not yet implemented
added FMC v6.5.0
Appears to only be valid for Firepower 1010 devices.
"""
| 16.333333 | 52 | 0.734694 | """
Not yet implemented
added FMC v6.5.0
Appears to only be valid for Firepower 1010 devices.
"""
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
568d2084adf71a287fd23fe49c7602c597d70fdf | 85 | py | Python | src/tcp/server/src/sizeof.py | gltchitm/pong-c-cheats | 64bdb50519db0ebdc68ae19c3ce738e658fb71d3 | [
"MIT"
] | null | null | null | src/tcp/server/src/sizeof.py | gltchitm/pong-c-cheats | 64bdb50519db0ebdc68ae19c3ce738e658fb71d3 | [
"MIT"
] | null | null | null | src/tcp/server/src/sizeof.py | gltchitm/pong-c-cheats | 64bdb50519db0ebdc68ae19c3ce738e658fb71d3 | [
"MIT"
] | null | null | null | SIZEOF_BYTE = 8
SIZEOF_INT_16 = 16 // SIZEOF_BYTE
SIZEOF_INT_32 = 32 // SIZEOF_BYTE
| 17 | 33 | 0.752941 | SIZEOF_BYTE = 8
SIZEOF_INT_16 = 16 // SIZEOF_BYTE
SIZEOF_INT_32 = 32 // SIZEOF_BYTE
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
205c779565841ac9c1b324e15a5cddc8e0f004a7 | 409 | py | Python | others/edge/speech_recognition/pytorch/setup.py | luluseptember/inference | acbc7b0bf288343ed81e62b69dea8afec03d679b | [
"Apache-2.0"
] | 4 | 2019-07-26T03:00:39.000Z | 2021-01-29T16:12:21.000Z | others/edge/speech_recognition/pytorch/setup.py | luluseptember/inference | acbc7b0bf288343ed81e62b69dea8afec03d679b | [
"Apache-2.0"
] | 5 | 2020-09-26T00:53:40.000Z | 2022-02-10T01:13:29.000Z | others/edge/speech_recognition/pytorch/setup.py | luluseptember/inference | acbc7b0bf288343ed81e62b69dea8afec03d679b | [
"Apache-2.0"
] | 7 | 2019-07-23T14:07:21.000Z | 2021-07-05T12:41:08.000Z | import setuptools
setuptools.setup(
name="deepspeech",
version="0.3.0",
description="train and evaluate a DeepSpeech or DeepSpeech2 network",
author="myrtle.ai",
author_email="mlperf@myrtle.ai",
packages=setuptools.find_packages('src'),
package_dir={'': 'src'},
python_requires='>=3.5',
... | 25.5625 | 73 | 0.665037 | import setuptools
setuptools.setup(
name="deepspeech",
version="0.3.0",
description="train and evaluate a DeepSpeech or DeepSpeech2 network",
author="myrtle.ai",
author_email="mlperf@myrtle.ai",
packages=setuptools.find_packages('src'),
package_dir={'': 'src'},
python_requires='>=3.5',
... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
f7c95412d83a0afd3dd3d0cc9ae3af3d9adb648c | 20,572 | py | Python | rapidtide/OrthoImageItem.py | tsalo/rapidtide | 9e0faff6e9796c21bd62d4b98c309034c0eba766 | [
"Apache-2.0"
] | null | null | null | rapidtide/OrthoImageItem.py | tsalo/rapidtide | 9e0faff6e9796c21bd62d4b98c309034c0eba766 | [
"Apache-2.0"
] | null | null | null | rapidtide/OrthoImageItem.py | tsalo/rapidtide | 9e0faff6e9796c21bd62d4b98c309034c0eba766 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: latin-1 -*-
#
# Copyright 2016-2021 Blaise Frederick
#
# 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/LICEN... | 36.154657 | 99 | 0.595615 | #!/usr/bin/env python
# -*- coding: latin-1 -*-
#
# Copyright 2016-2021 Blaise Frederick
#
# 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/LICEN... | 0 | 0 | 0 | 17,267 | 0 | 2,164 | 0 | 3 | 185 |
43bbd16a069970509cd22e50a5ec81784382bd16 | 4,200 | py | Python | src/arch/arm/ArmFsWorkload.py | yclin99/CS251A_final_gem5 | 391ca1d7c9484f4d58fce9a4424821dcbb2463ac | [
"BSD-3-Clause"
] | 1 | 2022-03-25T13:18:26.000Z | 2022-03-25T13:18:26.000Z | src/arch/arm/ArmFsWorkload.py | yclin99/CS251A_final_gem5 | 391ca1d7c9484f4d58fce9a4424821dcbb2463ac | [
"BSD-3-Clause"
] | 1 | 2022-03-25T14:15:30.000Z | 2022-03-25T14:15:30.000Z | src/arch/arm/ArmFsWorkload.py | ksco/gem5-xiangshan | 0baf1b5229885d81d689a677102f0665aaac5514 | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2009, 2012-2013, 2015-2020 ARM Limited
# All rights reserved.
#
# The license below extends only to copyright in the software and shall
# not be construed as granting a license to any other intellectual
# property including but not limited to intellectual property relating
# to a hardware implementation... | 44.680851 | 77 | 0.729048 | # Copyright (c) 2009, 2012-2013, 2015-2020 ARM Limited
# All rights reserved.
#
# The license below extends only to copyright in the software and shall
# not be construed as granting a license to any other intellectual
# property including but not limited to intellectual property relating
# to a hardware implementation... | 0 | 94 | 0 | 1,799 | 0 | 0 | 0 | 35 | 181 |
77d177e6f11bfb9fc9165a0dfb6f8d521f2dee0f | 1,678 | py | Python | leet/problems/295_median_of_stream.py | blurrcat/leet | bc2d00790f6b7e9cab56b1ddb55070ea9879a1c4 | [
"BSD-3-Clause"
] | null | null | null | leet/problems/295_median_of_stream.py | blurrcat/leet | bc2d00790f6b7e9cab56b1ddb55070ea9879a1c4 | [
"BSD-3-Clause"
] | null | null | null | leet/problems/295_median_of_stream.py | blurrcat/leet | bc2d00790f6b7e9cab56b1ddb55070ea9879a1c4 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Median is the middle value in an ordered integer list. If the size of the list
is even, there is no middle value. So the median is the mean of the two middle
value.
Examples:
[2,3,4] , the median is 3
[2,3], the median is (2 + 3) / 2 = 2.5
Design a data structure th... | 22.373333 | 78 | 0.563766 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Median is the middle value in an ordered integer list. If the size of the list
is even, there is no middle value. So the median is the mean of the two middle
value.
Examples:
[2,3,4] , the median is 3
[2,3], the median is (2 + 3) / 2 = 2.5
Design a data structure th... | 0 | 0 | 0 | 641 | 0 | 0 | 0 | -8 | 45 |
4a2fcf84d819ccdfff4e5675f100d5b1cfb73f33 | 634 | py | Python | djfiler/core/logger.py | E-RROR/django-file-upload-handler | 7efe013dfad225cd5691109757857aa9155d2043 | [
"Apache-2.0"
] | 8 | 2019-08-14T16:42:40.000Z | 2021-05-27T01:28:23.000Z | djfiler/core/logger.py | E-RROR/django-file-upload-handler | 7efe013dfad225cd5691109757857aa9155d2043 | [
"Apache-2.0"
] | 1 | 2019-12-30T18:05:44.000Z | 2020-01-06T07:10:54.000Z | djfiler/core/logger.py | E-RROR/django-file-upload-handler | 7efe013dfad225cd5691109757857aa9155d2043 | [
"Apache-2.0"
] | 2 | 2019-08-14T16:43:00.000Z | 2020-01-01T13:49:48.000Z | """
#
# Sina Farhadi
#
# @2019 All Rights Served
#
# This Is Logger Code
#
# This Module is Use To Print Debugging Process
#
"""
# Colors
debug = True
# Error Log
# Info Log | 17.135135 | 54 | 0.578864 | """
#
# Sina Farhadi
#
# @2019 All Rights Served
#
# This Is Logger Code
#
# This Module is Use To Print Debugging Process
#
"""
# Colors
class bcolors:
INFO = '\033[94m'
ERROR = '\033[91m'
RESET = '\033[0m'
debug = True
def init(state):
global debug
debug = state
# Error Log
def erro... | 0 | 0 | 0 | 60 | 0 | 297 | 0 | 0 | 89 |
f7c6ad607853e474524140843313ce111c6b547c | 8,346 | py | Python | geometric/tests/test_batch_opt.py | CRingrose94/geomeTRIC | 5d8eada8c0fafc4aa354adae4a2d84b5b8d943b2 | [
"BSD-3-Clause"
] | 73 | 2016-06-22T02:38:27.000Z | 2022-03-10T14:23:43.000Z | geometric/tests/test_batch_opt.py | CRingrose94/geomeTRIC | 5d8eada8c0fafc4aa354adae4a2d84b5b8d943b2 | [
"BSD-3-Clause"
] | 108 | 2017-04-22T06:23:18.000Z | 2022-01-07T15:46:15.000Z | geometric/tests/test_batch_opt.py | CRingrose94/geomeTRIC | 5d8eada8c0fafc4aa354adae4a2d84b5b8d943b2 | [
"BSD-3-Clause"
] | 45 | 2016-06-22T02:38:29.000Z | 2022-03-10T19:19:02.000Z | """
A set of tests for using the QCEngine project
"""
import logging
logger = logging.getLogger(__name__)
from . import addons
localizer = addons.in_folder
test_logger = addons.test_logger
_base_schema = {
"schema_version": 1,
"molecule": {
"geometry": [
0.0, 0.0, ... | 34.487603 | 115 | 0.554996 | """
A set of tests for using the QCEngine project
"""
import copy
import numpy as np
import tempfile
import logging
import math
from geometric.molecule import bohr2ang
logger = logging.getLogger(__name__)
from . import addons
import geometric.optimize as gt
from geometric.internal import CartesianCoordinates,\
... | 0 | 6,592 | 0 | 0 | 0 | 0 | 0 | 111 | 247 |
6a5870fd958fc13f8bc230be8f1e43fe623364ff | 3,475 | py | Python | nameko/exceptions.py | mitsuhiko/nameko | 6dccde0aec58a1c85efffcb1bdd38aca488c8874 | [
"Apache-2.0"
] | 3 | 2015-06-15T15:19:00.000Z | 2017-09-04T07:43:40.000Z | nameko/exceptions.py | mitsuhiko/nameko | 6dccde0aec58a1c85efffcb1bdd38aca488c8874 | [
"Apache-2.0"
] | null | null | null | nameko/exceptions.py | mitsuhiko/nameko | 6dccde0aec58a1c85efffcb1bdd38aca488c8874 | [
"Apache-2.0"
] | null | null | null | import inspect
registry = {}
def get_module_path(exc_type):
""" Return the dotted module path of `exc_type`, including the class name.
e.g.::
>>> get_module_path(MethodNotFound)
>>> "nameko.exceptions.MethodNotFound"
"""
module = inspect.getmodule(exc_type)
return "{}.{}".... | 25.740741 | 78 | 0.67741 | import inspect
class DependencyNotFound(AttributeError):
pass
class RpcTimeout(Exception):
pass
class RpcConnectionError(Exception):
"""Raised (in the caller) if the connection to the broker is lost while
waiting for an rpc reply"""
class ContainerBeingKilled(Exception):
"""Raised by :meth:`... | 0 | 141 | 0 | 1,523 | 0 | 0 | 0 | 0 | 230 |
f878c891985f242d5e6305f224668b4389ba01c9 | 5,793 | py | Python | prototyping.py | SimonKitSangChu/MLSB2021 | 1785a2d452be4652d3c6690188cf622a45bab5ef | [
"MIT"
] | 1 | 2022-01-25T14:37:30.000Z | 2022-01-25T14:37:30.000Z | prototyping.py | SimonKitSangChu/MLSB2021 | 1785a2d452be4652d3c6690188cf622a45bab5ef | [
"MIT"
] | null | null | null | prototyping.py | SimonKitSangChu/MLSB2021 | 1785a2d452be4652d3c6690188cf622a45bab5ef | [
"MIT"
] | null | null | null | from absl import app
from absl import flags
FLAGS = flags.FLAGS
flags.DEFINE_boolean('debug', False, 'Run one batch on CPU before training.')
flags.DEFINE_multi_string('datasets', None, 'Dataset(s) use`d in training.')
flags.DEFINE_multi_integer('hidden_channels', 16, 'Hidden layer size.')
flags.DEFINE_boolean('verbos... | 34.688623 | 116 | 0.574141 | from absl import app
from absl import flags
from collections import OrderedDict
import itertools
import pandas as pd
from pathlib import Path
import pickle
from sklearn.model_selection import ParameterGrid
from proteingnn.model import get_default_trainer
from proteingnn.example.data import DefaultDatamodule, read_Deep... | 0 | 0 | 0 | 0 | 0 | 4,348 | 0 | 140 | 222 |
60534f2e888ee14f526ac932a253eb938bce831d | 169 | py | Python | mundo-1/ex027.py | RaoniSilvestre/Exercicios-Python | d840a9471dc0ddf805ead0c63f9be5de0fb375af | [
"MIT"
] | 2 | 2021-05-06T20:36:36.000Z | 2022-02-17T13:50:07.000Z | mundo-1/ex027.py | RaoniSilvestre/Exercicios-Python | d840a9471dc0ddf805ead0c63f9be5de0fb375af | [
"MIT"
] | null | null | null | mundo-1/ex027.py | RaoniSilvestre/Exercicios-Python | d840a9471dc0ddf805ead0c63f9be5de0fb375af | [
"MIT"
] | 1 | 2021-05-26T02:24:04.000Z | 2021-05-26T02:24:04.000Z |
n = str(input('Qual seu nome? ')).strip()
nome = n.split()
print('O seu primeiro nome {} '.format(nome[0]))
print('O seu ltimo nome {}'.format(nome[len(nome)-1]))
| 28.166667 | 57 | 0.627219 |
n = str(input('Qual seu nome? ')).strip()
nome = n.split()
print('O seu primeiro nome é {} '.format(nome[0]))
print('O seu último nome é {}'.format(nome[len(nome)-1]))
| 6 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |