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
3007b42d0f94e33ccb5c6c32a3584d68ade21c92
2,752
py
Python
sortirovka.py
even-even/snoop
f49b9bc260640a793c52a58762342f0e9cf3a881
[ "Apache-2.0" ]
1
2020-03-12T14:53:55.000Z
2020-03-12T14:53:55.000Z
sortirovka.py
even-even/snoop
f49b9bc260640a793c52a58762342f0e9cf3a881
[ "Apache-2.0" ]
null
null
null
sortirovka.py
even-even/snoop
f49b9bc260640a793c52a58762342f0e9cf3a881
[ "Apache-2.0" ]
null
null
null
#! /usr/bin/env python3 """ """
38.222222
108
0.615552
#! /usr/bin/env python3 """Сортировка БД """ import json import sys import requests import threading def sorts(): pool = list() pool1 = list() with open("bad_data.json", "r", encoding="utf8") as bad_file: data1 = json.load(bad_file) with open("bad_site.md", "w", encoding="utf8") as bad_site:...
463
0
0
0
0
2,410
0
-32
112
1e438ccf686cc115a7ea9b07a79013a3ceb61e14
59
py
Python
{{cookiecutter.project_name}}/{{cookiecutter.project_repo}}/__init__.py
TonyFlury/NewPythonProject
e101a563310cd0e1e7fda00d1cf7c8ff901791ff
[ "MIT" ]
1
2017-05-02T10:19:26.000Z
2017-05-02T10:19:26.000Z
{{cookiecutter.project_name}}/{{cookiecutter.project_repo}}/__init__.py
TonyFlury/NewPythonProject
e101a563310cd0e1e7fda00d1cf7c8ff901791ff
[ "MIT" ]
null
null
null
{{cookiecutter.project_name}}/{{cookiecutter.project_repo}}/__init__.py
TonyFlury/NewPythonProject
e101a563310cd0e1e7fda00d1cf7c8ff901791ff
[ "MIT" ]
null
null
null
# coding=utf-8 from .{{cookiecutter.project_repo}} import *
29.5
44
0.745763
# coding=utf-8 from .{{cookiecutter.project_repo}} import *
0
0
0
0
0
0
0
0
0
af4db666748044cc925e6eaf48dd4e602345f2fa
3,627
py
Python
game-servers-pool/app/game_servers/schemas.py
OpenMatchmaking/microservice-game-servers-pool
53d8fcb6add21b16f8711d0a598eb9f9fdc0a0b9
[ "BSD-3-Clause" ]
2
2019-10-13T08:52:52.000Z
2020-04-27T04:19:39.000Z
game-servers-pool/app/game_servers/schemas.py
OpenMatchmaking/microservice-game-servers-pool
53d8fcb6add21b16f8711d0a598eb9f9fdc0a0b9
[ "BSD-3-Clause" ]
3
2018-12-30T08:41:46.000Z
2021-02-14T17:46:43.000Z
game-servers-pool/app/game_servers/schemas.py
OpenMatchmaking/microservice-game-servers-pool
53d8fcb6add21b16f8711d0a598eb9f9fdc0a0b9
[ "BSD-3-Clause" ]
1
2020-04-12T20:16:41.000Z
2020-04-12T20:16:41.000Z
from app import app GameServer = app.config["LAZY_UMONGO"].GameServer
24.019868
78
0.547009
from bson import ObjectId from marshmallow import Schema, fields, validate, validates, ValidationError from app import app GameServer = app.config["LAZY_UMONGO"].GameServer class RequestGetServerSchema(Schema): required_slots = fields.Integer( attribute="required-slots", load_from="required-slo...
0
514
0
2,817
0
0
0
59
159
9cd640dc0d74e0f0ac205efb30f50fc747fca849
1,195
py
Python
xmodaler/modeling/layers/base_attention.py
cclauss/xmodaler
1368fba6c550e97008628edbf01b59a0a6c8fde5
[ "Apache-2.0" ]
830
2021-06-26T07:16:33.000Z
2022-03-25T10:31:32.000Z
xmodaler/modeling/layers/base_attention.py
kevinjunwei/xmodaler
3e128a816876988c5fb07d842fde4a140e699dde
[ "Apache-2.0" ]
28
2021-08-19T12:39:02.000Z
2022-03-14T13:04:19.000Z
xmodaler/modeling/layers/base_attention.py
kevinjunwei/xmodaler
3e128a816876988c5fb07d842fde4a140e699dde
[ "Apache-2.0" ]
85
2021-08-15T06:58:29.000Z
2022-02-19T07:30:56.000Z
# Copyright 2021 JD.com, Inc., JD AI """ @author: Yehao Li @contact: yehaoli.sysu@gmail.com """ import torch.nn as nn __all__ = ["BaseAttention"]
33.194444
89
0.630962
# Copyright 2021 JD.com, Inc., JD AI """ @author: Yehao Li @contact: yehaoli.sysu@gmail.com """ import torch import torch.nn as nn __all__ = ["BaseAttention"] class BaseAttention(nn.Module): def __init__( self, *, hidden_size: int, att_embed_size: int, att_embed_dropout: ...
0
0
0
1,013
0
0
0
-9
45
46e6af921ce585e0de9646e50fae6aa9689cc5c3
3,346
py
Python
GenerateDataSetIDs.py
SizeLee/Industry-big-data-time-sequence-process
0e5f870ff4bc15a9a3217ccb706345ee034bc379
[ "MIT" ]
1
2020-04-18T05:08:03.000Z
2020-04-18T05:08:03.000Z
GenerateDataSetIDs.py
SizeLee/Industry-big-data-time-sequence-process
0e5f870ff4bc15a9a3217ccb706345ee034bc379
[ "MIT" ]
null
null
null
GenerateDataSetIDs.py
SizeLee/Industry-big-data-time-sequence-process
0e5f870ff4bc15a9a3217ccb706345ee034bc379
[ "MIT" ]
null
null
null
if __name__ == '__main__': create_and_save_data_ids() # create_and_save_incremental_learning_data_set_ids() # with open('./data/label_temp.txt') as f: # strs = f.read()[1:-1].split(',') # print(len(strs)) # for i in range(len(strs)-1, 0, -1): # if strs[i] != ' 2.0': ...
41.308642
115
0.641064
import random import numpy as np import json import configparser def generate_data_ids(start, end, sequence_len=1, foresight_steps=0): real_end = end - sequence_len + 1 - foresight_steps sample_num = real_end - start sample_ids = [i for i in range(start, real_end)] training_sample_ids = random.sample(s...
0
0
0
0
0
2,643
0
-23
157
328bcdfd320ce5078bec812fc11a25d4a5da86f3
1,543
py
Python
DATA_2/IN/india_loc.py
rakaar/Narmada-server
2d241bf6205332534abd2bd75f3283781564106a
[ "MIT" ]
2
2021-05-28T01:37:04.000Z
2021-09-20T14:51:42.000Z
DATA_2/IN/india_loc.py
rakaar/Narmada-server
2d241bf6205332534abd2bd75f3283781564106a
[ "MIT" ]
3
2021-05-12T18:15:54.000Z
2022-03-12T00:58:06.000Z
DATA_2/IN/india_loc.py
rakaar/Narmada-server
2d241bf6205332534abd2bd75f3283781564106a
[ "MIT" ]
2
2021-05-12T18:41:02.000Z
2021-12-08T22:13:11.000Z
import pickle csv_file=open('IN.txt','r') location_dict={} count=0 # low_longi= 80.1846 # low_lati= 12.9673 # up_longi= 80.3067 # up_lati= 13.1515 low_longi= 76.2448 low_lati= 8.0742 up_longi= 80.3502 up_lati= 13.5757 for line in csv_file: line=line.strip().split('\t') name1=line[1] name2=line[2] names=li...
18.369048
108
0.695399
import pickle import csv csv_file=open('IN.txt','r') location_dict={} count=0 # low_longi= 80.1846 # low_lati= 12.9673 # up_longi= 80.3067 # up_lati= 13.1515 low_longi= 76.2448 low_lati= 8.0742 up_longi= 80.3502 up_lati= 13.5757 def check_location_dict(name1,lat,longi): if name1 not in location_dict: locati...
0
0
0
0
0
403
0
-11
45
9c2554f493bf4d0da04f388f8d7bf696182ac440
1,543
py
Python
Testcase4-Application-breakdown/data-analysis/scripts/parse-single.py
Ddnirvana/serverlessbench
db97638899903c92380f0e5fb1f0f7063af68e4a
[ "MulanPSL-1.0" ]
4
2020-06-28T08:07:11.000Z
2020-08-10T02:16:05.000Z
Testcase4-Application-breakdown/data-analysis/scripts/parse-single.py
Ddnirvana/serverlessbench
db97638899903c92380f0e5fb1f0f7063af68e4a
[ "MulanPSL-1.0" ]
null
null
null
Testcase4-Application-breakdown/data-analysis/scripts/parse-single.py
Ddnirvana/serverlessbench
db97638899903c92380f0e5fb1f0f7063af68e4a
[ "MulanPSL-1.0" ]
1
2020-07-08T17:44:25.000Z
2020-07-08T17:44:25.000Z
import sys # This script should be invoked in parent dir of scripts if len(sys.argv) < 1: print('ERROR: unknown function invoke time') sys.exit(1) activationLog = open('./scripts/activation.log','a') activationLog.write("terminated\n") result = open('./scripts/result-single.log','w') starttime = sys.argv[1...
31.489796
81
0.671419
import os import time import sys from datetime import datetime # This script should be invoked in parent dir of scripts def string2timestamp(raw_timestr): # [2020-01-09T03:00:04.171Z] timestr = raw_timestr[:10] + ' ' + raw_timestr[11:23] # print('raw_timestr (%s), timestr (%s)' % (raw_timestr, timestr)) ...
0
0
0
0
0
538
0
-14
89
f2e61aeeeaa275f2ab92ddf86796cea45d6cdee4
7,703
py
Python
dataset/imagenet.py
yanzhicong/VAE-GAN
37fe060cd993d89c983bc8cfcc59c6edc3c5920f
[ "MIT" ]
33
2018-08-17T13:06:29.000Z
2021-04-29T11:34:00.000Z
dataset/imagenet.py
yanzhicong/VAE-GAN
37fe060cd993d89c983bc8cfcc59c6edc3c5920f
[ "MIT" ]
1
2018-12-04T07:33:40.000Z
2018-12-04T07:33:40.000Z
dataset/imagenet.py
yanzhicong/CVAEGAN
37fe060cd993d89c983bc8cfcc59c6edc3c5920f
[ "MIT" ]
9
2019-01-28T21:35:16.000Z
2021-09-07T10:18:01.000Z
# -*- coding: utf-8 -*- # MIT License # # Copyright (c) 2018 ZhicongYan # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to us...
37.393204
114
0.718421
# -*- coding: utf-8 -*- # MIT License # # Copyright (c) 2018 ZhicongYan # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to us...
0
0
0
6,317
0
0
0
-4
179
3725a03ff33ceb614141f34ea4cafeace14f8296
721
py
Python
practice/leetcode/lc0238_product_excpt_self.py
deehzee/dsalgo
025bf292e5a2c4e079cecb0c284ab6aeae9a07f4
[ "MIT" ]
null
null
null
practice/leetcode/lc0238_product_excpt_self.py
deehzee/dsalgo
025bf292e5a2c4e079cecb0c284ab6aeae9a07f4
[ "MIT" ]
null
null
null
practice/leetcode/lc0238_product_excpt_self.py
deehzee/dsalgo
025bf292e5a2c4e079cecb0c284ab6aeae9a07f4
[ "MIT" ]
1
2020-08-06T16:50:07.000Z
2020-08-06T16:50:07.000Z
def product_except_self(A): ''' 238. Product of Array Except Self ================================= Given an array A of n integers (n > 1), return an array where the i-th element is the product of all but the i-th element of A. Restrictions: ------------- 1. Don't use division 2. Us...
24.033333
74
0.482663
def product_except_self(A): ''' 238. Product of Array Except Self ================================= Given an array A of n integers (n > 1), return an array where the i-th element is the product of all but the i-th element of A. Restrictions: ------------- 1. Don't use division 2. Us...
0
0
0
0
0
0
0
0
0
67a757cc1a99f68082dc5b0810531502e32165d4
378
py
Python
bot/utilities/paginators/__init__.py
Axelancerr/Life
1e214af2a46439a756c442967be4bfa8b05fd99c
[ "MIT" ]
27
2020-10-18T04:35:00.000Z
2021-08-03T13:21:27.000Z
bot/utilities/paginators/__init__.py
Axelancerr/Life
1e214af2a46439a756c442967be4bfa8b05fd99c
[ "MIT" ]
19
2020-12-04T23:03:51.000Z
2021-08-14T20:21:53.000Z
bot/utilities/paginators/__init__.py
Axelancerr/Life
1e214af2a46439a756c442967be4bfa8b05fd99c
[ "MIT" ]
7
2020-10-26T18:51:17.000Z
2021-07-07T05:39:01.000Z
# Future from __future__ import annotations # My stuff
34.363636
55
0.873016
# Future from __future__ import annotations # My stuff from utilities.paginators.base import BasePaginator from utilities.paginators.embed import EmbedPaginator from utilities.paginators.embeds import EmbedsPaginator from utilities.paginators.fields import FieldsPaginator from utilities.paginators.file import FilePagi...
0
0
0
0
0
0
0
190
132
db9c6e7d36798cf54caaf287c6353c0070dfd189
5,566
py
Python
container_transform/systemd.py
jeremietharaud/container-transform
c03473c3c3c0b8a5921476ed55b242e061c49f25
[ "MIT" ]
null
null
null
container_transform/systemd.py
jeremietharaud/container-transform
c03473c3c3c0b8a5921476ed55b242e061c49f25
[ "MIT" ]
null
null
null
container_transform/systemd.py
jeremietharaud/container-transform
c03473c3c3c0b8a5921476ed55b242e061c49f25
[ "MIT" ]
null
null
null
UNIT_TEMPLATE = '''\ # {{ name }}.service ####################################################################### [Unit] Description={{ name | title }} After=docker.service {% for link in link_keys %}{{ link }}.service {% endfor %} Requires=docker.service {% for link in link_keys %}{{ link }}.service {% endfor %} [S...
27.969849
92
0.555875
from jinja2 import Template from .transformer import BaseTransformer UNIT_TEMPLATE = '''\ # {{ name }}.service ####################################################################### [Unit] Description={{ name | title }} After=docker.service {% for link in link_keys %}{{ link }}.service {% endfor %} Requires=docker....
0
842
0
2,384
0
0
0
25
68
67b483a32410c97fbada15bff5b891197ce7c157
4,417
py
Python
alipay/aop/api/domain/AlipayCommerceCityfacilitatorVoucherGenerateModel.py
articuly/alipay-sdk-python-all
0259cd28eca0f219b97dac7f41c2458441d5e7a6
[ "Apache-2.0" ]
null
null
null
alipay/aop/api/domain/AlipayCommerceCityfacilitatorVoucherGenerateModel.py
articuly/alipay-sdk-python-all
0259cd28eca0f219b97dac7f41c2458441d5e7a6
[ "Apache-2.0" ]
null
null
null
alipay/aop/api/domain/AlipayCommerceCityfacilitatorVoucherGenerateModel.py
articuly/alipay-sdk-python-all
0259cd28eca0f219b97dac7f41c2458441d5e7a6
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*-
30.253425
75
0.587956
#!/usr/bin/env python # -*- coding: utf-8 -*- import simplejson as json from alipay.aop.api.constant.ParamConstants import * class AlipayCommerceCityfacilitatorVoucherGenerateModel(object): def __init__(self): self._city_code = None self._site_begin = None self._site_end = None s...
0
1,576
0
2,689
0
0
0
35
68
b9f0b02e84ab0fbb6fe2664bc2df0b2b5352e01d
479
py
Python
feed/urls.py
pabulumm/neighbors
59f3f3ae727fe52c7897beaf73d157b02cdcb7a3
[ "BSD-3-Clause" ]
null
null
null
feed/urls.py
pabulumm/neighbors
59f3f3ae727fe52c7897beaf73d157b02cdcb7a3
[ "BSD-3-Clause" ]
null
null
null
feed/urls.py
pabulumm/neighbors
59f3f3ae727fe52c7897beaf73d157b02cdcb7a3
[ "BSD-3-Clause" ]
null
null
null
from django.conf.urls import url from . import views urlpatterns = [ url(r'^announce/$', views.make_announcement, name='announce'), url(r'^get-viewed/$', views.get_viewed, name='get-viewed'), url(r'^view-post/$', views.view_post, name='view-post'), url(r'^submit-post/$', views.submit_post, name='submit-post'), u...
34.214286
81
0.709812
from django.conf.urls import url from . import views urlpatterns = [ url(r'^announce/$', views.make_announcement, name='announce'), url(r'^get-viewed/$', views.get_viewed, name='get-viewed'), url(r'^view-post/$', views.view_post, name='view-post'), url(r'^submit-post/$', views.submit_post, name='submit-post'), u...
0
0
0
0
0
0
0
0
0
175ed17e2c0d56893352e5ef99ce2a95640b42d4
1,378
py
Python
src/burgard/scripts/Permission_granter.py
Hossein76/communication_node
6ff3473926a5568f492a330ac9b2812c419e0ec6
[ "BSD-3-Clause" ]
2
2017-07-24T14:09:11.000Z
2017-11-24T20:55:40.000Z
src/burgard/scripts/Permission_granter.py
Hossein76/communication_node
6ff3473926a5568f492a330ac9b2812c419e0ec6
[ "BSD-3-Clause" ]
null
null
null
src/burgard/scripts/Permission_granter.py
Hossein76/communication_node
6ff3473926a5568f492a330ac9b2812c419e0ec6
[ "BSD-3-Clause" ]
2
2018-03-13T05:20:25.000Z
2020-11-09T09:13:31.000Z
#!/usr/bin/env python import threading; robots=[]; permission_lock=threading.Lock(); if __name__ == '__main__': main();
36.263158
136
0.690131
#!/usr/bin/env python import rospy from std_msgs.msg import String,Bool import threading; robots=[]; permission_lock=threading.Lock(); class MyWrapper: def __init__(self,robot_name_space): self.name_space=robot_name_space; self.checking_goals_requst_handler=rospy.Subscriber("/"+robot_name_space+"/c...
0
0
0
864
0
270
0
6
113
06daf2ae6c185878fe3660af35bf7a8952f52bdb
2,307
py
Python
examples/glyph-mono+alpha-cairo.py
josh95117/freetype-py
1b564b7de61f0bde5c3e09ed9a1fb0f7642d6bad
[ "BSD-3-Clause-Clear" ]
242
2015-01-19T09:46:55.000Z
2022-03-24T08:18:44.000Z
examples/glyph-mono+alpha-cairo.py
josh95117/freetype-py
1b564b7de61f0bde5c3e09ed9a1fb0f7642d6bad
[ "BSD-3-Clause-Clear" ]
127
2015-01-02T02:29:23.000Z
2022-03-29T16:32:12.000Z
examples/glyph-mono+alpha-cairo.py
josh95117/freetype-py
1b564b7de61f0bde5c3e09ed9a1fb0f7642d6bad
[ "BSD-3-Clause-Clear" ]
81
2015-01-13T12:37:51.000Z
2022-03-09T18:52:36.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # # pycairo/cairocffi-based glyph-mono/alpha example - Copyright 2017 Hin-Tak Leung # Distributed under the terms of the new BSD license. # # rewrite of the numply,matplotlib-based example fr...
32.041667
91
0.636324
#!/usr/bin/env python # -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # # pycairo/cairocffi-based glyph-mono/alpha example - Copyright 2017 Hin-Tak Leung # Distributed under the terms of the new BSD license. # # rewrite of the numply,matplotlib-based example fr...
0
0
0
0
0
0
0
1
22
e494e98e9d19abec8d6e6ffc18c1a86134680ede
1,393
py
Python
examples/migrations/0001_initial.py
rogeriodelphi/livros
f902f6efda78ea45f487e00fa55156a12f798559
[ "MIT" ]
null
null
null
examples/migrations/0001_initial.py
rogeriodelphi/livros
f902f6efda78ea45f487e00fa55156a12f798559
[ "MIT" ]
2
2020-06-06T01:53:31.000Z
2021-06-10T22:56:34.000Z
examples/migrations/0001_initial.py
rogeriodelphi/livros
f902f6efda78ea45f487e00fa55156a12f798559
[ "MIT" ]
null
null
null
# Generated by Django 2.1.11 on 2020-05-24 03:03
36.657895
125
0.5542
# Generated by Django 2.1.11 on 2020-05-24 03:03 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('editoras', '0001_initial'), ] operations = [ migrations.CreateModel( name=...
0
0
0
1,245
0
0
0
30
68
a03c9d93c61249810042ad18ca61b042d43a7e43
21,961
py
Python
domestic/migrations/0010_move_rest_of_gcp_stats_fields_to_streamfields.py
uktrade/great-cms
f13fa335ddcb925bc33a5fa096fe73ef7bdd351a
[ "MIT" ]
10
2020-04-30T12:04:35.000Z
2021-07-21T12:48:55.000Z
domestic/migrations/0010_move_rest_of_gcp_stats_fields_to_streamfields.py
uktrade/great-cms
f13fa335ddcb925bc33a5fa096fe73ef7bdd351a
[ "MIT" ]
1,461
2020-01-23T18:20:26.000Z
2022-03-31T08:05:56.000Z
domestic/migrations/0010_move_rest_of_gcp_stats_fields_to_streamfields.py
uktrade/great-cms
f13fa335ddcb925bc33a5fa096fe73ef7bdd351a
[ "MIT" ]
3
2020-04-07T20:11:36.000Z
2020-10-16T16:22:59.000Z
# Generated by Django 2.2.14 on 2021-01-12 21:41 import wagtail.core.blocks
36.179572
110
0.542097
# Generated by Django 2.2.14 on 2021-01-12 21:41 import wagtail.core.blocks import wagtail.core.fields from django.db import migrations import core.blocks as core_blocks import domestic.models class Migration(migrations.Migration): dependencies = [ ('domestic', '0009_switch_cgp_statistics_to_streamfiel...
0
0
0
21,742
0
0
0
29
112
eaa2049bc5b8bf27c83f5354f1d2c90884035b71
368
py
Python
solution-bank/loop/solution_8.py
anishLearnsToCode/python-training-1
ef5d6b64f888e167faecd1410563173dcc27f319
[ "MIT" ]
3
2021-01-05T18:00:14.000Z
2021-11-28T15:43:04.000Z
solution-bank/loop/solution_8.py
anishLearnsToCode/python-training-1
ef5d6b64f888e167faecd1410563173dcc27f319
[ "MIT" ]
null
null
null
solution-bank/loop/solution_8.py
anishLearnsToCode/python-training-1
ef5d6b64f888e167faecd1410563173dcc27f319
[ "MIT" ]
null
null
null
""" WAP that prompts the user to input a positive integer. It should then output a message indicating whether the number is a prime number. """ number = int(input()) is_prime = True for i in range(2, number): if number % i == 0: print('composite number') is_prime = False break if is_prime...
21.647059
86
0.660326
""" WAP that prompts the user to input a positive integer. It should then output a message indicating whether the number is a prime number. """ number = int(input()) is_prime = True for i in range(2, number): if number % i == 0: print('composite number') is_prime = False break if is_prime...
0
0
0
0
0
0
0
0
0
12a899f173d39cd7821d3ba0e9b558641ee03d0b
4,800
py
Python
stalkbroker/bot/_commands_settings.py
peake100/stalkbroker-py
95bed6e6d89dc00b183b71d5d3fce7908c554ed9
[ "MIT" ]
null
null
null
stalkbroker/bot/_commands_settings.py
peake100/stalkbroker-py
95bed6e6d89dc00b183b71d5d3fce7908c554ed9
[ "MIT" ]
12
2020-04-25T22:13:57.000Z
2020-05-24T16:24:59.000Z
stalkbroker/bot/_commands_settings.py
peake100/stalkbroker-py
95bed6e6d89dc00b183b71d5d3fce7908c554ed9
[ "MIT" ]
null
null
null
_IMPORT_HELPER = None # TODO: put this behind some sort of role check
36.363636
88
0.732292
import discord.ext.commands import pytz.exceptions from stalkbroker import date_utils, errors, messages from ._bot import STALKBROKER from ._commands_utils import confirm_execution, user_change_bulletin_subscription _IMPORT_HELPER = None @STALKBROKER.command( name="timezone", case_insensitive=True, he...
0
4,342
0
0
0
0
0
106
271
70e96e30b800250bfefe8d91b60725878408f5bd
116
py
Python
src/revisao/08_funcoes.py
SamuelPossamai/material_auxilio_conceitos_python
44c15e72f7409441fe0db38288dac782f0cbc94d
[ "MIT" ]
1
2022-02-08T23:39:11.000Z
2022-02-08T23:39:11.000Z
src/revisao/08_funcoes.py
SamuelPossamai/material_auxilio_conceitos_python
44c15e72f7409441fe0db38288dac782f0cbc94d
[ "MIT" ]
null
null
null
src/revisao/08_funcoes.py
SamuelPossamai/material_auxilio_conceitos_python
44c15e72f7409441fe0db38288dac782f0cbc94d
[ "MIT" ]
null
null
null
#ao_quadrado = lambda x: x*x print(ao_quadrado(2)) print(ao_quadrado(3))
12.888889
28
0.698276
def ao_quadrado(x): return x*x*mult #ao_quadrado = lambda x: x*x print(ao_quadrado(2)) print(ao_quadrado(3))
0
0
0
0
0
18
0
0
23
734dba490a513c24e971b758a7aeef9c907be4a8
2,635
py
Python
zvt/api/stats.py
DrXin/zvt
55040c8a27fae97367f255975bb160101fba5d9a
[ "MIT" ]
null
null
null
zvt/api/stats.py
DrXin/zvt
55040c8a27fae97367f255975bb160101fba5d9a
[ "MIT" ]
null
null
null
zvt/api/stats.py
DrXin/zvt
55040c8a27fae97367f255975bb160101fba5d9a
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- if __name__ == '__main__': from pprint import pprint tops1, tops2 = get_top_performance_entities(start_timestamp='2020-01-01') pprint(tops1) pprint(tops2) # the __all__ is generated __all__ = ['get_top_performance_entities', 'get_top_entities']
38.75
116
0.663757
# -*- coding: utf-8 -*- import itertools from typing import Union import pandas as pd from zvt.api import get_kdata_schema from zvt.contract import Mixin, AdjustType def get_top_performance_entities(entity_type='stock', start_timestamp=None, end_timestamp=None, pct=0.1, return_type=...
0
0
0
0
0
2,154
0
32
158
1df23f7c4ec52c859073a9e12412f07a6adc5198
49
py
Python
voice_commands/record.py
patwaw/voice_commands
137e96b2f4bf9e88139f2edaf3207994625f59fc
[ "MIT" ]
2
2015-06-21T17:54:17.000Z
2017-12-10T05:02:05.000Z
voice_commands/record.py
patwaw/voice_commands
137e96b2f4bf9e88139f2edaf3207994625f59fc
[ "MIT" ]
null
null
null
voice_commands/record.py
patwaw/voice_commands
137e96b2f4bf9e88139f2edaf3207994625f59fc
[ "MIT" ]
null
null
null
# placeholder for recording and encoding to flac
24.5
48
0.816327
# placeholder for recording and encoding to flac
0
0
0
0
0
0
0
0
0
213f154b26d826d010abe98c5d98b9999b6f7b3b
3,078
py
Python
distributed_code/pcode/utils/mathdict.py
gessfred/LocalSGD-Code
6321473fc60bbd0145ee133ee360e3b695c455e5
[ "Apache-2.0" ]
39
2019-06-16T15:28:49.000Z
2022-03-15T09:20:35.000Z
dl_code/pcode/utils/mathdict.py
Distributed-Deep-Learning/ChocoSGD
c7715b368cc9f66674720ea9c823032c8058bdf6
[ "Apache-2.0" ]
6
2020-04-15T21:02:49.000Z
2021-05-24T23:24:03.000Z
dl_code/pcode/utils/mathdict.py
Distributed-Deep-Learning/ChocoSGD
c7715b368cc9f66674720ea9c823032c8058bdf6
[ "Apache-2.0" ]
18
2019-07-24T22:19:10.000Z
2022-02-09T08:20:10.000Z
MathDict.__add__ = _mathdict_binary_op(lambda a, b: a + b) MathDict.__sub__ = _mathdict_binary_op(lambda a, b: a - b) MathDict.__rsub__ = _mathdict_binary_op(lambda a, b: b - a) MathDict.__mul__ = _mathdict_binary_op(lambda a, b: a * b) MathDict.__rmul__ = _mathdict_binary_op(lambda a, b: a * b) MathDict.__tr...
29.037736
86
0.638726
class MathDict(): def __init__(self, dictionary): self.dictionary = dictionary self.keys = set(dictionary.keys()) def __str__(self): return 'MathDict({})'.format(str(self.dictionary)) def __repr__(self): return 'MathDict({})'.format(repr(self.dictionary)) def map(self,...
0
0
0
893
0
1,145
0
0
206
419b5158c1a39bb168521c8c82c169252c62b8cd
456
py
Python
ipredictor/defaults.py
zenio/ipredictor
41e2327174e257faf155b8c659a35f85cfb172cb
[ "Apache-2.0" ]
1
2018-04-06T03:55:54.000Z
2018-04-06T03:55:54.000Z
ipredictor/defaults.py
zenio/ipredictor
41e2327174e257faf155b8c659a35f85cfb172cb
[ "Apache-2.0" ]
null
null
null
ipredictor/defaults.py
zenio/ipredictor
41e2327174e257faf155b8c659a35f85cfb172cb
[ "Apache-2.0" ]
null
null
null
#: -*- coding: utf-8 -*- """ Application default settings file """ #: package name PACKAGE_NAME = 'ipredictor' #: data datetime format DATETIME_FORMAT = "%Y-%m-%d %H:%M:%S" #: resample period identifier RESAMPLE_PERIOD = 'H' #: default season period is 24 hours for hourly resampled data SEASON_PERIOD = 24 #: start ...
19
62
0.717105
#: -*- coding: utf-8 -*- """ Application default settings file """ #: package name PACKAGE_NAME = 'ipredictor' #: data datetime format DATETIME_FORMAT = "%Y-%m-%d %H:%M:%S" #: resample period identifier RESAMPLE_PERIOD = 'H' #: default season period is 24 hours for hourly resampled data SEASON_PERIOD = 24 #: start ...
0
0
0
0
0
0
0
0
0
3d4264e401bd543cdf5a13f5f9522dbb141cb705
7,629
py
Python
Roshan/Django final code after testing/personal/views.py
roshan02/prevention-of-impersonation-using-face-recognition
e94faa77633abe2454bc044b1823cca56bda0bc0
[ "MIT" ]
null
null
null
Roshan/Django final code after testing/personal/views.py
roshan02/prevention-of-impersonation-using-face-recognition
e94faa77633abe2454bc044b1823cca56bda0bc0
[ "MIT" ]
null
null
null
Roshan/Django final code after testing/personal/views.py
roshan02/prevention-of-impersonation-using-face-recognition
e94faa77633abe2454bc044b1823cca56bda0bc0
[ "MIT" ]
null
null
null
import pyttsx3 #text to speech library engine = pyttsx3.init() face_locations = [] face_encodings = [] face_names = [] process_this_frame = True # Create your views here.
29.342308
134
0.688033
from django.shortcuts import render from django import forms from django.http import HttpResponse import MySQLdb from django.contrib.auth import login, authenticate from personal.forms import LoginForm, Form import base64 import cv2 import re import face_recognition import pyttsx3 #text to speech library engine = pyt...
0
0
0
71
0
6,852
0
47
474
150d1cc4b6b084950cf012ac80174e8fc6e693e7
4,523
py
Python
tensorflow/python/keras/saving/model_config.py
B3EF/tensorflow
bc8d5ff6cdf9847a66e3d2ca4993c1a3a7c2223a
[ "Apache-2.0" ]
null
null
null
tensorflow/python/keras/saving/model_config.py
B3EF/tensorflow
bc8d5ff6cdf9847a66e3d2ca4993c1a3a7c2223a
[ "Apache-2.0" ]
null
null
null
tensorflow/python/keras/saving/model_config.py
B3EF/tensorflow
bc8d5ff6cdf9847a66e3d2ca4993c1a3a7c2223a
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
34.265152
95
0.710369
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
0
3,294
0
0
0
0
0
80
114
fb355a9f81cfffdc6afe7af4cbe6a1ea14d6c994
10,410
py
Python
src/charm.py
davigar15/charm-kamailio
91de4bbbfe0d2a6f3b04817b82c246063e37002f
[ "Apache-2.0" ]
null
null
null
src/charm.py
davigar15/charm-kamailio
91de4bbbfe0d2a6f3b04817b82c246063e37002f
[ "Apache-2.0" ]
null
null
null
src/charm.py
davigar15/charm-kamailio
91de4bbbfe0d2a6f3b04817b82c246063e37002f
[ "Apache-2.0" ]
1
2022-01-20T13:50:10.000Z
2022-01-20T13:50:10.000Z
#!/usr/bin/env python3 # Copyright 2021 Gabor Meszaros # See LICENSE file for licensing details. # # Learn more at: https://juju.is/docs/sdk """Charm the service. Refer to the following post for a quick-start guide that will help you develop a new k8s charm using the Operator Framework: https://discourse.charmhu...
34.7
85
0.574544
#!/usr/bin/env python3 # Copyright 2021 Gabor Meszaros # See LICENSE file for licensing details. # # Learn more at: https://juju.is/docs/sdk """Charm the service. Refer to the following post for a quick-start guide that will help you develop a new k8s charm using the Operator Framework: https://discourse.charmhu...
0
437
0
9,128
0
0
0
219
156
bea3be45acd717f4efe0c8fa949a269aeebab7de
6,391
py
Python
python/scripts/lookupGenerator.py
abelard2008/overlog
8df2bb95d2e39e41dd8e30249da6bb8a1615f39f
[ "BSD-3-Clause" ]
3
2016-01-26T22:19:12.000Z
2019-07-10T02:12:38.000Z
python/scripts/lookupGenerator.py
abelard2008/overlog
8df2bb95d2e39e41dd8e30249da6bb8a1615f39f
[ "BSD-3-Clause" ]
null
null
null
python/scripts/lookupGenerator.py
abelard2008/overlog
8df2bb95d2e39e41dd8e30249da6bb8a1615f39f
[ "BSD-3-Clause" ]
null
null
null
import dfparser import sys import os import getopt import random DATAFLOW_NAME = "LookupGenerator" if __name__ == "__main__": try: flags, args = parse_cmdline(sys.argv) except: print "EXCEPTION" print_usage() sys.exit(3) if len(args) < 2: print_usage() sys.exit(3) ...
32.607143
103
0.579252
import dfparser from libp2python import * import sys import os import getopt import random DATAFLOW_NAME = "LookupGenerator" class LookupGenerator(Element): def __init__(self, name, myaddress, nodes, freq): Element.__init__(self,name, 1, 1) self.mode = "edit" self.myaddress = myaddress ...
0
0
0
3,454
0
1,528
0
4
137
d2477da9cd23cb57c3ea5abd6feff6a8a20cd3f5
622
py
Python
example/04.Color_sensor/color_sensor.get_color.py
rundhall/PC-LEGO-SPIKE-Simulator
5b2fae19293875b2f60d599940d77237700798d3
[ "MIT" ]
null
null
null
example/04.Color_sensor/color_sensor.get_color.py
rundhall/PC-LEGO-SPIKE-Simulator
5b2fae19293875b2f60d599940d77237700798d3
[ "MIT" ]
null
null
null
example/04.Color_sensor/color_sensor.get_color.py
rundhall/PC-LEGO-SPIKE-Simulator
5b2fae19293875b2f60d599940d77237700798d3
[ "MIT" ]
null
null
null
'''get_color() Retrieves the detected color of a surface. Returns Name of the color. Type:String (text) Values:'black','violet','blue','cyan','green','yellow','red','white',None Errors RuntimeError The sensor has been disconnected from the Port. Example ''' from spike import ColorSensor import time # Initialize the Co...
21.448276
73
0.700965
'''get_color() Retrieves the detected color of a surface. Returns Name of the color. Type:String (text) Values:'black','violet','blue','cyan','green','yellow','red','white',None Errors RuntimeError The sensor has been disconnected from the Port. Example ''' from spike import ColorSensor import time # Initialize the Co...
0
0
0
0
0
0
0
0
0
96ee1f1c8502a7ba1b4fddc920e876d0637d6030
1,769
py
Python
hmmhc/cmdline.py
artyomovlab/hmmhc
1fb1b616967b0d03787976c835c738abc7853469
[ "MIT" ]
15
2019-10-23T07:46:53.000Z
2022-03-17T07:26:30.000Z
hmmhc/cmdline.py
artyomovlab/hmmhc
1fb1b616967b0d03787976c835c738abc7853469
[ "MIT" ]
5
2019-10-31T14:29:01.000Z
2021-04-24T19:46:51.000Z
hmmhc/cmdline.py
artyomovlab/hmmhc
1fb1b616967b0d03787976c835c738abc7853469
[ "MIT" ]
3
2019-11-18T06:05:02.000Z
2021-07-15T07:50:16.000Z
'''hmMHC command line interface Copyright (c) 2019 Maxim Artyomov, Ilya Kizhvatov ''' from __future__ import print_function import argparse import pandas as pd import sys from .hmmhc import hmMHC def parseArgs(args): '''Define and parse command line arguments''' parser = argparse.ArgumentParser(descriptio...
28.532258
127
0.676653
'''hmMHC command line interface Copyright (c) 2019 Maxim Artyomov, Ilya Kizhvatov ''' from __future__ import print_function import argparse import pandas as pd import sys from .hmmhc import hmMHC def parseArgs(args): '''Define and parse command line arguments''' parser = argparse.ArgumentParser(descriptio...
0
0
0
0
0
0
0
0
0
ad402ced6b3f5d15320d7c270b0fabf81ff6536a
1,106
py
Python
drones/v2/urls.py
Zoki92/Drone
7c637220d1c085ec804d72f148b1c98b088799df
[ "MIT" ]
null
null
null
drones/v2/urls.py
Zoki92/Drone
7c637220d1c085ec804d72f148b1c98b088799df
[ "MIT" ]
null
null
null
drones/v2/urls.py
Zoki92/Drone
7c637220d1c085ec804d72f148b1c98b088799df
[ "MIT" ]
null
null
null
from django.urls import path from drones import views from drones.v2 import views as views_v2 urlpatterns = [ path('vehicle-categories/', views.DroneCategoryList.as_view(), name=views.DroneCategoryList.name), path('vehicle-categories/<int:pk>', views.DroneCategoryDetail.as_view(), ...
31.6
46
0.640145
from django.urls import path from drones import views from drones.v2 import views as views_v2 urlpatterns = [ path('vehicle-categories/', views.DroneCategoryList.as_view(), name=views.DroneCategoryList.name), path('vehicle-categories/<int:pk>', views.DroneCategoryDetail.as_view(), ...
0
0
0
0
0
0
0
0
0
bef5c6866890c2db7392fb9b32a9b8bfb2f57d76
387
py
Python
backend/experiment/migrations/0006_auto_20180402_0508.py
graup/manyideas
3c4d5792e8912d257aced2d01f1184b06bf42c66
[ "MIT" ]
1
2018-08-30T19:59:59.000Z
2018-08-30T19:59:59.000Z
backend/experiment/migrations/0006_auto_20180402_0508.py
graup/manyideas
3c4d5792e8912d257aced2d01f1184b06bf42c66
[ "MIT" ]
null
null
null
backend/experiment/migrations/0006_auto_20180402_0508.py
graup/manyideas
3c4d5792e8912d257aced2d01f1184b06bf42c66
[ "MIT" ]
null
null
null
# Generated by Django 2.0.1 on 2018-04-02 05:08
20.368421
50
0.609819
# Generated by Django 2.0.1 on 2018-04-02 05:08 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('experiment', '0005_auto_20180402_0500'), ] operations = [ migrations.RenameField( model_name='classificationresult', old_nam...
0
0
0
281
0
0
0
11
46
cd879c90cce32a5c0c84b11bdfa2735fc6039467
7,833
py
Python
lrfinder.py
maeotaku/biomachina
6e384c0d20f6eeccefe990d2229537d1f6744df7
[ "MIT" ]
null
null
null
lrfinder.py
maeotaku/biomachina
6e384c0d20f6eeccefe990d2229537d1f6744df7
[ "MIT" ]
null
null
null
lrfinder.py
maeotaku/biomachina
6e384c0d20f6eeccefe990d2229537d1f6744df7
[ "MIT" ]
null
null
null
import os import warnings from omegaconf import OmegaConf warnings.filterwarnings("ignore") warnings.simplefilter(action='ignore', category=FutureWarning) CODE_ROOT = f'C:/Users/maeot/Documents/code/biomachina' import sys sys.path.insert(0, CODE_ROOT) import os # initialize_config_dir(config_dir=os.path.join(CODE...
44.254237
130
0.672412
import os import pickle import warnings import hydra import pandas as pd import torch from omegaconf import DictConfig, OmegaConf from pytorch_lightning.callbacks import EarlyStopping, StochasticWeightAveraging, LearningRateMonitor from torch.utils.data import DataLoader from torchvision import transforms import pytor...
0
2,272
0
0
0
3,662
0
349
536
fbbd4e125ac8c66785158876f2e7f4e41b332c8f
8,120
py
Python
hummingbot/connector/exchange/gate_io/gate_io_utils.py
joedomino874/hummingbot
cb3ee5a30a2feb0a55ceca9d200c59662d7e3057
[ "Apache-2.0" ]
5
2021-06-24T11:21:32.000Z
2022-03-07T11:17:49.000Z
hummingbot/connector/exchange/gate_io/gate_io_utils.py
joedomino874/hummingbot
cb3ee5a30a2feb0a55ceca9d200c59662d7e3057
[ "Apache-2.0" ]
17
2022-01-28T14:19:30.000Z
2022-03-31T08:54:28.000Z
hummingbot/connector/exchange/gate_io/gate_io_utils.py
joedomino874/hummingbot
cb3ee5a30a2feb0a55ceca9d200c59662d7e3057
[ "Apache-2.0" ]
2
2021-12-24T14:58:00.000Z
2022-03-28T09:16:28.000Z
from hummingbot.client.config.config_methods import using_exchange from hummingbot.client.config.config_var import ConfigVar from hummingbot.connector.exchange.gate_io import gate_io_constants as CONSTANTS CENTRALIZED = True EXAMPLE_PAIR = "BTC-USDT" DEFAULT_FEES = [0.2, 0.2] KEYS = { "gate_io_api_k...
38.666667
108
0.656034
import asyncio import logging import random from dataclasses import dataclass from typing import Any, Dict, Optional, Tuple import ujson from hummingbot.client.config.config_methods import using_exchange from hummingbot.client.config.config_var import ConfigVar from hummingbot.connector.exchange.gate_io import gate_io...
0
1,210
3,225
563
0
1,395
0
348
518
eeeae515491a08d5ba56483ba628401d0ada0693
12,038
py
Python
RecSys/recsys_cbf.py
Jewelryland/YelpRecSys
56a2a272432549076cd6c76b6f3fb50921a68743
[ "BSD-3-Clause" ]
null
null
null
RecSys/recsys_cbf.py
Jewelryland/YelpRecSys
56a2a272432549076cd6c76b6f3fb50921a68743
[ "BSD-3-Clause" ]
null
null
null
RecSys/recsys_cbf.py
Jewelryland/YelpRecSys
56a2a272432549076cd6c76b6f3fb50921a68743
[ "BSD-3-Clause" ]
1
2021-05-04T03:23:29.000Z
2021-05-04T03:23:29.000Z
# -*- coding: utf-8 -*- __author__ = 'Adward' # Python utils imports import os import sys from time import time import sqlite3 # Standard scientific Python imports # Import classifiers and performance metrics from sklearn.cross_validation import ShuffleSplit from sklearn.ensemble import RandomForestClassifier # Con...
48.736842
823
0.606247
# -*- coding: utf-8 -*- __author__ = 'Adward' # Python utils imports import math import os import sys from time import time import sqlite3 # Standard scientific Python imports import matplotlib.pyplot as plt import numpy as np # Import classifiers and performance metrics from sklearn.preprocessing import * from skle...
6
0
0
0
0
2,882
0
133
222
dbebb617c371cc551c4c6b23772feb45e413acbe
2,488
py
Python
octant/ocean/state.py
kthyng/octant
65591d87797fa74e0c092d5f50fb0cd703eb412e
[ "BSD-3-Clause" ]
null
null
null
octant/ocean/state.py
kthyng/octant
65591d87797fa74e0c092d5f50fb0cd703eb412e
[ "BSD-3-Clause" ]
null
null
null
octant/ocean/state.py
kthyng/octant
65591d87797fa74e0c092d5f50fb0cd703eb412e
[ "BSD-3-Clause" ]
1
2019-05-03T22:14:19.000Z
2019-05-03T22:14:19.000Z
#!/usr/bin/env python2.4 """ Tools for working with oceanic data """ def rho_stp(s,t,p=0): """ returns density as a function of: s = Salinity in psu, t = Temperature in deg C, p = Pressure in dbar (default = 0) """ p1 = 999.842594 p2 = 6.793952E-2 p3 = -9.09529E-3 p4 = 1...
28.597701
73
0.473875
#!/usr/bin/env python2.4 """ Tools for working with oceanic data """ from numpy import * def rho_stp(s,t,p=0): """ returns density as a function of: s = Salinity in psu, t = Temperature in deg C, p = Pressure in dbar (default = 0) """ p1 = 999.842594 p2 = 6.793952E-2 p3 = -9.0...
0
0
0
0
0
0
0
-2
22
942391b83ef479d88c76e5b1e5e5f21cc0919b9b
1,332
py
Python
dj/urls.py
mohamed17717/Like-Reddit-Backend-Clone
d60d7a4625ee0f7354a21e53c26c7c52746d735f
[ "MIT" ]
1
2022-01-10T12:00:59.000Z
2022-01-10T12:00:59.000Z
dj/urls.py
mohamed17717/Like-Reddit-Backend-Clone
d60d7a4625ee0f7354a21e53c26c7c52746d735f
[ "MIT" ]
null
null
null
dj/urls.py
mohamed17717/Like-Reddit-Backend-Clone
d60d7a4625ee0f7354a21e53c26c7c52746d735f
[ "MIT" ]
null
null
null
from django.contrib import admin from django.urls import path, include from rest_framework.documentation import include_docs_urls urlpatterns = [ path('', include('categories.urls', namespace='categories')), path('', include('follows.urls', namespace='follows')), path('', include('notifications.urls', namespac...
35.052632
75
0.6997
from django.contrib import admin from django.urls import path, include from rest_framework.documentation import include_docs_urls urlpatterns = [ path('', include('categories.urls', namespace='categories')), path('', include('follows.urls', namespace='follows')), path('', include('notifications.urls', namespac...
0
0
0
0
0
0
0
0
0
f1ae3741dcaf2564a221142a14000bfaed0c88fb
4,851
py
Python
learn/models.py
Shivamjha12/Mybio
e4bbcffa58341612ee684d74ba00cdb2125ef07b
[ "Unlicense", "MIT" ]
2
2021-08-29T08:07:03.000Z
2021-12-11T07:26:24.000Z
learn/models.py
Shivamjha12/Mybio
e4bbcffa58341612ee684d74ba00cdb2125ef07b
[ "Unlicense", "MIT" ]
null
null
null
learn/models.py
Shivamjha12/Mybio
e4bbcffa58341612ee684d74ba00cdb2125ef07b
[ "Unlicense", "MIT" ]
null
null
null
# Create your models here. category_choices= ( ('Motion_icon', 'Motion Icon'), ('Important_icon','Important'), ) # @receiver(post_save, sender=User,dispatch_uid='save_new_user_profile') # def create_or_save_profile(sender,created,instance,*args,**kwargs): # super(Profile).save(*args, **kwargs) #...
37.315385
124
0.696557
from django.db import models from django.contrib.auth.forms import UserCreationForm from django.contrib.auth.models import User from django import forms from django.db.models.signals import post_save from django.conf import settings from django.dispatch import receiver from django.db.models.fields import URLField from ...
0
715
0
2,176
0
0
0
210
379
38c1c316f2c8173a20cd2492693e96e4f86b7119
7,446
py
Python
utils.py
Zhang-Shubo/ai_nlp_model_zoo
1fe384463cafbef89f4b0d27917ac94f2ff2c6f1
[ "MIT" ]
null
null
null
utils.py
Zhang-Shubo/ai_nlp_model_zoo
1fe384463cafbef89f4b0d27917ac94f2ff2c6f1
[ "MIT" ]
null
null
null
utils.py
Zhang-Shubo/ai_nlp_model_zoo
1fe384463cafbef89f4b0d27917ac94f2ff2c6f1
[ "MIT" ]
null
null
null
# time: 2021/4/28 22:50 # File: utils.py # Author: zhangshubo # Mail: supozhang@126.com import json _bert_token_dict = json.loads(open("data/bert/bert-base-chinese/tokenizer.json", encoding="utf-8").read())["model"][ "vocab"] # extra_tencent_embedding(r"E:\tencent_embedding\Tencent_AILab_ChineseEmbedding...
31.025
116
0.520682
# time: 2021/4/28 22:50 # File: utils.py # Author: zhangshubo # Mail: supozhang@126.com import json import os import random import torch _bert_token_dict = json.loads(open("data/bert/bert-base-chinese/tokenizer.json", encoding="utf-8").read())["model"][ "vocab"] def read_nlpcc_text(path): with open(path, "r...
48
0
0
3,921
1,149
1,788
0
-29
274
3335cf80713d3bb5a32615846b4ee2a0282f2f08
1,855
py
Python
src/7.reverse-integer/7.reverse-integer.py
AnestLarry/LeetCodeAnswer
ca06a9cabe72879812f4b41d68ec882139974d84
[ "MIT" ]
null
null
null
src/7.reverse-integer/7.reverse-integer.py
AnestLarry/LeetCodeAnswer
ca06a9cabe72879812f4b41d68ec882139974d84
[ "MIT" ]
null
null
null
src/7.reverse-integer/7.reverse-integer.py
AnestLarry/LeetCodeAnswer
ca06a9cabe72879812f4b41d68ec882139974d84
[ "MIT" ]
null
null
null
# # @lc app=leetcode id=7 lang=python3 # # [7] Reverse Integer # # Given a 32-bit signed integer, reverse digits of an integer. # Example 1: # Input: 123 # Output: 321 # Example 2: # Input: -123 # Output: -321 # Example 3: # Input: 120 # Output: 21 # Note: # Assume we are dealing with an environment which could on...
26.884058
239
0.520755
# # @lc app=leetcode id=7 lang=python3 # # [7] Reverse Integer # # Given a 32-bit signed integer, reverse digits of an integer. # Example 1: # Input: 123 # Output: 321 # Example 2: # Input: -123 # Output: -321 # Example 3: # Input: 120 # Output: 21 # Note: # Assume we are dealing with an environment which could on...
6
0
0
1,329
0
0
0
0
23
417a281f12852e71f2093435fb21b4918a8df06d
3,640
py
Python
SoloPrac4/dictionary.py
vihaanphilip/FIT1008-Intro-to-comp-sci
9c9c7fd9ed713a7dcd44a0820436dde5ec493a13
[ "MIT" ]
null
null
null
SoloPrac4/dictionary.py
vihaanphilip/FIT1008-Intro-to-comp-sci
9c9c7fd9ed713a7dcd44a0820436dde5ec493a13
[ "MIT" ]
null
null
null
SoloPrac4/dictionary.py
vihaanphilip/FIT1008-Intro-to-comp-sci
9c9c7fd9ed713a7dcd44a0820436dde5ec493a13
[ "MIT" ]
null
null
null
def process_option(dictionary : Dictionary, method_name: str) -> None: """ Helper code for processing menu options.""" if method_name == 'read_file': filename = input('Enter filename: ') try: dictionary.load_dictionary(filename) print('Successfully read file') ex...
36.4
95
0.547253
from hash_table import LinearProbeHashTable from typing import Tuple import timeit class Dictionary: DEFAULT_ENCODING = 'utf-8' def __init__(self, hash_base: int, table_size: int) -> None: self.hash_table = LinearProbeHashTable(hash_base, table_size) def load_dictionary(self, filename: str, time_...
0
0
0
1,131
0
0
0
17
89
9913b7485d1211ea313829ef4be07b720480d865
15,290
py
Python
modules/networkx/algorithms/mixing.py
fstwn/Cockatoo
0c5f9c515053bfc31e62d20fddc4ae9bece09d88
[ "MIT" ]
9
2020-09-26T03:41:21.000Z
2021-11-29T06:52:35.000Z
modules/networkx/algorithms/mixing.py
fstwn/Cockatoo
0c5f9c515053bfc31e62d20fddc4ae9bece09d88
[ "MIT" ]
9
2020-08-10T19:38:03.000Z
2022-02-24T08:41:32.000Z
modules/networkx/algorithms/mixing.py
fstwn/Cockatoo
0c5f9c515053bfc31e62d20fddc4ae9bece09d88
[ "MIT" ]
7
2015-04-28T19:19:30.000Z
2022-02-06T11:46:29.000Z
#-*- coding: utf-8 -*- """ Mixing matrices and assortativity coefficients. """ __author__ = """Aric Hagberg (hagberg@lanl.gov)""" __all__ = ['degree_assortativity', 'attribute_assortativity', 'numeric_assortativity', 'attribute_mixing_matrix', 'degree_mixing_matrix', ...
25.915254
81
0.602616
#-*- coding: utf-8 -*- """ Mixing matrices and assortativity coefficients. """ __author__ = """Aric Hagberg (hagberg@lanl.gov)""" __all__ = ['degree_assortativity', 'attribute_assortativity', 'numeric_assortativity', 'attribute_mixing_matrix', 'degree_mixing_matrix', ...
0
0
0
0
2,080
736
0
0
114
27ad62167bd969bfe863f21aa489c9d278825a34
1,575
py
Python
lod2bin.py
jhart99/lodtools
612f9b00eb3cdd8d8b76ba155a57c7773fcf95b4
[ "MIT" ]
null
null
null
lod2bin.py
jhart99/lodtools
612f9b00eb3cdd8d8b76ba155a57c7773fcf95b4
[ "MIT" ]
null
null
null
lod2bin.py
jhart99/lodtools
612f9b00eb3cdd8d8b76ba155a57c7773fcf95b4
[ "MIT" ]
null
null
null
if __name__ == "__main__": import argparse parser = argparse.ArgumentParser(description='Auctus A6 dumper') parser.add_argument('--split', default=False, action="store_true", help='split the memory locations') parser.add_argument('--begin', type=lambda x: int(x,0), ...
45
86
0.543492
if __name__ == "__main__": import argparse parser = argparse.ArgumentParser(description='Auctus A6 dumper') parser.add_argument('--split', default=False, action="store_true", help='split the memory locations') parser.add_argument('--begin', type=lambda x: int(x,0), ...
0
0
0
0
0
0
0
0
0
e7b4f011a2e9b7bee26ce292d3efd24abd443810
989
py
Python
PyMessenger/test_1.py
ArmenG888/PyMessenger
9cd23df974bd69bf1418af85d1382a61db84b4fc
[ "MIT" ]
1
2021-11-09T17:30:44.000Z
2021-11-09T17:30:44.000Z
PyMessenger/test_1.py
ArmenG888/PyMessenger
9cd23df974bd69bf1418af85d1382a61db84b4fc
[ "MIT" ]
null
null
null
PyMessenger/test_1.py
ArmenG888/PyMessenger
9cd23df974bd69bf1418af85d1382a61db84b4fc
[ "MIT" ]
null
null
null
import sys if __name__ == "__main__": app = QApplication(sys.argv) window = server() sys.exit(app.exec_())
38.038462
175
0.698686
from PySide2 import QtCore, QtGui, QtWidgets from PySide2.QtCore import (QCoreApplication, QPropertyAnimation, QDate, QDateTime, QMetaObject, QObject, QPoint, QRect, QSize, QTime, QUrl, Qt, QEvent) from PySide2.QtGui import (QBrush, QColor, QConicalGradient, QCursor, QFont, QFontDatabase, QIcon, QKeySequence, QLinearGr...
0
0
0
399
0
0
0
337
133
ffef4c2e94719a6d189313bbf347eed74fff0172
353
py
Python
test.py
RTa-technology/template_bot
90501f0ad589321ae581df3fdb9f57232eb79660
[ "MIT" ]
null
null
null
test.py
RTa-technology/template_bot
90501f0ad589321ae581df3fdb9f57232eb79660
[ "MIT" ]
5
2021-11-12T10:27:49.000Z
2022-01-06T10:25:48.000Z
test.py
RTa-technology/template_discord_bot
90501f0ad589321ae581df3fdb9f57232eb79660
[ "MIT" ]
null
null
null
EXT = ( "test", )
22.0625
55
0.640227
import discord from discord.ext import commands EXT = ( "test", ) class MyTestableBot(commands.Bot): def __init__(self, command_prefix: str, **options): super().__init__(command_prefix, **options) for ext_name in EXT: self.load_extension("cogs." + ext_name) async def on_ready(...
0
0
30
229
0
0
0
4
67
a2e9d2f8197dbfc64de2e012e72d9309b30c85fb
243
py
Python
coding_exam_study/insertion_sort_example.py
94JuHo/Algorithm_study
e2c10ec680d966e5bcc4e7cb88d9514f9ccbbf15
[ "MIT" ]
null
null
null
coding_exam_study/insertion_sort_example.py
94JuHo/Algorithm_study
e2c10ec680d966e5bcc4e7cb88d9514f9ccbbf15
[ "MIT" ]
null
null
null
coding_exam_study/insertion_sort_example.py
94JuHo/Algorithm_study
e2c10ec680d966e5bcc4e7cb88d9514f9ccbbf15
[ "MIT" ]
null
null
null
array = [7, 5, 9, 0, 3, 1, 6, 2, 4, 8] for i in range(1, len(array)): for j in range(i, 0, -1): if array[j] < array[j - 1]: array[j], array[j - 1] = array[j - 1], array[j] else: break print(array)
22.090909
59
0.44856
array = [7, 5, 9, 0, 3, 1, 6, 2, 4, 8] for i in range(1, len(array)): for j in range(i, 0, -1): if array[j] < array[j - 1]: array[j], array[j - 1] = array[j - 1], array[j] else: break print(array)
0
0
0
0
0
0
0
0
0
03e834bd52f3e6cbefea31c6a93ae1bac6cbbfb0
3,781
py
Python
project/util.py
felixzheng02/pypkpd
9e7f41aa7e33ba50cec3482f14e7be08a4bc23e7
[ "MIT" ]
9
2021-06-17T08:11:31.000Z
2021-06-22T08:05:27.000Z
project/util.py
Caiya-Zhang/pypkpd
9e7f41aa7e33ba50cec3482f14e7be08a4bc23e7
[ "MIT" ]
null
null
null
project/util.py
Caiya-Zhang/pypkpd
9e7f41aa7e33ba50cec3482f14e7be08a4bc23e7
[ "MIT" ]
2
2021-06-18T07:16:08.000Z
2021-09-25T04:43:28.000Z
""" Author: Caiya Zhang, Yuchen Zheng """ #trans = function(x) matrix(c(x[bpop_index],exp(x[d_index])),ncol=1,byrow=T # transform_back = function(par,lower=-Inf,upper=Inf){ # # FastImputation::BoundNormalizedVariable( # # par, # # constraints = # # list(lower=lower, # # ...
29.771654
131
0.675218
""" Author: Caiya Zhang, Yuchen Zheng """ import numpy as np import scipy as sp def is_not_none(d: dict, k: str): if k in list(d.keys()): if d[k] is not None: return True else: return False else: return False def trans(x, exp_index): x[exp_index] = np.exp(x[exp_index]) ...
0
0
0
0
0
2,528
0
-6
223
a83a7e5bc5010100f792515914ddc4754b854cab
1,635
py
Python
attack.py
carlobar/resilient-forecast
1230a5101aee6c7257ede70d6ecb857091b5b2b8
[ "MIT" ]
null
null
null
attack.py
carlobar/resilient-forecast
1230a5101aee6c7257ede70d6ecb857091b5b2b8
[ "MIT" ]
null
null
null
attack.py
carlobar/resilient-forecast
1230a5101aee6c7257ede70d6ecb857091b5b2b8
[ "MIT" ]
null
null
null
import numpy as np import os import time import random import forecast_lib as fl dropout=False if dropout: type_exp = '_dropout' else: type_exp = '' # experiment parameters directory = './experiments/models_diff_size'+type_exp+'/' m = fl.num_meters max_num_models = 20 m_d_frac = np.linspace(0.5, 1, 5) m_a_f...
18.579545
106
0.669113
import numpy as np import os import time import random import forecast_lib as fl dropout=False if dropout: type_exp = '_dropout' else: type_exp = '' # experiment parameters directory = './experiments/models_diff_size'+type_exp+'/' m = fl.num_meters max_num_models = 20 m_d_frac = np.linspace(0.5, 1, 5) m_a_f...
0
0
0
0
0
0
0
0
0
1201793a8e06f213f976755f938fb0479db717dd
299
py
Python
tweet/urls.py
jeffsimp88/twitterclone
696aa05da4feae15d7a0c2296a8d74be4ee32286
[ "MIT" ]
null
null
null
tweet/urls.py
jeffsimp88/twitterclone
696aa05da4feae15d7a0c2296a8d74be4ee32286
[ "MIT" ]
null
null
null
tweet/urls.py
jeffsimp88/twitterclone
696aa05da4feae15d7a0c2296a8d74be4ee32286
[ "MIT" ]
null
null
null
from django.urls import path from tweet import views urlpatterns = [ path('posttweet/', views.post_tweet_view, name='post tweet'), path('tweet/<int:tweet_id>/', views.tweet_view, name="tweet details"), path('deletetweet/<int:tweet_id>/', views.delete_tweet_view, name="delete tweet") ]
33.222222
85
0.719064
from django.urls import path from tweet import views urlpatterns = [ path('posttweet/', views.post_tweet_view, name='post tweet'), path('tweet/<int:tweet_id>/', views.tweet_view, name="tweet details"), path('deletetweet/<int:tweet_id>/', views.delete_tweet_view, name="delete tweet") ]
0
0
0
0
0
0
0
0
0
f1728f9662225a0ba82687ddb3b9e62ad8d3e330
983
py
Python
task.py
Nicotinamide/lit-ncov-report
c6ef73b9dbc016ed3e02e3e3bd52570af1482525
[ "MIT" ]
null
null
null
task.py
Nicotinamide/lit-ncov-report
c6ef73b9dbc016ed3e02e3e3bd52570af1482525
[ "MIT" ]
null
null
null
task.py
Nicotinamide/lit-ncov-report
c6ef73b9dbc016ed3e02e3e3bd52570af1482525
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # _*_ coding:utf-8 _*_ from src import crontab, crontab_run # main if __name__ == '__main__': # 000010'executor script1 argv1' executor='python3' script1 = 'main.py' argv1 = '-m -t -s' crontab.every('day').at(hour=0, minute=0, second=10).execute(script1,executor,argv1) ...
31.709677
89
0.651068
#!/usr/bin/env python3 # _*_ coding:utf-8 _*_ import os, datetime from src import crontab, crontab_run # main if __name__ == '__main__': # 每天00点00分10秒运行一次'executor script1 argv1' executor='python3' script1 = 'main.py' argv1 = '-m -t -s' crontab.every('day').at(hour=0, minute=0, second=10).execute...
123
0
0
0
0
0
0
-2
23
99c7f43c1321f5b159fa930c0ab98f627036aaae
818
py
Python
migrations/versions/717ad3834899_add_username_column.py
Nicholas-muchiri/Pitch
f6b223c14db219961cc8f8ad63c18436f051549e
[ "MIT" ]
null
null
null
migrations/versions/717ad3834899_add_username_column.py
Nicholas-muchiri/Pitch
f6b223c14db219961cc8f8ad63c18436f051549e
[ "MIT" ]
null
null
null
migrations/versions/717ad3834899_add_username_column.py
Nicholas-muchiri/Pitch
f6b223c14db219961cc8f8ad63c18436f051549e
[ "MIT" ]
1
2019-08-06T06:38:09.000Z
2019-08-06T06:38:09.000Z
"""Add Username Column Revision ID: 717ad3834899 Revises: ed5ce2cd18c2 Create Date: 2017-10-31 11:28:44.615281 """ # revision identifiers, used by Alembic. revision = '717ad3834899' down_revision = 'ed5ce2cd18c2' branch_labels = None depends_on = None
26.387097
87
0.696822
"""Add Username Column Revision ID: 717ad3834899 Revises: ed5ce2cd18c2 Create Date: 2017-10-31 11:28:44.615281 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '717ad3834899' down_revision = 'ed5ce2cd18c2' branch_labels = None depends_on = None def upgrade(): ...
0
0
0
0
0
467
0
3
90
c9ba479136103fb84f57579706e1fb29e9bcf7fc
6,131
py
Python
source code/3_createTransactionDatabase.py
lukasmuell3r/WikidataMetadataPatterns
0dd53b1acc5197d77dd9267bb0f637b661c1ccf1
[ "MIT" ]
null
null
null
source code/3_createTransactionDatabase.py
lukasmuell3r/WikidataMetadataPatterns
0dd53b1acc5197d77dd9267bb0f637b661c1ccf1
[ "MIT" ]
null
null
null
source code/3_createTransactionDatabase.py
lukasmuell3r/WikidataMetadataPatterns
0dd53b1acc5197d77dd9267bb0f637b661c1ccf1
[ "MIT" ]
null
null
null
import bz2 import json import os import re from ast import literal_eval grep_property_line = re.compile('(^<wd:[Qq][^>]+>\s<p:[Pp][^>]+>\s<wds:[Qq][^>]+>)') grep_wds = re.compile('((?<=wds:)[Qq][^>]+)') grep_property = re.compile('((?<=p:)[Pp][^>]+)') grep_qualifier = re.compile('((?<=pq:)[Pp][^>]+)') grep_wditem = re...
48.65873
121
0.637416
import bz2 import json import os import re from ast import literal_eval grep_property_line = re.compile('(^<wd:[Qq][^>]+>\s<p:[Pp][^>]+>\s<wds:[Qq][^>]+>)') grep_wds = re.compile('((?<=wds:)[Qq][^>]+)') grep_property = re.compile('((?<=p:)[Pp][^>]+)') grep_qualifier = re.compile('((?<=pq:)[Pp][^>]+)') grep_wditem = re...
0
0
0
0
0
0
0
0
0
20997705d6ab6575c526bc48d31daccbdc218c5d
1,940
py
Python
src/vessel-drift-analysis/scripts/analysis/load-data-into-spatial-db.py
yosoyjay/project-nps-vessel-drift
1cdc14ef87db31fa03b0c3bdc1d60c332727ef57
[ "MIT" ]
null
null
null
src/vessel-drift-analysis/scripts/analysis/load-data-into-spatial-db.py
yosoyjay/project-nps-vessel-drift
1cdc14ef87db31fa03b0c3bdc1d60c332727ef57
[ "MIT" ]
null
null
null
src/vessel-drift-analysis/scripts/analysis/load-data-into-spatial-db.py
yosoyjay/project-nps-vessel-drift
1cdc14ef87db31fa03b0c3bdc1d60c332727ef57
[ "MIT" ]
null
null
null
#!python # Loads vessel hazard results into the spatial db import logging from pathlib import Path import geopandas as gpd import sqlalchemy logging.basicConfig(format='%(process)d - %(levelname)s: %(message)s', level=logging.INFO) def load_file(hazard_file_path: Path, db_engine: sqlalchemy.engine.Engine) -> None...
29.393939
104
0.684536
#!python # Loads vessel hazard results into the spatial db import logging import os from pathlib import Path import geopandas as gpd import sqlalchemy from sqlalchemy import create_engine logging.basicConfig(format='%(process)d - %(levelname)s: %(message)s', level=logging.INFO) def get_db_engine() -> sqlalchemy.en...
0
0
0
0
0
777
0
3
117
e0aa85891f29607c80b8a22d1c8bf9721b59efa4
10,372
py
Python
openpyxl/writer/tests/test_lxml.py
Hitachi-Data-Systems/org-chart-builder
3d3528d419c9123e5bed694a7c26245cfd73a0a7
[ "Apache-2.0" ]
8
2016-05-27T12:13:16.000Z
2019-08-05T13:49:11.000Z
openpyxl/writer/tests/test_lxml.py
Hitachi-Data-Systems/org-chart-builder
3d3528d419c9123e5bed694a7c26245cfd73a0a7
[ "Apache-2.0" ]
1
2019-01-10T22:55:25.000Z
2019-03-14T13:32:28.000Z
openpyxl/writer/tests/test_lxml.py
Hitachi-Data-Systems/org-chart-builder
3d3528d419c9123e5bed694a7c26245cfd73a0a7
[ "Apache-2.0" ]
1
2021-07-21T00:07:30.000Z
2021-07-21T00:07:30.000Z
from __future__ import absolute_import # Copyright (c) 2010-2014 openpyxl # stdlib # package # test imports
30.777448
282
0.582433
from __future__ import absolute_import # Copyright (c) 2010-2014 openpyxl # stdlib import datetime import decimal from io import BytesIO # package from openpyxl import Workbook from lxml.etree import xmlfile, tostring # test imports import pytest from openpyxl.tests.helper import compare_xml @pytest.fixture def wo...
0
7,230
0
0
0
2,510
0
31
476
297ab51123440ac3be111d9ad0bb97203cdfdf6a
1,977
py
Python
setup.py
Shchusia/gen_doc
216b561fc973c5565a78348c5b0b3db58f84442f
[ "Unlicense" ]
null
null
null
setup.py
Shchusia/gen_doc
216b561fc973c5565a78348c5b0b3db58f84442f
[ "Unlicense" ]
null
null
null
setup.py
Shchusia/gen_doc
216b561fc973c5565a78348c5b0b3db58f84442f
[ "Unlicense" ]
null
null
null
""" Setup module for install lib """ import os import re from os import path from pathlib import Path from typing import List, Optional from setuptools import setup LIB_NAME = 'gen_doc' HERE = Path(__file__).parent this_directory = path.abspath(path.dirname(__file__)) with open(path.join(this_director...
29.073529
76
0.604451
""" Setup module for install lib """ import os import re from os import path from pathlib import Path from typing import List, Optional from setuptools import setup LIB_NAME = 'gen_doc' HERE = Path(__file__).parent this_directory = path.abspath(path.dirname(__file__)) with open(path.join(this_director...
0
0
0
0
0
0
0
0
0
f11dc6a3faa4d4c96abf0b0d5e41ff88cd1215ae
16,769
py
Python
laravelconfig.py
Wissemhlimii/wisse
0f025cac505b2b1b54b87cb876ad3f292b614f3f
[ "Apache-2.0" ]
null
null
null
laravelconfig.py
Wissemhlimii/wisse
0f025cac505b2b1b54b87cb876ad3f292b614f3f
[ "Apache-2.0" ]
null
null
null
laravelconfig.py
Wissemhlimii/wisse
0f025cac505b2b1b54b87cb876ad3f292b614f3f
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- import requests, os, sys requests.packages.urllib3.disable_warnings() from ConfigParser import ConfigParser try: os.mkdir('Results') except: pass list_region = '''us-east-1 us-east-2 us-west-1 us-west-2 af-south-1 ap-east-1 ap-south-1 ap-northeast-1 ap-northeast-2 ap-northeast-3 ap-southeast...
31.880228
269
0.575347
# -*- coding: utf-8 -*- import requests, os, sys from re import findall as reg requests.packages.urllib3.disable_warnings() from threading import * from threading import Thread from ConfigParser import ConfigParser from Queue import Queue try: os.mkdir('Results') except: pass list_region = '''us-east-1 us-east-2 us...
0
0
0
12,624
0
1,641
0
19
203
12fc620c133cf4a4f639edcb7c5a2f3f905ed79d
13,518
py
Python
calvin_models/calvin_agent/datasets/utils/shared_memory_utils.py
mees/calvin
4f907763cee46b3205371ceb2b17868963b0cc5c
[ "MIT" ]
70
2021-12-08T12:41:39.000Z
2022-03-17T14:58:25.000Z
calvin_models/calvin_agent/datasets/utils/shared_memory_utils.py
mees/calvin
4f907763cee46b3205371ceb2b17868963b0cc5c
[ "MIT" ]
11
2021-12-15T04:37:02.000Z
2022-03-31T11:33:03.000Z
calvin_models/calvin_agent/datasets/utils/shared_memory_utils.py
mees/calvin
4f907763cee46b3205371ceb2b17868963b0cc5c
[ "MIT" ]
12
2021-12-09T13:13:32.000Z
2022-02-16T10:53:13.000Z
from collections import defaultdict import logging from multiprocessing.shared_memory import SharedMemory import os from pathlib import Path from typing import Dict, Optional, Tuple import numpy as np log = logging.getLogger(__name__) def gather_results(return_dict: Dict) -> Tuple[Dict, Dict]: """ Combine re...
40.473054
118
0.630049
from collections import defaultdict from functools import partial from itertools import chain import logging import multiprocessing from multiprocessing.shared_memory import SharedMemory import os from pathlib import Path import signal from typing import Dict, Optional, Tuple from calvin_agent.datasets.shm_dataset imp...
0
0
0
10,044
0
0
0
150
245
728bb3a6873ff7a330e750e5a04c0ebe069ac38c
1,793
py
Python
joystick.py
cckuailong/joystick
1ecc59579e982e6629f966f619b5b97ee72d1f4c
[ "Apache-2.0" ]
62
2020-02-26T01:33:51.000Z
2022-03-02T01:32:25.000Z
joystick.py
cckuailong/joystick
1ecc59579e982e6629f966f619b5b97ee72d1f4c
[ "Apache-2.0" ]
6
2020-04-08T15:43:13.000Z
2021-05-08T14:11:42.000Z
joystick.py
cckuailong/joystick
1ecc59579e982e6629f966f619b5b97ee72d1f4c
[ "Apache-2.0" ]
14
2020-02-27T03:05:04.000Z
2020-12-20T03:35:48.000Z
import yaml import logging from app.service.data_svc import DataService from app.service.file_svc import FileService if __name__ == '__main__': setup_logger(getattr(logging, 'INFO')) with open('conf/config.yml') as conf: config = yaml.safe_load(conf) config_host = config['host'] co...
30.913793
114
0.672616
import aiohttp_jinja2 import yaml import asyncio from aiohttp import web import logging import jinja2 from app.service.data_svc import DataService from app.service.file_svc import FileService from app.api.api import RestApi def setup_logger(level=logging.DEBUG): logging.basicConfig(level=level, ...
0
0
315
0
0
776
0
-3
179
528ec27b32724c6b8ace2d0537f2b005256b9d98
1,997
py
Python
app.py
DVVA-2018/DashCiclopi
6f78adb9841612c045ebefcb1e060c0e3cff76a5
[ "MIT" ]
null
null
null
app.py
DVVA-2018/DashCiclopi
6f78adb9841612c045ebefcb1e060c0e3cff76a5
[ "MIT" ]
null
null
null
app.py
DVVA-2018/DashCiclopi
6f78adb9841612c045ebefcb1e060c0e3cff76a5
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import pandas as pd import dash import dash_core_components as dcc import dash_html_components as html app = dash.Dash('Ciclopi Dashboard') ciclopi=pd.read_csv("data/04_ciclopi_cleaned.csv", sep=';', \ parse_dates=['DataOraPrelievo','DataOraDeposito','DataPrelievo','Ora...
28.528571
137
0.611417
# -*- coding: utf-8 -*- import pandas as pd import numpy as np import dash from dash.dependencies import Input, Output import dash_core_components as dcc import dash_html_components as html import plotly.plotly as py #import plotly import plotly.graph_objs as go #import graphs objects app = dash.Dash('Ciclopi Dashb...
0
969
0
0
0
0
0
33
149
29e4d47ded75dbbe852f60d953d5c3bb94c6b183
3,157
py
Python
testcases/generated/jdccs_test.py
Tanc009/jdcloud-cli
4e11de77c68501f44e7026c0ad1c24e5d043197e
[ "Apache-2.0" ]
null
null
null
testcases/generated/jdccs_test.py
Tanc009/jdcloud-cli
4e11de77c68501f44e7026c0ad1c24e5d043197e
[ "Apache-2.0" ]
null
null
null
testcases/generated/jdccs_test.py
Tanc009/jdcloud-cli
4e11de77c68501f44e7026c0ad1c24e5d043197e
[ "Apache-2.0" ]
null
null
null
# coding=utf8 # Copyright 2018 JDCLOUD.COM # # 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 ...
32.214286
147
0.623377
# coding=utf8 # Copyright 2018 JDCLOUD.COM # # 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 ...
0
0
0
2,425
0
0
0
-28
90
a7623094cd3f2590baf42517415503f198e3ba86
3,661
py
Python
app.py
FAST-PROJ/spv-etl
94085bcad71390a134a7ab8d0235fd6f8794136e
[ "MIT" ]
null
null
null
app.py
FAST-PROJ/spv-etl
94085bcad71390a134a7ab8d0235fd6f8794136e
[ "MIT" ]
null
null
null
app.py
FAST-PROJ/spv-etl
94085bcad71390a134a7ab8d0235fd6f8794136e
[ "MIT" ]
null
null
null
#!/usr/bin/env python __author__ = "Mateus Ferreira" __copyright__ = "Copyright 2020, The FAST-PROJ Group" __credits__ = ["Mateus Ferreira"] __license__ = "MIT" __version__ = "1.0.0" __maintainer__ = "FAST-PROJ" __email__ = "#" __status__ = "Development" from flask import Flask from mysql import...
31.560345
126
0.689702
#!/usr/bin/env python __author__ = "Mateus Ferreira" __copyright__ = "Copyright 2020, The FAST-PROJ Group" __credits__ = ["Mateus Ferreira"] __license__ = "MIT" __version__ = "1.0.0" __maintainer__ = "FAST-PROJ" __email__ = "#" __status__ = "Development" from flask import Flask, request, jsonify...
26
1,273
0
0
0
1,470
0
37
204
ce10ad401bdacd7ad4e51f2d93ec5428c10c5c0d
7,552
py
Python
rpython/memory/gc/inspector.py
microvm/pypy-mu
6b03fbe93052d0eb3a4c67152c987c16837b3484
[ "Apache-2.0", "OpenSSL" ]
null
null
null
rpython/memory/gc/inspector.py
microvm/pypy-mu
6b03fbe93052d0eb3a4c67152c987c16837b3484
[ "Apache-2.0", "OpenSSL" ]
null
null
null
rpython/memory/gc/inspector.py
microvm/pypy-mu
6b03fbe93052d0eb3a4c67152c987c16837b3484
[ "Apache-2.0", "OpenSSL" ]
null
null
null
""" Utility RPython functions to inspect objects in the GC. """ from rpython.rtyper.lltypesystem import lltype, llmemory, rffi, llgroup from rpython.rlib import rposix from rpython.memory.support import get_address_stack # ---------- implementation of rpython.rlib.rgc.get_rpy_roots() ---------- # ---------- impleme...
30.574899
79
0.62447
""" Utility RPython functions to inspect objects in the GC. """ from rpython.rtyper.lltypesystem import lltype, llmemory, rffi, llgroup from rpython.rlib.objectmodel import free_non_gc_object from rpython.rlib import rposix, rgc, jit from rpython.memory.support import AddressDict, get_address_stack # ---------- impl...
0
516
0
3,096
0
2,675
0
57
459
45f9b1c6b6a4e7a6b060c83963d2043b01317913
417
py
Python
solrzkutil/__main__.py
bendemott/solr-zkutil
abf379ade4db7a1fa65c85a279b40534a16f375f
[ "MIT" ]
14
2017-02-12T22:55:45.000Z
2022-01-05T12:56:52.000Z
solrzkutil/__main__.py
bendemott/solr-zkutil
abf379ade4db7a1fa65c85a279b40534a16f375f
[ "MIT" ]
21
2017-02-13T21:52:23.000Z
2019-03-26T22:04:35.000Z
solrzkutil/__main__.py
bendemott/solr-zkutil
abf379ade4db7a1fa65c85a279b40534a16f375f
[ "MIT" ]
2
2018-04-16T16:28:11.000Z
2018-05-23T03:04:05.000Z
# This module is executed when the program is run as a module... # using ``python -m solrzkutil`` import sys if __name__ == '__main__': try: except ImportError as e: sys.exit('solrzkutil python package is not installed. %s\n' % e) from solrzkutil import main try: sys.exit(...
26.0625
73
0.621103
# This module is executed when the program is run as a module... # using ``python -m solrzkutil`` import sys if __name__ == '__main__': try: import solrzkutil except ImportError as e: sys.exit('solrzkutil python package is not installed. %s\n' % e) from solrzkutil import main ...
0
0
0
0
0
0
0
-4
31
729acf0e5c6de6159702ff98eb89cd2eefbe19e2
388
py
Python
validators.py
muneeb-bashir/Lost_and_Found
e6d8c9f4323e4e0ecf69afd6af9615ac6e48a522
[ "Apache-2.0" ]
null
null
null
validators.py
muneeb-bashir/Lost_and_Found
e6d8c9f4323e4e0ecf69afd6af9615ac6e48a522
[ "Apache-2.0" ]
null
null
null
validators.py
muneeb-bashir/Lost_and_Found
e6d8c9f4323e4e0ecf69afd6af9615ac6e48a522
[ "Apache-2.0" ]
null
null
null
email_regex = r"(^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$)" password_regex = "^(?=.*\d)(?=.*[a-z])(?=.*[a-zA-Z])(?=.*\d)(?=.*[@$!%*#?&]).{8,}$"
22.823529
83
0.590206
import re email_regex = r"(^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$)" password_regex = "^(?=.*\d)(?=.*[a-z])(?=.*[a-zA-Z])(?=.*\d)(?=.*[@$!%*#?&]).{8,}$" def password_is_valid(password): return bool(re.match(password_regex, password)) def email_is_valid(email): return bool(re.match(email_regex,emai...
0
0
0
0
0
153
0
-12
91
705292df90160768de25734acf742b6c8178ed29
479
py
Python
src/main.py
dguisti/OpenBlocker
92a0011d41d9ba4df11771b5e63147a03cfd2d22
[ "MIT" ]
null
null
null
src/main.py
dguisti/OpenBlocker
92a0011d41d9ba4df11771b5e63147a03cfd2d22
[ "MIT" ]
null
null
null
src/main.py
dguisti/OpenBlocker
92a0011d41d9ba4df11771b5e63147a03cfd2d22
[ "MIT" ]
null
null
null
import psutil system = ["System", "services.exe", "svchost.exe", "csrss.exe", "fontdrvhost.exe", "conhost.exe", None] for proc in psutil.process_iter(): try: parent = proc.parent().name() except AttributeError: parent = None if parent not in system and proc.name() not in system:...
26.611111
62
0.599165
import psutil system = ["System", "services.exe", "svchost.exe", "csrss.exe", "fontdrvhost.exe", "conhost.exe", None] for proc in psutil.process_iter(): try: parent = proc.parent().name() except AttributeError: parent = None if parent not in system and proc.name() not in system:...
0
0
0
0
0
0
0
0
0
0d6e42be97fa1cab1857f9d2bdfb1cdc1724d370
1,613
py
Python
Campaign Finance Bot/financeBot.py
JasonBernert/slack-bots
b31bdd7427146e0be2da8067a97aa174e2b437d3
[ "MIT" ]
null
null
null
Campaign Finance Bot/financeBot.py
JasonBernert/slack-bots
b31bdd7427146e0be2da8067a97aa174e2b437d3
[ "MIT" ]
null
null
null
Campaign Finance Bot/financeBot.py
JasonBernert/slack-bots
b31bdd7427146e0be2da8067a97aa174e2b437d3
[ "MIT" ]
null
null
null
import json import requests import os # Set up incoming webhooks on Slack to get a URL for your team: https://api.slack.com/incoming-webhooks slackUrl = os.environ["SLACK_URL"] # Declare the API endpoint for requests response = requests.get('http://54.213.83.132/hackoregon/http/all_new_transactions/5/') data = respon...
35.844444
103
0.699318
import json import requests import os # Set up incoming webhooks on Slack to get a URL for your team: https://api.slack.com/incoming-webhooks slackUrl = os.environ["SLACK_URL"] # Declare the API endpoint for requests response = requests.get('http://54.213.83.132/hackoregon/http/all_new_transactions/5/') data = respon...
0
0
0
0
0
0
0
0
0
7a6c9b9abd1a9ddedcf81dffb7d0b38c403fdb7d
554
py
Python
lecciones/32/poo_2.py
ImAlexisSaez/curso-python-desde-0
c4a84dae0804adefe4ee6024b411d8ed288da759
[ "MIT" ]
2
2020-08-31T02:17:36.000Z
2022-01-29T15:25:27.000Z
lecciones/32/poo_2.py
ImAlexisSaez/curso-python-desde-0
c4a84dae0804adefe4ee6024b411d8ed288da759
[ "MIT" ]
null
null
null
lecciones/32/poo_2.py
ImAlexisSaez/curso-python-desde-0
c4a84dae0804adefe4ee6024b411d8ed288da759
[ "MIT" ]
null
null
null
mi_vehiculo = Camion() desplazamiento_vehiculo(mi_vehiculo) mi_vehiculo = Coche() desplazamiento_vehiculo(mi_vehiculo) mi_vehiculo = Moto() desplazamiento_vehiculo(mi_vehiculo)
17.870968
54
0.731047
class Coche(): def desplazamiento(self): print("Me desplazo utilizando cuatro ruedas.") class Moto(): def desplazamiento(self): print("Me desplazo utilizando dos ruedas.") class Camion(): def desplazamiento(self): print("Me desplazo utilizando seis ruedas.") def desplazamiento_...
0
0
0
229
0
47
0
0
91
dc389720c41151e6d0aa0972ba04c92c74e0134f
3,444
py
Python
hcplot/tests/data.py
bernhard-42/hcplot
1c791e2b19b173b9b98a3d8914095e3c372c9de4
[ "Apache-2.0" ]
null
null
null
hcplot/tests/data.py
bernhard-42/hcplot
1c791e2b19b173b9b98a3d8914095e3c372c9de4
[ "Apache-2.0" ]
null
null
null
hcplot/tests/data.py
bernhard-42/hcplot
1c791e2b19b173b9b98a3d8914095e3c372c9de4
[ "Apache-2.0" ]
null
null
null
from ggplot import mpg from ..data import Data, GridData, WrapData print("Single chart case") g = Data(mpg) print("=> S1", g.getCategoriesByIndex() is None) print("=> S2", mpg.equals(g.getDataByIndex()["data"])) print("=> S3", {} == g.getDataByIndex()["colCategories"]) print("=> S4", {} == g.getDataByIndex()["rowCateg...
39.136364
93
0.561556
from ggplot import mpg from ..data import Data, GridData, WrapData print("Single chart case") g = Data(mpg) print("=> S1", g.getCategoriesByIndex() is None) print("=> S2", mpg.equals(g.getDataByIndex()["data"])) print("=> S3", {} == g.getDataByIndex()["colCategories"]) print("=> S4", {} == g.getDataByIndex()["rowCateg...
0
0
0
0
0
0
0
0
0
e09481fe33e0c0b434f956c2767e7fb74a3a140c
2,043
py
Python
c/chapter10/rss/rssgossip.py
BonfaceKilz/headfirst
680c2fc4bacb3151e61819d89dcad5524ec42c34
[ "MIT" ]
1
2021-06-19T03:10:18.000Z
2021-06-19T03:10:18.000Z
c/chapter9/rssgossip.py
BonfaceKilz/headfirst
680c2fc4bacb3151e61819d89dcad5524ec42c34
[ "MIT" ]
null
null
null
c/chapter9/rssgossip.py
BonfaceKilz/headfirst
680c2fc4bacb3151e61819d89dcad5524ec42c34
[ "MIT" ]
null
null
null
#!/usr/bin/python import feedparser import time import sys #feed_name = 'TRIBUNE' #url = 'http://chicagotribune.feedsportal.com/c/34253/f/622872/index.rss' feed_name = sys.argv[1] url = sys.argv[2] db = './feeds.db' limit = 12 * 3600 * 1000 # # function to get the current time # current_time_millis = lambda: int(r...
24.614458
115
0.614293
#!/usr/bin/python import feedparser import time from subprocess import check_output import sys #feed_name = 'TRIBUNE' #url = 'http://chicagotribune.feedsportal.com/c/34253/f/622872/index.rss' feed_name = sys.argv[1] url = sys.argv[2] db = './feeds.db' limit = 12 * 3600 * 1000 # # function to get the current time #...
0
0
0
0
0
457
0
14
67
5911a84fe5408bd7eaea00006570fd5217d7b8df
546
py
Python
scripts/check-manifest.py
d1618033/dessert
6c01eb36a51be481a940b22e539074e6b883cc50
[ "MIT" ]
8
2015-03-11T07:35:34.000Z
2022-02-01T22:39:30.000Z
scripts/check-manifest.py
d1618033/dessert
6c01eb36a51be481a940b22e539074e6b883cc50
[ "MIT" ]
12
2017-01-17T13:38:37.000Z
2022-01-16T08:39:04.000Z
scripts/check-manifest.py
d1618033/dessert
6c01eb36a51be481a940b22e539074e6b883cc50
[ "MIT" ]
9
2017-01-09T10:59:01.000Z
2022-01-07T18:01:18.000Z
""" Script used by tox.ini to check the manifest file if we are under version control, or skip the check altogether if not. "check-manifest" will needs a vcs to work, which is not available when testing the package instead of the source code (with ``devpi test`` for example). """ from __future__ import print_function...
24.818182
94
0.741758
""" Script used by tox.ini to check the manifest file if we are under version control, or skip the check altogether if not. "check-manifest" will needs a vcs to work, which is not available when testing the package instead of the source code (with ``devpi test`` for example). """ from __future__ import print_function...
0
0
0
0
0
0
0
0
0
72dfdf6ffa2c6374efebb300a2835d022d4d019b
590
py
Python
setup.py
RyotaroAbe/slack_post
de575a526527ba78f3173b9e3b30b4e9e9232c31
[ "MIT" ]
null
null
null
setup.py
RyotaroAbe/slack_post
de575a526527ba78f3173b9e3b30b4e9e9232c31
[ "MIT" ]
null
null
null
setup.py
RyotaroAbe/slack_post
de575a526527ba78f3173b9e3b30b4e9e9232c31
[ "MIT" ]
null
null
null
''' Setup script for slack_post This file is a part of sack_post ''' from setuptools import setup if __name__ == '__main__': # Long description with open('./README.md') as f: readme = f.read() setup( name='slack_post', version='0.0.1', description='Posting messag...
24.583333
60
0.605085
''' Setup script for slack_post This file is a part of sack_post ''' from setuptools import setup if __name__ == '__main__': # Long description with open('./README.md') as f: readme = f.read() setup( name='slack_post', version='0.0.1', description='Posting messag...
0
0
0
0
0
0
0
0
0
000a01acfeb0a6b4bf95ae5224ab1b130e12352b
6,269
py
Python
tweetf0rm/process/twitter_crawler.py
amaurywalbert/mytweetf0rm
2272b53214b3669eb104762f5b5b38ff4adda435
[ "MIT" ]
null
null
null
tweetf0rm/process/twitter_crawler.py
amaurywalbert/mytweetf0rm
2272b53214b3669eb104762f5b5b38ff4adda435
[ "MIT" ]
null
null
null
tweetf0rm/process/twitter_crawler.py
amaurywalbert/mytweetf0rm
2272b53214b3669eb104762f5b5b38ff4adda435
[ "MIT" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- # import logging logger = logging.getLogger(__name__)
28.238739
127
0.649067
#!/usr/bin/python # -*- coding: utf-8 -*- # import logging logger = logging.getLogger(__name__) from .crawler_process import CrawlerProcess from tweetf0rm.twitterapi.twitter_api import TwitterAPI from tweetf0rm.handler import create_handler from tweetf0rm.handler.crawl_user_relationship_command_handler import CrawlUs...
0
0
0
5,711
0
0
0
248
200
9c671643bb20805a0164ef3d948ad6f0106f8fae
3,593
py
Python
surfify/utils/io.py
AGrigis/surfify
180f7967f435d886e28df79be502406ee7946712
[ "CECILL-B" ]
null
null
null
surfify/utils/io.py
AGrigis/surfify
180f7967f435d886e28df79be502406ee7946712
[ "CECILL-B" ]
null
null
null
surfify/utils/io.py
AGrigis/surfify
180f7967f435d886e28df79be502406ee7946712
[ "CECILL-B" ]
null
null
null
# -*- coding: utf-8 -*- ########################################################################## # NSAp - Copyright (C) CEA, 2021 # Distributed under the terms of the CeCILL-B license, as published by # the CEA-CNRS-INRIA. Refer to the LICENSE file or to # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html #...
28.975806
77
0.608962
# -*- coding: utf-8 -*- ########################################################################## # NSAp - Copyright (C) CEA, 2021 # Distributed under the terms of the CeCILL-B license, as published by # the CEA-CNRS-INRIA. Refer to the LICENSE file or to # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html #...
0
0
0
0
0
0
0
0
0
0a29c15d5b1fdb3bde4062fbbdbd0d487f227c68
3,522
py
Python
oneflow/python/test/graph/test_output_op_expr.py
xcnick/oneflow
7b786b27069dec35d2493256011e773988c91f56
[ "Apache-2.0" ]
null
null
null
oneflow/python/test/graph/test_output_op_expr.py
xcnick/oneflow
7b786b27069dec35d2493256011e773988c91f56
[ "Apache-2.0" ]
null
null
null
oneflow/python/test/graph/test_output_op_expr.py
xcnick/oneflow
7b786b27069dec35d2493256011e773988c91f56
[ "Apache-2.0" ]
null
null
null
""" Copyright 2020 The OneFlow Authors. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agr...
37.073684
91
0.676036
""" Copyright 2020 The OneFlow Authors. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agr...
0
2,531
0
0
0
0
0
106
156
5a57758dd39d8aba67e2117780df33c07facb909
232
py
Python
git/status-all.py
lachieggg/scripts-lachie
22ed7f70160a875ddf1c5a3faef006aaba7dc171
[ "MIT" ]
null
null
null
git/status-all.py
lachieggg/scripts-lachie
22ed7f70160a875ddf1c5a3faef006aaba7dc171
[ "MIT" ]
null
null
null
git/status-all.py
lachieggg/scripts-lachie
22ed7f70160a875ddf1c5a3faef006aaba7dc171
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import os GIT_FOLDER = os.getcwd() + '/../../' folders = os.listdir(GIT_FOLDER) for folder in folders: print('\n\n\n' + folder) cmd = 'cd ' + GIT_FOLDER + folder + ' && ' + ' git status' os.system(cmd)
17.846154
59
0.607759
#!/usr/bin/env python3 import os GIT_FOLDER = os.getcwd() + '/../../' folders = os.listdir(GIT_FOLDER) for folder in folders: print('\n\n\n' + folder) cmd = 'cd ' + GIT_FOLDER + folder + ' && ' + ' git status' os.system(cmd)
0
0
0
0
0
0
0
0
0
25655e440393bd1401930c480bae82e090db1244
5,198
py
Python
css/executor/feature.py
desh2608/css
a595f40085f2a8de9a62f9d4e34950ab55a7d27e
[ "MIT" ]
7
2021-11-25T11:11:20.000Z
2021-11-30T01:29:11.000Z
css/executor/feature.py
desh2608/css
a595f40085f2a8de9a62f9d4e34950ab55a7d27e
[ "MIT" ]
null
null
null
css/executor/feature.py
desh2608/css
a595f40085f2a8de9a62f9d4e34950ab55a7d27e
[ "MIT" ]
2
2021-12-05T06:20:22.000Z
2022-03-08T01:19:01.000Z
import math import torch import torch.nn as nn EPSILON = torch.finfo(torch.float32).eps MATH_PI = math.pi
29.534091
106
0.520585
import math import torch import torch.nn.functional as F import torch.nn as nn from packaging import version EPSILON = torch.finfo(torch.float32).eps MATH_PI = math.pi def init_kernel(frame_len, round_pow_of_two=True): def _rfft(x, n): if version.parse(torch.__version__) <= version.parse("1.7.1"): ...
0
0
0
4,349
0
582
0
18
138
df4abae47568360134ae8ab23e7bbd51575a7eae
900
py
Python
numpy.transponse.py
eltechno/python_course
f74abac7df3f9f41864afd06479389260c29ea3a
[ "MIT" ]
4
2019-05-04T00:33:25.000Z
2021-05-29T20:37:59.000Z
numpy.transponse.py
eltechno/python_course
f74abac7df3f9f41864afd06479389260c29ea3a
[ "MIT" ]
null
null
null
numpy.transponse.py
eltechno/python_course
f74abac7df3f9f41864afd06479389260c29ea3a
[ "MIT" ]
3
2020-05-05T13:14:28.000Z
2022-02-03T16:18:37.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Created by techno at 28/05/19 #Feature: #Enter feature name here # Enter feature description here #Scenario: # Enter scenario name here # Enter steps here import numpy as np my_2d_array = np.array([[1, 2, 3, 4], [5, 6, 7, 8]]) print(my_2d...
19.565217
52
0.553333
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Created by techno at 28/05/19 #Feature: #Enter feature name here # Enter feature description here #Scenario: # Enter scenario name here # Enter steps here import numpy as np my_2d_array = np.array([[1, 2, 3, 4], [5, 6, 7, 8]]) print(my_2d...
0
0
0
0
0
0
0
0
0
f020ff5e3a30e630a7231086cc46c6450807dfbc
18,201
py
Python
pisa/stages/reco/simple_param.py
atrettin/pisa
9702ed946e3f669f1126ca4ffe96b49280a8ff12
[ "Apache-2.0" ]
5
2021-03-10T18:18:10.000Z
2022-03-04T03:04:05.000Z
pisa/stages/reco/simple_param.py
atrettin/pisa
9702ed946e3f669f1126ca4ffe96b49280a8ff12
[ "Apache-2.0" ]
105
2019-03-21T13:53:59.000Z
2021-01-25T16:34:14.000Z
pisa/stages/reco/simple_param.py
atrettin/pisa
9702ed946e3f669f1126ca4ffe96b49280a8ff12
[ "Apache-2.0" ]
26
2019-03-03T22:25:04.000Z
2020-10-23T15:57:10.000Z
# pylint: disable=not-callable """ Create reconstructed and PID variables based on truth information for MC events using simple parameterisations. """ #TODO In future this could be integrated with param.py (but, that meed updating from cake to pi first) from __future__ import absolute_import, print_function, divis...
34.471591
148
0.666612
# pylint: disable=not-callable """ Create reconstructed and PID variables based on truth information for MC events using simple parameterisations. """ #TODO In future this could be integrated with param.py (but, that meed updating from cake to pi first) from __future__ import absolute_import, print_function, divis...
0
0
0
5,814
0
0
0
91
134
ad12cc237be88cbee401dbb18e6a630a61f47de8
3,945
py
Python
django/contrib/auth/server.py
kantai/passe-framework-prototype
51a441b689c54cfd57748129f77fde3c7a08e5c3
[ "BSD-3-Clause" ]
3
2016-07-06T16:34:38.000Z
2021-02-10T08:06:23.000Z
django/contrib/auth/server.py
kantai/passe-framework-prototype
51a441b689c54cfd57748129f77fde3c7a08e5c3
[ "BSD-3-Clause" ]
null
null
null
django/contrib/auth/server.py
kantai/passe-framework-prototype
51a441b689c54cfd57748129f77fde3c7a08e5c3
[ "BSD-3-Clause" ]
2
2020-06-22T20:55:48.000Z
2021-01-15T18:01:04.000Z
PYRO_NAME = "authbackend"
31.814516
93
0.6109
import os, sys, Pyro4 import django.htoken.serializer from django.contrib.auth.models import User, Permission from django.analysis.tracer import pause_sql_analysis, resume_sql_analysis from django import htoken from django.conf import settings PYRO_NAME = "authbackend" def get_SOCK(): return "/tmp/auth_%s.sock" ...
0
0
0
3,032
0
525
0
112
247
6baf0f77360ba9723f33a10c7af75ae38711cd83
3,395
py
Python
python/MDSplus/widgets/mdsplusxdboxbutton.py
zack-vii/mdsplus
7c631281d22e993599dbdf7bd31782035af92688
[ "BSD-2-Clause" ]
1
2019-09-02T13:40:23.000Z
2019-09-02T13:40:23.000Z
python/MDSplus/widgets/mdsplusxdboxbutton.py
zack-vii/mdsplus
7c631281d22e993599dbdf7bd31782035af92688
[ "BSD-2-Clause" ]
4
2019-10-29T09:06:32.000Z
2020-03-26T22:09:39.000Z
python/MDSplus/widgets/mdsplusxdboxbutton.py
zack-vii/mdsplus
7c631281d22e993599dbdf7bd31782035af92688
[ "BSD-2-Clause" ]
2
2019-10-29T08:54:27.000Z
2020-05-18T09:59:39.000Z
# # Copyright (c) 2017, Massachusetts Institute of Technology All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # Redistributions of source code must retain the above copyright notice, this # list o...
36.902174
128
0.704271
# # Copyright (c) 2017, Massachusetts Institute of Technology All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # Redistributions of source code must retain the above copyright notice, this # list o...
0
0
0
1,659
0
0
0
0
72
7ac79df01da6a49a3bc77ff7a1dc76d267010021
2,403
py
Python
deploy.py
cisagov/con-pca
71999e23d14aa66b45600c33b8f2bdaf270084f2
[ "CC0-1.0" ]
3
2020-05-20T19:58:03.000Z
2020-07-07T19:01:41.000Z
deploy.py
cisagov/con-pca
71999e23d14aa66b45600c33b8f2bdaf270084f2
[ "CC0-1.0" ]
11
2020-05-05T17:18:33.000Z
2020-07-20T22:24:24.000Z
deploy.py
cisagov/cpa
71999e23d14aa66b45600c33b8f2bdaf270084f2
[ "CC0-1.0" ]
null
null
null
"""Script to deploy to staging or production COOL environments.""" import configparser import requests # type: ignore def main(): """Execute main.""" cli.add_command(deploy) cli.add_command(configure) cli() def get_token(): """Get token from config.ini file.""" config = configparser.Conf...
25.56383
83
0.65335
"""Script to deploy to staging or production COOL environments.""" import configparser import click import requests # type: ignore @click.group() @click.pass_context def cli(ctx): """Create cli.""" return def main(): """Execute main.""" cli.add_command(deploy) cli.add_command(configure) cl...
0
1,170
0
0
0
0
0
-9
92
aa64071dc5572df473c3be6732a70953d6eba05f
597
py
Python
pyleecan/Methods/Slot/SlotM14/comp_surface.py
IrakozeFD/pyleecan
5a93bd98755d880176c1ce8ac90f36ca1b907055
[ "Apache-2.0" ]
95
2019-01-23T04:19:45.000Z
2022-03-17T18:22:10.000Z
pyleecan/Methods/Slot/SlotM14/comp_surface.py
IrakozeFD/pyleecan
5a93bd98755d880176c1ce8ac90f36ca1b907055
[ "Apache-2.0" ]
366
2019-02-20T07:15:08.000Z
2022-03-31T13:37:23.000Z
pyleecan/Methods/Slot/SlotM14/comp_surface.py
IrakozeFD/pyleecan
5a93bd98755d880176c1ce8ac90f36ca1b907055
[ "Apache-2.0" ]
74
2019-01-24T01:47:31.000Z
2022-02-25T05:44:42.000Z
# -*- coding: utf-8 -*- from numpy import pi def comp_surface(self): """Compute the Slot total surface (by analytical computation). Caution, the bottom of the Slot is an Arc Parameters ---------- self : SlotM14 A SlotM14 object Returns ------- S: float Slot total sur...
18.090909
66
0.534338
# -*- coding: utf-8 -*- from numpy import sin, pi def comp_surface(self): """Compute the Slot total surface (by analytical computation). Caution, the bottom of the Slot is an Arc Parameters ---------- self : SlotM14 A SlotM14 object Returns ------- S: float Slot tota...
0
0
0
0
0
0
0
5
0
7261f8bff77a72072b06c59cb93dfb8399aad65c
37,846
py
Python
graph_embedding/monet/glove_model_tf.py
jayden118/google-research
1407039925b1fe2c22cafe48d3a26af49eda29d1
[ "Apache-2.0" ]
null
null
null
graph_embedding/monet/glove_model_tf.py
jayden118/google-research
1407039925b1fe2c22cafe48d3a26af49eda29d1
[ "Apache-2.0" ]
null
null
null
graph_embedding/monet/glove_model_tf.py
jayden118/google-research
1407039925b1fe2c22cafe48d3a26af49eda29d1
[ "Apache-2.0" ]
1
2020-09-21T14:10:37.000Z
2020-09-21T14:10:37.000Z
# coding=utf-8 # Copyright 2020 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
40.048677
80
0.633145
# coding=utf-8 # Copyright 2020 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
0
0
0
36,486
0
0
0
-32
157
1a6acb95a5133fe9a19e1331243e039b610e4951
630
py
Python
Python3/LambdasAndBuilt-InFunctions/min_max.py
norbertosanchezdichi/TIL
2e9719ddd288022f53b094a42679e849bdbcc625
[ "MIT" ]
null
null
null
Python3/LambdasAndBuilt-InFunctions/min_max.py
norbertosanchezdichi/TIL
2e9719ddd288022f53b094a42679e849bdbcc625
[ "MIT" ]
null
null
null
Python3/LambdasAndBuilt-InFunctions/min_max.py
norbertosanchezdichi/TIL
2e9719ddd288022f53b094a42679e849bdbcc625
[ "MIT" ]
null
null
null
print(f'{max(3, 67 ,9)}') print(f'{max("awesome")}') print(f"{max({1:'a', 3:'c', 2:'b'})}") print(f"{min(3, 67 ,9)}") print(f'{min("awesome")}') print(f"{min({1:'a', 3:'c', 2:'b'})}") names = ['Arya', 'Samson', 'Dora', 'Tim', 'Ollivander'] print(f'{min(len(name) for name in names)}') print(f'{min(names, key=lambda n:...
30
61
0.550794
print(f'{max(3, 67 ,9)}') print(f'{max("awesome")}') print(f"{max({1:'a', 3:'c', 2:'b'})}") print(f"{min(3, 67 ,9)}") print(f'{min("awesome")}') print(f"{min({1:'a', 3:'c', 2:'b'})}") names = ['Arya', 'Samson', 'Dora', 'Tim', 'Ollivander'] print(f'{min(len(name) for name in names)}') print(f'{min(names, key=lambda n:...
0
0
0
0
0
0
0
0
0
525801e51c3dc73bc110b82d3c5774b8c3a00e49
2,128
py
Python
userscripts/test_meteogram_boxplot.py
marcowurth/w2w-ensembleplots
16f8ac905b92b73279e788d04ea2c4d3eb07c1af
[ "Apache-2.0" ]
2
2019-12-17T16:23:24.000Z
2021-01-05T17:24:08.000Z
userscripts/test_meteogram_boxplot.py
marcowurth/w2w-ensembleplots
16f8ac905b92b73279e788d04ea2c4d3eb07c1af
[ "Apache-2.0" ]
null
null
null
userscripts/test_meteogram_boxplot.py
marcowurth/w2w-ensembleplots
16f8ac905b92b73279e788d04ea2c4d3eb07c1af
[ "Apache-2.0" ]
null
null
null
############################################################################### ### script for plotting boxplot meteograms of point data of icon-eu-eps ### ############################################################################### import sys current_path = sys.path[0] ex_op_str = current_path[current_path.ind...
32.738462
108
0.472274
############################################################################### ### script for plotting boxplot meteograms of point data of icon-eu-eps ### ############################################################################### import sys current_path = sys.path[0] ex_op_str = current_path[current_path.ind...
2
0
0
0
0
940
0
48
45
48051291f1392505e3c5caefed3837f08ca61fa6
2,676
py
Python
lnk/bitly/command.py
goldsborough/lnk
1487d272a70329571c77c0ec17c394dc6a1d088f
[ "MIT" ]
3
2017-06-16T18:51:54.000Z
2018-04-08T19:36:12.000Z
lnk/bitly/command.py
goldsborough/lnk
1487d272a70329571c77c0ec17c394dc6a1d088f
[ "MIT" ]
2
2021-02-08T20:17:54.000Z
2021-04-30T20:35:44.000Z
lnk/bitly/command.py
goldsborough/lnk
1487d272a70329571c77c0ec17c394dc6a1d088f
[ "MIT" ]
1
2019-11-06T19:05:30.000Z
2019-11-06T19:05:30.000Z
#!/usr/bin/env python #! -*- coding: utf-8 -*- """Contains the base-class for all bit.ly commands.""" import lnk.config
33.037037
71
0.695441
#!/usr/bin/env python #! -*- coding: utf-8 -*- """Contains the base-class for all bit.ly commands.""" import lnk.config import lnk.errors from lnk.abstract import AbstractCommand class Command(AbstractCommand): """ Base-class for all bit.ly commands. Configures the AbstractCommand base class for all commands in...
0
1,619
0
852
0
0
0
15
68
7679711a39fa54abad83121c1ed089688ed17a05
2,726
py
Python
src/flashcards.py
sciencemanx/jlpt-flashcards
b0f7b7f8e4a7efe3959b64897a5a598e1abc83b2
[ "MIT" ]
null
null
null
src/flashcards.py
sciencemanx/jlpt-flashcards
b0f7b7f8e4a7efe3959b64897a5a598e1abc83b2
[ "MIT" ]
null
null
null
src/flashcards.py
sciencemanx/jlpt-flashcards
b0f7b7f8e4a7efe3959b64897a5a598e1abc83b2
[ "MIT" ]
null
null
null
#! /usr/bin/env python3 import genanki MODEL_ID = 654321 DECK_BASE_ID = 563412 VOCAB_FIELDS = [ {'name': 'id'}, {'name': 'kana'}, {'name': 'kanji'}, {'name': 'partofspeech'}, {'name': 'meaning'}, {'name': 'audio'}, ] JA_EN_TEMPLATE = { 'name': 'kana->kanji/meaning', 'qfmt': '{{audio}...
25.961905
205
0.610051
#! /usr/bin/env python3 import os import shutil import genanki import requests from vocab import get_vocab, JLPT_LEVELS MODEL_ID = 654321 DECK_BASE_ID = 563412 VOCAB_FIELDS = [ {'name': 'id'}, {'name': 'kana'}, {'name': 'kanji'}, {'name': 'partofspeech'}, {'name': 'meaning'}, {'name': 'audi...
0
72
0
9
0
896
0
-7
185
427aee63ba1d2207ae34be7b48fc1772cd92ad1e
10,849
py
Python
ibdp_classes/ibdp_classes.py
ram6ler/ibdp_classes
bc4335a7d5e8d7bf2a983e317cd46164f57e155c
[ "MIT" ]
null
null
null
ibdp_classes/ibdp_classes.py
ram6ler/ibdp_classes
bc4335a7d5e8d7bf2a983e317cd46164f57e155c
[ "MIT" ]
null
null
null
ibdp_classes/ibdp_classes.py
ram6ler/ibdp_classes
bc4335a7d5e8d7bf2a983e317cd46164f57e155c
[ "MIT" ]
null
null
null
#! python3 from typing import TypeVar T = TypeVar("T")
32.975684
116
0.476726
#! python3 import re, sys, traceback from typing import Generic, TypeVar from contextlib import redirect_stdout from io import StringIO T = TypeVar("T") class _Base(Generic[T]): def __init__(self, *elements: T) -> None: self._elements = list(elements) def __str__(self) -> str: if len(self._...
9
0
0
10,523
0
0
0
32
228
92b7b5e49a8b7c5ce43a6dd8ab4fafea1f5480e1
14,672
py
Python
WikidataTreeBuilderSPARQL.py
petartodorov/wikidata
f4a57856befd056de94b89b6dc93f75ec68ff90a
[ "MIT" ]
9
2017-08-01T12:40:53.000Z
2021-08-11T10:32:42.000Z
WikidataTreeBuilderSPARQL.py
petartodorov/WikidataTreeBuilderSPARQL
f4a57856befd056de94b89b6dc93f75ec68ff90a
[ "MIT" ]
null
null
null
WikidataTreeBuilderSPARQL.py
petartodorov/WikidataTreeBuilderSPARQL
f4a57856befd056de94b89b6dc93f75ec68ff90a
[ "MIT" ]
4
2017-09-10T20:04:26.000Z
2020-11-24T21:47:15.000Z
#!/usr/bin/python # -*- coding: utf-8 -*- from __future__ import print_function, division from datetime import datetime import simplejson as json def main(): """Example run""" tree = WikidataTreeQuery() print(datetime.now()) flare = tree.from_root("Q21198") print(datetime.now()) with open("o...
43.666667
218
0.623909
#!/usr/bin/python # -*- coding: utf-8 -*- from __future__ import print_function, division from datetime import datetime, timedelta import simplejson as json import requests from itertools import product as allpairs import re import pandas as pd class WikidataTreeQuery(object): """Class to : * Query wikid...
0
0
0
14,128
0
0
0
11
111
14ccb3f1229677d9d1b6d213796efbc76cfa9967
762
py
Python
Trivia/file_io.py
zhangzhii/python_game
64a22879d5ce4ec22a1a81018a181411cade3517
[ "MIT" ]
null
null
null
Trivia/file_io.py
zhangzhii/python_game
64a22879d5ce4ec22a1a81018a181411cade3517
[ "MIT" ]
null
null
null
Trivia/file_io.py
zhangzhii/python_game
64a22879d5ce4ec22a1a81018a181411cade3517
[ "MIT" ]
null
null
null
import struct file = open("binary.dat", "wb") for n in range(1000): data = struct.pack("i", n) file.write(data) file.close() file = open("binary.dat", "rb") size = struct.calcsize("i") bytes_read = file.read(size) while bytes_read: value = struct.unpack("i", bytes_read) value = value[0]...
20.052632
43
0.58399
import struct file = open("binary.dat", "wb") for n in range(1000): data = struct.pack("i", n) file.write(data) file.close() file = open("binary.dat", "rb") size = struct.calcsize("i") bytes_read = file.read(size) while bytes_read: value = struct.unpack("i", bytes_read) value = value[0]...
0
0
0
0
0
0
0
0
0
18816e3f4472a05a67518afd704c0ca28c05e024
11,770
py
Python
exoskeleton/queue_manager.py
RuedigerVoigt/exoskeleton
30865c7b8a570d2825d883c707eeb3c58f174d64
[ "Apache-2.0" ]
22
2020-04-04T20:45:09.000Z
2022-01-08T17:55:54.000Z
exoskeleton/queue_manager.py
RuedigerVoigt/exoskeleton
30865c7b8a570d2825d883c707eeb3c58f174d64
[ "Apache-2.0" ]
23
2019-11-07T09:25:03.000Z
2021-11-01T23:55:35.000Z
exoskeleton/queue_manager.py
RuedigerVoigt/exoskeleton
30865c7b8a570d2825d883c707eeb3c58f174d64
[ "Apache-2.0" ]
1
2020-07-08T12:41:27.000Z
2020-07-08T12:41:27.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ The class QueueManager manages the action queue for the exoskeleton framework. ~~~~~~~~~~~~~~~~~~~~~ Source: https://github.com/RuedigerVoigt/exoskeleton (c) 2019-2021 Rdiger Voigt: Released under the Apache License 2.0 """ # standard library: # external dependencie...
43.91791
97
0.560238
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ The class QueueManager manages the action queue for the exoskeleton framework. ~~~~~~~~~~~~~~~~~~~~~ Source: https://github.com/RuedigerVoigt/exoskeleton (c) 2019-2021 Rüdiger Voigt: Released under the Apache License 2.0 """ # standard library: from collections import...
2
0
0
10,886
0
0
0
143
416
89bf8a1fd0d6da9ad814e158c03224b76a05e888
7,659
py
Python
source/cleaner.py
n-duncan/GOLD-Digger
f16b348ac16fcbd74643b19d3006aa9f380a51a2
[ "MIT" ]
1
2018-03-27T03:40:58.000Z
2018-03-27T03:40:58.000Z
source/cleaner.py
nduncan1014/GOLD-Digger
f16b348ac16fcbd74643b19d3006aa9f380a51a2
[ "MIT" ]
null
null
null
source/cleaner.py
nduncan1014/GOLD-Digger
f16b348ac16fcbd74643b19d3006aa9f380a51a2
[ "MIT" ]
1
2020-06-16T08:53:45.000Z
2020-06-16T08:53:45.000Z
import pandas as pd import sys import os # extract year and quarter number # extract subject and course id # extract minUnit from unit # extract grading options to Letter and PassNP # extract location and building # extract time to start and end time # extract enrollment status to MaxEnroll an...
29.571429
130
0.57971
import pandas as pd import re import sys import os # extract year and quarter number def format_quarter(df): years = [] for index, row in df.iterrows(): string = str(row['Quarter']) separator = string.find('_') row['Quarter'] = string[separator - 1 : separator] ye...
0
0
0
0
0
6,146
0
-12
255
a171315a9b548202644ef6d8e6556a90879c1f3a
1,855
py
Python
code/test_edelbaum.py
Juanlu001/pfc-uc3m
c2c2c3e55d78672a26dcac9f56a15ff9c61d925a
[ "MIT" ]
8
2017-02-12T17:56:00.000Z
2017-03-08T10:59:11.000Z
code/test_edelbaum.py
astrojuanlu/pfc-uc3m
c2c2c3e55d78672a26dcac9f56a15ff9c61d925a
[ "MIT" ]
2
2021-11-05T15:37:26.000Z
2021-11-05T15:41:33.000Z
code/test_edelbaum.py
Juanlu001/pfc-uc3m
c2c2c3e55d78672a26dcac9f56a15ff9c61d925a
[ "MIT" ]
2
2020-04-10T09:35:29.000Z
2020-06-18T18:55:38.000Z
from astropy import units as u from poliastro.bodies import Earth # Problem data f = 3.5e-7 # km / s2 a_0 = 7000.0 # km a_f = 42166.0 # km inc_f = 0.0 # rad k = Earth.k.decompose([u.km, u.s]).value
28.538462
79
0.622102
import pytest import numpy as np from numpy.testing import assert_allclose from astropy import units as u from poliastro.bodies import Earth from poliastro.twobody import Orbit from poliastro.twobody.propagation import cowell from edelbaum import guidance_law, extra_quantities # Problem data f = 3.5e-7 # km / s2...
0
1,385
0
0
0
0
0
80
181
5875adcf5c3410f2b69b27bb4f1954f0e8a44313
5,019
py
Python
hri/disambiguate_ros/disambiguate_ros/disambiguate_service.py
matiov/disambiguate-BT-execution
9e2ca83f77539e81a6124c3e08694d2fc5728672
[ "BSD-3-Clause" ]
2
2022-03-03T05:02:15.000Z
2022-03-28T13:55:53.000Z
hri/disambiguate_ros/disambiguate_ros/disambiguate_service.py
matiov/disambiguate-BT-execution
9e2ca83f77539e81a6124c3e08694d2fc5728672
[ "BSD-3-Clause" ]
null
null
null
hri/disambiguate_ros/disambiguate_ros/disambiguate_service.py
matiov/disambiguate-BT-execution
9e2ca83f77539e81a6124c3e08694d2fc5728672
[ "BSD-3-Clause" ]
null
null
null
"""Service that calls the HRI loop to disambiguate the scene.""" # Copyright (c) 2022, ABB # All rights reserved. # # Redistribution and use in source and binary forms, with # or without modification, are permitted provided that # the following conditions are met: # # * Redistributions of source code must retain the...
36.635036
95
0.691373
"""Service that calls the HRI loop to disambiguate the scene.""" # Copyright (c) 2022, ABB # All rights reserved. # # Redistribution and use in source and binary forms, with # or without modification, are permitted provided that # the following conditions are met: # # * Redistributions of source code must retain the...
0
0
0
2,856
0
135
0
43
202
3313991b780cdcdaebd4949375f413f90e0cf2c0
326
py
Python
app_blog/controllers/users_controller.py
DubstepWar/flask-blog-test
bc1bf2b662d75f73d37dd1f7f1cdc337b99cb76f
[ "MIT" ]
null
null
null
app_blog/controllers/users_controller.py
DubstepWar/flask-blog-test
bc1bf2b662d75f73d37dd1f7f1cdc337b99cb76f
[ "MIT" ]
null
null
null
app_blog/controllers/users_controller.py
DubstepWar/flask-blog-test
bc1bf2b662d75f73d37dd1f7f1cdc337b99cb76f
[ "MIT" ]
null
null
null
from flask import Blueprint users_blueprint = Blueprint("users", __name__, url_prefix="/users")
27.166667
67
0.769939
from flask import Blueprint, jsonify from app_blog.services.users_service import users_service users_blueprint = Blueprint("users", __name__, url_prefix="/users") @users_blueprint.route('/info/<int:user_id>', methods=['GET']) def get_user_info(user_id): user = users_service.get_user(user_id) return jsonify(...
0
137
0
0
0
0
0
45
46
e9f0da76333cf8735d30788e4030f721a4e0f0f0
173
py
Python
stweet/model/replies_filter.py
enginbozaba/stweet-twitter-api
060250e00a01ae53c2ca12954719b5efc918e132
[ "MIT" ]
101
2020-11-22T16:44:25.000Z
2022-03-30T08:42:07.000Z
stweet/model/replies_filter.py
enginbozaba/stweet-twitter-api
060250e00a01ae53c2ca12954719b5efc918e132
[ "MIT" ]
53
2020-11-21T19:40:36.000Z
2022-03-02T10:09:52.000Z
stweet/model/replies_filter.py
enginbozaba/stweet-twitter-api
060250e00a01ae53c2ca12954719b5efc918e132
[ "MIT" ]
16
2020-12-12T23:02:51.000Z
2022-03-01T12:10:32.000Z
"""Domain RepliesFilter enum class."""
15.727273
42
0.687861
"""Domain RepliesFilter enum class.""" import enum class RepliesFilter(enum.Enum): """Domain RepliesFilter enum class.""" ONLY_REPLIES = 1 ONLY_ORIGINAL = 2
0
0
0
97
0
0
0
-10
46
fee8dcb179262e9a5f575c987732d8a456e7c19e
1,331
py
Python
yummlySearchAPI/json_to_db.py
enjoybeta/ProjectHash
24c7de674543c4b9ce51b566798656e21e8d1813
[ "MIT" ]
null
null
null
yummlySearchAPI/json_to_db.py
enjoybeta/ProjectHash
24c7de674543c4b9ce51b566798656e21e8d1813
[ "MIT" ]
null
null
null
yummlySearchAPI/json_to_db.py
enjoybeta/ProjectHash
24c7de674543c4b9ce51b566798656e21e8d1813
[ "MIT" ]
2
2018-05-09T02:10:07.000Z
2018-08-16T02:45:25.000Z
import json from cassandra.cluster import Cluster import os if __name__ == '__main__': os.chdir("./detailedData") cluster = Cluster() session = cluster.connect('hash') for root, dirs, files in os.walk("."): for filename in files: data = json.load(open(filename)) recipeid = data["id"] rows = session.exec...
29.577778
110
0.643125
import cassandra import sys import json from cassandra.cluster import Cluster import os if __name__ == '__main__': os.chdir("./detailedData") cluster = Cluster() session = cluster.connect('hash') for root, dirs, files in os.walk("."): for filename in files: data = json.load(open(filename)) recipeid = data[...
0
0
0
0
0
0
0
-16
44
9922c5cebe526f7c1515e4f5c7dc13335b6bb3c2
2,674
py
Python
eucaweb/webtestcase.py
tbeckham/eutester
1440187150ce284bd87147e71ac7f0fda194b4d9
[ "BSD-2-Clause" ]
null
null
null
eucaweb/webtestcase.py
tbeckham/eutester
1440187150ce284bd87147e71ac7f0fda194b4d9
[ "BSD-2-Clause" ]
null
null
null
eucaweb/webtestcase.py
tbeckham/eutester
1440187150ce284bd87147e71ac7f0fda194b4d9
[ "BSD-2-Clause" ]
null
null
null
''' Simple wrapper for tests '''
25.711538
82
0.389678
''' Simple wrapper for tests ''' import sys, unittest class Webtestcase(unittest.TestCase): ''' Simple test outline and utilities ''' def __init__(self, testMethod, name = "", dieOnError=True, logname="", *args): if (testMethod is None): raise Exception("Test Method must be define...
0
0
0
2,560
0
0
0
-1
46
6ae028f20d9c86a6da93db9155b05a9d0455d4b3
9,517
py
Python
ixnetwork_restpy/testplatform/sessions/ixnetwork/vport/protocols/switchhostrangelearnedinfotriggerattributes_972a89638b94fd8481cd311e99101fb6.py
rfrye-github/ixnetwork_restpy
23eeb24b21568a23d3f31bbd72814ff55eb1af44
[ "MIT" ]
null
null
null
ixnetwork_restpy/testplatform/sessions/ixnetwork/vport/protocols/switchhostrangelearnedinfotriggerattributes_972a89638b94fd8481cd311e99101fb6.py
rfrye-github/ixnetwork_restpy
23eeb24b21568a23d3f31bbd72814ff55eb1af44
[ "MIT" ]
null
null
null
ixnetwork_restpy/testplatform/sessions/ixnetwork/vport/protocols/switchhostrangelearnedinfotriggerattributes_972a89638b94fd8481cd311e99101fb6.py
rfrye-github/ixnetwork_restpy
23eeb24b21568a23d3f31bbd72814ff55eb1af44
[ "MIT" ]
null
null
null
# MIT LICENSE # # Copyright 1997 - 2020 by IXIA Keysight # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, ...
38.686992
385
0.661868
# MIT LICENSE # # Copyright 1997 - 2020 by IXIA Keysight # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, ...
0
4,616
0
3,656
0
0
0
36
71
f7f44b24cd750618b84b8aa36ad3b59bbd84b42d
653
py
Python
utils/shuffler.py
Luke-zhang-04/Sorting_Algorithms
dc89ce0f1651252b30509062fddff72d423689a3
[ "Unlicense" ]
1
2020-01-03T10:09:33.000Z
2020-01-03T10:09:33.000Z
utils/shuffler.py
Luke-zhang-04/Sorting_Algorithms
dc89ce0f1651252b30509062fddff72d423689a3
[ "Unlicense" ]
1
2020-06-11T13:46:57.000Z
2020-06-11T13:46:57.000Z
utils/shuffler.py
Luke-zhang-04/Sorting_Algorithms
dc89ce0f1651252b30509062fddff72d423689a3
[ "Unlicense" ]
2
2020-01-03T10:17:39.000Z
2020-06-13T06:15:17.000Z
from random import shuffle from typing import List, Union def randomSequence(*args: Union[List[int], range]) -> List[int]: """Returns a shuffled array\n args can be either stop, start stop, and start stop step, or a range object """ if isinstance(args[0], int): if (len(args)) == 1: ...
29.681818
79
0.57121
from random import shuffle from typing import List, Union def randomSequence(*args: Union[List[int], range]) -> List[int]: """Returns a shuffled array\n args can be either stop, start stop, and start stop step, or a range object """ if isinstance(args[0], int): if (len(args)) == 1: ...
0
0
0
0
0
0
0
0
0