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
ed83595a224bf334d5261e08f0dd4def4f8f1b7b
19,980
py
Python
egs/wsj/s5/steps/cleanup/internal/modify_ctm_edits.py
IcyW/SMIIP
c05fcdcd77837e254998a899c4ae50cf1bfbe497
[ "Apache-2.0" ]
61
2017-10-03T17:30:36.000Z
2020-08-17T16:01:26.000Z
egs/wsj/s5/steps/cleanup/internal/modify_ctm_edits.py
Acidburn0zzz/kaldi
134cf7ee5c9604a431080db14cf6dc19f6524047
[ "Apache-2.0" ]
1
2018-12-12T16:04:59.000Z
2019-01-25T17:15:00.000Z
egs/wsj/s5/steps/cleanup/internal/modify_ctm_edits.py
Acidburn0zzz/kaldi
134cf7ee5c9604a431080db14cf6dc19f6524047
[ "Apache-2.0" ]
10
2017-10-04T05:46:19.000Z
2021-04-08T12:54:20.000Z
#!/usr/bin/env python # Copyright 2016 Vimal Manohar # 2016 Johns Hopkins University (author: Daniel Povey) # Apache 2.0 from __future__ import print_function import argparse import logging from collections import defaultdict """ This script reads and writes the 'ctm-edits' file that is produced by get...
45.306122
97
0.646446
#!/usr/bin/env python # Copyright 2016 Vimal Manohar # 2016 Johns Hopkins University (author: Daniel Povey) # Apache 2.0 from __future__ import print_function import argparse import logging import sys from collections import defaultdict """ This script reads and writes the 'ctm-edits' file that is prod...
0
0
0
0
0
12,943
0
-11
180
527884993045334d555f2ba30503a0c47602c556
339
py
Python
sdp/xiaoaiskill/admin.py
liutianfang/skill-dev-platform
37e76232869ae6eaf23d88398d2e52e7e0a5a80f
[ "Apache-2.0" ]
3
2018-08-31T02:43:39.000Z
2018-12-23T23:59:23.000Z
sdp/xiaoaiskill/admin.py
liutianfang/skill-dev-platform
37e76232869ae6eaf23d88398d2e52e7e0a5a80f
[ "Apache-2.0" ]
5
2020-06-05T18:50:52.000Z
2022-03-11T23:28:58.000Z
sdp/xiaoaiskill/admin.py
liutianfang/skill-dev-platform
37e76232869ae6eaf23d88398d2e52e7e0a5a80f
[ "Apache-2.0" ]
1
2018-09-13T08:51:41.000Z
2018-09-13T08:51:41.000Z
from django.contrib import admin from django.contrib import admin admin.site.register(MI_Log, MI_Whereis_LogAdmin) admin.site.register(MI_Device) admin.site.register(MI_DeviceOwner)
26.076923
74
0.79056
from django.contrib import admin from django.contrib import admin from xiaoaiskill.models import * class MI_Whereis_LogAdmin(admin.ModelAdmin): list_display = ("pk",'create_time','request',"response","ip","exmsg",) admin.site.register(MI_Log, MI_Whereis_LogAdmin) admin.site.register(MI_Device) admin.site.regis...
0
0
0
98
0
0
0
11
45
a909608250f6e1df44425da131396682cb259b93
1,050
py
Python
peering/migrations/0083_move_email_to_messaging.py
maznu/peering-manager
d249fcf530f4cc48b39429badb79bc203e0148ba
[ "Apache-2.0" ]
127
2017-10-12T00:27:45.000Z
2020-08-07T11:13:55.000Z
peering/migrations/0083_move_email_to_messaging.py
maznu/peering-manager
d249fcf530f4cc48b39429badb79bc203e0148ba
[ "Apache-2.0" ]
247
2017-12-26T12:55:34.000Z
2020-08-08T11:57:35.000Z
peering/migrations/0083_move_email_to_messaging.py
maznu/peering-manager
d249fcf530f4cc48b39429badb79bc203e0148ba
[ "Apache-2.0" ]
63
2017-10-13T06:46:05.000Z
2020-08-08T00:41:57.000Z
# Generated by Django 3.2.11 on 2022-01-07 22:05
37.5
86
0.728571
# Generated by Django 3.2.11 on 2022-01-07 22:05 from django.db import migrations class Migration(migrations.Migration): dependencies = [("peering", "0082_move_autonomoussystem_contacts")] database_operations = [migrations.AlterModelTable("Email", "messaging_email")] state_operations = [migrations.Delet...
0
0
0
943
0
0
0
11
46
c5878b6f3946fbbc760914ab0bb8dab5b27bb7ef
5,311
py
Python
lab_07/main.py
migregal/bmstu_iu7_cg
b336e6058329656863d6066d69aabeb5aaef8014
[ "MIT" ]
null
null
null
lab_07/main.py
migregal/bmstu_iu7_cg
b336e6058329656863d6066d69aabeb5aaef8014
[ "MIT" ]
null
null
null
lab_07/main.py
migregal/bmstu_iu7_cg
b336e6058329656863d6066d69aabeb5aaef8014
[ "MIT" ]
null
null
null
import sys # if __name__ == '__main__': app = QApplication([]) application = Window() application.show() sys.exit(app.exec())
29.505556
80
0.567313
import sys from copy import deepcopy from PyQt5 import QtWidgets from PyQt5 import uic from PyQt5.QtCore import * from PyQt5.QtGui import * from PyQt5.QtWidgets import * from funcs import * from simple_cut import simple_cut # Класс главного окна class Window(QMainWindow): def __init__(self): QWidget.__...
214
0
0
4,792
0
0
0
37
224
959c9786634416f76e5af9a4e4d0557746d5d2df
283
py
Python
recommendations/users/urls.py
batalova90/recommendations
6a006b792f5b8aae6ad1a5c54b7cd81e4c53ae80
[ "MIT" ]
null
null
null
recommendations/users/urls.py
batalova90/recommendations
6a006b792f5b8aae6ad1a5c54b7cd81e4c53ae80
[ "MIT" ]
null
null
null
recommendations/users/urls.py
batalova90/recommendations
6a006b792f5b8aae6ad1a5c54b7cd81e4c53ae80
[ "MIT" ]
null
null
null
from django.contrib.auth.views import LogoutView from django.urls import path from . import views urlpatterns = [ path('logout/', LogoutView.as_view(template_name='users/logged_out.html'), name='logout'), path('signup/', views.SignUp.as_view(), name='signup') ]
21.769231
78
0.70318
from django.contrib.auth.views import LogoutView from django.urls import path from . import views urlpatterns = [ path('logout/', LogoutView.as_view(template_name='users/logged_out.html'), name='logout'), path('signup/', views.SignUp.as_view(), name='signup') ]
0
0
0
0
0
0
0
0
0
0c6ef210d7da12a90e4d6ae5831bdbd4c6f0f39b
12,962
py
Python
moztrap/model/library/api.py
bobsilverberg/moztrap
9f51f098b03f365b8101be2e2c9a38486a43314c
[ "BSD-2-Clause" ]
null
null
null
moztrap/model/library/api.py
bobsilverberg/moztrap
9f51f098b03f365b8101be2e2c9a38486a43314c
[ "BSD-2-Clause" ]
null
null
null
moztrap/model/library/api.py
bobsilverberg/moztrap
9f51f098b03f365b8101be2e2c9a38486a43314c
[ "BSD-2-Clause" ]
null
null
null
import logging logger = logging.getLogger(__name__)
31.158654
83
0.612637
from tastypie import http, fields from tastypie.exceptions import ImmediateHttpResponse from tastypie.resources import ModelResource, ALL, ALL_WITH_RELATIONS from ..core.api import (ProductVersionResource, ProductResource, UserResource) from .models import CaseVersion, Case, Suite, CaseStep, Su...
0
1,216
0
10,935
0
0
0
311
429
1bfe241b43b3ad59ad7f4c55395602c668570444
1,348
py
Python
lbpi/wrappers/ensembles/ensembles_copy.py
nairvinayv/random_scripts
6e1cc8d82cf61ae245108a69ffa1359f636f37f7
[ "MIT" ]
null
null
null
lbpi/wrappers/ensembles/ensembles_copy.py
nairvinayv/random_scripts
6e1cc8d82cf61ae245108a69ffa1359f636f37f7
[ "MIT" ]
null
null
null
lbpi/wrappers/ensembles/ensembles_copy.py
nairvinayv/random_scripts
6e1cc8d82cf61ae245108a69ffa1359f636f37f7
[ "MIT" ]
null
null
null
import os import shutil import sys dirr = sys.argv[1] # this should be the path for a common folder from forms flags = sys.argv[2] print(dirr) def folders_target(): """ Make multiple target folders for receptor """ if not os.path.exists('{}/ensembles'.format(dirr)): os.path.join(os.mkdir...
16.439024
93
0.577151
import os import shutil import sys dirr = sys.argv[1] # this should be the path for a common folder from forms flags = sys.argv[2] print(dirr) def folders_target(): """ Make multiple target folders for receptor """ if not os.path.exists('{}/ensembles'.format(dirr)): os.path.join(os.mkdir...
0
0
0
0
0
0
0
0
0
624018f1a61d00e55e13767dd664755a55e6d5b5
6,666
py
Python
test.py
buriedms/-3D-ResNets-Paddle
2b8e51faa03e86be7308cb0706b4d41d24570ebb
[ "MIT" ]
1
2022-02-28T00:48:16.000Z
2022-02-28T00:48:16.000Z
test.py
buriedms/-3D-ResNets-Paddle
2b8e51faa03e86be7308cb0706b4d41d24570ebb
[ "MIT" ]
null
null
null
test.py
buriedms/-3D-ResNets-Paddle
2b8e51faa03e86be7308cb0706b4d41d24570ebb
[ "MIT" ]
1
2022-02-28T00:48:20.000Z
2022-02-28T00:48:20.000Z
if __name__ == '__main__': main()
34.184615
80
0.636064
import paddle import time import os import sys import json from opts import parse_opts from model import generate_model from mean import get_mean, get_std from spatial_transforms import ( Compose, Normalize, Scale, CenterCrop, CornerCrop, MultiScaleCornerCrop, MultiScaleRandomCrop, RandomHorizontalFlip, ToTens...
0
0
0
0
0
5,911
0
289
425
6d841ec89fca6bdcf9485738eb500bfbfe999af1
346
py
Python
blog/App/views/__init__.py
caoluyang8/blog
98b702e7b038036986895fac4daefccd90c22bdc
[ "BSD-2-Clause" ]
null
null
null
blog/App/views/__init__.py
caoluyang8/blog
98b702e7b038036986895fac4daefccd90c22bdc
[ "BSD-2-Clause" ]
null
null
null
blog/App/views/__init__.py
caoluyang8/blog
98b702e7b038036986895fac4daefccd90c22bdc
[ "BSD-2-Clause" ]
null
null
null
from .main import main # from .user import user # from .posts import posts from .owncenter import center blueprintConfig = [ (main,''), (user,''), (posts,''), (center,''), ] #
19.222222
59
0.684971
from .main import main #首页蓝本 from .user import user #用户处理的蓝本对象 from .posts import posts from .owncenter import center blueprintConfig = [ (main,''), (user,''), (posts,''), (center,''), ] #注册蓝本 def register_blueprint(app): for blueprint,prefix in blueprintConfig: app.register_blueprint(bl...
51
0
0
0
0
112
0
0
22
2cf89d6f0c52f8a3936d5f44f7dd186b241c5cce
589
py
Python
src/remote_blink.py
RochesterMakerSpace/Raspberry-Pi-class
eef4b5de958571eced00d00db18edca4d7d34c94
[ "MIT" ]
null
null
null
src/remote_blink.py
RochesterMakerSpace/Raspberry-Pi-class
eef4b5de958571eced00d00db18edca4d7d34c94
[ "MIT" ]
null
null
null
src/remote_blink.py
RochesterMakerSpace/Raspberry-Pi-class
eef4b5de958571eced00d00db18edca4d7d34c94
[ "MIT" ]
null
null
null
from gpiozero import LED from gpiozero.pins.pigpio import PiGPIOFactory from time import sleep # Change localhost to Raspberry Pi host and run # this program on a remote computer factory = PiGPIOFactory(host='localhost') led = LED(21, pin_factory=factory) try: # toggle the led forever while True: led....
23.56
65
0.706282
from gpiozero import LED from gpiozero.pins.pigpio import PiGPIOFactory from time import sleep # Change localhost to Raspberry Pi host and run # this program on a remote computer factory = PiGPIOFactory(host='localhost') led = LED(21, pin_factory=factory) try: # toggle the led forever while True: led....
0
0
0
0
0
0
0
0
0
5f76a2f4a84049efe77d3b7b628525f29b3f92b6
2,824
py
Python
package/src/masonry/utils.py
MrKriss/stonemason
d78becc9168c2566b31b48c9a951e2823bc98362
[ "MIT" ]
2
2017-11-13T17:40:52.000Z
2021-05-08T15:58:28.000Z
package/src/masonry/utils.py
MrKriss/masonry
d78becc9168c2566b31b48c9a951e2823bc98362
[ "MIT" ]
3
2017-09-03T22:58:37.000Z
2017-09-12T21:45:27.000Z
package/src/masonry/utils.py
MrKriss/stonemason
d78becc9168c2566b31b48c9a951e2823bc98362
[ "MIT" ]
null
null
null
import json import logging import os from itertools import dropwhile from pathlib import Path def load_application_data(location=None): """Return the stored application data on where templates live""" if not location: location = os.getenv("HOME") app_data_dir = Path(os.path.join(location, ".mas...
28.24
92
0.693343
import json import logging import os import shlex import subprocess from itertools import dropwhile from pathlib import Path from clint.textui import colored, indent, puts def load_application_data(location=None): """Return the stored application data on where templates live""" if not location: loc...
0
0
0
0
0
423
0
12
116
236f56ebee647da1e638c0c765b9af34368035f1
6,025
py
Python
gfapy/alignment/cigar.py
ujjwalsh/gfapy
891ef3df695f20c67809e5a54549c876d90690b4
[ "ISC" ]
44
2017-03-18T08:08:04.000Z
2021-11-10T16:11:15.000Z
gfapy/alignment/cigar.py
ujjwalsh/gfapy
891ef3df695f20c67809e5a54549c876d90690b4
[ "ISC" ]
22
2017-04-04T21:20:31.000Z
2022-03-09T19:05:30.000Z
gfapy/alignment/cigar.py
ujjwalsh/gfapy
891ef3df695f20c67809e5a54549c876d90690b4
[ "ISC" ]
5
2017-07-07T02:56:56.000Z
2020-09-30T20:10:49.000Z
Operation = CIGAR.Operation
30.583756
80
0.61195
import re import gfapy class CIGAR(list): """ Representation of the contents of a CIGAR string. Each operation is represented by a :class:`CIGAR.Operation <gfapy.alignment.cigar.CIGAR.Operation>`, which specifies an operation length and operation symbol. Instances are usually created from their string re...
0
988
0
4,962
0
0
0
-21
67
442e7e55cc3c82406b780fb1efbd567afcfc80d5
3,653
py
Python
go_nn.py
ejmejm/GoHeuristics
9336d661abd48aa31ff5c9ed50cc2fbbd4472ebe
[ "Apache-2.0" ]
1
2017-07-18T22:24:30.000Z
2017-07-18T22:24:30.000Z
go_nn.py
ejmejm/GoHeuristics
9336d661abd48aa31ff5c9ed50cc2fbbd4472ebe
[ "Apache-2.0" ]
null
null
null
go_nn.py
ejmejm/GoHeuristics
9336d661abd48aa31ff5c9ed50cc2fbbd4472ebe
[ "Apache-2.0" ]
null
null
null
import global_vars_go as gvg batch_size = gvg.process_batch_size # How many board states (not full games) to send to GPU at once, about 200 is the limit of this GPU's RAM # Source: https://stackoverflow.com/questions/21989513/finding-index-of-maximum-value-in-array-with-numpy
48.065789
141
0.658363
import tensorflow as tf import numpy as np import time import board3d as go_board import matplotlib.pyplot as plt import global_vars_go as gvg import models.cnn batch_size = gvg.process_batch_size # How many board states (not full games) to send to GPU at once, about 200 is the limit of this GPU's RAM def train_netwo...
0
0
0
0
0
3,174
0
0
200
07c7ed0e82580e02f8fc7ae7c19aaf4b7078ddf1
9,607
py
Python
main/views.py
jhdulaney/oh-dataselfie-source
ea40129ae01a14e86e8f87eb62948c23ae2dc30e
[ "MIT" ]
null
null
null
main/views.py
jhdulaney/oh-dataselfie-source
ea40129ae01a14e86e8f87eb62948c23ae2dc30e
[ "MIT" ]
5
2019-05-09T14:44:40.000Z
2021-06-10T20:39:04.000Z
main/views.py
jhdulaney/oh-dataselfie-source
ea40129ae01a14e86e8f87eb62948c23ae2dc30e
[ "MIT" ]
2
2018-07-13T00:06:22.000Z
2018-12-27T18:19:28.000Z
import json import logging try: from urllib2 import HTTPError except ImportError: from django.conf import settings from django.contrib.auth import logout from django.shortcuts import redirect, render from django.contrib import messages from django.utils.safestring import mark_safe import ohapi import requests fr...
35.713755
79
0.640991
import json import logging try: from urllib2 import HTTPError except ImportError: from urllib.error import HTTPError from django.conf import settings from django.contrib.auth import login, logout from django.shortcuts import redirect, render from django.contrib import messages from django.utils.safestring impo...
0
0
0
0
0
2,983
0
61
231
ef31d0cec9f6459d47be8bfaa11b135ea2c9a8f9
3,542
py
Python
tests/test_workers.py
toastdriven/alligator
2bb41e0cf0a57baf90a9c15b3bb01bd74438bc69
[ "BSD-3-Clause" ]
21
2015-01-01T02:06:25.000Z
2022-03-19T13:57:42.000Z
tests/test_workers.py
toastdriven/alligator
2bb41e0cf0a57baf90a9c15b3bb01bd74438bc69
[ "BSD-3-Clause" ]
2
2015-01-07T07:38:53.000Z
2015-01-07T07:39:01.000Z
tests/test_workers.py
toastdriven/alligator
2bb41e0cf0a57baf90a9c15b3bb01bd74438bc69
[ "BSD-3-Clause" ]
7
2015-01-03T19:45:14.000Z
2022-03-19T13:57:44.000Z
import os ALLOW_SLOW = bool(os.environ.get("ALLIGATOR_SLOW", False)) CONN_STRING = os.environ.get("ALLIGATOR_CONN") FILENAME = "/tmp/alligator_test_workers.txt"
28.796748
71
0.65415
import os import unittest from unittest import mock from alligator.gator import Gator from alligator.workers import Worker ALLOW_SLOW = bool(os.environ.get("ALLIGATOR_SLOW", False)) CONN_STRING = os.environ.get("ALLIGATOR_CONN") FILENAME = "/tmp/alligator_test_workers.txt" def touch_file(): with open(FILENAME,...
0
2,729
0
0
0
392
0
25
227
3fa00e78910eee773dfd47ebe1a32119bd178d04
345
py
Python
apps/webmarks/upload/urls.py
EricMuller/mynote-backend
69bc39b8cfad52d6c42003cfa7bd629f3e8eccb7
[ "MIT" ]
1
2017-04-26T10:24:21.000Z
2017-04-26T10:24:21.000Z
apps/webmarks/upload/urls.py
EricMuller/mynotes-backend
69bc39b8cfad52d6c42003cfa7bd629f3e8eccb7
[ "MIT" ]
5
2020-06-05T18:16:39.000Z
2022-01-13T00:45:49.000Z
apps/webmarks/upload/urls.py
EricMuller/webmarks-rest-api
69bc39b8cfad52d6c42003cfa7bd629f3e8eccb7
[ "MIT" ]
null
null
null
from django.conf.urls import url from django.conf.urls import include from rest_framework import routers from webmarks.bookmarks import viewsets apiRouter = routers.DefaultRouter() apiRouter.register(r'upload', viewsets.FileUploaderViewSet) urlpatterns = [ # API V1 url(r'v1/', include(apiRouter.urls, namesp...
23
68
0.776812
from django.conf.urls import url from django.conf.urls import include from rest_framework import routers from webmarks.bookmarks import viewsets apiRouter = routers.DefaultRouter() apiRouter.register(r'upload', viewsets.FileUploaderViewSet) urlpatterns = [ # API V1 url(r'v1/', include(apiRouter.urls, namesp...
0
0
0
0
0
0
0
0
0
b2f55a72355b229af932ac8ad82b7589a66ce05b
26,979
py
Python
orbitize/plot.py
sblunt/orbitize
665ca4843d10ee1593665254354d934f37e1b5fc
[ "BSD-3-Clause-Clear" ]
60
2018-01-12T17:16:53.000Z
2022-02-14T01:39:39.000Z
orbitize/plot.py
sblunt/orbitize
665ca4843d10ee1593665254354d934f37e1b5fc
[ "BSD-3-Clause-Clear" ]
278
2018-01-12T17:25:47.000Z
2022-03-31T21:28:27.000Z
orbitize/plot.py
sblunt/orbitize
665ca4843d10ee1593665254354d934f37e1b5fc
[ "BSD-3-Clause-Clear" ]
49
2018-10-30T19:34:05.000Z
2021-10-31T13:28:45.000Z
import numpy as np import corner import warnings import itertools import astropy.units as u import astropy.constants as consts from astropy.time import Time import matplotlib as mpl import matplotlib.pyplot as plt from matplotlib.collections import LineCollection import matplotlib.colors as colors from erfa import E...
44.815615
166
0.585715
import numpy as np import corner import warnings import itertools import astropy.units as u import astropy.constants as consts from astropy.time import Time import matplotlib as mpl import matplotlib.pyplot as plt from matplotlib.collections import LineCollection import matplotlib.colors as colors from erfa import E...
0
0
0
0
0
0
0
0
0
29cf3ca08014999c12eddf1018f67e6c18064f76
155
py
Python
src/assets/scene_config/console/5/solution.py
DataArt/kiddo
58fc41bd8d1ee93c9af464179fe6e3c0d6150b50
[ "Apache-2.0" ]
12
2020-10-01T12:37:26.000Z
2022-01-11T09:00:24.000Z
src/assets/scene_config/console/5/solution.py
ra1amx/kiddo
dfb1c9324152a14edc62e1e89f7b108bc69b7d63
[ "Apache-2.0" ]
1
2021-01-15T07:15:54.000Z
2021-01-15T07:15:54.000Z
src/assets/scene_config/console/5/solution.py
ra1amx/kiddo
dfb1c9324152a14edc62e1e89f7b108bc69b7d63
[ "Apache-2.0" ]
2
2020-10-16T09:27:33.000Z
2021-07-11T13:19:31.000Z
import console x = console.get_value("x") y = console.get_value("y") if x >= 0: console.set_value("c", x + y) else: console.set_value("c", x * y)
17.222222
33
0.612903
import console x = console.get_value("x") y = console.get_value("y") if x >= 0: console.set_value("c", x + y) else: console.set_value("c", x * y)
0
0
0
0
0
0
0
0
0
dd2ae237043f5511cbae8bbc3116d9709f19e8cc
240
py
Python
setup.py
davidmeijer/mol2html
606d4cccc93fc0505779342e76a0166cef32377a
[ "MIT" ]
1
2021-11-30T14:15:09.000Z
2021-11-30T14:15:09.000Z
setup.py
davidmeijer/mol2html
606d4cccc93fc0505779342e76a0166cef32377a
[ "MIT" ]
null
null
null
setup.py
davidmeijer/mol2html
606d4cccc93fc0505779342e76a0166cef32377a
[ "MIT" ]
null
null
null
from setuptools import setup, find_packages from mol2html.__version__ import __version__ setup( name='mol2html', version=__version__, pacakges=find_packages(), author='David Meijer', author_email='david.meijer@wur.nl' )
24
44
0.745833
from setuptools import setup, find_packages from mol2html.__version__ import __version__ setup( name='mol2html', version=__version__, pacakges=find_packages(), author='David Meijer', author_email='david.meijer@wur.nl' )
0
0
0
0
0
0
0
0
0
fa203b374d6b8852ccb15e6949867b415cb5fd6d
1,349
py
Python
alien_game/settings.py
Brucehanyf/python_tutorial
fc5c888ac818ad6e8fda9ee7fbcc3ecbca94436b
[ "Apache-2.0" ]
null
null
null
alien_game/settings.py
Brucehanyf/python_tutorial
fc5c888ac818ad6e8fda9ee7fbcc3ecbca94436b
[ "Apache-2.0" ]
null
null
null
alien_game/settings.py
Brucehanyf/python_tutorial
fc5c888ac818ad6e8fda9ee7fbcc3ecbca94436b
[ "Apache-2.0" ]
null
null
null
#
26.45098
68
0.595256
# 设置类 class Settings(): '''存储外星人入侵所有的设置的类 ''' def __init__(self): """ 初始化游戏的设置 """ # 屏幕设置 self.screen_width = 600 self.screen_height = 600 self.bg_color = (230, 230, 230) # 飞船移动的速度设置 self.ship_speed_factor = 1.5 self.ship_limit = 3 #子弹设置...
309
0
0
1,221
0
0
0
0
22
26357af55397b9f718b1c3fddda93b2341102317
3,081
py
Python
app/lib/qiniu/auth.py
zhongxinghong/pkuyouth
9262346b3c88109ca731387095d5678071a05d60
[ "Apache-2.0" ]
1
2018-06-19T04:00:35.000Z
2018-06-19T04:00:35.000Z
app/lib/qiniu/auth.py
zhongxinghong/PKUyouth
9262346b3c88109ca731387095d5678071a05d60
[ "Apache-2.0" ]
null
null
null
app/lib/qiniu/auth.py
zhongxinghong/PKUyouth
9262346b3c88109ca731387095d5678071a05d60
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # filename: app/lib/qiniu/auth.py try: from .util import to_bytes, urlsafe_base64_encode except (ImportError,SystemError,ValueError):
32.431579
106
0.635508
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # filename: app/lib/qiniu/auth.py import time import simplejson as json import hmac from hashlib import sha1 from urllib.parse import urlparse from requests.auth import AuthBase try: from .util import to_bytes, urlsafe_base64_encode except (ImportError,SystemError,...
0
0
0
2,647
0
0
0
39
206
ef18948fdb78fa3068ca12b44f03bba8440d1b43
7,594
py
Python
Testes com Pygame/scrolling_plataformer.py
fotavio16/PycharmProjects
f5be49db941de69159ec543e8a6dde61f9f94d86
[ "MIT" ]
null
null
null
Testes com Pygame/scrolling_plataformer.py
fotavio16/PycharmProjects
f5be49db941de69159ec543e8a6dde61f9f94d86
[ "MIT" ]
null
null
null
Testes com Pygame/scrolling_plataformer.py
fotavio16/PycharmProjects
f5be49db941de69159ec543e8a6dde61f9f94d86
[ "MIT" ]
null
null
null
#! /usr/bin/python WIN_WIDTH = 800 WIN_HEIGHT = 640 HALF_WIDTH = int(WIN_WIDTH / 2) HALF_HEIGHT = int(WIN_HEIGHT / 2) DISPLAY = (WIN_WIDTH, WIN_HEIGHT) DEPTH = 32 FLAGS = 0 CAMERA_SLACK = 30 if __name__ == "__main__": main()
32.732759
78
0.454306
#! /usr/bin/python import pygame from pygame import * WIN_WIDTH = 800 WIN_HEIGHT = 640 HALF_WIDTH = int(WIN_WIDTH / 2) HALF_HEIGHT = int(WIN_HEIGHT / 2) DISPLAY = (WIN_WIDTH, WIN_HEIGHT) DEPTH = 32 FLAGS = 0 CAMERA_SLACK = 30 def main(): global cameraX, cameraY pygame.init() screen = pygame.display.set_...
2
0
0
2,824
0
4,316
0
-9
229
33f621e85f116a0cc71456be34809b20fbefd5d3
2,121
py
Python
ssrm_test/test_jupyter_notebooks.py
michaellindon/ssrm
c44f5382471a2c2ddea4bf597072304745af8578
[ "Apache-2.0" ]
null
null
null
ssrm_test/test_jupyter_notebooks.py
michaellindon/ssrm
c44f5382471a2c2ddea4bf597072304745af8578
[ "Apache-2.0" ]
null
null
null
ssrm_test/test_jupyter_notebooks.py
michaellindon/ssrm
c44f5382471a2c2ddea4bf597072304745af8578
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 Optimizely Inc. # # 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 l...
35.35
82
0.715229
# Copyright 2020 Optimizely Inc. # # 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 l...
0
487
0
0
0
572
0
-20
136
82526c0dd834ab826582f8c46cdfe3cfd94bc82e
6,390
py
Python
pythonfiles/testphone_pythonfiles/test_phone/test/test.py
Huyuxuan-github/wica
f87b22ce4c773ce96b9e583ebcd5bf36469e32c7
[ "WTFPL" ]
1
2022-03-04T01:03:50.000Z
2022-03-04T01:03:50.000Z
pythonfiles/testphone_pythonfiles/test_phone/test/test.py
Huyuxuan-github/wica
f87b22ce4c773ce96b9e583ebcd5bf36469e32c7
[ "WTFPL" ]
null
null
null
pythonfiles/testphone_pythonfiles/test_phone/test/test.py
Huyuxuan-github/wica
f87b22ce4c773ce96b9e583ebcd5bf36469e32c7
[ "WTFPL" ]
1
2022-03-04T01:03:53.000Z
2022-03-04T01:03:53.000Z
# from tkinter.filedialog import FileDialog from win32com.client import Dispatch name = [] root =Tk() root.geometry("1000x385") root.title('') wmp = Dispatch("WMPlayer.OCX") canvas = Canvas(root,width =200,height = 200,bg = "white") img = PhotoImage(file = 'C:\\\\Users\\\\1\\\\Desktop\\\\test_phone\\\\test\\\\111.g...
34.540541
125
0.700939
from tkinter import * from tkinter import filedialog # from tkinter.filedialog import FileDialog from traceback import * from win32com.client import Dispatch import time,eyed3,threading name = [] def openfile(index = [1]): global total,name filenames = filedialog.askopenfilenames(title = "音乐播放器",filetypes =[("mp...
441
0
0
0
0
1,942
0
17
466
58a2e095dd52fbf9150d60febf9321dd76634b0e
14,932
py
Python
code/scripts/dataset.py
estherrolf/representation-matters
502e351e21fc6b33aaa5c96b8c1409c76807f5a7
[ "BSD-3-Clause" ]
1
2021-11-28T09:29:33.000Z
2021-11-28T09:29:33.000Z
code/scripts/dataset.py
estherrolf/representation-matters
502e351e21fc6b33aaa5c96b8c1409c76807f5a7
[ "BSD-3-Clause" ]
null
null
null
code/scripts/dataset.py
estherrolf/representation-matters
502e351e21fc6b33aaa5c96b8c1409c76807f5a7
[ "BSD-3-Clause" ]
null
null
null
import torchvision.transforms as transforms
40.797814
130
0.567975
import os import torch import torchvision.transforms as transforms from PIL import Image import pandas as pd from skimage import io, transform import numpy as np from torch.utils.data import Dataset, DataLoader from torchvision import transforms, utils from torch.utils.data.sampler import WeightedRandomSampler class...
0
0
0
5,197
0
9,302
0
70
276
a57f663fc645eda54af2f6bb152a3cf3577ccdc4
233
py
Python
Spider/db.py
aspxcor/Ming-Dynasty-Knowledge-Graph
576cbbd86ca61d415d18bb5d6c60feac56357693
[ "MIT" ]
3
2021-12-12T12:11:45.000Z
2022-02-09T03:12:58.000Z
Spider/db.py
aspxcor/Ming-Dynasty-Knowledge-Graph
576cbbd86ca61d415d18bb5d6c60feac56357693
[ "MIT" ]
null
null
null
Spider/db.py
aspxcor/Ming-Dynasty-Knowledge-Graph
576cbbd86ca61d415d18bb5d6c60feac56357693
[ "MIT" ]
1
2022-02-09T03:13:00.000Z
2022-02-09T03:13:00.000Z
import dbExe a="*" b="kg.validRelationship" db=dbExe.db() # db.add(Table="validRelationship",names="(valid)",values=r'("4")') # db.delete(Table="validRelationship",name="valid",value=r'"4"') print(db.select(a,b))
23.3
69
0.703863
import pymysql import dbExe a="*" b="kg.validRelationship" db=dbExe.db() # db.add(Table="validRelationship",names="(valid)",values=r'("父子4")') # db.delete(Table="validRelationship",name="valid",value=r'"父子4"') print(db.select(a,b))
12
0
0
0
0
0
0
-7
22
cda652031409758da610e6b0915e4a658f41312d
1,794
py
Python
2020/01/code.py
irobin591/advent-of-code-2019
279c28a2863558bd014b289802fff4b444c5d6cf
[ "MIT" ]
null
null
null
2020/01/code.py
irobin591/advent-of-code-2019
279c28a2863558bd014b289802fff4b444c5d6cf
[ "MIT" ]
null
null
null
2020/01/code.py
irobin591/advent-of-code-2019
279c28a2863558bd014b289802fff4b444c5d6cf
[ "MIT" ]
null
null
null
# Advent of Code 2020 # Day 01 # Author: irobin591 import os import doctest with open(os.path.join(os.path.dirname(__file__), "input.txt"), 'r') as input_file: input_data = input_file.read() # Prep Input input_data = list(map(int, input_data.strip().split('\n'))) # print(input_data) def part1(input_data): ...
24.916667
83
0.584727
# Advent of Code 2020 # Day 01 # Author: irobin591 import os import doctest with open(os.path.join(os.path.dirname(__file__), "input.txt"), 'r') as input_file: input_data = input_file.read() # Prep Input input_data = list(map(int, input_data.strip().split('\n'))) # print(input_data) def part1(input_data): ...
0
0
0
0
0
0
0
0
0
6d67dce8b62b3d80e3629c6790b99aedc88608e3
2,034
py
Python
tocador mp3 python/tocador_mp3_python.py
Koalapvh13/python_exercises
5dc12dfa886edaccc54727d1866438f20a83d4d0
[ "MIT" ]
null
null
null
tocador mp3 python/tocador_mp3_python.py
Koalapvh13/python_exercises
5dc12dfa886edaccc54727d1866438f20a83d4d0
[ "MIT" ]
null
null
null
tocador mp3 python/tocador_mp3_python.py
Koalapvh13/python_exercises
5dc12dfa886edaccc54727d1866438f20a83d4d0
[ "MIT" ]
null
null
null
import os version = '2.0 (Beta)' update = 'March 6th, 2018' playlist() os.system("pause")
30.818182
120
0.333333
import pygame import os version = '2.0 (Beta)' update = 'March 6th, 2018' def playlist(): print( "+-----------------------------------------------------------------------------------------------------------+") print( "| ...
4
0
0
0
0
1,900
0
-8
45
b5e3c96d790f5b5539d92549c83a1e60f902dba2
6,531
py
Python
clubhouse/parser.py
j-martin/clubhouse
45975e337905d701a2d4725133f0f9f85e5da076
[ "MIT" ]
2
2019-04-12T09:29:06.000Z
2019-05-03T12:00:03.000Z
clubhouse/parser.py
j-martin/clubhouse
45975e337905d701a2d4725133f0f9f85e5da076
[ "MIT" ]
1
2018-11-05T23:39:11.000Z
2018-11-05T23:39:11.000Z
clubhouse/parser.py
mahmoudimus/clubhouse
adaf97197b557e9cb6bf4eecd2b80a581987c7dc
[ "MIT" ]
4
2018-10-22T23:55:06.000Z
2019-12-01T03:47:23.000Z
""" Parses https://clubhouse.io/api/rest/v2/ and generates a JSON payload of their resources that can be used as basis of a client library. """ import logging from jinja2 import BaseLoader, Environment _jinja_env = Environment(loader=BaseLoader(), trim_blocks=True, lstrip_blocks=True) logger = logging.getLogger(__na...
30.661972
94
0.59409
""" Parses https://clubhouse.io/api/rest/v2/ and generates a JSON payload of their resources that can be used as basis of a client library. """ import argparse import logging import sys import re from typing import Dict from collections import OrderedDict, deque from lxml import html from unidecode import unidecode f...
0
0
0
0
0
5,686
0
-7
385
dc8143457a2ac5bfe1b4efd724c65cef8d03a12a
349
py
Python
app.py
edusan7/cdk-serverless-pipeline-starter-template
299fa1dffc9b1dc2cf52a6703eb36dd56a3c49db
[ "Apache-2.0" ]
9
2019-10-20T21:02:43.000Z
2021-02-16T10:19:08.000Z
app.py
edusan7/cdk-serverless-pipeline-starter-template
299fa1dffc9b1dc2cf52a6703eb36dd56a3c49db
[ "Apache-2.0" ]
null
null
null
app.py
edusan7/cdk-serverless-pipeline-starter-template
299fa1dffc9b1dc2cf52a6703eb36dd56a3c49db
[ "Apache-2.0" ]
9
2019-10-13T15:39:45.000Z
2021-05-26T16:38:57.000Z
#!/usr/bin/env python3 from aws_cdk import core import os from serverless_pipeline.serverless_pipeline_stack import ServerlessPipelineStack app = core.App() ServerlessPipelineStack(app, "serverless-pipeline", env=core.Environment( account=os.getenv('AWS_CDK_DEFAULT_ACCOUNT'), region=os.getenv('AWS_CDK_DEFAU...
21.8125
81
0.790831
#!/usr/bin/env python3 from aws_cdk import core import os from serverless_pipeline.serverless_pipeline_stack import ServerlessPipelineStack app = core.App() ServerlessPipelineStack(app, "serverless-pipeline", env=core.Environment( account=os.getenv('AWS_CDK_DEFAULT_ACCOUNT'), region=os.getenv('AWS_CDK_DEFAU...
0
0
0
0
0
0
0
0
0
4167bbe9554b86bc903c8c9aadc9881a3baf49c5
446
py
Python
pra subir/pythonexercicios/ex42.py
daianebandeira88/curso-python
763f5f36b6d7329549ad861c63acc3c84aade887
[ "MIT" ]
null
null
null
pra subir/pythonexercicios/ex42.py
daianebandeira88/curso-python
763f5f36b6d7329549ad861c63acc3c84aade887
[ "MIT" ]
null
null
null
pra subir/pythonexercicios/ex42.py
daianebandeira88/curso-python
763f5f36b6d7329549ad861c63acc3c84aade887
[ "MIT" ]
null
null
null
r1=float(input('primeiro segmento')) r2=float(input('segundo segmento')) r3=float(input('terceiro segmento')) if r1 < r2 + r3 and r2 < r1 + r3 and r3 < r1 + r2: print('os segmentos acima podem formar um triangulo ' ,end='') if r1 == r2 and r2 == r3: print('EQUILATERO') elif r1 != r2 != r3 != r1: ...
34.307692
66
0.616592
r1=float(input('primeiro segmento')) r2=float(input('segundo segmento')) r3=float(input('terceiro segmento')) if r1 < r2 + r3 and r2 < r1 + r3 and r3 < r1 + r2: print('os segmentos acima podem formar um triangulo ' ,end='') if r1 == r2 and r2 == r3: print('EQUILATERO') elif r1 != r2 != r3 != r1: ...
2
0
0
0
0
0
0
0
0
05a2aabcad9d2b7c91c1ea7c34e4db3da03cbad5
1,322
py
Python
Python3/1170.py
rakhi2001/ecom7
73790d44605fbd51e8f7e804b9808e364fcfc680
[ "MIT" ]
854
2018-11-09T08:06:16.000Z
2022-03-31T06:05:53.000Z
Python3/1170.py
rakhi2001/ecom7
73790d44605fbd51e8f7e804b9808e364fcfc680
[ "MIT" ]
29
2019-06-02T05:02:25.000Z
2021-11-15T04:09:37.000Z
Python3/1170.py
rakhi2001/ecom7
73790d44605fbd51e8f7e804b9808e364fcfc680
[ "MIT" ]
347
2018-12-23T01:57:37.000Z
2022-03-12T14:51:21.000Z
__________________________________________________________________________________________________ sample 72 ms submission __________________________________________________________________________________________________ sample 136 ms submission _________________________________________________________________________...
48.962963
107
0.688351
__________________________________________________________________________________________________ sample 72 ms submission class Solution: def numSmallerByLeadingCount(self, queries: List[str], words: List[str]) -> List[int]: def score(word): return word.count(min(word)) word_s...
0
0
0
932
0
0
0
0
44
45df30d3c79310cce01ab793fba5834771916f6a
362
py
Python
kb/admin.py
movermeyer/django-kb
3c3246761f4f6d60221049f46ce9702fd56384a8
[ "BSD-3-Clause" ]
7
2015-04-17T12:01:29.000Z
2021-06-21T01:54:15.000Z
kb/admin.py
movermeyer/django-kb
3c3246761f4f6d60221049f46ce9702fd56384a8
[ "BSD-3-Clause" ]
null
null
null
kb/admin.py
movermeyer/django-kb
3c3246761f4f6d60221049f46ce9702fd56384a8
[ "BSD-3-Clause" ]
3
2015-04-17T16:21:42.000Z
2018-06-06T13:34:03.000Z
from __future__ import unicode_literals from django.contrib import admin from .article.admin import ArticleAdmin from .category.admin import CategoryAdmin from .vote.admin import VoteAdmin from .models import Article, Category, Vote admin.site.register(Article, ArticleAdmin) admin.site.register(Category, CategoryAd...
25.857143
44
0.831492
from __future__ import unicode_literals from django.contrib import admin from .article.admin import ArticleAdmin from .category.admin import CategoryAdmin from .vote.admin import VoteAdmin from .models import Article, Category, Vote admin.site.register(Article, ArticleAdmin) admin.site.register(Category, CategoryAd...
0
0
0
0
0
0
0
0
0
c7d46243836354e254c8dae539d0806a6b6d09a9
1,989
py
Python
bin/nback_derivative.py
willstrawson/adie_ongoingthoughts
a9ba9e8e4326fd528db72eac8ed5cc932fc490b5
[ "MIT" ]
1
2021-06-04T15:39:14.000Z
2021-06-04T15:39:14.000Z
bin/nback_derivative.py
willstrawson/adie_ongoingthoughts
a9ba9e8e4326fd528db72eac8ed5cc932fc490b5
[ "MIT" ]
27
2020-11-30T11:13:00.000Z
2021-05-02T07:58:37.000Z
bin/nback_derivative.py
willstrawson/adie_ongoingthoughts
a9ba9e8e4326fd528db72eac8ed5cc932fc490b5
[ "MIT" ]
4
2020-11-27T13:49:31.000Z
2021-04-28T15:51:09.000Z
from pathlib import Path import json import pandas as pd from adie.nback import (read_log, compile_performance, compile_probes, compile_ses) bids_dir = Path("__file__").parent # this file is in BIDS_data/code sub_probes = [] sub_beh = [] sub_ses = [] for p in bids_dir.glob("sub-*/**/*task-nback*.tsv"): # extra...
25.177215
76
0.65812
from os import sep from pathlib import Path import json import pandas as pd from adie.nback import ( read_log, compile_performance, compile_probes, compile_ses, ) bids_dir = Path("__file__").parent # this file is in BIDS_data/code sub_probes = [] sub_beh = [] sub_ses = [] for p in bids_dir.glob("su...
0
0
0
0
0
0
0
16
22
4a707d2752561152bbc9cff59f79e54377f195b6
17,209
py
Python
lib/mk/autoconf/make_example_metamakefiles.py
rmrsk/Chombo-3.3
f2119e396460c1bb19638effd55eb71c2b35119e
[ "BSD-3-Clause-LBNL" ]
8
2019-08-07T12:34:08.000Z
2021-07-16T01:12:57.000Z
lib/mk/autoconf/make_example_metamakefiles.py
rmrsk/Chombo-3.3
f2119e396460c1bb19638effd55eb71c2b35119e
[ "BSD-3-Clause-LBNL" ]
1
2021-01-07T11:26:51.000Z
2021-01-07T11:26:51.000Z
lib/mk/autoconf/make_example_metamakefiles.py
rmrsk/Chombo-3.3
f2119e396460c1bb19638effd55eb71c2b35119e
[ "BSD-3-Clause-LBNL" ]
6
2020-03-08T18:17:48.000Z
2021-12-25T15:11:08.000Z
""" This script attempts to generate a complete autoconf/automake/libtool-based build system for any project that wants to use the Chombo library. To use it, type python make_example_metamakefiles.py <rootdir> where rootdir is the root directory of your project. Your project can contain C++ sources (with suffixes ....
41.46747
113
0.615085
""" This script attempts to generate a complete autoconf/automake/libtool-based build system for any project that wants to use the Chombo library. To use it, type python make_example_metamakefiles.py <rootdir> where rootdir is the root directory of your project. Your project can contain C++ sources (with suffixes ....
0
0
0
176
0
4,240
0
0
145
a08c38d6c8319f07b9477a4539b2eeedf4490472
1,375
py
Python
radioepg/migrations/0023_auto_20210505_2116.py
mervij/radiodns
01543cf1e4de8de335af0301616e089c35fc67f8
[ "Apache-2.0" ]
null
null
null
radioepg/migrations/0023_auto_20210505_2116.py
mervij/radiodns
01543cf1e4de8de335af0301616e089c35fc67f8
[ "Apache-2.0" ]
8
2021-05-17T10:54:28.000Z
2021-06-08T12:02:37.000Z
radioepg/migrations/0023_auto_20210505_2116.py
mervij/radiodns
01543cf1e4de8de335af0301616e089c35fc67f8
[ "Apache-2.0" ]
null
null
null
# Generated by Django 3.2.1 on 2021-05-05 18:16
31.25
91
0.579636
# Generated by Django 3.2.1 on 2021-05-05 18:16 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('radioepg', '0022_service_logo'), ] operations = [ migrations.AddField( model_name='service', name='logo112', ...
0
0
0
1,261
0
0
0
19
46
ee1c8f7bb7be58d86f5522c7f5df1b0d12eaa0db
1,329
py
Python
test/testbase/dummy.py
noralsydmp/icetea
b486cdc8e0d2211e118f1f8211aa4d284ca02422
[ "Apache-2.0" ]
6
2018-08-10T17:11:10.000Z
2020-04-29T07:05:36.000Z
test/testbase/dummy.py
noralsydmp/icetea
b486cdc8e0d2211e118f1f8211aa4d284ca02422
[ "Apache-2.0" ]
58
2018-08-13T08:36:08.000Z
2021-07-07T08:32:52.000Z
test/testbase/dummy.py
noralsydmp/icetea
b486cdc8e0d2211e118f1f8211aa4d284ca02422
[ "Apache-2.0" ]
7
2018-08-10T12:53:18.000Z
2021-11-08T05:15:42.000Z
""" Copyright 2017 ARM Limited Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software dis...
32.414634
72
0.54778
""" Copyright 2017 ARM Limited Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software dis...
0
0
0
631
0
0
0
34
68
4bead50296bd25e856c7c5c341f7f4ccd6db5412
6,281
py
Python
ficapi/fictoken.py
riceball-k/ficapi
98387d98252f4e438a7c136b59dbefe1425718f0
[ "Apache-2.0" ]
null
null
null
ficapi/fictoken.py
riceball-k/ficapi
98387d98252f4e438a7c136b59dbefe1425718f0
[ "Apache-2.0" ]
null
null
null
ficapi/fictoken.py
riceball-k/ficapi
98387d98252f4e438a7c136b59dbefe1425718f0
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 riceball-k # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
29.767773
79
0.574431
# Copyright 2021 riceball-k # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
1,128
462
0
4,374
0
0
0
8
180
c3a4c4d5fa877feaf2babdef850a2c1ecda90814
4,769
py
Python
WebKit/Tools/Scripts/webkitpy/common/system/executive_mock.py
JavaScriptTesting/LJS
9818dbdb421036569fff93124ac2385d45d01c3a
[ "Apache-2.0" ]
1
2019-06-18T06:52:54.000Z
2019-06-18T06:52:54.000Z
WebKit/Tools/Scripts/webkitpy/common/system/executive_mock.py
JavaScriptTesting/LJS
9818dbdb421036569fff93124ac2385d45d01c3a
[ "Apache-2.0" ]
null
null
null
WebKit/Tools/Scripts/webkitpy/common/system/executive_mock.py
JavaScriptTesting/LJS
9818dbdb421036569fff93124ac2385d45d01c3a
[ "Apache-2.0" ]
null
null
null
# Copyright (C) 2011 Google Inc. 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 of conditions and the f...
39.413223
104
0.651499
# Copyright (C) 2011 Google Inc. 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 of conditions and the f...
0
0
0
3,016
0
0
0
59
113
fac72f5de4eca19b50e505af1e0929ed2f6b7d44
250
py
Python
p15.py
daicang/Euler
c00114d588351b6f2c637937558a35738d56345b
[ "MIT" ]
null
null
null
p15.py
daicang/Euler
c00114d588351b6f2c637937558a35738d56345b
[ "MIT" ]
null
null
null
p15.py
daicang/Euler
c00114d588351b6f2c637937558a35738d56345b
[ "MIT" ]
null
null
null
# Lattice path through 20 * 20 grids print solve(20, 20)
16.666667
43
0.452
# Lattice path through 20 * 20 grids def solve(x0, y0): x, y = x0 + 1, y0 + 1 l = [[1] * x] * y for i in range(1, x): for j in range(1, y): l[i][j] = l[i-1][j] + l[i][j-1] return l[x0][y0] print solve(20, 20)
0
0
0
0
0
167
0
0
23
6701dd775ed2c2e99d08413a997a7eec1946f37d
1,103
py
Python
src/arbiterd/common/nova.py
valleedelisle/arbiterd
18d6babbc3eab9eac6f35fd0babf1658cab4863e
[ "Apache-2.0" ]
null
null
null
src/arbiterd/common/nova.py
valleedelisle/arbiterd
18d6babbc3eab9eac6f35fd0babf1658cab4863e
[ "Apache-2.0" ]
6
2021-12-01T13:18:21.000Z
2022-01-31T23:50:24.000Z
src/arbiterd/common/nova.py
valleedelisle/arbiterd
18d6babbc3eab9eac6f35fd0babf1658cab4863e
[ "Apache-2.0" ]
1
2022-01-21T18:45:03.000Z
2022-01-21T18:45:03.000Z
# -*- coding: utf-8 -*- # Copyright 2021 - 2021, Sean Mooney and the arbiterd contributors # SPDX-License-Identifier: Apache-2.0
26.902439
71
0.692656
# -*- coding: utf-8 -*- # Copyright 2021 - 2021, Sean Mooney and the arbiterd contributors # SPDX-License-Identifier: Apache-2.0 import configparser import typing as ty from arbiterd.common import cpu def parse_nova_conf(nova_conf: str) -> configparser.ConfigParser: config = configparser.ConfigParser(interpolati...
0
0
0
0
0
805
0
6
159
92d497e92371584ebd1df6bf0aa6c2bb39ad029b
9,266
py
Python
retrograde/modules/gra_afch/__init__.py
Software-Knife-and-Tool/retrograde
1c9be80eb42e3bf395feba2fd99b9a29bef15925
[ "MIT" ]
null
null
null
retrograde/modules/gra_afch/__init__.py
Software-Knife-and-Tool/retrograde
1c9be80eb42e3bf395feba2fd99b9a29bef15925
[ "MIT" ]
44
2020-11-22T19:56:59.000Z
2021-06-15T22:42:01.000Z
retrograde/modules/gra_afch/__init__.py
Software-Knife-and-Tool/retrograde
1c9be80eb42e3bf395feba2fd99b9a29bef15925
[ "MIT" ]
null
null
null
########## ## ## SPDX-License-Identifier: MIT ## ## Copyright (c) 2017-2022 James M. Putnam <putnamjm.design@gmail.com> ## ########## ########## ## ## gra-afch controller ## ########### """Manage GRA-AFCH NCS31X hardware See module ncs31x for display/clock interface. Classes: GraAfch Functions: dump(obje...
29.509554
79
0.514246
########## ## ## SPDX-License-Identifier: MIT ## ## Copyright (c) 2017-2022 James M. Putnam <putnamjm.design@gmail.com> ## ########## ########## ## ## gra-afch controller ## ########### """Manage GRA-AFCH NCS31X hardware See module ncs31x for display/clock interface. Classes: GraAfch Functions: dump(obje...
0
0
0
8,413
0
0
0
22
180
85f464a00257f88848ce98d9706db18bf15eb15d
2,998
py
Python
meissner/__main__.py
terrylove19/meissner
14cedb73aa86172aac7af4031aa4670d26acc8ef
[ "MIT" ]
1
2022-01-27T10:16:46.000Z
2022-01-27T10:16:46.000Z
meissner/__main__.py
terrylove19/meissner
14cedb73aa86172aac7af4031aa4670d26acc8ef
[ "MIT" ]
null
null
null
meissner/__main__.py
terrylove19/meissner
14cedb73aa86172aac7af4031aa4670d26acc8ef
[ "MIT" ]
null
null
null
""" .@@# (@&*%@@@/,%@@@# #&@@@@&. .@@# /&@@@@&* /&@@@@&* (@&*%@@@( *%@@@@&/ .@@&*&@. (@@&((&@@@(/&@@, #@@#/(&@@. .@@# #@@(///(, .@@%////, (@@&(/#@@# #@@&//#@@( .@@@@@%. (@@. /@@* ,@@/ .&@@%%%&@@* .@@# ...
37.475
111
0.548699
""" .@@# (@&*%@@@/,%@@@# #&@@@@&. .@@# /&@@@@&* /&@@@@&* (@&*%@@@( *%@@@@&/ .@@&*&@. (@@&((&@@@(/&@@, #@@#/(&@@. .@@# #@@(///(, .@@%////, (@@&(/#@@# #@@&//#@@( .@@@@@%. (@@. /@@* ,@@/ .&@@%%%&@@* .@@# ...
0
161
0
191
0
0
0
0
23
99161f4405050317dc8d31e92ba3ec2ce76eea68
2,235
py
Python
certifiable/__init__.py
sys-git/certifiable
a3c33c0d4f3ac2c53be9eded3fae633fa5f697f8
[ "MIT" ]
null
null
null
certifiable/__init__.py
sys-git/certifiable
a3c33c0d4f3ac2c53be9eded3fae633fa5f697f8
[ "MIT" ]
311
2017-09-14T22:34:21.000Z
2022-03-27T18:30:17.000Z
certifiable/__init__.py
sys-git/certifiable
a3c33c0d4f3ac2c53be9eded3fae633fa5f697f8
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: latin-1 -*- # ____ ____ ____ ______ ______ ____ ______ ____ __ ____ # /\ _`\ /\ _`\ /\ _`\ /\__ _/\__ _\/\ _`\ /\ _ \/\ _`\ /\ \ /\ _`\ # \ \ \/\_\ \ \L\_\ \ \L\ \/_/\ \\/_/\ \/\ \ \L\_\ \ \L\ \ \ \L\ \ \ \ \ \ \L\_\ # \ \ \/_/\ \ _\L\ \ , ...
33.358209
97
0.587472
#!/usr/bin/env python # -*- coding: latin-1 -*- # ____ ____ ____ ______ ______ ____ ______ ____ __ ____ # /\ _`\ /\ _`\ /\ _`\ /\__ _/\__ _\/\ _`\ /\ _ \/\ _`\ /\ \ /\ _`\ # \ \ \/\_\ \ \L\_\ \ \L\ \/_/\ \\/_/\ \/\ \ \L\_\ \ \L\ \ \ \L\ \ \ \ \ \ \L\_\ # \ \ \/_/\ \ _\L\ \ , ...
0
0
0
0
0
0
0
116
45
07bfae00eeb43316afb302e4aa036a13d9396e3c
1,345
py
Python
example/compat.py
mattkatz/dynaconf
5f79f18ce031fcef7631b66b9eb0c311c6424d01
[ "MIT" ]
null
null
null
example/compat.py
mattkatz/dynaconf
5f79f18ce031fcef7631b66b9eb0c311c6424d01
[ "MIT" ]
null
null
null
example/compat.py
mattkatz/dynaconf
5f79f18ce031fcef7631b66b9eb0c311c6424d01
[ "MIT" ]
null
null
null
from dynaconf import LazySettings settings = LazySettings( DYNACONF_NAMESPACE='FOO', DYNACONF_SETTINGS_MODULE='foo.py', PROJECT_ROOT='/tmp', DYNACONF_SILENT_ERRORS=True, DYNACONF_ALWAYS_FRESH_VARS=['BAR'] ) assert settings.ENV_FOR_DYNACONF == 'FOO' assert settings.SETTINGS_MODULE_FOR_DYNACONF == ...
29.888889
56
0.81487
from dynaconf import LazySettings settings = LazySettings( DYNACONF_NAMESPACE='FOO', DYNACONF_SETTINGS_MODULE='foo.py', PROJECT_ROOT='/tmp', DYNACONF_SILENT_ERRORS=True, DYNACONF_ALWAYS_FRESH_VARS=['BAR'] ) assert settings.ENV_FOR_DYNACONF == 'FOO' assert settings.SETTINGS_MODULE_FOR_DYNACONF == ...
0
0
0
0
0
0
0
0
0
8688294bfc8d813dfe57824b275879de0265537b
4,475
py
Python
scripts/make_iso_input_file.py
marwahaha/MIST_codes
116fc4f85f985c869e225eaae1e023251629dee8
[ "MIT" ]
17
2016-05-19T01:49:11.000Z
2022-03-31T14:56:21.000Z
scripts/make_iso_input_file.py
arjanbik/MIST_codes
116fc4f85f985c869e225eaae1e023251629dee8
[ "MIT" ]
3
2016-05-25T15:44:38.000Z
2021-08-11T13:30:56.000Z
scripts/make_iso_input_file.py
arjanbik/MIST_codes
116fc4f85f985c869e225eaae1e023251629dee8
[ "MIT" ]
25
2016-11-18T19:30:00.000Z
2021-09-09T15:14:22.000Z
""" Generates the input file to the MIST isochrone code. Use in either the eep or iso mode. Args: runname: the name of the grid mode: determine if the the file is to make isochrones or eeps Returns: None Example: >>> make_iso_input_file('MIST_v0.1', 'eeps') """
40.681818
137
0.607151
""" Generates the input file to the MIST isochrone code. Use in either the eep or iso mode. Args: runname: the name of the grid mode: determine if the the file is to make isochrones or eeps Returns: None Example: >>> make_iso_input_file('MIST_v0.1', 'eeps') """ import glob import os im...
0
0
0
0
0
4,115
0
-25
90
df05cf12de434b7a4cb11b97a3c9f0048e5c8171
2,752
py
Python
iotawallet/gui/send.py
scottbelden/iotawallet
4b495b4a94ea7ad2ca593515e9dda10ffe8bb476
[ "MIT" ]
null
null
null
iotawallet/gui/send.py
scottbelden/iotawallet
4b495b4a94ea7ad2ca593515e9dda10ffe8bb476
[ "MIT" ]
null
null
null
iotawallet/gui/send.py
scottbelden/iotawallet
4b495b4a94ea7ad2ca593515e9dda10ffe8bb476
[ "MIT" ]
null
null
null
SPACER = (0, 0)
34.835443
80
0.590843
import wx from ..wallet import Wallet SPACER = (0, 0) class SendTab(wx.Panel): # type: ignore def __init__(self, parent: wx.Window, wallet: Wallet) -> None: super().__init__(parent) self.wallet = wallet self.create_send_tab() def create_send_tab(se...
0
0
0
2,672
0
0
0
-6
68
7a52120f4b6f320604b136fce855e1da180aabaa
1,997
py
Python
testsuite/tests/apicast/policy/test_default_credentials_policy.py
dlaso99/3scale-tests
b31a3b3596af6d632b393e383c0417ea56bd95ca
[ "Apache-2.0" ]
5
2021-11-04T14:09:24.000Z
2021-12-23T13:48:36.000Z
testsuite/tests/apicast/policy/test_default_credentials_policy.py
dlaso99/3scale-tests
b31a3b3596af6d632b393e383c0417ea56bd95ca
[ "Apache-2.0" ]
41
2021-11-03T14:27:21.000Z
2022-03-29T14:46:16.000Z
testsuite/tests/apicast/policy/test_default_credentials_policy.py
dlaso99/3scale-tests
b31a3b3596af6d632b393e383c0417ea56bd95ca
[ "Apache-2.0" ]
12
2021-11-03T17:28:31.000Z
2021-11-30T12:28:25.000Z
"Rewrite spec/functional_specs/policies/default_credentials_spec.rb" def test_default_credentials(a_client): "test default_credentials behavior" assert a_client.get("/get").status_code == 200
35.035088
99
0.751627
"Rewrite spec/functional_specs/policies/default_credentials_spec.rb" import pytest from threescale_api.resources import Service from testsuite import rawobj from testsuite.utils import blame @pytest.fixture(scope="module") def application(application, service): "Application with default_credentials policy conf...
0
1,574
0
0
0
0
0
34
183
b242ac360de6a7a7086d7b7218d722b4c0236654
1,798
py
Python
packages/tractography/mristudio_to_swc.py
justi/m2g
09e8b889889ee8d8fb08b9b6fcd726fb3d901644
[ "Apache-2.0" ]
12
2015-03-11T22:07:17.000Z
2016-01-29T21:24:29.000Z
packages/tractography/mristudio_to_swc.py
youngmook/m2g
09e8b889889ee8d8fb08b9b6fcd726fb3d901644
[ "Apache-2.0" ]
213
2015-01-30T16:02:57.000Z
2016-01-29T21:45:02.000Z
packages/tractography/mristudio_to_swc.py
youngmook/m2g
09e8b889889ee8d8fb08b9b6fcd726fb3d901644
[ "Apache-2.0" ]
5
2015-02-04T13:58:12.000Z
2016-01-29T21:24:46.000Z
#!/usr/bin/env python # Copyright 2014 Open Connectome Project (http://openconnecto.me) # # 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 # #...
29
107
0.67297
#!/usr/bin/env python # Copyright 2014 Open Connectome Project (http://openconnecto.me) # # 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 # #...
0
0
0
933
0
0
0
2
46
88172972b739ccfbabb46955126f913724d499b3
251
py
Python
lab/lab00.py
dani3lwinter/IML.HUJI
46b5e001b92d7bac3b7efa2278d0236b69159895
[ "MIT" ]
null
null
null
lab/lab00.py
dani3lwinter/IML.HUJI
46b5e001b92d7bac3b7efa2278d0236b69159895
[ "MIT" ]
null
null
null
lab/lab00.py
dani3lwinter/IML.HUJI
46b5e001b92d7bac3b7efa2278d0236b69159895
[ "MIT" ]
null
null
null
import sys sys.path.append("../") print(find_closest([1, 24, 12, 13, 14], 10))
13.944444
44
0.649402
import sys import numpy as np sys.path.append("../") from utils import * def create_cartesian_product(vec1, vec2): pass def find_closest(a, n): a = np.array(a) return np.min(np.abs(a-n)) print(find_closest([1, 24, 12, 13, 14], 10))
0
0
0
0
0
82
0
-5
91
1044eaf84965eeda15c2a91692f1484268ad0443
1,078
py
Python
src/ggrc_basic_permissions/migrations/versions/20150317135354_27432edbe6d4_add_unique_constraint_for_user_roles.py
Smotko/ggrc-core
b3abb58b24e7559960d71a94ba79c75539e7fe29
[ "Apache-2.0" ]
null
null
null
src/ggrc_basic_permissions/migrations/versions/20150317135354_27432edbe6d4_add_unique_constraint_for_user_roles.py
Smotko/ggrc-core
b3abb58b24e7559960d71a94ba79c75539e7fe29
[ "Apache-2.0" ]
12
2015-01-08T14:50:19.000Z
2017-11-29T19:37:53.000Z
src/ggrc_basic_permissions/migrations/versions/20150317135354_27432edbe6d4_add_unique_constraint_for_user_roles.py
mikecb/ggrc-core
1cda560cb0920021416e07740c6cca1acba56268
[ "ECL-2.0", "Apache-2.0" ]
1
2015-01-08T13:25:09.000Z
2015-01-08T13:25:09.000Z
# Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file> # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> # Created By: anze@reciprocitylabs.com # Maintained By: anze@reciprocitylabs.com """add unique constraint for user roles Revision ID: 27432edbe6d4 Revises: 3bb...
29.135135
218
0.746753
# Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file> # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> # Created By: anze@reciprocitylabs.com # Maintained By: anze@reciprocitylabs.com """add unique constraint for user roles Revision ID: 27432edbe6d4 Revises: 3bb...
0
0
0
0
0
508
0
3
91
2b7bc498ae4838f9d7d50e516a343f3a09283220
873
py
Python
zedenv/__init__.py
benyanke/zedenv
ca91d05fe74357b786b1a013f18351658e2a4a51
[ "BSD-3-Clause" ]
null
null
null
zedenv/__init__.py
benyanke/zedenv
ca91d05fe74357b786b1a013f18351658e2a4a51
[ "BSD-3-Clause" ]
null
null
null
zedenv/__init__.py
benyanke/zedenv
ca91d05fe74357b786b1a013f18351658e2a4a51
[ "BSD-3-Clause" ]
null
null
null
# __init__.py import subprocess __version__ = '0.2.0' def vcs_release(version: str): """ If in git repo, get git version """ try: git_hash = subprocess.check_output( ['git', 'rev-parse', '--short', 'HEAD'], universal_newlines=True, stderr=subprocess.PIPE) except s...
24.942857
85
0.627721
# __init__.py import subprocess __version__ = '0.2.0' def vcs_release(version: str): """ If in git repo, get git version """ try: git_hash = subprocess.check_output( ['git', 'rev-parse', '--short', 'HEAD'], universal_newlines=True, stderr=subprocess.PIPE) except s...
0
0
0
0
0
0
0
0
0
d821c28e1486dd2deb72a873e7ce437b4a192669
3,533
py
Python
flavio/physics/bdecays/bvll/amplitudes.py
Felicia56/flavio
ea735bd8febbb961d249eddf338a4960c1fbee69
[ "MIT" ]
61
2016-03-09T16:19:39.000Z
2022-03-30T00:55:51.000Z
flavio/physics/bdecays/bvll/amplitudes.py
Felicia56/flavio
ea735bd8febbb961d249eddf338a4960c1fbee69
[ "MIT" ]
167
2016-03-15T15:25:57.000Z
2022-02-27T22:19:22.000Z
flavio/physics/bdecays/bvll/amplitudes.py
Felicia56/flavio
ea735bd8febbb961d249eddf338a4960c1fbee69
[ "MIT" ]
57
2016-03-15T14:24:23.000Z
2022-01-14T01:00:03.000Z
"""Functions for constructing the helicity amplitudes""" from flavio.physics.bdecays.common import lambda_K, beta_l # get spectator scattering contribution # get subleading hadronic contribution at low q2
41.081395
121
0.680442
"""Functions for constructing the helicity amplitudes""" from flavio.physics.bdecays.common import lambda_K, beta_l from math import sqrt, pi from flavio.physics.bdecays.wilsoncoefficients import wctot_dict, get_wceff from flavio.physics.running import running from flavio.config import config from flavio.physics.bdeca...
0
0
0
0
0
2,634
0
286
401
606b47acd58fd4dd17c55fc84eba614a90158647
84
py
Python
platform/radio/efr32_multiphy_configurator/pyradioconfig/parts/unit_test_part/__init__.py
lmnotran/gecko_sdk
2e82050dc8823c9fe0e8908c1b2666fb83056230
[ "Zlib" ]
82
2016-06-29T17:24:43.000Z
2021-04-16T06:49:17.000Z
platform/radio/efr32_multiphy_configurator/pyradioconfig/parts/unit_test_part/__init__.py
lmnotran/gecko_sdk
2e82050dc8823c9fe0e8908c1b2666fb83056230
[ "Zlib" ]
6
2022-01-12T18:22:08.000Z
2022-03-25T10:19:27.000Z
platform/radio/efr32_multiphy_configurator/pyradioconfig/parts/unit_test_part/__init__.py
lmnotran/gecko_sdk
2e82050dc8823c9fe0e8908c1b2666fb83056230
[ "Zlib" ]
56
2016-08-02T10:50:50.000Z
2021-07-19T08:57:34.000Z
""" Test code used for unit tests lives here. Do not put production code here. """
14
41
0.702381
""" Test code used for unit tests lives here. Do not put production code here. """
0
0
0
0
0
0
0
0
0
e7d7276e87a2a43529f72b73e6e9c977003f554f
19,554
py
Python
mingle/utilities/phoenix_utils.py
jason-neal/companion_simulations
b5773e5539011d492b7128d0dd2778041ce50d52
[ "MIT" ]
1
2018-09-04T19:06:44.000Z
2018-09-04T19:06:44.000Z
mingle/utilities/phoenix_utils.py
jason-neal/companion_simulations
b5773e5539011d492b7128d0dd2778041ce50d52
[ "MIT" ]
85
2017-03-25T22:37:02.000Z
2022-03-01T16:49:14.000Z
mingle/utilities/phoenix_utils.py
jason-neal/companion_simulations
b5773e5539011d492b7128d0dd2778041ce50d52
[ "MIT" ]
1
2017-08-18T10:56:39.000Z
2017-08-18T10:56:39.000Z
"""Phoenix Utilities. Some functions to deal with phoenix models i.e. searching for models with certain parameters Jason Neal, January 2017 """ import glob import itertools import logging import os import warnings import Starfish import numpy as np from Starfish.grid_tools import HDF5Interface from logutils import B...
36.144177
123
0.644267
"""Phoenix Utilities. Some functions to deal with phoenix models i.e. searching for models with certain parameters Jason Neal, January 2017 """ import glob import itertools import logging import os import warnings import Starfish import numpy as np from Starfish.grid_tools import HDF5Interface from astropy.io import...
0
0
0
0
3,738
3,082
0
43
296
5d71a6fd59057f44b5149d32337e46b4adc3d7e9
8,062
py
Python
ahmia/solr_grouping_backend.py
keyboardcowboy42/ahmia
a474a30e77f002ddf2be771dbe5ee7371a3c0ec8
[ "BSD-3-Clause" ]
176
2015-01-12T10:27:28.000Z
2022-02-01T16:43:12.000Z
ahmia/solr_grouping_backend.py
keyboardcowboy42/ahmia
a474a30e77f002ddf2be771dbe5ee7371a3c0ec8
[ "BSD-3-Clause" ]
17
2015-01-05T11:58:51.000Z
2022-03-02T14:54:14.000Z
ahmia/solr_grouping_backend.py
keyboardcowboy42/ahmia
a474a30e77f002ddf2be771dbe5ee7371a3c0ec8
[ "BSD-3-Clause" ]
80
2015-01-07T14:43:36.000Z
2020-11-09T01:03:51.000Z
# encoding: utf-8 """Experimental Solr Grouping / Field Collapsing backend for Haystack 2.0""" # NOTE: You must be running the latest Pysolr master - no PyPI release yet! # See https://gist.github.com/3750774 for the current version of this code # See http://wiki.apache.org/solr/FieldCollapsing for the Solr feature doc...
39.326829
110
0.632721
# encoding: utf-8 """Experimental Solr Grouping / Field Collapsing backend for Haystack 2.0""" # NOTE: You must be running the latest Pysolr master - no PyPI release yet! # See https://gist.github.com/3750774 for the current version of this code # See http://wiki.apache.org/solr/FieldCollapsing for the Solr feature doc...
0
0
0
7,066
0
0
0
226
272
cbdab3e6e4d30e8dd46dc3d9430542aa328f9c5e
743
py
Python
digits-knn.py
WuzipengYL/2-scikit-learn-intro
afd1011d2fad77e85724f9d12591bc3574d3c51e
[ "Apache-2.0" ]
null
null
null
digits-knn.py
WuzipengYL/2-scikit-learn-intro
afd1011d2fad77e85724f9d12591bc3574d3c51e
[ "Apache-2.0" ]
null
null
null
digits-knn.py
WuzipengYL/2-scikit-learn-intro
afd1011d2fad77e85724f9d12591bc3574d3c51e
[ "Apache-2.0" ]
null
null
null
## K- from sklearn import datasets from sklearn.neighbors import KNeighborsClassifier ## digits = datasets.load_digits() X_digits = digits.data y_digits = digits.target n_samples = len(X_digits) ## #X_train = X_digits[:.9 * n_samples] #y_train = y_digits[:.9 * n_samples] #X_test = X_digits[.9 * n_samples:] #y_te...
20.081081
50
0.732167
## 这里我们用K-近邻估计来判断手写数字的扫描图像来判断数字是多少。 from sklearn import datasets from sklearn.neighbors import KNeighborsClassifier ## 导入数据 digits = datasets.load_digits() X_digits = digits.data y_digits = digits.target n_samples = len(X_digits) ## 拆分训练集和测试集 #X_train = X_digits[:.9 * n_samples] #y_train = y_digits[:.9 * n_samples...
231
0
0
0
0
0
0
0
0
d7ac50a8eb587719728dbff277531c620447d436
6,381
py
Python
DB/Database.py
fefelson/FelsonSports
bc0c16d63b19ffe4d468dcda5ab224013abe23fa
[ "MIT" ]
null
null
null
DB/Database.py
fefelson/FelsonSports
bc0c16d63b19ffe4d468dcda5ab224013abe23fa
[ "MIT" ]
null
null
null
DB/Database.py
fefelson/FelsonSports
bc0c16d63b19ffe4d468dcda5ab224013abe23fa
[ "MIT" ]
null
null
null
from .. import Environ as ENV ################################################################################ ################################################################################ checkTableCmd = "SELECT * FROM sqlite_master" indexCmd = "CREATE INDEX idx_{} ON {} ({})" updateCmd = "UPDATE {0[table]} S...
31.126829
166
0.542548
import os import sqlite3 import unicodedata import tarfile import json import shutil from .. import Environ as ENV from abc import ABCMeta, abstractmethod from itertools import chain from pprint import pprint ################################################################################ ###########################...
0
70
0
5,161
0
216
0
-19
268
afa2e8424b7013cdb4acfc58337a742581335e8a
667
py
Python
modulo 1/d004/tipoprimitivo.py
rafa-evangelista/PYTHON
761ec7e01f1617263bc023a6b82b599a936275ee
[ "MIT" ]
null
null
null
modulo 1/d004/tipoprimitivo.py
rafa-evangelista/PYTHON
761ec7e01f1617263bc023a6b82b599a936275ee
[ "MIT" ]
null
null
null
modulo 1/d004/tipoprimitivo.py
rafa-evangelista/PYTHON
761ec7e01f1617263bc023a6b82b599a936275ee
[ "MIT" ]
null
null
null
p = (input('Digite algo: ')) print('A varivel ', p, ' alfabtica? ', (p.isalpha())) print('A varivel ', p, ' numrica? ', (p.isnumeric())) print('A varivel ', p, ' alfanumrica? ', (p.isalnum())) print('A varivel ', p, ' dgito? ', (p.isdigit())) print('A varivel ', p, ' minscula? ', (p.islower())) print('A varivel ',...
55.583333
65
0.584708
p = (input('Digite algo: ')) print('A variável ', p, ' é alfabética? ', (p.isalpha())) print('A variável ', p, ' é numérica? ', (p.isnumeric())) print('A variável ', p, ' é alfanumérica? ', (p.isalnum())) print('A variável ', p, ' é dígito? ', (p.isdigit())) print('A variável ', p, ' é minúscula? ', (p.islower())) prin...
60
0
0
0
0
0
0
0
0
552e612284da911df93384aaa96e4ceeb40333db
274
py
Python
06/quad_eq.py
Siketyan/Programming-I
0749c1ae045d53cd8a67f0de7ab13c26030ddd74
[ "Apache-2.0" ]
null
null
null
06/quad_eq.py
Siketyan/Programming-I
0749c1ae045d53cd8a67f0de7ab13c26030ddd74
[ "Apache-2.0" ]
null
null
null
06/quad_eq.py
Siketyan/Programming-I
0749c1ae045d53cd8a67f0de7ab13c26030ddd74
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 # 2 import math print("2") a = float(input("a = ")) b = float(input("b = ")) c = float(input("c = ")) d = math.sqrt((b * b) - (4 * a * c)) x1 = (- b + d) / (2 * a) x2 = (- b - d) / (2 * a) print(" %6.2f %6.2f " %(x1, x2))
17.125
39
0.489051
# coding: utf-8 # 2次方程式の解を求める import math print("2次方程式の係数を入れてください") a = float(input("a = ")) b = float(input("b = ")) c = float(input("c = ")) d = math.sqrt((b * b) - (4 * a * c)) x1 = (- b + d) / (2 * a) x2 = (- b - d) / (2 * a) print("解は %6.2f と %6.2f です。" %(x1, x2))
93
0
0
0
0
0
0
0
0
0ad14b8593a4e18a694b203872fa03d40ab663c8
1,415
py
Python
armory/baseline_models/keras/resnet50.py
KyleBittner/armory
7e403d6aa9f8f60f34365de06cd990697a1c5b1c
[ "MIT" ]
1
2021-06-17T23:05:58.000Z
2021-06-17T23:05:58.000Z
armory/baseline_models/keras/resnet50.py
KyleBittner/armory
7e403d6aa9f8f60f34365de06cd990697a1c5b1c
[ "MIT" ]
null
null
null
armory/baseline_models/keras/resnet50.py
KyleBittner/armory
7e403d6aa9f8f60f34365de06cd990697a1c5b1c
[ "MIT" ]
null
null
null
""" ResNet50 CNN model for 244x244x3 image classification """ from typing import Optional import tensorflow as tf from art.classifiers import KerasClassifier from tensorflow.keras.applications.resnet50 import ResNet50 from tensorflow.keras.layers import Lambda from tensorflow.keras.models import Model IMAGENET_MEANS...
33.690476
115
0.737102
""" ResNet50 CNN model for 244x244x3 image classification """ from typing import Optional import tensorflow as tf from art.classifiers import KerasClassifier from tensorflow.keras.applications.resnet50 import ResNet50 from tensorflow.keras.layers import Lambda from tensorflow.keras.models import Model IMAGENET_MEANS...
0
0
0
0
0
0
0
0
0
4b59942824827c6641bf0499d42429470c8035b4
93,027
py
Python
src/python/attic/evenblocks.py
BBN-Q/pyqgl2
7acc8b244ee7799c21df03ecff8325e15cdb94d3
[ "Apache-2.0" ]
10
2017-09-30T14:31:42.000Z
2021-12-12T07:52:05.000Z
src/python/attic/evenblocks.py
BBN-Q/pyqgl2
7acc8b244ee7799c21df03ecff8325e15cdb94d3
[ "Apache-2.0" ]
56
2017-04-11T15:47:15.000Z
2019-10-11T15:50:35.000Z
src/python/attic/evenblocks.py
BBN-Q/pyqgl2
7acc8b244ee7799c21df03ecff8325e15cdb94d3
[ "Apache-2.0" ]
3
2019-06-20T07:08:39.000Z
2020-10-24T19:29:05.000Z
# Copyright 2016 by Raytheon BBN Technologies Corp. All Rights Reserved. # Note: This code is QGL not QGL2 # This file contains code to replace Barrier instructions with appropriate Id() # pulses to make channels line up without using a Wait where possible. # Where not possible, it replaces the Barrier with Sync the...
46.374377
411
0.602331
# Copyright 2016 by Raytheon BBN Technologies Corp. All Rights Reserved. # Note: This code is QGL not QGL2 # This file contains code to replace Barrier instructions with appropriate Id() # pulses to make channels line up without using a Wait where possible. # Where not possible, it replaces the Barrier with Sync the...
0
0
0
0
0
14,937
0
202
697
8f33c883632dd88e193a16cb271b82e81a1d018a
1,778
py
Python
ppjson.py
nightjuggler/peaks
9ef7596295648e070eb5b62c88564423916d84fa
[ "MIT" ]
1
2021-01-16T17:54:03.000Z
2021-01-16T17:54:03.000Z
ppjson.py
nightjuggler/peaks
9ef7596295648e070eb5b62c88564423916d84fa
[ "MIT" ]
null
null
null
ppjson.py
nightjuggler/peaks
9ef7596295648e070eb5b62c88564423916d84fa
[ "MIT" ]
null
null
null
# # ppjson.py - Pretty Print JSON # import sys level = 0 write = sys.stdout.write if __name__ == '__main__': main()
14.224
81
0.602362
# # ppjson.py - Pretty Print JSON # import sys def log(message, *formatArgs): print(message.format(*formatArgs), file=sys.stderr) level = 0 write = sys.stdout.write def writeTab(): write('\t' * level) def ppDict(o): global level, write n = len(o) if n == 0: write('{}') return if n == 1: write('{') fo...
0
0
0
0
0
1,521
0
0
138
7d3920167f2ff85fc145bda37fe2ad2ff4f17034
4,915
py
Python
src/cnrg/src/part_info.py
Abdumaleek/infinity-mirror
b493c5602d9e4bcf374b748e9b80e7c85be54a88
[ "MIT" ]
5
2020-03-13T02:54:03.000Z
2022-03-18T02:33:12.000Z
src/cnrg/src/part_info.py
Abdumaleek/infinity-mirror
b493c5602d9e4bcf374b748e9b80e7c85be54a88
[ "MIT" ]
2
2021-11-10T19:47:00.000Z
2022-02-10T01:24:59.000Z
src/cnrg/src/part_info.py
Abdumaleek/infinity-mirror
b493c5602d9e4bcf374b748e9b80e7c85be54a88
[ "MIT" ]
1
2021-05-24T21:54:44.000Z
2021-05-24T21:54:44.000Z
""" Partial info extraction and generation Partial boundary information containing node level info on boundary degree """ import random import networkx as nx import numpy as np from src.cnrg.src.LightMultiGraph import LightMultiGraph from src.cnrg.src.globals import find_boundary_edges def set_boundary_degrees_o...
34.612676
115
0.62238
""" Partial info extraction and generation Partial boundary information containing node level info on boundary degree """ import random import networkx as nx import numpy as np from src.cnrg.src.LightMultiGraph import LightMultiGraph from src.cnrg.src.globals import find_boundary_edges def set_boundary_degrees(g,...
0
0
0
0
0
401
0
0
23
3f4dea2d62030d0f427afb8a404d1182031975f7
11,515
py
Python
crowd_anki/config/config_ui.py
lukas-mertens/CrowdAnki
2961f9c073bc799f192235414408907632fc8211
[ "MIT" ]
null
null
null
crowd_anki/config/config_ui.py
lukas-mertens/CrowdAnki
2961f9c073bc799f192235414408907632fc8211
[ "MIT" ]
null
null
null
crowd_anki/config/config_ui.py
lukas-mertens/CrowdAnki
2961f9c073bc799f192235414408907632fc8211
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'ui_files/config.ui' # # Created by: PyQt5 UI code generator 5.13.1 # # WARNING! All changes made in this file will be lost!
94.385246
635
0.730873
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'ui_files/config.ui' # # Created by: PyQt5 UI code generator 5.13.1 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_Dialog(object): def setupUi(self, Dialog): Dialog...
0
0
0
11,243
0
0
0
21
46
e0142fa4ec05646b0e86910d593bf4e001e44504
8,615
py
Python
Utils/visualize_object_survey.py
arafin-lab/model_inversion_experiments
8e491f22ae847d8d0f2f31caed6ad0078c9b6a49
[ "Apache-2.0" ]
101
2018-10-26T14:39:19.000Z
2022-03-28T11:38:45.000Z
Utils/visualize_object_survey.py
zhampel/cyphercat
4029ae8683b9056013e6424d8931afe79afa618e
[ "Apache-2.0" ]
32
2018-10-10T23:02:04.000Z
2019-11-11T21:30:57.000Z
Utils/visualize_object_survey.py
zhampel/cyphercat
4029ae8683b9056013e6424d8931afe79afa618e
[ "Apache-2.0" ]
49
2018-10-05T17:54:49.000Z
2022-02-10T07:47:25.000Z
#!/usr/bin/python3 """ Set of functions used to call a series of algorithms used to visualize the object localization of a pre-trained network in PyTorch. The different algorithms are discussed in several papers, while the implementation is based, roughly, on work in the following repository (https://github.com/sar-...
32.509434
117
0.643645
#!/usr/bin/python3 """ Set of functions used to call a series of algorithms used to visualize the object localization of a pre-trained network in PyTorch. The different algorithms are discussed in several papers, while the implementation is based, roughly, on work in the following repository (https://github.com/sar-...
0
0
0
0
0
772
0
0
135
042732899e68080fe08c8f52ede7a73a878819ff
1,696
py
Python
tdclient/account_api.py
minchuang/td-client-python
6cf6dfbb60119f400274491d3e942d4f9fbcebd6
[ "Apache-2.0" ]
2
2019-02-22T11:56:17.000Z
2019-02-25T10:09:46.000Z
tdclient/account_api.py
minchuang/td-client-python
6cf6dfbb60119f400274491d3e942d4f9fbcebd6
[ "Apache-2.0" ]
null
null
null
tdclient/account_api.py
minchuang/td-client-python
6cf6dfbb60119f400274491d3e942d4f9fbcebd6
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python from __future__ import print_function from __future__ import unicode_literals
33.92
79
0.514151
#!/usr/bin/env python from __future__ import print_function from __future__ import unicode_literals import time class AccountAPI(object): #### ## Account API ## def show_account(self): """ TODO: add docstring """ with self.get("/v3/account/show") as res: c...
0
0
0
1,559
0
0
0
-10
46
7523dddeccce7c26beff51912adb1dd4fceff950
11,210
py
Python
logging_automation.py
aws-samples/aws-centeralized-logging-with-datadog
f1fb778664915b645a0fec5c56a34654ac761233
[ "MIT-0" ]
3
2020-02-05T03:52:33.000Z
2021-10-30T01:41:04.000Z
logging_automation.py
aws-samples/aws-centeralized-logging-with-datadog
f1fb778664915b645a0fec5c56a34654ac761233
[ "MIT-0" ]
null
null
null
logging_automation.py
aws-samples/aws-centeralized-logging-with-datadog
f1fb778664915b645a0fec5c56a34654ac761233
[ "MIT-0" ]
6
2018-09-06T05:48:07.000Z
2021-10-30T01:40:56.000Z
# Copyright 2008-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. # Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of the License is located at # http://aws.amazon.com/apache2.0/ # or in the "license" file accompanying...
46.322314
268
0.632739
# Copyright 2008-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. # Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of the License is located at # http://aws.amazon.com/apache2.0/ # or in the "license" file accompanying...
0
0
0
0
0
8,570
0
-16
136
04ed3e193b41cca7d967ab45758a87d8c8d2d08a
3,726
py
Python
examples/main.py
2020-ICT-insdeout/ICT-insideout
abccd30552f8f67bd7699fa38608d50bf920fff9
[ "MIT" ]
null
null
null
examples/main.py
2020-ICT-insdeout/ICT-insideout
abccd30552f8f67bd7699fa38608d50bf920fff9
[ "MIT" ]
null
null
null
examples/main.py
2020-ICT-insdeout/ICT-insideout
abccd30552f8f67bd7699fa38608d50bf920fff9
[ "MIT" ]
1
2022-03-16T05:59:22.000Z
2022-03-16T05:59:22.000Z
''' strates how to use `CNN` model from `speechemotionrecognition` package ''' import pulsectl pulse = pulsectl.Pulse('my-client-name') if __name__ == "__main__": lstm_example()
32.4
134
0.627751
''' strates how to use `CNN` model from `speechemotionrecognition` package ''' from keras.utils import np_utils import pulsectl import serial import time import os import sys import collections import webrtcvad import signal import subprocess import socket as sk import numpy as np from common import e...
0
0
0
0
0
2,980
0
126
420
7ca9789ce165ed243be6718a78e0afd7a24e5147
2,868
py
Python
src/python/pants/backend/native/register.py
billybecker/pants
ee101f3e360b712aceb9dacf7723aaf9b5567f04
[ "Apache-2.0" ]
94
2015-01-15T21:24:20.000Z
2022-02-16T16:55:43.000Z
src/python/pants/backend/native/register.py
billybecker/pants
ee101f3e360b712aceb9dacf7723aaf9b5567f04
[ "Apache-2.0" ]
5
2020-07-18T01:04:43.000Z
2021-05-10T08:40:56.000Z
src/python/pants/backend/native/register.py
billybecker/pants
ee101f3e360b712aceb9dacf7723aaf9b5567f04
[ "Apache-2.0" ]
47
2015-02-25T02:20:07.000Z
2022-03-21T00:59:16.000Z
# coding=utf-8 # Copyright 2018 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import absolute_import, division, print_function, unicode_literals
43.454545
97
0.791492
# coding=utf-8 # Copyright 2018 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import absolute_import, division, print_function, unicode_literals from pants.backend.native.config.environment import create_native_environment_rules from ...
0
0
0
0
0
1,099
0
1,046
489
e9cf7acd97a40ffdbac1b4a42da7f8b511a0e314
1,167
py
Python
problem_118.py
renxiaoyi/project_euler
2566482209cd225fce39887fe869f839cf88330e
[ "Unlicense" ]
null
null
null
problem_118.py
renxiaoyi/project_euler
2566482209cd225fce39887fe869f839cf88330e
[ "Unlicense" ]
null
null
null
problem_118.py
renxiaoyi/project_euler
2566482209cd225fce39887fe869f839cf88330e
[ "Unlicense" ]
null
null
null
import itertools import petools d = {} digits = range(1, 10) for l in range(1, len(digits)+1): for t in itertools.combinations(digits, l): key = str(Combine(sorted(t))) val = NumOfPrimesCat(t) if val > 0: d[key] = val ans = 0 for p in Part(str(Combine(digits)), d.keys()): ans += petools.Pr...
18.822581
70
0.579263
import itertools import petools def Combine(t): ret = 0 for i in t: ret *= 10 ret += i return ret def NumOfPrimesCat(s): if len(s) == 0: return 0 if len(s) == 1: return int(s[0] in [2, 3, 5, 7]) if sum(s) % 3 == 0: return 0 if all([x % 2 == 0 for x in s]): return 0 ret = 0 ...
0
0
0
0
256
441
0
0
115
cb14bed8fd4d80b5e2ad2efaf1d46a5dee88e7c8
16,824
py
Python
rmgpy/kinetics/kineticsdataTest.py
mbprend/RMG-Py
29e111d683f2daa0b376417be60e76b32ce8a993
[ "MIT" ]
null
null
null
rmgpy/kinetics/kineticsdataTest.py
mbprend/RMG-Py
29e111d683f2daa0b376417be60e76b32ce8a993
[ "MIT" ]
null
null
null
rmgpy/kinetics/kineticsdataTest.py
mbprend/RMG-Py
29e111d683f2daa0b376417be60e76b32ce8a993
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # # # RMG - Reaction Mechanism Generator # # ...
46.86351
116
0.599144
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # # # RMG - Reaction Mechanism Generator # # ...
0
0
0
14,252
0
0
0
40
114
fba2b02af14665d0ddace29de0d5019383f51be5
350
py
Python
requests_test/request_test_3.py
waws520waws/waws_spider
c6a5988121f32619a5c5134c09fdfd556c696fe7
[ "MIT" ]
null
null
null
requests_test/request_test_3.py
waws520waws/waws_spider
c6a5988121f32619a5c5134c09fdfd556c696fe7
[ "MIT" ]
null
null
null
requests_test/request_test_3.py
waws520waws/waws_spider
c6a5988121f32619a5c5134c09fdfd556c696fe7
[ "MIT" ]
null
null
null
# encoding:utf-8 """ requests POST postdata,get params """ import requests data = {"user":"admin","pwd":"admin"} headers = {"User-Agent": "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0);"} url = "https://httpbin.org/post" req = requests.post(url,data=data,headers=headers) print(req.content.decode("ut...
26.923077
92
0.702857
# encoding:utf-8 """ requests 的POST方法 注意post方式中传递的参数是data,而get 是params """ import requests data = {"user":"admin","pwd":"admin"} headers = {"User-Agent": "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0);"} url = "https://httpbin.org/post" req = requests.post(url,data=data,headers=headers) print(req.co...
48
0
0
0
0
0
0
0
0
5f8cca5795d2a214e46ae5e039dd2b525827f58f
1,260
py
Python
TapeEquilibrium.py
Cynthyah/Exercises
4c458cb518d8e77f2c51a9dd8d36eb4e4c73364c
[ "MIT" ]
null
null
null
TapeEquilibrium.py
Cynthyah/Exercises
4c458cb518d8e77f2c51a9dd8d36eb4e4c73364c
[ "MIT" ]
null
null
null
TapeEquilibrium.py
Cynthyah/Exercises
4c458cb518d8e77f2c51a9dd8d36eb4e4c73364c
[ "MIT" ]
null
null
null
# A non-empty array A consisting of N integers is given. Array A represents numbers on a tape. # Any integer P, such that 0 < P < N, splits this tape into two non-empty parts: # A[0], A[1], ..., A[P 1] and A[P], A[P + 1], ..., A[N 1]. # The difference between the two parts is the value of: |(A[0] + A[1] + ... + A[P ...
31.5
125
0.560317
# A non-empty array A consisting of N integers is given. Array A represents numbers on a tape. # Any integer P, such that 0 < P < N, splits this tape into two non-empty parts: # A[0], A[1], ..., A[P − 1] and A[P], A[P + 1], ..., A[N − 1]. # The difference between the two parts is the value of: |(A[0] + A[1] + ... + A[P...
30
0
0
0
0
323
0
0
23
b3198f38460196e85f4db1f61f3cb0834ada74e4
6,370
py
Python
ridt/tests/systemtests/test_st02.py
riskaware-ltd/ridt
c0288a2f814b2749bdf73de7157f7477ca271aff
[ "MIT" ]
null
null
null
ridt/tests/systemtests/test_st02.py
riskaware-ltd/ridt
c0288a2f814b2749bdf73de7157f7477ca271aff
[ "MIT" ]
9
2020-09-18T08:22:39.000Z
2021-07-20T09:39:59.000Z
ridt/tests/systemtests/test_st02.py
riskaware-ltd/ridt
c0288a2f814b2749bdf73de7157f7477ca271aff
[ "MIT" ]
1
2021-06-22T21:53:20.000Z
2021-06-22T21:53:20.000Z
import unittest if __name__ == "__main__": unittest.main()
39.079755
101
0.619466
import unittest import os import json from ridt.config import ConfigFileParser from ridt.config.ridtconfig import ConsistencyError from ridt.config.configfileparser import ConfigFileParserValidationError class ST02(unittest.TestCase): """System Test 02. The objective is to able to parse monitor points/...
0
0
0
6,090
0
0
0
78
136
feadbcdbbac786c3b04fd65e5a611ba0ead397a6
693
py
Python
setup.py
smkia/neuroCombat
d1a70c5f93284ec32a29bf2ba8c5addeea1089c7
[ "MIT" ]
null
null
null
setup.py
smkia/neuroCombat
d1a70c5f93284ec32a29bf2ba8c5addeea1089c7
[ "MIT" ]
null
null
null
setup.py
smkia/neuroCombat
d1a70c5f93284ec32a29bf2ba8c5addeea1089c7
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( author="Jean-Philippe Fortin, Nick Cullen, Tim Robert-Fitzgerald", author_email='fortin946@gmail.com,', classifiers=[ 'License :: OSI Approved :: MIT Lice...
26.653846
73
0.676768
#!/usr/bin/env python # -*- coding: utf-8 -*- import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( author="Jean-Philippe Fortin, Nick Cullen, Tim Robert-Fitzgerald", author_email='fortin946@gmail.com,', classifiers=[ 'License :: OSI Approved :: MIT Lice...
0
0
0
0
0
0
0
0
0
5c55da3acbe2a3fb755637361be2db476d2ff4cc
979
py
Python
UnitTests/test_type_checker.py
mjdroz/StatisticsCalculator
6be77b650b16e1c3e8ed6160905d99e58449e9b4
[ "MIT" ]
null
null
null
UnitTests/test_type_checker.py
mjdroz/StatisticsCalculator
6be77b650b16e1c3e8ed6160905d99e58449e9b4
[ "MIT" ]
18
2020-11-02T00:14:07.000Z
2020-11-09T04:07:07.000Z
UnitTests/test_type_checker.py
mjdroz/StatisticsCalculator
6be77b650b16e1c3e8ed6160905d99e58449e9b4
[ "MIT" ]
null
null
null
import unittest if __name__ == '__main__': unittest.main()
31.580645
61
0.733401
import unittest from AdditionalModules.type_checker import is_valid_number class MyTestCase(unittest.TestCase): def test_valid_whole_positive_number_string(self): self.assertTrue(is_valid_number("12345")) self.assertTrue(is_valid_number("123456")) def test_valid_negative_number_string(self): ...
0
0
0
832
0
0
0
37
45
be2c403274d5eaf1a9f49e212f01bb768a9e7069
59,185
py
Python
test/terra/backends/statevector_simulator/statevector_basics.py
sagarpahwa/qiskit-aer
77e40c8d99fd0490d85285e96f87e4905017b646
[ "Apache-2.0" ]
null
null
null
test/terra/backends/statevector_simulator/statevector_basics.py
sagarpahwa/qiskit-aer
77e40c8d99fd0490d85285e96f87e4905017b646
[ "Apache-2.0" ]
null
null
null
test/terra/backends/statevector_simulator/statevector_basics.py
sagarpahwa/qiskit-aer
77e40c8d99fd0490d85285e96f87e4905017b646
[ "Apache-2.0" ]
null
null
null
# This code is part of Qiskit. # # (C) Copyright IBM 2018, 2020. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivat...
45.986791
93
0.594019
# This code is part of Qiskit. # # (C) Copyright IBM 2018, 2020. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivat...
0
0
0
58,065
0
0
0
299
290
123ca78a2356ea365d65b74f4b9b8e4302d0f4f3
350
py
Python
account/migrations/0002_auto_20201105_1938.py
zzZ5/compost
00cc2cbc74df6626e07072c8c1e638ffd9bac8f1
[ "MIT" ]
1
2020-11-28T00:06:06.000Z
2020-11-28T00:06:06.000Z
account/migrations/0002_auto_20201105_1938.py
zzZ5/compost
00cc2cbc74df6626e07072c8c1e638ffd9bac8f1
[ "MIT" ]
null
null
null
account/migrations/0002_auto_20201105_1938.py
zzZ5/compost
00cc2cbc74df6626e07072c8c1e638ffd9bac8f1
[ "MIT" ]
null
null
null
# Generated by Django 3.0.8 on 2020-11-05 19:38
18.421053
47
0.568571
# Generated by Django 3.0.8 on 2020-11-05 19:38 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('account', '0001_initial'), ] operations = [ migrations.RenameField( model_name='user', old_name='name', new_name...
0
0
0
244
0
0
0
11
46
ca706a41024e87211c983a6cb0fdc4ec44bdb20f
331
py
Python
tests/config.py
cjolowicz/muckr-service
014017ab92bd1d2034cd398f2e98a6fdaf30f164
[ "MIT" ]
null
null
null
tests/config.py
cjolowicz/muckr-service
014017ab92bd1d2034cd398f2e98a6fdaf30f164
[ "MIT" ]
12
2018-12-21T22:13:33.000Z
2019-08-03T20:03:19.000Z
tests/config.py
cjolowicz/muckr-service
014017ab92bd1d2034cd398f2e98a6fdaf30f164
[ "MIT" ]
null
null
null
"""Configuration for the test app.""" ADMIN_USERNAME = "admin" ADMIN_EMAIL = "admin@localhost" ADMIN_PASSWORD = "9V0aGfEGAkQTfn8GICqHjAqCzodsUL6IVp02GmtKML8" BCRYPT_LOG_ROUNDS = 4 SECRET_KEY = "lzlD6LdPmLI6rX-4eEMUeLsIcnkXaDDQYqrAIKahsdY" SQLALCHEMY_DATABASE_URI = "sqlite://" SQLALCHEMY_TRACK_MODIFICATIONS = False TEST...
33.1
62
0.821752
"""Configuration for the test app.""" ADMIN_USERNAME = "admin" ADMIN_EMAIL = "admin@localhost" ADMIN_PASSWORD = "9V0aGfEGAkQTfn8GICqHjAqCzodsUL6IVp02GmtKML8" BCRYPT_LOG_ROUNDS = 4 SECRET_KEY = "lzlD6LdPmLI6rX-4eEMUeLsIcnkXaDDQYqrAIKahsdY" SQLALCHEMY_DATABASE_URI = "sqlite://" SQLALCHEMY_TRACK_MODIFICATIONS = False TEST...
0
0
0
0
0
0
0
0
0
06c1e791f45b52a84e1415581c12c0bffeacd27b
3,932
py
Python
colordistance/app.py
chriskiehl/color-distance-tool
aa44db7bde5509d4b909cd635bc07a78adb0f4f0
[ "MIT" ]
1
2020-10-31T07:58:23.000Z
2020-10-31T07:58:23.000Z
colordistance/app.py
chriskiehl/color-distance-tool
aa44db7bde5509d4b909cd635bc07a78adb0f4f0
[ "MIT" ]
null
null
null
colordistance/app.py
chriskiehl/color-distance-tool
aa44db7bde5509d4b909cd635bc07a78adb0f4f0
[ "MIT" ]
null
null
null
import wx import colordistance.core as core import colordistance.screen as screen if __name__ == '__main__': run()
32.229508
113
0.637335
import wx import wx.lib.mixins.inspection from pynput import mouse import sys import os import colordistance.core as core import colordistance.screen as screen from colordistance.components import ColorSelector, DifferenceLine from colordistance.util import assoc class Application(wx.Frame): """ Entry poin...
0
0
0
3,495
0
83
0
50
180
402a5f09a08992f4c3337ba570a6e028e88dbbac
657
py
Python
Conceptos/funciones_integradas.py
jaramosperez/Pythonizando
3571a6451b383ed5fea35f84e3444fd946c6560d
[ "MIT" ]
1
2020-07-13T04:34:34.000Z
2020-07-13T04:34:34.000Z
Conceptos/funciones_integradas.py
jaramosperez/Pythonizando
3571a6451b383ed5fea35f84e3444fd946c6560d
[ "MIT" ]
null
null
null
Conceptos/funciones_integradas.py
jaramosperez/Pythonizando
3571a6451b383ed5fea35f84e3444fd946c6560d
[ "MIT" ]
null
null
null
n = '10.5' print(n) float(n) print(n) cadena = "Un numero podra ser " + str(10) + ' y un decimal podria ser ' + str(12.4) print(cadena) # CONVERSION DE UN NUMERO A BINARIO print(bin(10)) # CONVERSION DE UN NUMERO A HEXADECIMAL print(hex(13)) #CONVERSION DE UNA CADENA A BINARIO print(int('0b1010', 2)) #CONVERSION DE ...
18.25
84
0.689498
n = '10.5' print(n) float(n) print(n) cadena = "Un numero podría ser " + str(10) + ' y un decimal podria ser ' + str(12.4) print(cadena) # CONVERSION DE UN NUMERO A BINARIO print(bin(10)) # CONVERSION DE UN NUMERO A HEXADECIMAL print(hex(13)) #CONVERSION DE UNA CADENA A BINARIO print(int('0b1010', 2)) #CONVERSION DE...
2
0
0
0
0
0
0
0
0
499c5dcfc041d8549b4e3d3dd514330f36a6074d
361
py
Python
test7.py
Tealaves/mypython
151f29eb720889710c7705a0c674b097bcec50f3
[ "Apache-2.0" ]
null
null
null
test7.py
Tealaves/mypython
151f29eb720889710c7705a0c674b097bcec50f3
[ "Apache-2.0" ]
null
null
null
test7.py
Tealaves/mypython
151f29eb720889710c7705a0c674b097bcec50f3
[ "Apache-2.0" ]
null
null
null
#!/bin/python print('I am:', __name__) if __name__ == '__main__': print(minmax(lessthan, 4, 2, 1, 5, 6, 3)) print(minmax(grtrthan, 4, 2, 1, 5, 6, 3))
20.055556
45
0.554017
#!/bin/python print('I am:', __name__) def minmax(test, *args): res = args[0] for arg in args[:-1]: if test(arg, res): res = arg return res def lessthan(x, y): return x < y def grtrthan(x, y): return x > y if __name__ == '__main__': print(minmax(lessthan, 4, 2, 1, 5, 6, 3)) p...
0
0
0
0
0
133
0
0
68
44a2faac9c8324a37b1a4590881412884bc6bc79
4,116
py
Python
xc7/utils/prjxray_create_place_constraints.py
mjasperse/symbiflow-arch-defs
ff3aedec45c0f886260b34ff5288482a89411d13
[ "ISC" ]
null
null
null
xc7/utils/prjxray_create_place_constraints.py
mjasperse/symbiflow-arch-defs
ff3aedec45c0f886260b34ff5288482a89411d13
[ "ISC" ]
null
null
null
xc7/utils/prjxray_create_place_constraints.py
mjasperse/symbiflow-arch-defs
ff3aedec45c0f886260b34ff5288482a89411d13
[ "ISC" ]
null
null
null
""" Convert a PCF file into a VPR io.place file. """ from __future__ import print_function if __name__ == '__main__': main()
24.35503
79
0.629981
""" Convert a PCF file into a VPR io.place file. """ from __future__ import print_function import argparse import sys import vpr_place_constraints import sqlite3 import lxml.etree as ET def get_tile_capacities(arch_xml_filename): arch = ET.parse(arch_xml_filename, ET.XMLParser(remove_blank_text=True)) root = ...
0
0
0
0
0
3,818
0
-15
179
ea5d3faa9c5f5e6eaf055e946f6ea32a73b4a57e
7,301
py
Python
da/examples/ratoken/spec.py
yagrawal-sbu/distalgo
10e6db89b7db05d3b076dcf9295ce4f189558323
[ "MIT" ]
null
null
null
da/examples/ratoken/spec.py
yagrawal-sbu/distalgo
10e6db89b7db05d3b076dcf9295ce4f189558323
[ "MIT" ]
null
null
null
da/examples/ratoken/spec.py
yagrawal-sbu/distalgo
10e6db89b7db05d3b076dcf9295ce4f189558323
[ "MIT" ]
null
null
null
# -*- generated by 1.0.9 -*- import da PatternExpr_243 = da.pat.TuplePattern([da.pat.ConstantPattern('access'), da.pat.FreePattern('newtok')]) PatternExpr_255 = da.pat.TuplePattern([da.pat.ConstantPattern('request'), da.pat.FreePattern('c'), da.pat.FreePattern('p')]) PatternExpr_283 = da.pat.TuplePattern([da.pat.Consta...
49
1,219
0.618819
# -*- generated by 1.0.9 -*- import da PatternExpr_243 = da.pat.TuplePattern([da.pat.ConstantPattern('access'), da.pat.FreePattern('newtok')]) PatternExpr_255 = da.pat.TuplePattern([da.pat.ConstantPattern('request'), da.pat.FreePattern('c'), da.pat.FreePattern('p')]) PatternExpr_283 = da.pat.TuplePattern([da.pat.Consta...
0
0
0
6,137
0
0
0
-11
68
819231ebcb82e1951e26b4701c363d5616596d38
13,846
py
Python
backend/moonstreamapi/providers/moonworm_provider.py
lsheiba/moonstream
1cead0413e3e7ad96e2cded6b9cc3a95c6b7e7e0
[ "Apache-2.0" ]
67
2021-07-22T11:09:30.000Z
2022-03-30T07:38:19.000Z
backend/moonstreamapi/providers/moonworm_provider.py
lsheiba/moonstream
1cead0413e3e7ad96e2cded6b9cc3a95c6b7e7e0
[ "Apache-2.0" ]
246
2021-07-19T15:40:59.000Z
2022-03-24T20:30:55.000Z
backend/moonstreamapi/providers/moonworm_provider.py
lsheiba/moonstream
1cead0413e3e7ad96e2cded6b9cc3a95c6b7e7e0
[ "Apache-2.0" ]
21
2021-07-25T18:36:05.000Z
2022-03-30T16:30:24.000Z
import logging from moonstreamdb.blockchain import AvailableBlockchainType from .. import data logger = logging.getLogger(__name__) logger.setLevel(logging.WARN) ethereum_event_type = "ethereum_blockchain" polygon_event_type = "polygon_blockchain" allowed_tags = ["tag:erc721"] description = f"""Event provider for ...
34.187654
178
0.640546
import logging from dataclasses import dataclass, field from typing import Any, Dict, List, Optional, Tuple, cast from bugout.app import Bugout from bugout.data import BugoutResource from moonstreamdb.blockchain import AvailableBlockchainType, get_label_model from sqlalchemy import and_, or_, text from sqlalchemy.orm ...
0
317
0
11,769
0
0
0
228
314
4fadd427d9e9cb1eb6aa7eccfdde1eb29b0ac329
4,994
py
Python
microscope/monitor/epresolver.py
cilium/microscope
db922b79fb28e500f9a2d1f749620485cfda9dc0
[ "Apache-2.0" ]
16
2018-04-24T16:54:41.000Z
2021-05-13T22:49:19.000Z
microscope/monitor/epresolver.py
cilium/microscope
db922b79fb28e500f9a2d1f749620485cfda9dc0
[ "Apache-2.0" ]
50
2018-02-06T11:32:46.000Z
2021-06-01T21:54:45.000Z
microscope/monitor/epresolver.py
cilium/monitor-mux
db922b79fb28e500f9a2d1f749620485cfda9dc0
[ "Apache-2.0" ]
4
2018-02-13T10:10:34.000Z
2022-02-28T11:50:41.000Z
# https://github.com/cilium/cilium/blob/master/pkg/identity/numericidentity.go#L33 reserved_identities = { 0: ["reserved:unknown"], 1: ["reserved:host"], 2: ["reserved:world"], 3: ["reserved:cluster"], 4: ["reserved:health"], 5: ["reserved:init"] }
33.972789
82
0.538046
from typing import Dict, List, Set, Callable # https://github.com/cilium/cilium/blob/master/pkg/identity/numericidentity.go#L33 reserved_identities = { 0: ["reserved:unknown"], 1: ["reserved:host"], 2: ["reserved:world"], 3: ["reserved:cluster"], 4: ["reserved:health"], 5: ["reserved:init"] } ...
0
0
0
4,454
0
174
0
23
68
6f98757d8929b926f6db70c57f06a707280ee1eb
3,229
py
Python
amqp_influxdb/tests/tests.py
cloudify-cosmo/cloudify-amqp-influxdb
60c1f99bcb04876bd6a148f2815d9c900602241b
[ "Apache-2.0" ]
3
2016-08-25T00:34:26.000Z
2017-05-11T09:46:44.000Z
amqp_influxdb/tests/tests.py
cloudify-cosmo/cloudify-amqp-influxdb
60c1f99bcb04876bd6a148f2815d9c900602241b
[ "Apache-2.0" ]
5
2015-03-16T19:53:25.000Z
2018-01-06T11:59:31.000Z
amqp_influxdb/tests/tests.py
cloudify-cosmo/cloudify-amqp-influxdb
60c1f99bcb04876bd6a148f2815d9c900602241b
[ "Apache-2.0" ]
6
2015-01-21T17:09:54.000Z
2017-03-27T02:06:06.000Z
######## # Copyright (c) 2014 GigaSpaces Technologies Ltd. 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...
29.623853
79
0.584391
######## # Copyright (c) 2014 GigaSpaces Technologies Ltd. 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...
0
0
0
1,217
0
992
0
44
248
e6e5d2f55796186a5638dbc834049ae6db8f09e8
486,178
py
Python
script.py
minecraft-design/minecraft-design.github.io
1b07c919e9dbc9a7e8c1833e2541fb5268d49a12
[ "MIT" ]
null
null
null
script.py
minecraft-design/minecraft-design.github.io
1b07c919e9dbc9a7e8c1833e2541fb5268d49a12
[ "MIT" ]
null
null
null
script.py
minecraft-design/minecraft-design.github.io
1b07c919e9dbc9a7e8c1833e2541fb5268d49a12
[ "MIT" ]
null
null
null
print("<!DOCTYPE html><html><body>") # arr =[[0, 152, 17, 252, 146, 88], [1, 260, 335, 63, 44, 17], [2, 53, 72, 130, 24, 80], [3, 352, 178, 32, 30, 287], [4, 80, 24, 17, 77, 28], [5, 85, 79, 276, 158, 63], [6, 376, 85, 16, 251, 382], [7, 17, 378, 16, 376, 384], [8, 79, 180, 183, 362, 85], [9, 80, 28, 17, 11, 36], [10, ...
5,227.72043
61,586
0.741782
print("<!DOCTYPE html><html><body>") # arr =[[0, 152, 17, 252, 146, 88], [1, 260, 335, 63, 44, 17], [2, 53, 72, 130, 24, 80], [3, 352, 178, 32, 30, 287], [4, 80, 24, 17, 77, 28], [5, 85, 79, 276, 158, 63], [6, 376, 85, 16, 251, 382], [7, 17, 378, 16, 376, 384], [8, 79, 180, 183, 362, 85], [9, 80, 28, 17, 11, 36], [10, ...
0
0
0
0
0
0
0
0
0
14d30ee0c043ae6980a427f35c470ba92110bfd2
1,446
py
Python
past-competitions/2018/src/brett-python/Prob07.py
gideontong/CodeQuest
8da4fe367221094cdf058402a4719ca0dc4bdaac
[ "MIT" ]
2
2021-05-23T01:21:59.000Z
2022-02-17T23:12:48.000Z
past-competitions/2018/src/brett-python/Prob07.py
gideontong/CodeQuest
8da4fe367221094cdf058402a4719ca0dc4bdaac
[ "MIT" ]
null
null
null
past-competitions/2018/src/brett-python/Prob07.py
gideontong/CodeQuest
8da4fe367221094cdf058402a4719ca0dc4bdaac
[ "MIT" ]
null
null
null
# Open the input file with open("Prob07.in.txt", "rt") as inputFile: # Read the number of test cases (trim out the newline) cases = int(inputFile.readline().replace("\n", "")) # For each test case for caseNum in range(cases): # Read the number of words wordCount = int(inputFile.readline(...
36.15
68
0.478562
# Open the input file with open("Prob07.in.txt", "rt") as inputFile: # Read the number of test cases (trim out the newline) cases = int(inputFile.readline().replace("\n", "")) # For each test case for caseNum in range(cases): # Read the number of words wordCount = int(inputFile.readline(...
0
0
0
0
0
0
0
0
0
8e677461788a883eb660d8987193edb44d9015eb
5,801
py
Python
see/context/resources/test/vbox_test.py
security-geeks/see
900472b8b3e45fbb414f3beba4df48e86eaa4b3a
[ "Apache-2.0" ]
851
2015-10-28T09:32:05.000Z
2022-03-31T02:32:28.000Z
see/context/resources/test/vbox_test.py
security-geeks/see
900472b8b3e45fbb414f3beba4df48e86eaa4b3a
[ "Apache-2.0" ]
29
2015-12-21T15:43:28.000Z
2021-05-16T10:57:09.000Z
see/context/resources/test/vbox_test.py
security-geeks/see
900472b8b3e45fbb414f3beba4df48e86eaa4b3a
[ "Apache-2.0" ]
110
2015-10-26T13:05:18.000Z
2021-11-17T18:00:17.000Z
import difflib def compare(text1, text2): """Utility function for comparing text and returining differences.""" diff = difflib.ndiff(text1.splitlines(True), text2.splitlines(True)) return '\n' + '\n'.join(diff)
44.968992
109
0.620927
import sys import mock import libvirt import difflib import unittest from see.context.resources import vbox def compare(text1, text2): """Utility function for comparing text and returining differences.""" diff = difflib.ndiff(text1.splitlines(True), text2.splitlines(True)) return '\n' + '\n'.join(diff) ...
0
2,048
0
3,338
0
0
0
-17
203
9888e98a07ee556543a1ef4aa21ba395358d4ab3
9,658
py
Python
D3G/main.py
uber-research/D3G
475a1f2491d32da6369846361d77e372908fd1df
[ "Apache-2.0" ]
25
2020-02-25T14:30:11.000Z
2021-07-05T18:42:32.000Z
D3G/main.py
uber-research/D3G
475a1f2491d32da6369846361d77e372908fd1df
[ "Apache-2.0" ]
null
null
null
D3G/main.py
uber-research/D3G
475a1f2491d32da6369846361d77e372908fd1df
[ "Apache-2.0" ]
5
2020-03-17T12:59:43.000Z
2020-10-06T20:34:15.000Z
""" Modifications Copyright (c) 2019 Uber Technologies, Inc. """ import numpy as np import torch import argparse import os import utils import TD3 import OurDDPG import D3G import Standard_QSS # Runs policy for X episodes and returns average reward # A fixed seed is used for the eval environment if __name__ == ...
41.273504
171
0.565231
""" Modifications Copyright (c) 2019 Uber Technologies, Inc. """ import numpy as np import cv2 import torch import gym import argparse import os import utils import TD3 import OurDDPG import D3G import Standard_QSS def done_condition(env_name, state): if 'Reacher' in env_name: return (np.abs(np.linalg.no...
0
0
0
0
0
2,054
0
-22
158
3317dfd8291d9c905fca53c341d286e90afbe3ff
342
py
Python
pythonProject/03al88Criar_Ler_escrever_apagar_arquivo/ler_modo_try.py
D-Wolter/PycharmProjects
c8d6144efa30261bff72a3e0414a0d80f6730f9b
[ "MIT" ]
null
null
null
pythonProject/03al88Criar_Ler_escrever_apagar_arquivo/ler_modo_try.py
D-Wolter/PycharmProjects
c8d6144efa30261bff72a3e0414a0d80f6730f9b
[ "MIT" ]
null
null
null
pythonProject/03al88Criar_Ler_escrever_apagar_arquivo/ler_modo_try.py
D-Wolter/PycharmProjects
c8d6144efa30261bff72a3e0414a0d80f6730f9b
[ "MIT" ]
null
null
null
#https://docs.python.org/3/libraty/functions.html#open #costumase usar o bloco try para abrir arquivos try: file = open('abc.txt', 'w+') file.write('Linha')# o arquivo esta vazio entao escrevemos file.seek(0) print(file.read()) finally: #para garantir que o arquivo sera fechado se holver e...
28.5
78
0.672515
#https://docs.python.org/3/libraty/functions.html#open #costumase usar o bloco try para abrir arquivos try: file = open('abc.txt', 'w+') file.write('Linha')# o arquivo esta vazio entao escrevemos file.seek(0) print(file.read()) finally: #para garantir que o arquivo sera fechado se holver e...
0
0
0
0
0
0
0
0
0
a37330d8bd84ef702161d82dfa4cbf7705b5dc92
3,406
py
Python
code.py
Namrata-NM/olympics-data-analysis
7490f33f9335077532f652709fce0301fa3ca67c
[ "MIT" ]
null
null
null
code.py
Namrata-NM/olympics-data-analysis
7490f33f9335077532f652709fce0301fa3ca67c
[ "MIT" ]
null
null
null
code.py
Namrata-NM/olympics-data-analysis
7490f33f9335077532f652709fce0301fa3ca67c
[ "MIT" ]
null
null
null
# -------------- #Importing header files import pandas as pd import numpy as np import matplotlib.pyplot as plt #Path of the file is stored in the variable path #Code starts here # Data Loading data=pd.read_csv(path) data.rename(columns={'Total':'Total_Medals'},inplace=True) data.head(10) # Summer or Winter data['B...
29.617391
107
0.745449
# -------------- #Importing header files import pandas as pd import numpy as np import matplotlib.pyplot as plt #Path of the file is stored in the variable path #Code starts here # Data Loading data=pd.read_csv(path) data.rename(columns={'Total':'Total_Medals'},inplace=True) data.head(10) # Summer or Winter data['B...
0
0
0
0
0
121
0
0
22
b1d982527a36cd045a0ec9f565af25b1ae1a1041
921
py
Python
hw9/task_3.py
DashViolin/gb_python_lvl1
ce4d6e8a717122c4d492b724b249d881c885d30c
[ "Apache-2.0" ]
1
2021-11-01T18:24:38.000Z
2021-11-01T18:24:38.000Z
hw9/task_3.py
DashViolin/gb_python_lvl1
ce4d6e8a717122c4d492b724b249d881c885d30c
[ "Apache-2.0" ]
1
2021-10-04T17:48:29.000Z
2021-10-04T17:48:29.000Z
hw9/task_3.py
DashViolin/gb_python_lvl1
ce4d6e8a717122c4d492b724b249d881c885d30c
[ "Apache-2.0" ]
null
null
null
welder = Position(name='Alex', surname='Murphy', position='welder', wage=120000, bonus=30000) print(welder) print(welder.get_full_name()) miller = Position(name='Anne', surname='Lewis', position='miller', wage=150000, bonus=24000) print(miller) print(miller.get_total_income())
27.909091
114
0.647123
from typing import Union class Worker: def __init__(self, name: str, surname: str, position: str, wage: Union[int, float], bonus: Union[int, float]): self.name = name.capitalize() self.surname = surname.capitalize() self.position = position self._income = { "wage": wage...
0
0
0
567
0
0
0
3
68
1274d5c5256b405787333273d1e01c0f02bbbaf3
9,903
py
Python
obstacle2osm.py
osmno/obstacle2osm
e45dad160812506f8dd6dddc1c89a75930710fab
[ "CC0-1.0" ]
1
2021-05-27T09:37:01.000Z
2021-05-27T09:37:01.000Z
obstacle2osm.py
osmno/obstacle2osm
e45dad160812506f8dd6dddc1c89a75930710fab
[ "CC0-1.0" ]
null
null
null
obstacle2osm.py
osmno/obstacle2osm
e45dad160812506f8dd6dddc1c89a75930710fab
[ "CC0-1.0" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf8 # obstacle2osm # Converts aviation obstacles from Kartverket WFS/GML files for import/update in OSM # Usage: obstacle2.osm [county] # Creates OSM file with name "Luftfartshinder_" + county + ".osm" import time import sys import urllib.request import json import zipfile from i...
28.456897
152
0.647783
#!/usr/bin/env python3 # -*- coding: utf8 # obstacle2osm # Converts aviation obstacles from Kartverket WFS/GML files for import/update in OSM # Usage: obstacle2.osm [county] # Creates OSM file with name "Luftfartshinder_" + county + ".osm" import html import time import sys import urllib.request import json import z...
30
0
0
0
0
136
0
-10
46
5c9603f2e0ac2abb46a8160361bd4405030226f9
377
py
Python
calibrate.py
etanzapinsky/voyeur
0b8e6b212dec93a9fee0bbf45e639d63c691cea9
[ "MIT" ]
null
null
null
calibrate.py
etanzapinsky/voyeur
0b8e6b212dec93a9fee0bbf45e639d63c691cea9
[ "MIT" ]
null
null
null
calibrate.py
etanzapinsky/voyeur
0b8e6b212dec93a9fee0bbf45e639d63c691cea9
[ "MIT" ]
null
null
null
# janky way to calibrate blinds to be open/closed to the right amount # edit this file to change UP/DOWN to move blinds in desired direction, # save and then run if __name__ == '__main__': main()
22.176471
71
0.708223
import time from blinds import Blinds, NEUTRAL, UP, DOWN # janky way to calibrate blinds to be open/closed to the right amount # edit this file to change UP/DOWN to move blinds in desired direction, # save and then run def main(): blinds = Blinds() blinds.run_servo(NEUTRAL + UP) time.sleep(1) blinds.r...
0
0
0
0
0
95
0
13
67
d3c9aa8d47bb2a5146cb0aeb909d6c72c15066cf
5,018
py
Python
test/test_compiler.py
timothyrenner/svl
a74c09c49f2e14046acd4b0eeb861f8fef6bca96
[ "MIT" ]
8
2019-03-27T12:49:21.000Z
2020-10-10T11:16:25.000Z
test/test_compiler.py
timothyrenner/svl
a74c09c49f2e14046acd4b0eeb861f8fef6bca96
[ "MIT" ]
65
2018-08-26T14:48:45.000Z
2020-03-17T12:24:42.000Z
test/test_compiler.py
timothyrenner/svl
a74c09c49f2e14046acd4b0eeb861f8fef6bca96
[ "MIT" ]
1
2019-09-13T19:39:07.000Z
2019-09-13T19:39:07.000Z
import pytest import os from jinja2 import Environment, BaseLoader from svl.compiler.compiler import _extract_additional_datasets, svl from svl.compiler.errors import (SvlSyntaxError, SvlMissingFileError, SvlPlotError, SvlDataLoadError, SvlDataProcessingError) CURRENT_DIR = os.path.dirname(os.path.abspath(__file__)...
27.723757
78
0.66381
import pytest import os from jinja2 import Environment, BaseLoader from svl.compiler.compiler import _extract_additional_datasets, svl from svl.compiler.errors import ( SvlSyntaxError, SvlMissingFileError, SvlPlotError, SvlDataLoadError, SvlDataProcessingError, ) CURRENT_DIR = os.path.dirname(os...
0
513
0
0
0
0
0
23
23
a2fa74364a6125d4e4765053cb76ca93208691d6
17,331
py
Python
rules/dr_default.py
00-ab/willows
14754329451b5a11a2ea626ecf939014c2bf4cac
[ "Unlicense" ]
null
null
null
rules/dr_default.py
00-ab/willows
14754329451b5a11a2ea626ecf939014c2bf4cac
[ "Unlicense" ]
null
null
null
rules/dr_default.py
00-ab/willows
14754329451b5a11a2ea626ecf939014c2bf4cac
[ "Unlicense" ]
null
null
null
from __future__ import print_function import math import copy import json dancer = { verbs : {} adjs: {} } # dancer describes the state of a conscious being # relation describes the feeling of one regarding another dancer["adjs"]["lust"] dancer["adjs"]["like"] # define the archetypal relations dancer["relati...
28.364975
104
0.667878
from __future__ import print_function import math import copy import json dancer = { verbs : {} adjs: {} } # dancer describes the state of a conscious being # relation describes the feeling of one regarding another dancer["adjs"]["lust"] dancer["adjs"]["like"] # define the archetypal relations dancer["relati...
0
0
0
59
0
1,342
0
0
366
29ccba1a2cac835de3bf2e7be861a69f13af32ef
4,653
py
Python
Arbre.py
AmadouSY/Construction-de-mobiles
5c954dc3d5fa99bbdce2bdab395008d863e6178c
[ "MIT" ]
null
null
null
Arbre.py
AmadouSY/Construction-de-mobiles
5c954dc3d5fa99bbdce2bdab395008d863e6178c
[ "MIT" ]
null
null
null
Arbre.py
AmadouSY/Construction-de-mobiles
5c954dc3d5fa99bbdce2bdab395008d863e6178c
[ "MIT" ]
null
null
null
##### CLASSE ARBRE ##### ###### CLASSE FEUILLE #####
26.140449
80
0.566301
##### CLASSE ARBRE ##### class Arbre: #Initialise l'arbre def __init__(self): #Valeur de l'arbre self.valeur = 0 #Fils gauche self.gauche = None #Fils droit self.droit = None #Position de l'arbre self.position = Position() def __str__(self): return "["+s...
0
0
0
4,528
0
0
0
0
69