hexsha
string | size
int64 | ext
string | lang
string | max_stars_repo_path
string | max_stars_repo_name
string | max_stars_repo_head_hexsha
string | max_stars_repo_licenses
list | max_stars_count
int64 | max_stars_repo_stars_event_min_datetime
string | max_stars_repo_stars_event_max_datetime
string | max_issues_repo_path
string | max_issues_repo_name
string | max_issues_repo_head_hexsha
string | max_issues_repo_licenses
list | max_issues_count
int64 | max_issues_repo_issues_event_min_datetime
string | max_issues_repo_issues_event_max_datetime
string | max_forks_repo_path
string | max_forks_repo_name
string | max_forks_repo_head_hexsha
string | max_forks_repo_licenses
list | max_forks_count
int64 | max_forks_repo_forks_event_min_datetime
string | max_forks_repo_forks_event_max_datetime
string | content
string | avg_line_length
float64 | max_line_length
int64 | alphanum_fraction
float64 | qsc_code_num_words_quality_signal
int64 | qsc_code_num_chars_quality_signal
float64 | qsc_code_mean_word_length_quality_signal
float64 | qsc_code_frac_words_unique_quality_signal
float64 | qsc_code_frac_chars_top_2grams_quality_signal
float64 | qsc_code_frac_chars_top_3grams_quality_signal
float64 | qsc_code_frac_chars_top_4grams_quality_signal
float64 | qsc_code_frac_chars_dupe_5grams_quality_signal
float64 | qsc_code_frac_chars_dupe_6grams_quality_signal
float64 | qsc_code_frac_chars_dupe_7grams_quality_signal
float64 | qsc_code_frac_chars_dupe_8grams_quality_signal
float64 | qsc_code_frac_chars_dupe_9grams_quality_signal
float64 | qsc_code_frac_chars_dupe_10grams_quality_signal
float64 | qsc_code_frac_chars_replacement_symbols_quality_signal
float64 | qsc_code_frac_chars_digital_quality_signal
float64 | qsc_code_frac_chars_whitespace_quality_signal
float64 | qsc_code_size_file_byte_quality_signal
float64 | qsc_code_num_lines_quality_signal
float64 | qsc_code_num_chars_line_max_quality_signal
float64 | qsc_code_num_chars_line_mean_quality_signal
float64 | qsc_code_frac_chars_alphabet_quality_signal
float64 | qsc_code_frac_chars_comments_quality_signal
float64 | qsc_code_cate_xml_start_quality_signal
float64 | qsc_code_frac_lines_dupe_lines_quality_signal
float64 | qsc_code_cate_autogen_quality_signal
float64 | qsc_code_frac_lines_long_string_quality_signal
float64 | qsc_code_frac_chars_string_length_quality_signal
float64 | qsc_code_frac_chars_long_word_length_quality_signal
float64 | qsc_code_frac_lines_string_concat_quality_signal
float64 | qsc_code_cate_encoded_data_quality_signal
float64 | qsc_code_frac_chars_hex_words_quality_signal
float64 | qsc_code_frac_lines_prompt_comments_quality_signal
float64 | qsc_code_frac_lines_assert_quality_signal
float64 | qsc_codepython_cate_ast_quality_signal
float64 | qsc_codepython_frac_lines_func_ratio_quality_signal
float64 | qsc_codepython_cate_var_zero_quality_signal
bool | qsc_codepython_frac_lines_pass_quality_signal
float64 | qsc_codepython_frac_lines_import_quality_signal
float64 | qsc_codepython_frac_lines_simplefunc_quality_signal
float64 | qsc_codepython_score_lines_no_logic_quality_signal
float64 | qsc_codepython_frac_lines_print_quality_signal
float64 | qsc_code_num_words
int64 | qsc_code_num_chars
int64 | qsc_code_mean_word_length
int64 | qsc_code_frac_words_unique
null | qsc_code_frac_chars_top_2grams
int64 | qsc_code_frac_chars_top_3grams
int64 | qsc_code_frac_chars_top_4grams
int64 | qsc_code_frac_chars_dupe_5grams
int64 | qsc_code_frac_chars_dupe_6grams
int64 | qsc_code_frac_chars_dupe_7grams
int64 | qsc_code_frac_chars_dupe_8grams
int64 | qsc_code_frac_chars_dupe_9grams
int64 | qsc_code_frac_chars_dupe_10grams
int64 | qsc_code_frac_chars_replacement_symbols
int64 | qsc_code_frac_chars_digital
int64 | qsc_code_frac_chars_whitespace
int64 | qsc_code_size_file_byte
int64 | qsc_code_num_lines
int64 | qsc_code_num_chars_line_max
int64 | qsc_code_num_chars_line_mean
int64 | qsc_code_frac_chars_alphabet
int64 | qsc_code_frac_chars_comments
int64 | qsc_code_cate_xml_start
int64 | qsc_code_frac_lines_dupe_lines
int64 | qsc_code_cate_autogen
int64 | qsc_code_frac_lines_long_string
int64 | qsc_code_frac_chars_string_length
int64 | qsc_code_frac_chars_long_word_length
int64 | qsc_code_frac_lines_string_concat
null | qsc_code_cate_encoded_data
int64 | qsc_code_frac_chars_hex_words
int64 | qsc_code_frac_lines_prompt_comments
int64 | qsc_code_frac_lines_assert
int64 | qsc_codepython_cate_ast
int64 | qsc_codepython_frac_lines_func_ratio
int64 | qsc_codepython_cate_var_zero
int64 | qsc_codepython_frac_lines_pass
int64 | qsc_codepython_frac_lines_import
int64 | qsc_codepython_frac_lines_simplefunc
int64 | qsc_codepython_score_lines_no_logic
int64 | qsc_codepython_frac_lines_print
int64 | effective
string | hits
int64 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1b360f7ecc6eae331a405cb9ec8f79880ab25c8d
| 146
|
py
|
Python
|
vacuum.py
|
aayn/vacuum-picar
|
2a8db4ae5c7fac1d020aa5866d171f937382863c
|
[
"MIT"
] | 2
|
2019-12-19T17:06:57.000Z
|
2020-05-27T22:47:25.000Z
|
vacuum.py
|
aayn/vacuum-picar
|
2a8db4ae5c7fac1d020aa5866d171f937382863c
|
[
"MIT"
] | null | null | null |
vacuum.py
|
aayn/vacuum-picar
|
2a8db4ae5c7fac1d020aa5866d171f937382863c
|
[
"MIT"
] | null | null | null |
"""I suck in the dust."""
class Vacuum(object):
def input(self):
"Dust."
def output(self):
print('Sucking in dust...')
| 14.6
| 35
| 0.534247
| 19
| 146
| 4.105263
| 0.736842
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.287671
| 146
| 9
| 36
| 16.222222
| 0.75
| 0.171233
| 0
| 0
| 0
| 0
| 0.190083
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.4
| false
| 0
| 0
| 0
| 0.6
| 0.2
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
1b5ac491885edbeb385c0d3f51ee8ded0062660f
| 6,169
|
py
|
Python
|
products/views.py
|
venkat0708/BalajiVV
|
ddf74d26a7ecae3f3bc5a902dcab09bf8f30e448
|
[
"MIT"
] | null | null | null |
products/views.py
|
venkat0708/BalajiVV
|
ddf74d26a7ecae3f3bc5a902dcab09bf8f30e448
|
[
"MIT"
] | null | null | null |
products/views.py
|
venkat0708/BalajiVV
|
ddf74d26a7ecae3f3bc5a902dcab09bf8f30e448
|
[
"MIT"
] | null | null | null |
from django.core.urlresolvers import reverse
from django.urls import reverse_lazy
from django.views import generic
from django.contrib.auth.mixins import UserPassesTestMixin,LoginRequiredMixin
from .models import Category,Product, Service
# Create your views here.
class CategoryIndexView(LoginRequiredMixin,UserPassesTestMixin,generic.ListView):
model = Category
template_name = 'categories/category_list.html'
context_object_name = 'category_list'
login_url = '/'
def test_func(self):
return 'product management' in [i.name for i in self.request.user.groups.all()]
class CategoryDetailView(LoginRequiredMixin,UserPassesTestMixin,generic.DetailView):
model = Category
template_name = 'categories/category_detail.html'
context_object_name = 'category'
login_url = '/'
def test_func(self):
return 'product management' in [i.name for i in self.request.user.groups.all()]
class CategoryCreateView(LoginRequiredMixin, UserPassesTestMixin,generic.edit.CreateView):
model = Category
fields = ['name','description']
template_name = 'categories/category_add.html'
login_url = '/'
def test_func(self):
return 'product management' in [i.name for i in self.request.user.groups.all()]
def get_success_url(self):
return reverse('products:Category_Index')
def test_func(self):
print (self.request.user.groups.all())
return 'product management' in [i.name for i in self.request.user.groups.all()]
class CategoryUpdateView(LoginRequiredMixin,UserPassesTestMixin,generic.edit.UpdateView):
model = Category
fields = ['name','description']
template_name = 'categories/category_update.html'
login_url = '/'
def test_func(self):
return 'product management' in [i.name for i in self.request.user.groups.all()]
class CategoryDeleteView(LoginRequiredMixin,UserPassesTestMixin,generic.edit.DeleteView):
model = Category
template_name = 'categories/category_delete.html'
success_url = reverse_lazy('products:Category_Index')
login_url = '/'
def test_func(self):
return 'product management' in [i.name for i in self.request.user.groups.all()]
class ProductIndexView(LoginRequiredMixin,UserPassesTestMixin,generic.ListView):
model = Product
template_name = 'products/products_list.html'
context_object_name = 'products_list'
login_url = '/'
def test_func(self):
return 'product management' in [i.name for i in self.request.user.groups.all()]
class ProductDetailView(LoginRequiredMixin,UserPassesTestMixin,generic.DetailView):
model = Product
template_name = 'products/product_detail.html'
context_object_name = 'product'
login_url = '/'
def test_func(self):
return 'product management' in [i.name for i in self.request.user.groups.all()]
class ProductCreateView(LoginRequiredMixin, UserPassesTestMixin,generic.edit.CreateView):
model = Product
fields = ['name','description','price','quantity','category']
template_name = 'products/product_add.html'
login_url = '/'
def test_func(self):
return 'product management' in [i.name for i in self.request.user.groups.all()]
def get_success_url(self):
return reverse('products:Product_Index')
def test_func(self):
print (self.request.user.groups.all())
return 'product management' in [i.name for i in self.request.user.groups.all()]
class ProductUpdateView(LoginRequiredMixin,UserPassesTestMixin,generic.edit.UpdateView):
model = Product
fields = ['name','description','price','quantity','category']
template_name = 'products/product_update.html'
login_url = '/'
def test_func(self):
return 'product management' in [i.name for i in self.request.user.groups.all()]
class ProductDeleteView(LoginRequiredMixin,UserPassesTestMixin,generic.edit.DeleteView):
model = Product
template_name = 'products/product_delete.html'
success_url = reverse_lazy('products:Product_Index')
login_url = '/'
def test_func(self):
return 'product management' in [i.name for i in self.request.user.groups.all()]
class ServiceIndexView(LoginRequiredMixin,UserPassesTestMixin,generic.ListView):
model = Service
template_name = 'services/services_list.html'
context_object_name = 'Services_list'
login_url = '/'
def test_func(self):
return 'product management' in [i.name for i in self.request.user.groups.all()]
class ServiceDetailView(LoginRequiredMixin,UserPassesTestMixin,generic.DetailView):
model = Service
template_name = 'services/service_detail.html'
context_object_name = 'Service'
login_url = '/'
def test_func(self):
return 'product management' in [i.name for i in self.request.user.groups.all()]
class ServiceCreateView(LoginRequiredMixin, UserPassesTestMixin,generic.edit.CreateView):
model = Service
fields = ['name','description','price','quantity','category']
template_name = 'services/service_add.html'
login_url = '/'
def test_func(self):
return 'product management' in [i.name for i in self.request.user.groups.all()]
def get_success_url(self):
return reverse('products:Service_Index')
def test_func(self):
print (self.request.user.groups.all())
return 'product management' in [i.name for i in self.request.user.groups.all()]
class ServiceUpdateView(LoginRequiredMixin,UserPassesTestMixin,generic.edit.UpdateView):
model = Service
fields = ['name','description','price','quantity','category']
template_name = 'services/service_update.html'
login_url = '/'
def test_func(self):
return 'product management' in [i.name for i in self.request.user.groups.all()]
class ServiceDeleteView(LoginRequiredMixin,UserPassesTestMixin,generic.edit.DeleteView):
model = Service
template_name = 'services/service_delete.html'
success_url = reverse_lazy('products:Service_Index')
login_url = '/'
def test_func(self):
return 'product management' in [i.name for i in self.request.user.groups.all()]
| 34.657303
| 90
| 0.720862
| 734
| 6,169
| 5.926431
| 0.110354
| 0.053103
| 0.072414
| 0.101379
| 0.867356
| 0.74
| 0.554483
| 0.527586
| 0.527586
| 0.498161
| 0
| 0
| 0.168585
| 6,169
| 177
| 91
| 34.853107
| 0.848119
| 0.003728
| 0
| 0.624
| 0
| 0
| 0.183919
| 0.090495
| 0
| 0
| 0
| 0
| 0
| 1
| 0.168
| false
| 0.128
| 0.04
| 0.144
| 0.976
| 0.024
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
|
0
| 4
|
1b5af6ddf4a86c8306772b0d251a019290957be7
| 1,379
|
gyp
|
Python
|
ui/file_manager/file_manager/foreground/elements/compiled_resources2.gyp
|
xzhan96/chromium.src
|
1bd0cf3997f947746c0fc5406a2466e7b5f6159e
|
[
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 1
|
2021-01-07T18:51:03.000Z
|
2021-01-07T18:51:03.000Z
|
ui/file_manager/file_manager/foreground/elements/compiled_resources2.gyp
|
emilio/chromium.src
|
1bd0cf3997f947746c0fc5406a2466e7b5f6159e
|
[
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null |
ui/file_manager/file_manager/foreground/elements/compiled_resources2.gyp
|
emilio/chromium.src
|
1bd0cf3997f947746c0fc5406a2466e7b5f6159e
|
[
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null |
# Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
{
'targets': [
# {
# 'target_name': 'files_icon_button',
# 'includes': ['../../../compile_js2.gypi'],
# },
# {
# 'target_name': 'files_metadata_box',
# 'includes': ['../../../compile_js2.gypi'],
# },
# {
# 'target_name': 'files_metadata_entry',
# 'includes': ['../../../compile_js2.gypi'],
# },
# {
# 'target_name': 'files_quick_view',
# 'includes': ['../../../compile_js2.gypi'],
# },
# {
# 'target_name': 'files_ripple',
# 'includes': ['../../../compile_js2.gypi'],
# },
# {
# 'target_name': 'files_safe_img',
# 'includes': ['../../../compile_js2.gypi'],
# },
# {
# 'target_name': 'files_safe_img_webview_content',
# 'includes': ['../../../compile_js2.gypi'],
# },
# {
# 'target_name': 'files_toast',
# 'includes': ['../../../compile_js2.gypi'],
# },
# {
# 'target_name': 'files_toggle_ripple',
# 'includes': ['../../../compile_js2.gypi'],
# },
# {
# 'target_name': 'files_tooltip',
# 'includes': ['../../../compile_js2.gypi'],
# },
# {
# 'target_name': 'files_tooltip_unittest',
# 'includes': ['../../../compile_js2.gypi'],
# },
],
}
| 26.519231
| 72
| 0.506164
| 127
| 1,379
| 5.15748
| 0.393701
| 0.167939
| 0.251908
| 0.369466
| 0.650382
| 0.650382
| 0.650382
| 0.424427
| 0.134351
| 0
| 0
| 0.014232
| 0.235678
| 1,379
| 51
| 73
| 27.039216
| 0.607211
| 0.913706
| 0
| 0
| 0
| 0
| 0.098592
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
1b98a0b4b8c47a16fd1a4b611db2d6670b5b579c
| 89
|
py
|
Python
|
mysite/aNewApp/apps.py
|
cs-fullstack-fall-2018/django-intro2-jpark1914
|
88c411c07a48b5d9e2ef9d5012952fc57daa09fb
|
[
"Apache-2.0"
] | null | null | null |
mysite/aNewApp/apps.py
|
cs-fullstack-fall-2018/django-intro2-jpark1914
|
88c411c07a48b5d9e2ef9d5012952fc57daa09fb
|
[
"Apache-2.0"
] | null | null | null |
mysite/aNewApp/apps.py
|
cs-fullstack-fall-2018/django-intro2-jpark1914
|
88c411c07a48b5d9e2ef9d5012952fc57daa09fb
|
[
"Apache-2.0"
] | null | null | null |
from django.apps import AppConfig
class AnewappConfig(AppConfig):
name = 'aNewApp'
| 14.833333
| 33
| 0.752809
| 10
| 89
| 6.7
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.168539
| 89
| 5
| 34
| 17.8
| 0.905405
| 0
| 0
| 0
| 0
| 0
| 0.078652
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
1bb0d975b96b6a434f3689da666b481503cc62a4
| 663
|
py
|
Python
|
postfix_mail_admin/models/user.py
|
dyachoksa/postfix-mail-admin
|
dca49176d0ca1d1af5c500d3cc0b800cc081ed32
|
[
"MIT"
] | 1
|
2020-12-08T15:45:32.000Z
|
2020-12-08T15:45:32.000Z
|
postfix_mail_admin/models/user.py
|
dyachoksa/postfix-mail-admin
|
dca49176d0ca1d1af5c500d3cc0b800cc081ed32
|
[
"MIT"
] | null | null | null |
postfix_mail_admin/models/user.py
|
dyachoksa/postfix-mail-admin
|
dca49176d0ca1d1af5c500d3cc0b800cc081ed32
|
[
"MIT"
] | null | null | null |
from passlib.hash import bcrypt
from .base import BaseModel
from ..services import db
class User(BaseModel):
"""Internal user account to access admin panel"""
__tablename__ = "users"
email = db.Column(
db.String(150), unique=True, nullable=False, info={"label": "Email"}
)
password = db.Column(
db.String(150), nullable=False, info={"label": "Password"},
)
def __repr__(self):
return f"<User {self.email}>"
def __str__(self):
return self.email
def __hash__(self):
return hash((self.id, self.email,))
def set_password(self, value):
self.password = bcrypt.hash(value)
| 22.1
| 76
| 0.627451
| 82
| 663
| 4.865854
| 0.47561
| 0.075188
| 0.090226
| 0.080201
| 0.095238
| 0
| 0
| 0
| 0
| 0
| 0
| 0.011881
| 0.238311
| 663
| 29
| 77
| 22.862069
| 0.778218
| 0.064857
| 0
| 0
| 0
| 0
| 0.076547
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.210526
| false
| 0.263158
| 0.157895
| 0.157895
| 0.736842
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
|
0
| 4
|
1bccd894dd05d9c00256171eb7f7f961077877ce
| 106
|
py
|
Python
|
python/splitDate.py
|
esix2/coffee-accounting
|
24337f48e3a1581df4dd5f50d1e17e9f6d89e13a
|
[
"MIT"
] | null | null | null |
python/splitDate.py
|
esix2/coffee-accounting
|
24337f48e3a1581df4dd5f50d1e17e9f6d89e13a
|
[
"MIT"
] | null | null | null |
python/splitDate.py
|
esix2/coffee-accounting
|
24337f48e3a1581df4dd5f50d1e17e9f6d89e13a
|
[
"MIT"
] | null | null | null |
def splitDate(date):
splitup = date.split('.')
return splitup[1], splitup[0], splitup[2]
| 21.2
| 49
| 0.584906
| 13
| 106
| 4.769231
| 0.692308
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.0375
| 0.245283
| 106
| 4
| 50
| 26.5
| 0.7375
| 0
| 0
| 0
| 0
| 0
| 0.009524
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
59edeb46071a0aa08e3cbfe2b31b96722db863f6
| 180
|
py
|
Python
|
food/urls.py
|
campbellmarianna/Restaurant-App
|
362eb14e59204f8e66a007caebc2706bb68a0944
|
[
"MIT"
] | 25
|
2017-08-13T02:47:20.000Z
|
2020-12-07T15:24:26.000Z
|
food/urls.py
|
campbellmarianna/Restaurant-App
|
362eb14e59204f8e66a007caebc2706bb68a0944
|
[
"MIT"
] | 5
|
2020-02-12T03:25:59.000Z
|
2021-06-10T22:27:22.000Z
|
food/urls.py
|
campbellmarianna/Restaurant-App
|
362eb14e59204f8e66a007caebc2706bb68a0944
|
[
"MIT"
] | 10
|
2017-12-29T07:57:30.000Z
|
2022-03-25T20:37:46.000Z
|
from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^$', views.index, name='index'),
url(r'api/list', views.get_rest_list, name='get_rest_list'),
]
| 22.5
| 64
| 0.677778
| 28
| 180
| 4.214286
| 0.535714
| 0.067797
| 0.186441
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.15
| 180
| 7
| 65
| 25.714286
| 0.771242
| 0
| 0
| 0
| 0
| 0
| 0.155556
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
59fa69d3c568232b669330ff21191f53463c0c2d
| 165
|
py
|
Python
|
orders/apps.py
|
City-of-Turku/munpalvelut_backend
|
9baa530f2f3405322f74ccc145641148f253341b
|
[
"MIT"
] | null | null | null |
orders/apps.py
|
City-of-Turku/munpalvelut_backend
|
9baa530f2f3405322f74ccc145641148f253341b
|
[
"MIT"
] | null | null | null |
orders/apps.py
|
City-of-Turku/munpalvelut_backend
|
9baa530f2f3405322f74ccc145641148f253341b
|
[
"MIT"
] | null | null | null |
#!/usr/bin/env python
# coding=utf-8
from __future__ import unicode_literals
from django.apps import AppConfig
class OrdersConfig(AppConfig):
name = 'orders'
| 16.5
| 39
| 0.763636
| 22
| 165
| 5.5
| 0.863636
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.007092
| 0.145455
| 165
| 9
| 40
| 18.333333
| 0.851064
| 0.2
| 0
| 0
| 0
| 0
| 0.046154
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
942211bbfce408fb27b03e86f6cd013cf2b621eb
| 219
|
py
|
Python
|
src/os_dbnetget/commands/qdb/processor.py
|
cfhamlet/os-dbnetget
|
09643e5fc8d8f912199cd54e7be1eeb17154be4b
|
[
"MIT"
] | 10
|
2018-12-04T14:23:41.000Z
|
2020-11-27T07:03:05.000Z
|
src/os_dbnetget/commands/qdb/processor.py
|
cfhamlet/os-dbnetget
|
09643e5fc8d8f912199cd54e7be1eeb17154be4b
|
[
"MIT"
] | 1
|
2018-12-14T13:03:37.000Z
|
2018-12-14T13:03:37.000Z
|
src/os_dbnetget/commands/qdb/processor.py
|
cfhamlet/os-dbnetget
|
09643e5fc8d8f912199cd54e7be1eeb17154be4b
|
[
"MIT"
] | 1
|
2019-03-01T06:29:48.000Z
|
2019-03-01T06:29:48.000Z
|
import logging
class Processor(object):
def __init__(self, config):
self.config = config
self._logger = logging.getLogger(self.__class__.__name__)
def process(self, data, proto):
pass
| 19.909091
| 65
| 0.6621
| 25
| 219
| 5.28
| 0.64
| 0.151515
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.242009
| 219
| 10
| 66
| 21.9
| 0.795181
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.285714
| false
| 0.142857
| 0.142857
| 0
| 0.571429
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 1
| 0
|
0
| 4
|
847295b74c93b2d777b65f81dd73ba399e636233
| 82
|
py
|
Python
|
Python/InSearchForAnEasyProblem.py
|
Zardosh/code-forces-solutions
|
ea1446b8e4f391f3e9ef63094816c7bdaded1557
|
[
"MIT"
] | null | null | null |
Python/InSearchForAnEasyProblem.py
|
Zardosh/code-forces-solutions
|
ea1446b8e4f391f3e9ef63094816c7bdaded1557
|
[
"MIT"
] | null | null | null |
Python/InSearchForAnEasyProblem.py
|
Zardosh/code-forces-solutions
|
ea1446b8e4f391f3e9ef63094816c7bdaded1557
|
[
"MIT"
] | null | null | null |
n = int(input())
print('EASY' if sum(map(int, input().split())) == 0 else "HARD")
| 27.333333
| 64
| 0.585366
| 14
| 82
| 3.428571
| 0.857143
| 0.333333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.014085
| 0.134146
| 82
| 3
| 64
| 27.333333
| 0.661972
| 0
| 0
| 0
| 0
| 0
| 0.096386
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.5
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
84defaf38226530b8bbd5ca5775c9feb26c69fdf
| 1,403
|
py
|
Python
|
remove-greek-accents.py
|
kyrpas/SublimeRemoveGreekAccents
|
92698de6f3004095459bccb0c3be5b4c2f9e3d40
|
[
"MIT"
] | null | null | null |
remove-greek-accents.py
|
kyrpas/SublimeRemoveGreekAccents
|
92698de6f3004095459bccb0c3be5b4c2f9e3d40
|
[
"MIT"
] | null | null | null |
remove-greek-accents.py
|
kyrpas/SublimeRemoveGreekAccents
|
92698de6f3004095459bccb0c3be5b4c2f9e3d40
|
[
"MIT"
] | null | null | null |
import sublime
import sublime_plugin
class RemoveGreekAccentsCommand(sublime_plugin.TextCommand):
def run(self, edit):
for region in self.view.sel():
if region.empty():
sublime.message_dialog(u'Remove Greek Accents: Please select some text')
else:
myString = self.view.substr(region)
myString = myString.replace('Ά' , 'Α')
myString = myString.replace('Έ' , 'Ε')
myString = myString.replace('Ή' , 'Η')
myString = myString.replace('Ί' , 'Ι')
myString = myString.replace('Ϊ' , 'Ι')
myString = myString.replace('Ϊ́' , 'Ι')
myString = myString.replace('Ό' , 'Ο')
myString = myString.replace('Ύ' , 'Υ')
myString = myString.replace('Ώ' , 'Ω')
myString = myString.replace('ά' , 'α')
myString = myString.replace('έ' , 'ε')
myString = myString.replace('ή' , 'η')
myString = myString.replace('ί' , 'ι')
myString = myString.replace('ϊ' , 'ι')
myString = myString.replace('ΐ' , 'ι')
myString = myString.replace('ό' , 'ο')
myString = myString.replace('ύ' , 'υ')
myString = myString.replace('ώ' , 'ω')
self.view.replace(edit, region, myString)
| 46.766667
| 88
| 0.507484
| 136
| 1,403
| 5.213235
| 0.345588
| 0.406206
| 0.583921
| 0.203103
| 0.634697
| 0.634697
| 0.634697
| 0.634697
| 0.634697
| 0.634697
| 0
| 0
| 0.350677
| 1,403
| 30
| 89
| 46.766667
| 0.778266
| 0
| 0
| 0
| 0
| 0
| 0.059117
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.035714
| false
| 0
| 0.071429
| 0
| 0.142857
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
84e6145e17d1249c421ae8fd22fb5fc243060c0a
| 57
|
py
|
Python
|
packages/core/minos-microservice-networks/tests/__init__.py
|
sorasful/minos-python
|
1189330eebf6444627a2af6b29f347670f95a4dd
|
[
"MIT"
] | 247
|
2022-01-24T14:55:30.000Z
|
2022-03-25T12:06:17.000Z
|
packages/core/minos-microservice-networks/tests/__init__.py
|
sorasful/minos-python
|
1189330eebf6444627a2af6b29f347670f95a4dd
|
[
"MIT"
] | 275
|
2021-04-03T09:23:40.000Z
|
2022-01-28T11:56:25.000Z
|
tests/__init__.py
|
Clariteia/minos_microservice_networks
|
77f239429653272c5cb3447311513143f8521ed9
|
[
"MIT"
] | 21
|
2022-02-06T17:25:58.000Z
|
2022-03-27T04:50:29.000Z
|
"""Unit test package for minos_microservice_networks."""
| 28.5
| 56
| 0.789474
| 7
| 57
| 6.142857
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.087719
| 57
| 1
| 57
| 57
| 0.826923
| 0.877193
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
170484d47a722f8a61dc61b72cb1f7eb86117ded
| 64
|
py
|
Python
|
Decorator/Python 3/IPrinter.py
|
kuuhaku86/design-patterns
|
9044ecbeb366fec97e27f1ec51e66d0fafdace07
|
[
"MIT"
] | 11
|
2022-03-24T15:08:06.000Z
|
2022-03-30T19:24:30.000Z
|
Decorator/Python 3/IPrinter.py
|
kuuhaku86/design-patterns
|
9044ecbeb366fec97e27f1ec51e66d0fafdace07
|
[
"MIT"
] | null | null | null |
Decorator/Python 3/IPrinter.py
|
kuuhaku86/design-patterns
|
9044ecbeb366fec97e27f1ec51e66d0fafdace07
|
[
"MIT"
] | null | null | null |
class IPrinter:
def print(self):
raise NotImplementedError
| 21.333333
| 29
| 0.765625
| 7
| 64
| 7
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.171875
| 64
| 3
| 29
| 21.333333
| 0.924528
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0
| 0
| 0.666667
| 0.333333
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
170589159b46e5b10981515b34e34c8b7ee6d230
| 30
|
py
|
Python
|
src/core/migrations/__init__.py
|
mheppner/django-x10
|
8c80688ccd702e101b204b34f2b6722a3596db77
|
[
"MIT"
] | null | null | null |
src/core/migrations/__init__.py
|
mheppner/django-x10
|
8c80688ccd702e101b204b34f2b6722a3596db77
|
[
"MIT"
] | null | null | null |
src/core/migrations/__init__.py
|
mheppner/django-x10
|
8c80688ccd702e101b204b34f2b6722a3596db77
|
[
"MIT"
] | null | null | null |
"""Core migration scripts."""
| 15
| 29
| 0.666667
| 3
| 30
| 6.666667
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.1
| 30
| 1
| 30
| 30
| 0.740741
| 0.766667
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
ca02936e72af90f01edcc552df305de39907153a
| 119
|
py
|
Python
|
chessresults/berkeleydb/__init__.py
|
RogerMarsh/chessresults
|
374d4f399a59c246c3d595157e45f3b15d3cf4be
|
[
"BSD-3-Clause"
] | null | null | null |
chessresults/berkeleydb/__init__.py
|
RogerMarsh/chessresults
|
374d4f399a59c246c3d595157e45f3b15d3cf4be
|
[
"BSD-3-Clause"
] | null | null | null |
chessresults/berkeleydb/__init__.py
|
RogerMarsh/chessresults
|
374d4f399a59c246c3d595157e45f3b15d3cf4be
|
[
"BSD-3-Clause"
] | null | null | null |
# __init__.py
# Copyright 2011 Roger Marsh
# Licence: See LICENCE (BSD licence)
"""results berkelelydb interface.
"""
| 17
| 36
| 0.731092
| 14
| 119
| 5.928571
| 0.857143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.039604
| 0.151261
| 119
| 6
| 37
| 19.833333
| 0.782178
| 0.882353
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
ca1ab586eab0bb6cd625f9809aa412552c1f34b6
| 1,824
|
py
|
Python
|
mit-ml/project0/main.py
|
stepinski/machinelearning
|
1f84883a25616da4cd76bb4655267efd3421e561
|
[
"MIT"
] | null | null | null |
mit-ml/project0/main.py
|
stepinski/machinelearning
|
1f84883a25616da4cd76bb4655267efd3421e561
|
[
"MIT"
] | null | null | null |
mit-ml/project0/main.py
|
stepinski/machinelearning
|
1f84883a25616da4cd76bb4655267efd3421e561
|
[
"MIT"
] | null | null | null |
import numpy as np
def randomization(n):
"""
Arg:
n - an integer
Returns:
A - a randomly-generated nx1 Numpy array.
"""
#Your code here
return np.random.random([n,1])
def operations(h, w):
"""
Takes two inputs, h and w, and makes two Numpy arrays A and B of size
h x w, and returns A, B, and s, the sum of A and B.
Arg:
h - an integer describing the height of A and B
w - an integer describing the width of A and B
Returns (in this order):
A - a randomly-generated h x w Numpy array.
B - a randomly-generated h x w Numpy array.
s - the sum of A and B.
"""
#Your code here
A=np.random.random([h,w])
B=np.random.random([h,w])
s=A+B
return A,B,s
def norm(A, B):
"""
Takes two Numpy column arrays, A and B, and returns the L2 norm of their
sum.
Arg:
A - a Numpy array
B - a Numpy array
Returns:
s - the L2 norm of A+B.
"""
#Your code here
return np.linalg.norm(A+B)
def neural_network(inputs, weights):
"""
Takes an input vector and runs it through a 1-layer neural network
with a given weight matrix and returns the output.
Arg:
inputs - 2 x 1 NumPy array
weights - 2 x 1 NumPy array
Returns (in this order):
out - a 1 x 1 NumPy array, representing the output of the neural network
"""
#Your code here
return np.tanh(np.matmul(np.transpose(weights),inputs))
def scalar_function(x, y):
"""
Returns the f(x,y) defined in the problem statement.
"""
#Your code here
return x*y if x<=y else x/y
def vector_function(x, y):
"""
Make sure vector_function can deal with vector input x,y
"""
#Your code here
tmp = np.vectorize(scalar_function)
return tmp(x,y)
| 23.384615
| 79
| 0.60307
| 306
| 1,824
| 3.578431
| 0.27451
| 0.073059
| 0.065753
| 0.065753
| 0.189954
| 0.082192
| 0.082192
| 0.056621
| 0
| 0
| 0
| 0.008661
| 0.303728
| 1,824
| 77
| 80
| 23.688312
| 0.853543
| 0.593202
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0.077922
| 0
| 1
| 0.352941
| false
| 0
| 0.058824
| 0
| 0.764706
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
ca29912e16556c0282e23140f453cd9e02d64d8e
| 140
|
py
|
Python
|
Grammar/programms/operators.py
|
Alberto42/Interpreter
|
a56c4d905672572734a8470ef607b66727489f15
|
[
"BSD-3-Clause"
] | null | null | null |
Grammar/programms/operators.py
|
Alberto42/Interpreter
|
a56c4d905672572734a8470ef607b66727489f15
|
[
"BSD-3-Clause"
] | null | null | null |
Grammar/programms/operators.py
|
Alberto42/Interpreter
|
a56c4d905672572734a8470ef607b66727489f15
|
[
"BSD-3-Clause"
] | null | null | null |
a = 2 < 3
b = 2 + 4
c = (1 <= 2 ) and (1 <= 3)
x = 1 + 2 * 3
y = 1 * 2 + 3
x = 2+3 < 2+1 or 2 < 3 and not not True
y = not True and False
| 15.555556
| 40
| 0.428571
| 37
| 140
| 1.621622
| 0.378378
| 0.166667
| 0.1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.235294
| 0.392857
| 140
| 9
| 41
| 15.555556
| 0.470588
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
0462eebef0b63faf8317695df7a6cf4685b2d074
| 64
|
py
|
Python
|
src/lamberthub/p_solvers/__init__.py
|
jorgepiloto/lamberthub
|
fedf6aaa939ee08e3bccb754b519397352cb5a84
|
[
"Apache-2.0"
] | 10
|
2021-05-18T11:16:09.000Z
|
2022-02-07T13:20:37.000Z
|
src/lamberthub/p_solvers/__init__.py
|
jorgepiloto/lamberthub
|
fedf6aaa939ee08e3bccb754b519397352cb5a84
|
[
"Apache-2.0"
] | 39
|
2021-05-18T10:08:58.000Z
|
2021-10-14T14:28:05.000Z
|
src/lamberthub/p_solvers/__init__.py
|
jorgepiloto/lamberthub
|
fedf6aaa939ee08e3bccb754b519397352cb5a84
|
[
"Apache-2.0"
] | 1
|
2021-10-21T15:00:00.000Z
|
2021-10-21T15:00:00.000Z
|
"""A sub-package holding all orbital parameter based solvers"""
| 32
| 63
| 0.765625
| 9
| 64
| 5.444444
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.125
| 64
| 1
| 64
| 64
| 0.875
| 0.890625
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
0464f04a33d8c01cd44d65ba827fc316b2a37f26
| 499
|
py
|
Python
|
pyblast/__init__.py
|
jvrana/pyblast
|
0f7ee7575e97470bfd05a2373d9c68247ec4ead0
|
[
"MIT"
] | 1
|
2021-07-16T16:29:02.000Z
|
2021-07-16T16:29:02.000Z
|
pyblast/__init__.py
|
jvrana/pyblast
|
0f7ee7575e97470bfd05a2373d9c68247ec4ead0
|
[
"MIT"
] | 8
|
2017-10-19T22:02:05.000Z
|
2020-04-09T20:45:23.000Z
|
pyblast/__init__.py
|
jvrana/pyblast2
|
573e3c52d8fff42c8a131b7d384e28065cd4e096
|
[
"MIT"
] | null | null | null |
""".. module:: pyblast.
Submodules
==========
.. autosummary::
:toctree: _autosummary
BioBlast
JSONBlast
BioBlastFactory
utils.Span
utils
"""
from .__bin__ import __bin__
from .__version__ import __authors__
from .__version__ import __homepage__
from .__version__ import __repo__
from .__version__ import __title__
from .__version__ import __version__
from .blast import BioBlast
from .blast import BioBlastFactory
from .blast import JSONBlast
from .cli import entrypoint
| 19.96
| 37
| 0.759519
| 52
| 499
| 6.346154
| 0.403846
| 0.166667
| 0.257576
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.164329
| 499
| 24
| 38
| 20.791667
| 0.791367
| 0.322645
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
04661320e54a5b6e453e549651f6e294bb90fd29
| 20
|
py
|
Python
|
tests/local_config.py
|
ScholarPack/environment-manager
|
9b9701dbae53be7b75968cf4873419b34f9971a7
|
[
"MIT"
] | null | null | null |
tests/local_config.py
|
ScholarPack/environment-manager
|
9b9701dbae53be7b75968cf4873419b34f9971a7
|
[
"MIT"
] | 1
|
2021-02-04T08:47:07.000Z
|
2021-02-04T08:47:07.000Z
|
tests/local_config.py
|
ScholarPack/flask-environment-manager
|
9b9701dbae53be7b75968cf4873419b34f9971a7
|
[
"MIT"
] | null | null | null |
TEST1 = 1
TEST2 = 2
| 6.666667
| 9
| 0.6
| 4
| 20
| 3
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.285714
| 0.3
| 20
| 2
| 10
| 10
| 0.571429
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
0481fe50b65df8244779b554d49156f72826255d
| 817
|
py
|
Python
|
aiotdlib/api/functions/clear_recently_found_chats.py
|
jraylan/aiotdlib
|
4528fcfca7c5c69b54a878ce6ce60e934a2dcc73
|
[
"MIT"
] | 37
|
2021-05-04T10:41:41.000Z
|
2022-03-30T13:48:05.000Z
|
aiotdlib/api/functions/clear_recently_found_chats.py
|
jraylan/aiotdlib
|
4528fcfca7c5c69b54a878ce6ce60e934a2dcc73
|
[
"MIT"
] | 13
|
2021-07-17T19:54:51.000Z
|
2022-02-26T06:50:00.000Z
|
aiotdlib/api/functions/clear_recently_found_chats.py
|
jraylan/aiotdlib
|
4528fcfca7c5c69b54a878ce6ce60e934a2dcc73
|
[
"MIT"
] | 7
|
2021-09-22T21:27:11.000Z
|
2022-02-20T02:33:19.000Z
|
# =============================================================================== #
# #
# This file has been generated automatically!! Do not change this manually! #
# #
# =============================================================================== #
from __future__ import annotations
from pydantic import Field
from ..base_object import BaseObject
class ClearRecentlyFoundChats(BaseObject):
"""
Clears the list of recently found chats
"""
ID: str = Field("clearRecentlyFoundChats", alias="@type")
@staticmethod
def read(q: dict) -> ClearRecentlyFoundChats:
return ClearRecentlyFoundChats.construct(**q)
| 34.041667
| 83
| 0.421053
| 50
| 817
| 6.78
| 0.78
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.328029
| 817
| 23
| 84
| 35.521739
| 0.617486
| 0.543452
| 0
| 0
| 1
| 0
| 0.081871
| 0.067251
| 0
| 0
| 0
| 0
| 0
| 1
| 0.125
| false
| 0
| 0.375
| 0.125
| 0.875
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
|
0
| 4
|
b6f42117ee54126965a0029bce0cebb72164d79d
| 191
|
py
|
Python
|
applications/contents/serializers.py
|
afmicc/python-target-api
|
6216721f61f4baae00e4d7281a7441ad0c30652f
|
[
"MIT"
] | null | null | null |
applications/contents/serializers.py
|
afmicc/python-target-api
|
6216721f61f4baae00e4d7281a7441ad0c30652f
|
[
"MIT"
] | 4
|
2020-07-08T18:21:42.000Z
|
2021-03-22T15:21:09.000Z
|
applications/contents/serializers.py
|
afmicc/python-target-api
|
6216721f61f4baae00e4d7281a7441ad0c30652f
|
[
"MIT"
] | 1
|
2020-07-29T22:11:27.000Z
|
2020-07-29T22:11:27.000Z
|
from rest_framework import serializers
from .models import Content
class ContentSerializer(serializers.ModelSerializer):
class Meta:
model = Content
exclude = ('id', )
| 19.1
| 53
| 0.712042
| 19
| 191
| 7.105263
| 0.736842
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.219895
| 191
| 9
| 54
| 21.222222
| 0.90604
| 0
| 0
| 0
| 0
| 0
| 0.010471
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
b6fdef7ae708cd28becc1c79ff0a475e546598c8
| 122
|
py
|
Python
|
Beginning-Python/11/11-6.py
|
llinmeng/PythonStudy
|
68c27eaa302b95aa4fb35d794f0d645f98b832dd
|
[
"MIT"
] | null | null | null |
Beginning-Python/11/11-6.py
|
llinmeng/PythonStudy
|
68c27eaa302b95aa4fb35d794f0d645f98b832dd
|
[
"MIT"
] | null | null | null |
Beginning-Python/11/11-6.py
|
llinmeng/PythonStudy
|
68c27eaa302b95aa4fb35d794f0d645f98b832dd
|
[
"MIT"
] | null | null | null |
# -*- coding: utf-8 -*-
f = open(filename)
char = f.read(1)
while char:
process(char)
char = f.read(1)
f.close()
| 15.25
| 23
| 0.565574
| 20
| 122
| 3.45
| 0.6
| 0.144928
| 0.26087
| 0.289855
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.031579
| 0.221311
| 122
| 7
| 24
| 17.428571
| 0.694737
| 0.172131
| 0
| 0.333333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
8e0a7ee83125105efad6d8f3dbbcb99e3549fd7f
| 6,434
|
py
|
Python
|
env/Lib/site-packages/sqlalchemy/util/__init__.py
|
m4573rn3rd/flaskaiml
|
076c4064a52e8717a80fc5e79304e1c5d889116c
|
[
"MIT"
] | null | null | null |
env/Lib/site-packages/sqlalchemy/util/__init__.py
|
m4573rn3rd/flaskaiml
|
076c4064a52e8717a80fc5e79304e1c5d889116c
|
[
"MIT"
] | null | null | null |
env/Lib/site-packages/sqlalchemy/util/__init__.py
|
m4573rn3rd/flaskaiml
|
076c4064a52e8717a80fc5e79304e1c5d889116c
|
[
"MIT"
] | 1
|
2021-06-20T19:28:37.000Z
|
2021-06-20T19:28:37.000Z
|
# util/__init__.py
# Copyright (C) 2005-2021 the SQLAlchemy authors and contributors
# <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
from collections import defaultdict
from contextlib import contextmanager
from functools import partial
from functools import update_wrapper
from ._collections import coerce_generator_arg
from ._collections import coerce_to_immutabledict
from ._collections import collections_abc
from ._collections import column_dict
from ._collections import column_set
from ._collections import EMPTY_DICT
from ._collections import EMPTY_SET
from ._collections import FacadeDict
from ._collections import flatten_iterator
from ._collections import has_dupes
from ._collections import has_intersection
from ._collections import IdentitySet
from ._collections import ImmutableContainer
from ._collections import immutabledict
from ._collections import ImmutableProperties
from ._collections import LRUCache
from ._collections import ordered_column_set
from ._collections import OrderedDict
from ._collections import OrderedIdentitySet
from ._collections import OrderedProperties
from ._collections import OrderedSet
from ._collections import PopulateDict
from ._collections import Properties
from ._collections import ScopedRegistry
from ._collections import sort_dictionary
from ._collections import ThreadLocalRegistry
from ._collections import to_column_set
from ._collections import to_list
from ._collections import to_set
from ._collections import unique_list
from ._collections import UniqueAppender
from ._collections import update_copy
from ._collections import WeakPopulateDict
from ._collections import WeakSequence
from ._preloaded import preload_module
from ._preloaded import preloaded
from .compat import ABC
from .compat import arm
from .compat import b
from .compat import b64decode
from .compat import b64encode
from .compat import binary_type
from .compat import byte_buffer
from .compat import callable
from .compat import cmp
from .compat import cpython
from .compat import dataclass_fields
from .compat import decode_backslashreplace
from .compat import dottedgetter
from .compat import has_refcount_gc
from .compat import inspect_getfullargspec
from .compat import int_types
from .compat import iterbytes
from .compat import itertools_filter
from .compat import itertools_filterfalse
from .compat import local_dataclass_fields
from .compat import namedtuple
from .compat import next
from .compat import nullcontext
from .compat import osx
from .compat import parse_qsl
from .compat import perf_counter
from .compat import pickle
from .compat import print_
from .compat import py2k
from .compat import py37
from .compat import py3k
from .compat import pypy
from .compat import quote_plus
from .compat import raise_
from .compat import raise_from_cause
from .compat import reduce
from .compat import reraise
from .compat import string_types
from .compat import StringIO
from .compat import text_type
from .compat import threading
from .compat import timezone
from .compat import TYPE_CHECKING
from .compat import u
from .compat import ue
from .compat import unquote
from .compat import unquote_plus
from .compat import win32
from .compat import with_metaclass
from .compat import zip_longest
from .concurrency import asyncio
from .concurrency import await_fallback
from .concurrency import await_only
from .concurrency import greenlet_spawn
from .concurrency import is_exit_exception
from .deprecations import deprecated
from .deprecations import deprecated_20
from .deprecations import deprecated_20_cls
from .deprecations import deprecated_cls
from .deprecations import deprecated_params
from .deprecations import inject_docstring_text
from .deprecations import moved_20
from .deprecations import SQLALCHEMY_WARN_20
from .deprecations import warn_deprecated
from .deprecations import warn_deprecated_20
from .langhelpers import add_parameter_text
from .langhelpers import as_interface
from .langhelpers import asbool
from .langhelpers import asint
from .langhelpers import assert_arg_type
from .langhelpers import attrsetter
from .langhelpers import bool_or_str
from .langhelpers import chop_traceback
from .langhelpers import class_hierarchy
from .langhelpers import classproperty
from .langhelpers import clsname_as_plain_name
from .langhelpers import coerce_kw_type
from .langhelpers import constructor_copy
from .langhelpers import constructor_key
from .langhelpers import counter
from .langhelpers import create_proxy_methods
from .langhelpers import decode_slice
from .langhelpers import decorator
from .langhelpers import dictlike_iteritems
from .langhelpers import duck_type_collection
from .langhelpers import ellipses_string
from .langhelpers import EnsureKWArgType
from .langhelpers import format_argspec_init
from .langhelpers import format_argspec_plus
from .langhelpers import generic_repr
from .langhelpers import get_callable_argspec
from .langhelpers import get_cls_kwargs
from .langhelpers import get_func_kwargs
from .langhelpers import getargspec_init
from .langhelpers import has_compiled_ext
from .langhelpers import HasMemoized
from .langhelpers import hybridmethod
from .langhelpers import hybridproperty
from .langhelpers import iterate_attributes
from .langhelpers import map_bits
from .langhelpers import md5_hex
from .langhelpers import memoized_instancemethod
from .langhelpers import memoized_property
from .langhelpers import MemoizedSlots
from .langhelpers import method_is_overridden
from .langhelpers import methods_equivalent
from .langhelpers import monkeypatch_proxied_specials
from .langhelpers import NoneType
from .langhelpers import only_once
from .langhelpers import PluginLoader
from .langhelpers import portable_instancemethod
from .langhelpers import quoted_token_parser
from .langhelpers import safe_reraise
from .langhelpers import set_creation_order
from .langhelpers import string_or_unprintable
from .langhelpers import symbol
from .langhelpers import unbound_method_to_callable
from .langhelpers import walk_subclasses
from .langhelpers import warn
from .langhelpers import warn_exception
from .langhelpers import warn_limited
from .langhelpers import wrap_callable
| 37.406977
| 70
| 0.839136
| 811
| 6,434
| 6.448829
| 0.293465
| 0.16348
| 0.228872
| 0.022945
| 0.091013
| 0
| 0
| 0
| 0
| 0
| 0
| 0.005197
| 0.132732
| 6,434
| 171
| 71
| 37.625731
| 0.932079
| 0.03466
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.006173
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0.012346
| 0
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
8e0f4645de64b6edb636ea8a6c75709482325236
| 170
|
py
|
Python
|
tpdatasrc/kotbfixes/scr/_include.py
|
edoipi/TemplePlus
|
f0e552289822fea908f16daa379fa568b1bd286d
|
[
"MIT"
] | 69
|
2015-05-05T14:09:25.000Z
|
2022-02-15T06:13:04.000Z
|
tpdatasrc/kotbfixes/scr/_include.py
|
edoipi/TemplePlus
|
f0e552289822fea908f16daa379fa568b1bd286d
|
[
"MIT"
] | 457
|
2015-05-01T22:07:45.000Z
|
2022-03-31T02:19:10.000Z
|
tpdatasrc/kotbfixes/scr/_include.py
|
edoipi/TemplePlus
|
f0e552289822fea908f16daa379fa568b1bd286d
|
[
"MIT"
] | 25
|
2016-02-04T21:19:53.000Z
|
2021-11-15T23:14:51.000Z
|
##Allows importing packages under \scr in game scripts. - Spellslinger
import sys
#modules are imported only once, thus this should suffice
sys.path.append("data\\scr")
| 28.333333
| 70
| 0.776471
| 25
| 170
| 5.28
| 0.92
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.135294
| 170
| 5
| 71
| 34
| 0.897959
| 0.729412
| 0
| 0
| 0
| 0
| 0.209302
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
8e1c8c857c071db4b2a955df53b5797ca0a25114
| 428
|
py
|
Python
|
src/cardiac_geometries/_gmsh/__init__.py
|
ComputationalPhysiology/cardiac_geometries
|
ce4a621f5f067554fca58460ddb1892189aadd99
|
[
"MIT"
] | 1
|
2022-01-31T11:14:08.000Z
|
2022-01-31T11:14:08.000Z
|
src/cardiac_geometries/_gmsh/__init__.py
|
ComputationalPhysiology/cardiac_geometries
|
ce4a621f5f067554fca58460ddb1892189aadd99
|
[
"MIT"
] | null | null | null |
src/cardiac_geometries/_gmsh/__init__.py
|
ComputationalPhysiology/cardiac_geometries
|
ce4a621f5f067554fca58460ddb1892189aadd99
|
[
"MIT"
] | null | null | null |
from ._lv_ellipsoid import create_benchmark_geometry_land15
from ._lv_ellipsoid import lv_ellipsoid
from ._lv_ellipsoid import lv_ellipsoid_flat_base
from ._lv_ellipsoid import prolate_lv_ellipsoid
from ._lv_ellipsoid import prolate_lv_ellipsoid_flat_base
__all__ = [
"lv_ellipsoid",
"lv_ellipsoid_flat_base",
"prolate_lv_ellipsoid_flat_base",
"prolate_lv_ellipsoid",
"create_benchmark_geometry_land15",
]
| 28.533333
| 59
| 0.827103
| 57
| 428
| 5.508772
| 0.210526
| 0.455414
| 0.238854
| 0.334395
| 0.678344
| 0.652866
| 0.449045
| 0
| 0
| 0
| 0
| 0.01061
| 0.119159
| 428
| 14
| 60
| 30.571429
| 0.822281
| 0
| 0
| 0
| 0
| 0
| 0.271028
| 0.196262
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.416667
| 0
| 0.416667
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
8e2b0341b9060b1484ca18244b84b30aacde3aaa
| 209
|
py
|
Python
|
scripts/MI01B_Preprocessing_imagesIDs.py
|
alanlegoallec/Age_Sex_and_Medical_Images
|
d2b57bef1484360e129e9e2c97d4ae535c68e9c9
|
[
"MIT"
] | null | null | null |
scripts/MI01B_Preprocessing_imagesIDs.py
|
alanlegoallec/Age_Sex_and_Medical_Images
|
d2b57bef1484360e129e9e2c97d4ae535c68e9c9
|
[
"MIT"
] | 4
|
2021-08-25T15:13:50.000Z
|
2022-02-09T23:58:01.000Z
|
scripts/MI01B_Preprocessing_imagesIDs.py
|
alanlegoallec/Age_Sex_and_Medical_Images
|
d2b57bef1484360e129e9e2c97d4ae535c68e9c9
|
[
"MIT"
] | null | null | null |
import sys
from MI_Classes import PreprocessingImagesIDs
# Compute results
Preprocessing_ImagesIDs = PreprocessingImagesIDs()
Preprocessing_ImagesIDs.generate_eids_splits()
# Exit
print('Done.')
sys.exit(0)
| 19
| 50
| 0.832536
| 23
| 209
| 7.347826
| 0.73913
| 0.260355
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.005263
| 0.090909
| 209
| 10
| 51
| 20.9
| 0.884211
| 0.095694
| 0
| 0
| 1
| 0
| 0.026882
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.333333
| 0.166667
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
f3f39bbb56054f4e558ee4b5b54776a507a748f4
| 60
|
py
|
Python
|
debug_gunicorn.py
|
Making-It/gunicorn
|
dc50f237ecb9f6e3402d6b6281d37b0fe8638f5e
|
[
"MIT"
] | null | null | null |
debug_gunicorn.py
|
Making-It/gunicorn
|
dc50f237ecb9f6e3402d6b6281d37b0fe8638f5e
|
[
"MIT"
] | null | null | null |
debug_gunicorn.py
|
Making-It/gunicorn
|
dc50f237ecb9f6e3402d6b6281d37b0fe8638f5e
|
[
"MIT"
] | null | null | null |
# coding=utf-8
from gunicorn.app.wsgiapp import run
run()
| 10
| 36
| 0.733333
| 10
| 60
| 4.4
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.019608
| 0.15
| 60
| 5
| 37
| 12
| 0.843137
| 0.2
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
6d105cc8a69d9a1f0416e6446eb47f54f83f139d
| 95
|
py
|
Python
|
kattis/carrots.py
|
Ashindustry007/competitive-programming
|
2eabd3975c029d235abb7854569593d334acae2f
|
[
"WTFPL"
] | 506
|
2018-08-22T10:30:38.000Z
|
2022-03-31T10:01:49.000Z
|
kattis/carrots.py
|
Ashindustry007/competitive-programming
|
2eabd3975c029d235abb7854569593d334acae2f
|
[
"WTFPL"
] | 13
|
2019-08-07T18:31:18.000Z
|
2020-12-15T21:54:41.000Z
|
kattis/carrots.py
|
Ashindustry007/competitive-programming
|
2eabd3975c029d235abb7854569593d334acae2f
|
[
"WTFPL"
] | 234
|
2018-08-06T17:11:41.000Z
|
2022-03-26T10:56:42.000Z
|
#!/usr/bin/env python2
# https://open.kattis.com/problems/carrots
print raw_input().split()[1]
| 23.75
| 42
| 0.726316
| 15
| 95
| 4.533333
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.022472
| 0.063158
| 95
| 3
| 43
| 31.666667
| 0.741573
| 0.652632
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 1
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
6d10a97644e5b29c77c16842b90d8f4b0d01dd17
| 23
|
py
|
Python
|
nflwin/_version.py
|
AndrewRook/NFLWin
|
4440f87676d87a52311c566f3b241a11a64a440c
|
[
"MIT"
] | 15
|
2016-09-12T16:16:54.000Z
|
2021-12-28T03:28:50.000Z
|
nflwin/_version.py
|
pretzel583/NFLWin
|
4440f87676d87a52311c566f3b241a11a64a440c
|
[
"MIT"
] | 12
|
2016-06-10T01:52:49.000Z
|
2019-10-18T00:51:12.000Z
|
nflwin/_version.py
|
pretzel583/NFLWin
|
4440f87676d87a52311c566f3b241a11a64a440c
|
[
"MIT"
] | 8
|
2017-05-21T17:04:01.000Z
|
2021-12-28T03:27:34.000Z
|
__version__ = u"1.0.1"
| 11.5
| 22
| 0.652174
| 5
| 23
| 2.2
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.15
| 0.130435
| 23
| 1
| 23
| 23
| 0.4
| 0
| 0
| 0
| 0
| 0
| 0.217391
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
6d2bf07234ec69b64975bc62ed8e9153fe735e33
| 193
|
py
|
Python
|
stocks/apps.py
|
dcopm999/pharmcrm2-stocks
|
25a928f0cf7f97d48ec88f56aa0257c499e1ff7e
|
[
"MIT"
] | null | null | null |
stocks/apps.py
|
dcopm999/pharmcrm2-stocks
|
25a928f0cf7f97d48ec88f56aa0257c499e1ff7e
|
[
"MIT"
] | null | null | null |
stocks/apps.py
|
dcopm999/pharmcrm2-stocks
|
25a928f0cf7f97d48ec88f56aa0257c499e1ff7e
|
[
"MIT"
] | null | null | null |
# -*- coding: utf-8
from django.apps import AppConfig
from django.utils.translation import gettext_lazy as _
class StocksConfig(AppConfig):
name = "stocks"
verbose_name = _("stocks")
| 21.444444
| 54
| 0.73057
| 24
| 193
| 5.708333
| 0.75
| 0.145985
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.006211
| 0.165803
| 193
| 8
| 55
| 24.125
| 0.844721
| 0.088083
| 0
| 0
| 0
| 0
| 0.068966
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.4
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
6d57f881e93063a822a9f7badd231b9b2020bdf5
| 124
|
py
|
Python
|
CommentAnalyze/Taobao/step4_sentiments/train_model/train.py
|
seriouszyx/software-engineering
|
0a961b9e38104027b0fd98e1ad36d3d118a84dd9
|
[
"MIT"
] | 15
|
2019-12-12T13:45:02.000Z
|
2022-03-13T05:02:51.000Z
|
CommentAnalyze/Taobao/step4_sentiments/train_model/train.py
|
seriouszyx/software-engineering
|
0a961b9e38104027b0fd98e1ad36d3d118a84dd9
|
[
"MIT"
] | null | null | null |
CommentAnalyze/Taobao/step4_sentiments/train_model/train.py
|
seriouszyx/software-engineering
|
0a961b9e38104027b0fd98e1ad36d3d118a84dd9
|
[
"MIT"
] | 5
|
2019-12-12T12:34:03.000Z
|
2022-03-13T05:02:54.000Z
|
from snownlp import sentiment
sentiment.train('negative_dict.txt', 'positive_dict.txt')
sentiment.save('sentiment.marshal')
| 31
| 57
| 0.814516
| 16
| 124
| 6.1875
| 0.6875
| 0.141414
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.056452
| 124
| 4
| 58
| 31
| 0.846154
| 0
| 0
| 0
| 0
| 0
| 0.408
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
6d62cbed0b130f7e6fea0afc949d9491c5a9add4
| 162
|
py
|
Python
|
zsync/__init__.py
|
presslabs/zsync
|
46b7cecaa2473d17306cdc686c1649ffdeee6633
|
[
"MIT"
] | 1
|
2018-07-11T14:55:54.000Z
|
2018-07-11T14:55:54.000Z
|
zsync/__init__.py
|
presslabs/zsync
|
46b7cecaa2473d17306cdc686c1649ffdeee6633
|
[
"MIT"
] | null | null | null |
zsync/__init__.py
|
presslabs/zsync
|
46b7cecaa2473d17306cdc686c1649ffdeee6633
|
[
"MIT"
] | null | null | null |
from .pipeable import Pipeable
from .receivable import Receivable
from .sync import Sync
from .s3 import S3
from .local import Local
from .remote import Remote
| 18
| 34
| 0.802469
| 24
| 162
| 5.416667
| 0.333333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.014706
| 0.160494
| 162
| 8
| 35
| 20.25
| 0.941176
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
ed8d67674498425cf766d04daf89b8ad67de8612
| 200
|
py
|
Python
|
setup.py
|
chaosfissure/smartgrad
|
11a7ee7f72e782dc5f1378dea26f69d16cef5085
|
[
"MIT"
] | null | null | null |
setup.py
|
chaosfissure/smartgrad
|
11a7ee7f72e782dc5f1378dea26f69d16cef5085
|
[
"MIT"
] | null | null | null |
setup.py
|
chaosfissure/smartgrad
|
11a7ee7f72e782dc5f1378dea26f69d16cef5085
|
[
"MIT"
] | null | null | null |
from distutils.core import setup
from Cython.Build import cythonize
import numpy
setup(
ext_modules = cythonize('*.pyx', annotate=True, language_level=3),
include_dirs = [numpy.get_include()],
)
| 22.222222
| 68
| 0.76
| 27
| 200
| 5.481481
| 0.740741
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.005714
| 0.125
| 200
| 9
| 69
| 22.222222
| 0.84
| 0
| 0
| 0
| 0
| 0
| 0.024876
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.428571
| 0
| 0.428571
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
edf6aaa820589edf62ee6fe31c557d343b1537f8
| 266
|
py
|
Python
|
EvaMap/Dimensions/Coverability.py
|
benjimor/EvaMap
|
42e616abe9f15925b885797d30496e30615989a0
|
[
"MIT"
] | 1
|
2021-01-29T18:53:26.000Z
|
2021-01-29T18:53:26.000Z
|
EvaMap/Dimensions/Coverability.py
|
benjimor/EvaMap
|
42e616abe9f15925b885797d30496e30615989a0
|
[
"MIT"
] | 1
|
2021-06-06T17:56:00.000Z
|
2021-06-06T17:56:00.000Z
|
EvaMap/Dimensions/Coverability.py
|
benjimor/EvaMap
|
42e616abe9f15925b885797d30496e30615989a0
|
[
"MIT"
] | null | null | null |
from EvaMap.Dimensions.Dimension import Dimension
from EvaMap.Metrics.verticalCoverage import verticalCoverage
class Coverability(Dimension):
def __init__(self, nom='Coverability', list_metrics=[verticalCoverage]):
super().__init__(nom, list_metrics)
| 29.555556
| 76
| 0.793233
| 28
| 266
| 7.178571
| 0.535714
| 0.099502
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.116541
| 266
| 8
| 77
| 33.25
| 0.855319
| 0
| 0
| 0
| 0
| 0
| 0.045113
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0
| 0.4
| 0
| 0.8
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
6103c5b600300fcec8de5b8d09af51ad90e707b2
| 149
|
py
|
Python
|
golem_driving/agents/__init__.py
|
KNSI-Golem/Duckietown-Driving-Olympics
|
051294c8094a81e7cd51efe5ec904c314d345c0a
|
[
"MIT"
] | null | null | null |
golem_driving/agents/__init__.py
|
KNSI-Golem/Duckietown-Driving-Olympics
|
051294c8094a81e7cd51efe5ec904c314d345c0a
|
[
"MIT"
] | 10
|
2019-12-19T16:47:15.000Z
|
2020-05-27T18:11:36.000Z
|
golem_driving/agents/__init__.py
|
KNSI-Golem/Duckietown-Driving-Olympics
|
051294c8094a81e7cd51efe5ec904c314d345c0a
|
[
"MIT"
] | null | null | null |
from golem_driving.agents.manual_agent import ManualAgent
agents = {
'manual': ManualAgent
}
def get_agent(agent):
return agents[agent]()
| 14.9
| 57
| 0.731544
| 18
| 149
| 5.888889
| 0.611111
| 0.226415
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.167785
| 149
| 9
| 58
| 16.555556
| 0.854839
| 0
| 0
| 0
| 0
| 0
| 0.040268
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.166667
| false
| 0
| 0.166667
| 0.166667
| 0.5
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
|
0
| 4
|
611fb9132e1054a4385837867f0023506b17832a
| 2,313
|
py
|
Python
|
x_item.py
|
wholetonegames/panda3d-ness-rpg
|
8d81e8418c1bc20706b5b3f4c0631fe9bd76a65e
|
[
"MIT"
] | 1
|
2021-02-01T03:09:28.000Z
|
2021-02-01T03:09:28.000Z
|
x_item.py
|
wholetonegames/panda3d-ness-rpg
|
8d81e8418c1bc20706b5b3f4c0631fe9bd76a65e
|
[
"MIT"
] | null | null | null |
x_item.py
|
wholetonegames/panda3d-ness-rpg
|
8d81e8418c1bc20706b5b3f4c0631fe9bd76a65e
|
[
"MIT"
] | null | null | null |
class ItemModel:
def __init__(self):
self.vowels = ['A', 'E', 'I', 'O', 'U']
self.rare_letters = ['X', 'J']
self.other_letters = ['B', 'C', 'D', 'F', 'G', 'H',
'K', 'L', 'M', 'N', 'P', 'Q',
'R', 'S', 'T', 'V', 'W', 'Y', 'Z']
self.items = [
{"id": 1, "name": "A", 'costs': {'amount': 1}, "affects": {}},
{"id": 2, "name": "B", 'costs': {'amount': 1}, "affects": {}},
{"id": 3, "name": "C", 'costs': {'amount': 1}, "affects": {}},
{"id": 4, "name": "D", 'costs': {'amount': 1}, "affects": {}},
{"id": 5, "name": "E", 'costs': {'amount': 1}, "affects": {}},
{"id": 6, "name": "F", 'costs': {'amount': 1}, "affects": {}},
{"id": 7, "name": "G", 'costs': {'amount': 1}, "affects": {}},
{"id": 8, "name": "H", 'costs': {'amount': 1}, "affects": {}},
{"id": 9, "name": "I", 'costs': {'amount': 1}, "affects": {}},
{"id": 10, "name": "J", 'costs': {'amount': 1}, "affects": {}},
{"id": 11, "name": "K", 'costs': {'amount': 1}, "affects": {}},
{"id": 12, "name": "L", 'costs': {'amount': 1}, "affects": {}},
{"id": 13, "name": "M", 'costs': {'amount': 1}, "affects": {}},
{"id": 14, "name": "N", 'costs': {'amount': 1}, "affects": {}},
{"id": 15, "name": "O", 'costs': {'amount': 1}, "affects": {}},
{"id": 16, "name": "P", 'costs': {'amount': 1}, "affects": {}},
{"id": 17, "name": "Q", 'costs': {'amount': 1}, "affects": {}},
{"id": 18, "name": "R", 'costs': {'amount': 1}, "affects": {}},
{"id": 19, "name": "S", 'costs': {'amount': 1}, "affects": {}},
{"id": 20, "name": "T", 'costs': {'amount': 1}, "affects": {}},
{"id": 21, "name": "U", 'costs': {'amount': 1}, "affects": {}},
{"id": 22, "name": "V", 'costs': {'amount': 1}, "affects": {}},
{"id": 23, "name": "W", 'costs': {'amount': 1}, "affects": {}},
{"id": 24, "name": "X", 'costs': {'amount': 1}, "affects": {}},
{"id": 25, "name": "Y", 'costs': {'amount': 1}, "affects": {}},
{"id": 26, "name": "Z", 'costs': {'amount': 1}, "affects": {}}
]
| 62.513514
| 75
| 0.357112
| 249
| 2,313
| 3.293173
| 0.269076
| 0.34878
| 0.380488
| 0.602439
| 0.640244
| 0
| 0
| 0
| 0
| 0
| 0
| 0.04254
| 0.298746
| 2,313
| 36
| 76
| 64.25
| 0.463009
| 0
| 0
| 0
| 0
| 0
| 0.292388
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.028571
| false
| 0
| 0
| 0
| 0.057143
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
b6331e5d3eb47d393d645b812dc9f2b414941faf
| 96
|
py
|
Python
|
venv/Lib/site-packages/imdb/parser/sql/logging.py
|
ZUSM0/zynoPYsis
|
0cbe84d60a9611eac4daed82176477939bf79183
|
[
"MIT"
] | null | null | null |
venv/Lib/site-packages/imdb/parser/sql/logging.py
|
ZUSM0/zynoPYsis
|
0cbe84d60a9611eac4daed82176477939bf79183
|
[
"MIT"
] | null | null | null |
venv/Lib/site-packages/imdb/parser/sql/logging.py
|
ZUSM0/zynoPYsis
|
0cbe84d60a9611eac4daed82176477939bf79183
|
[
"MIT"
] | null | null | null |
from imdb.parser.logging import logger as parent_logger
logger = parent_logger.getChild('sql')
| 24
| 55
| 0.8125
| 14
| 96
| 5.428571
| 0.714286
| 0.315789
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.104167
| 96
| 3
| 56
| 32
| 0.883721
| 0
| 0
| 0
| 0
| 0
| 0.03125
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
b64c91a3e1ea4c117bd5f6efba4ce2668323cd7f
| 104
|
py
|
Python
|
run.py
|
CoffeeStraw/CapsNet-Knowledge-Extractor
|
99dc665bcce394e4dfa0b8a6deda28d1e3713509
|
[
"MIT"
] | 5
|
2020-09-29T13:34:23.000Z
|
2021-12-01T15:27:53.000Z
|
run.py
|
CoffeeStraw/CapsNet-Knowledge-Extractor
|
99dc665bcce394e4dfa0b8a6deda28d1e3713509
|
[
"MIT"
] | null | null | null |
run.py
|
CoffeeStraw/CapsNet-Knowledge-Extractor
|
99dc665bcce394e4dfa0b8a6deda28d1e3713509
|
[
"MIT"
] | null | null | null |
"""
Flask debug server runner
Author: Antonio Strippoli
"""
from flaskr import app
app.run(debug=True)
| 13
| 25
| 0.75
| 15
| 104
| 5.2
| 0.866667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.144231
| 104
| 7
| 26
| 14.857143
| 0.876404
| 0.490385
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
b670d62afa03212ff88dc521ec9a218462b10dd9
| 4,501
|
py
|
Python
|
gym3/trajectory_recorder_test.py
|
christopher-hesse/gym3
|
2ed9d344ede8bbd96b6280e9fbbbf55861ea33a9
|
[
"MIT"
] | null | null | null |
gym3/trajectory_recorder_test.py
|
christopher-hesse/gym3
|
2ed9d344ede8bbd96b6280e9fbbbf55861ea33a9
|
[
"MIT"
] | null | null | null |
gym3/trajectory_recorder_test.py
|
christopher-hesse/gym3
|
2ed9d344ede8bbd96b6280e9fbbbf55861ea33a9
|
[
"MIT"
] | null | null | null |
import os
import pickle
import tempfile
from glob import glob
import numpy as np
from gym3 import types, types_np
from gym3.concat import ConcatEnv
from gym3.testing import IdentityEnv
from gym3.trajectory_recorder import TrajectoryRecorderWrapper
def test_recorder():
with tempfile.TemporaryDirectory() as tmpdir:
ep_len1 = 3
ep_len2 = 4
env1 = IdentityEnv(
space=types.TensorType(eltype=types.Discrete(256), shape=(3, 3, 3)),
episode_len=ep_len1,
)
env2 = IdentityEnv(
space=types.TensorType(eltype=types.Discrete(256), shape=(3, 3, 3)),
episode_len=ep_len2,
seed=1,
)
env = ConcatEnv([env1, env2])
env = TrajectoryRecorderWrapper(env=env, directory=tmpdir)
_, obs, _ = env.observe()
action = types_np.zeros(env.ac_space, bshape=(env.num,))
action[1] = 1
num_acs = 10
for _ in range(num_acs):
env.act(action)
files = sorted(glob(os.path.join(tmpdir, "*.pickle")))
print(files)
assert len(files) == (num_acs // ep_len1) + (num_acs // ep_len2)
with open(files[0], "rb") as f:
loaded_traj = pickle.load(f)
assert len(loaded_traj["ob"]) == ep_len1
assert np.allclose(loaded_traj["ob"][0], obs[0])
assert np.allclose(loaded_traj["act"][0], action[0])
with open(files[1], "rb") as f:
loaded_traj = pickle.load(f)
assert len(loaded_traj["ob"]) == ep_len2
assert np.allclose(loaded_traj["ob"][0], obs[1])
assert np.allclose(loaded_traj["act"][0], action[1])
def test_recorder_dict():
with tempfile.TemporaryDirectory() as tmpdir:
ep_len1 = 3
ep_len2 = 4
space = types.DictType(
a=types.TensorType(eltype=types.Discrete(256), shape=(2,)),
b=types.DictType(
c=types.TensorType(eltype=types.Discrete(256), shape=()),
d=types.TensorType(eltype=types.Discrete(256), shape=(2, 2)),
),
)
env1 = IdentityEnv(space=space, episode_len=ep_len1)
env2 = IdentityEnv(space=space, episode_len=ep_len2, seed=1)
env = ConcatEnv([env1, env2])
env = TrajectoryRecorderWrapper(env=env, directory=tmpdir)
print(env._trajectories)
_, obs, _ = env.observe()
action = {
"a": types_np.zeros(env.ac_space["a"], bshape=(env.num,)),
"b": {
"c": types_np.zeros(env.ac_space["b"]["c"], bshape=(env.num,)),
"d": types_np.zeros(env.ac_space["b"]["d"], bshape=(env.num,)),
},
}
action["a"][1] = 1
action["b"]["c"][1] = 1
action["b"]["d"][1] = 1
num_acs = 10
for _ in range(num_acs):
env.act(action)
files = sorted(glob(os.path.join(tmpdir, "*.pickle")))
print(files)
assert len(files) == (num_acs // ep_len1) + (num_acs // ep_len2)
with open(files[0], "rb") as f:
loaded_traj = pickle.load(f)
assert len(loaded_traj["ob"]["a"]) == ep_len1
assert len(loaded_traj["ob"]["b"]["c"]) == ep_len1
assert len(loaded_traj["ob"]["b"]["d"]) == ep_len1
assert np.allclose(loaded_traj["ob"]["a"][0], obs["a"][0])
assert np.allclose(loaded_traj["ob"]["b"]["c"][0], obs["b"]["c"][0])
assert np.allclose(loaded_traj["ob"]["b"]["d"][0], obs["b"]["d"][0])
assert np.allclose(loaded_traj["act"]["a"][0], action["a"][0])
assert np.allclose(loaded_traj["act"]["b"]["c"][0], action["b"]["c"][0])
assert np.allclose(loaded_traj["act"]["b"]["d"][0], action["b"]["d"][0])
with open(files[1], "rb") as f:
loaded_traj = pickle.load(f)
assert len(loaded_traj["ob"]["a"]) == ep_len2
assert len(loaded_traj["ob"]["b"]["c"]) == ep_len2
assert len(loaded_traj["ob"]["b"]["d"]) == ep_len2
assert np.allclose(loaded_traj["ob"]["a"][0], obs["a"][1])
assert np.allclose(loaded_traj["ob"]["b"]["c"][0], obs["b"]["c"][1])
assert np.allclose(loaded_traj["ob"]["b"]["d"][0], obs["b"]["d"][1])
assert np.allclose(loaded_traj["act"]["a"][0], action["a"][1])
assert np.allclose(loaded_traj["act"]["b"]["c"][0], action["b"]["c"][1])
assert np.allclose(loaded_traj["act"]["b"]["d"][0], action["b"]["d"][1])
if __name__ == "__main__":
test_recorder()
test_recorder_dict()
| 37.508333
| 80
| 0.555876
| 615
| 4,501
| 3.920325
| 0.131707
| 0.116134
| 0.079635
| 0.145998
| 0.802986
| 0.802986
| 0.773953
| 0.717545
| 0.567399
| 0.567399
| 0
| 0.03266
| 0.251722
| 4,501
| 119
| 81
| 37.823529
| 0.683195
| 0
| 0
| 0.336634
| 0
| 0
| 0.03377
| 0
| 0
| 0
| 0
| 0
| 0.257426
| 1
| 0.019802
| false
| 0
| 0.089109
| 0
| 0.108911
| 0.029703
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
b678b60fd8a5d71079031f0b1d14a4d3119ec8a7
| 151
|
py
|
Python
|
CursoIntensivoPython/curso-intensivo-python-master/capitulo_05/exercicios/alienigenas_2.py
|
SweydAbdul/estudos-python
|
b052708d0566a0afb9a1c04d035467d45f820879
|
[
"MIT"
] | null | null | null |
CursoIntensivoPython/curso-intensivo-python-master/capitulo_05/exercicios/alienigenas_2.py
|
SweydAbdul/estudos-python
|
b052708d0566a0afb9a1c04d035467d45f820879
|
[
"MIT"
] | null | null | null |
CursoIntensivoPython/curso-intensivo-python-master/capitulo_05/exercicios/alienigenas_2.py
|
SweydAbdul/estudos-python
|
b052708d0566a0afb9a1c04d035467d45f820879
|
[
"MIT"
] | null | null | null |
cor_do_alien = 'vermelho'
if cor_do_alien == 'verde':
print('Você acabou de ganhar 5 pontos!')
else:
print('Você acabou de ganhar 10 pontos!')
| 25.166667
| 45
| 0.688742
| 24
| 151
| 4.166667
| 0.625
| 0.1
| 0.2
| 0.34
| 0.46
| 0
| 0
| 0
| 0
| 0
| 0
| 0.02439
| 0.18543
| 151
| 5
| 46
| 30.2
| 0.788618
| 0
| 0
| 0
| 0
| 0
| 0.503311
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.4
| 1
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
b6884ae96470f2b1a0ec81972360d7e48e6dba4f
| 35
|
py
|
Python
|
byemail/__init__.py
|
jrmi/byemail
|
5d8ac2a0f9308aa9e3098948ba8a7a4598848539
|
[
"MIT"
] | 10
|
2018-03-03T16:12:56.000Z
|
2021-01-18T10:52:45.000Z
|
byemail/__init__.py
|
jrmi/byemail
|
5d8ac2a0f9308aa9e3098948ba8a7a4598848539
|
[
"MIT"
] | 69
|
2018-03-01T20:08:46.000Z
|
2019-05-05T18:53:30.000Z
|
byemail/__init__.py
|
jrmi/byemail
|
5d8ac2a0f9308aa9e3098948ba8a7a4598848539
|
[
"MIT"
] | 3
|
2018-03-12T15:17:26.000Z
|
2020-04-17T14:19:47.000Z
|
__version__ = "0.0.1"
__url__ = ""
| 11.666667
| 21
| 0.6
| 5
| 35
| 2.6
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.103448
| 0.171429
| 35
| 2
| 22
| 17.5
| 0.344828
| 0
| 0
| 0
| 0
| 0
| 0.142857
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
b68a105b8943d2c9d42111eec1738b20c428f8ed
| 14,109
|
py
|
Python
|
results_pneumatic-actuator/results_dynamic_leakage.py
|
EvaZillen/3D-printed-pneumatic-actuator
|
6e0bcb4633bd53b2a8544cdbd497c4c06539afc7
|
[
"CC0-1.0"
] | 1
|
2021-07-27T15:58:45.000Z
|
2021-07-27T15:58:45.000Z
|
results_pneumatic-actuator/results_dynamic_leakage.py
|
EvaZillen/3D-printed-pneumatic-actuator
|
6e0bcb4633bd53b2a8544cdbd497c4c06539afc7
|
[
"CC0-1.0"
] | null | null | null |
results_pneumatic-actuator/results_dynamic_leakage.py
|
EvaZillen/3D-printed-pneumatic-actuator
|
6e0bcb4633bd53b2a8544cdbd497c4c06539afc7
|
[
"CC0-1.0"
] | null | null | null |
#!/usr/bin/env python
# coding: utf-8
"""
In this script, the results of the dynamic leakage tests are visualised.
All visualisations are stored in /figures/
"""
__author__ = "Eva Zillen"
__copyright__ = "Copyright 2021, TU Delft Biomechanical Design"
__credits__ = ["Eva Zillen, Heike Vallery, Gerwin Smit"]
__license__ = "CC0-1.0 License"
__version__ = "1.0.0"
__maintainer__ = "Eva Zillen"
__email__ = "e.zillen@student.tudelft.nl"
# #### Imports
import math
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
# #### Global variables
# The models with different sealing mechanism used in this test
rings = ['O-ring','NAPN','NAP310','PK','KDN','O-ring257','X-ring257']
# The models with different cross-sectional shape used in this test
shapes = ['Circle','Stadium','Kidney', 'Stadium_lc', 'Kidney_lc']
# Remove first 15 data points to avoid deviating starting values
drop_amount = 15
# # Dynamic leakage test
# The position in the piston where the pressure is compared (in mm)
alpha = {
'O-ring': 37.7,
'NAPN': 38,
'NAP310': 37.7,
'PK': 37.8,
'KDN': 37.7,
'O-ring257': 37.7,
'X-ring257': 37.7,
'Circle': 36.9,
'Stadium': 38.5,
'Kidney': 39.3,
'Stadium_lc': 38.5,
'Kidney_lc': 37.4,
}
# All the pressures are selected where the laser sensor provided the value alpha +/- 0.02 mm
margin = 0.02
# Define a dictionary to store all data from the dynamic tests
# For each ring all variables are stored in this nested dictionary
dynamic_leakage = {}
# For each model type
for model in rings+shapes:
# Load the data of the corresponding results in .CSV and drop unncessary columns
model_df = pd.read_csv(f'./data/dynamic/{model}.csv',delimiter='\s+',header=None,names=(['Time','A','B','C','Laser(mm)','Pressure(bar)','Force(N)']))
model_df.drop(columns=['A','B','C'],index=model_df.index[range(drop_amount)],axis=1,inplace=True)
# Selecting the data points around the chosen position with the chosen margin
model_df = model_df[(model_df['Laser(mm)'] > (alpha[model]-margin)) & (model_df['Laser(mm)'] < (alpha[model]+margin))]
# Store the data in our larger dictionary
dynamic_leakage[model] = {}
# Set the time (in s)
dynamic_leakage[model]['Time'] = model_df['Time']/1000
dynamic_leakage[model]['Laser(mm)'] = model_df['Laser(mm)']
# Set the pressure (in MPa)
dynamic_leakage[model]['Pressure(bar)'] = model_df['Pressure(bar)']/10
# #### Dynamic leakage plot 25mm
# To smoothen out the lines a sampling [::4] and a rolling window of 10 are applied
plt.plot(dynamic_leakage['O-ring257']['Time'][::4],dynamic_leakage['O-ring257']['Pressure(bar)'].rolling(window=10).mean()[::4],'tab:blue', alpha=0.25, linestyle='dotted',linewidth=3)
plt.plot(dynamic_leakage['X-ring257']['Time'][::4],dynamic_leakage['X-ring257']['Pressure(bar)'].rolling(window=10).mean()[::4],'tab:brown', alpha=0.25, linestyle=(0,(5,2,2)))
plt.plot(dynamic_leakage['O-ring']['Time'][::4],dynamic_leakage['O-ring']['Pressure(bar)'].rolling(window=10).mean()[::4],'tab:blue',label='O-ring', linestyle='dotted',linewidth=3)
plt.plot(dynamic_leakage['NAPN']['Time'][::4],dynamic_leakage['NAPN']['Pressure(bar)'].rolling(window=10).mean()[::4],'tab:orange',label='NAPN',linestyle='dashdot')
plt.plot(dynamic_leakage['NAP310']['Time'][::4],dynamic_leakage['NAP310']['Pressure(bar)'].rolling(window=10).mean()[::4],'tab:green',label='NAP 310', linestyle=(0,(5,2,2)))
plt.plot(dynamic_leakage['PK']['Time'][::4],dynamic_leakage['PK']['Pressure(bar)'].rolling(window=10).mean()[::4],'tab:red',label='PK',linestyle='dashed')
plt.plot(dynamic_leakage['KDN']['Time'][::4],dynamic_leakage['KDN']['Pressure(bar)'].rolling(window=10).mean()[::4],'tab:purple',label='KDN')
# Set the labels and save the figure
plt.xlabel('Time (s)')
plt.ylabel('Pressure (MPa)')
plt.legend()
plt.savefig('./figures/result_dynamic_leakage_25mm.pdf',bbox_inches = 'tight')
plt.clf()
# #### Dynamic leakage plot 25.7mm
# To smoothen out the lines a sampling [::4] and a rolling window of 10 are applied
plt.plot(dynamic_leakage['O-ring']['Time'][::4],dynamic_leakage['O-ring']['Pressure(bar)'].rolling(window=10).mean()[::4],'tab:blue', alpha=0.25, linestyle='dotted',linewidth=3)
plt.plot(dynamic_leakage['NAPN']['Time'][::4],dynamic_leakage['NAPN']['Pressure(bar)'].rolling(window=10).mean()[::4],'tab:orange',alpha=0.25,linestyle='dashdot')
plt.plot(dynamic_leakage['NAP310']['Time'][::4],dynamic_leakage['NAP310']['Pressure(bar)'].rolling(window=10).mean()[::4],'tab:green',alpha=0.25, linestyle=(0,(5,2,2)))
plt.plot(dynamic_leakage['PK']['Time'][::4],dynamic_leakage['PK']['Pressure(bar)'].rolling(window=10).mean()[::4],'tab:red',alpha=0.25,linestyle='dashed')
plt.plot(dynamic_leakage['KDN']['Time'][::4],dynamic_leakage['KDN']['Pressure(bar)'].rolling(window=10).mean()[::4],'tab:purple',alpha=0.25)
plt.plot(dynamic_leakage['O-ring257']['Time'][::4],dynamic_leakage['O-ring257']['Pressure(bar)'].rolling(window=10).mean()[::4],'tab:blue',label='O-ring', linestyle='dotted',linewidth=3)
plt.plot(dynamic_leakage['X-ring257']['Time'][::4],dynamic_leakage['X-ring257']['Pressure(bar)'].rolling(window=10).mean()[::4],'tab:brown',label='X-ring', linestyle=(0,(5,2,2)))
# Set the labels and save the figure
plt.xlabel('Time (s)')
plt.ylabel('Pressure (MPa)')
plt.legend()
plt.savefig('./figures/result_dynamic_leakage_257mm.pdf',bbox_inches = 'tight')
plt.clf()
# #### Dynamic leakage plot different shapes
# To smoothen out the lines a rolling window of 10 are applied
plt.plot(dynamic_leakage['Circle']['Time'],dynamic_leakage['Circle']['Pressure(bar)'].rolling(window=10).mean(),'0.8',label='Circle', linestyle='dotted',linewidth=3)
plt.plot(dynamic_leakage['Stadium']['Time'],dynamic_leakage['Stadium']['Pressure(bar)'].rolling(window=10).mean(),'tab:olive',label='Stadium',linestyle='dashdot')
plt.plot(dynamic_leakage['Kidney']['Time'],dynamic_leakage['Kidney']['Pressure(bar)'].rolling(window=10).mean(),'tab:cyan',label='Kidney')
# Set the labels and save the figure
plt.xlabel('Time (s)')
plt.ylabel('Pressure (MPa)')
plt.legend()
plt.savefig('./figures/result_dynamic_leakage_shapes.pdf',bbox_inches = 'tight')
plt.clf()
# #### Dynamic leakage plot different shapes with lower clearance
# To smoothen out the lines a rolling window of 10 are applied
plt.plot(dynamic_leakage['Stadium']['Time'],dynamic_leakage['Stadium']['Pressure(bar)'].rolling(window=10).mean(),'tab:olive',alpha=0.5,label='Stadium 0.5 mm clearance',linestyle='dashdot')
plt.plot(dynamic_leakage['Kidney']['Time'],dynamic_leakage['Kidney']['Pressure(bar)'].rolling(window=10).mean(),'tab:cyan',alpha=0.5,label='Kidney 0.5 mm clearance')
plt.plot(dynamic_leakage['Circle']['Time'],dynamic_leakage['Circle']['Pressure(bar)'].rolling(window=10).mean(),'0.8', alpha=0.5 ,label='Circle 0.5 mm clearance', linestyle='dotted',linewidth=3)
plt.plot(dynamic_leakage['Stadium_lc']['Time'],dynamic_leakage['Stadium_lc']['Pressure(bar)'].rolling(window=10).mean(),'tab:olive',label='Stadium 0.2 mm clearance',linestyle='dashdot', linewidth=2)
plt.plot(dynamic_leakage['Kidney_lc']['Time'],dynamic_leakage['Kidney_lc']['Pressure(bar)'].rolling(window=10).mean(),'tab:cyan',label='Kidney 0.2 mm clearance', linewidth=2)
# Set the labels and save the figure
plt.xlabel('Time (s)')
plt.ylabel('Pressure (MPa)')
plt.legend(loc='lower center',bbox_to_anchor=(0.5,-0.42),ncol=2)
plt.savefig('./figures/app_dynamic_leakage_shapes_lc.pdf',bbox_inches = 'tight')
plt.clf()
# # Repeatablilty
# We performed two repeatability tests
# - The test was rerun without any changes in the connections (rerun)
# - The model was reconnected prior to taking the tests (reconnected)
# ### Rerun
# The position in the piston where the pressure is compared (in mm), different to initial setup
# Each number stands for the specific repeated test
alpha = {
1: 38.5,
2: 35.5,
3: 35.5
}
# Store repeatability data in a dictionary
dynamic_rerun = {}
# Iterate all 3 repeated tests and add them to the dictionary
for test in alpha.keys():
# Load the data of the corresponding results in .CSV and drop unncessary columns
test_df = pd.read_csv(f'./data/repeatability/rerun/dynamic/{test}_O-ring257.csv',delimiter='\s+',header=None,names=(['Time','A','B','C','Laser(mm)','Pressure(bar)','Force(N)']))
test_df.drop(columns=['A','B','C'],index=test_df.index[range(drop_amount)],axis=1,inplace=True)
# Selecting the data points around the chosen position with the chosen margin
test_df = test_df[(test_df['Laser(mm)'] > (alpha[test]-margin)) & (test_df['Laser(mm)'] < (alpha[test]+margin))]
# Store the data in the dictionary
dynamic_rerun[test] = {}
# Set the time (in s)
dynamic_rerun[test]['Time'] = test_df['Time']/1000
dynamic_rerun[test]['Laser(mm)'] = test_df['Laser(mm)']
# Set the pressure (in MPa)dynamic_rerun[test] = {}
dynamic_rerun[test]['Pressure(bar)'] = test_df['Pressure(bar)']/10
# To smoothen out the lines a sampling [::4] and a rolling window of 10 are applied
plt.plot(dynamic_leakage['O-ring']['Time'][::4],dynamic_leakage['O-ring']['Pressure(bar)'].rolling(window=10).mean()[::4],'tab:grey', alpha=0.25, linestyle='dotted',linewidth=3)
plt.plot(dynamic_leakage['NAPN']['Time'][::4],dynamic_leakage['NAPN']['Pressure(bar)'].rolling(window=10).mean()[::4],'tab:grey',alpha=0.25,linestyle='dashdot')
plt.plot(dynamic_leakage['NAP310']['Time'][::4],dynamic_leakage['NAP310']['Pressure(bar)'].rolling(window=10).mean()[::4],'tab:grey',alpha=0.25, linestyle=(0,(5,2,2)))
plt.plot(dynamic_leakage['PK']['Time'][::4],dynamic_leakage['PK']['Pressure(bar)'].rolling(window=10).mean()[::4],'tab:grey',alpha=0.25,linestyle='dashed')
plt.plot(dynamic_leakage['KDN']['Time'][::4],dynamic_leakage['KDN']['Pressure(bar)'].rolling(window=10).mean()[::4],'tab:grey',alpha=0.25)
plt.plot(dynamic_leakage['O-ring257']['Time'][::4],dynamic_leakage['O-ring257']['Pressure(bar)'].rolling(window=10).mean()[::4],'tab:grey',alpha=0.25, linestyle='dotted',linewidth=3)
plt.plot(dynamic_leakage['X-ring257']['Time'][::4],dynamic_leakage['X-ring257']['Pressure(bar)'].rolling(window=10).mean()[::4],'tab:grey',alpha=0.25, linestyle=(0,(5,2,2)))
plt.plot(dynamic_rerun[1]['Time'][::4],dynamic_rerun[1]['Pressure(bar)'].rolling(window=10).mean()[::4],'red',label='Test 1',linewidth=2)
plt.plot(dynamic_rerun[2]['Time'][::4],dynamic_rerun[2]['Pressure(bar)'].rolling(window=10).mean()[::4],'firebrick',label='Test 2',linewidth=2)
plt.plot(dynamic_rerun[3]['Time'][::4],dynamic_rerun[3]['Pressure(bar)'].rolling(window=10).mean()[::4],'darkred',label='Test 3',linewidth=2)
# Set the labels and save the figure
plt.xlabel('Time (s)')
plt.ylabel('Pressure (MPa)')
plt.legend()
plt.savefig('./figures/app_dynamic_leakage_rerun.pdf',bbox_inches = 'tight')
plt.clf()
# ### Reconnected
# The position in the piston where the pressure is compared (in mm), different to initial setup
# Each number stands for the specific repeated test
alpha = {
1: 37.7,
2: 35.5,
3: 38.5
}
# Store repeatability data in a dictionary
dynamic_reconnected = {}
# Iterate all 3 repeated tests and add them to the dictionary
for test in range(1,4):
# Load the data of the corresponding results in .CSV and drop unncessary columns
test_df = pd.read_csv(f'./data/repeatability/reconnected/dynamic/{test}_O-ring257.csv',delimiter='\s+',header=None,names=(['Time','A','B','C','Laser(mm)','Pressure(bar)','Force(N)']))
test_df.drop(columns=['A','B','C'],index=test_df.index[range(drop_amount)],axis=1,inplace=True)
# Selecting the data points around the chosen position with the chosen margin
test_df = test_df[(test_df['Laser(mm)'] > (alpha[test]-margin)) & (test_df['Laser(mm)'] < (alpha[test]+margin))]
# Store the data in the dictionary
dynamic_reconnected[test] = {}
# Set the time (in s)
dynamic_reconnected[test]['Time'] = test_df['Time']/1000
dynamic_reconnected[test]['Laser(mm)'] = test_df['Laser(mm)']
# Set the pressure (in MPa)
dynamic_reconnected[test]['Pressure(bar)'] = test_df['Pressure(bar)']/10
# To smoothen out the lines a sampling [::4] and a rolling window of 10 are applied
plt.plot(dynamic_leakage['O-ring']['Time'][::4],dynamic_leakage['O-ring']['Pressure(bar)'].rolling(window=10).mean()[::4],'tab:grey', alpha=0.25, linestyle='dotted',linewidth=3)
plt.plot(dynamic_leakage['NAPN']['Time'][::4],dynamic_leakage['NAPN']['Pressure(bar)'].rolling(window=10).mean()[::4],'tab:grey',alpha=0.25,linestyle='dashdot')
plt.plot(dynamic_leakage['NAP310']['Time'][::4],dynamic_leakage['NAP310']['Pressure(bar)'].rolling(window=10).mean()[::4],'tab:grey',alpha=0.25, linestyle=(0,(5,2,2)))
plt.plot(dynamic_leakage['PK']['Time'][::4],dynamic_leakage['PK']['Pressure(bar)'].rolling(window=10).mean()[::4],'tab:grey',alpha=0.25,linestyle='dashed')
plt.plot(dynamic_leakage['KDN']['Time'][::4],dynamic_leakage['KDN']['Pressure(bar)'].rolling(window=10).mean()[::4],'tab:grey',alpha=0.25)
plt.plot(dynamic_leakage['O-ring257']['Time'][::4],dynamic_leakage['O-ring257']['Pressure(bar)'].rolling(window=10).mean()[::4],'tab:grey',alpha=0.25, linestyle='dotted',linewidth=3)
plt.plot(dynamic_leakage['X-ring257']['Time'][::4],dynamic_leakage['X-ring257']['Pressure(bar)'].rolling(window=10).mean()[::4],'tab:grey',alpha=0.25, linestyle=(0,(5,2,2)))
plt.plot(dynamic_reconnected[1]['Time'][::4],dynamic_reconnected[1]['Pressure(bar)'].rolling(window=10).mean()[::4],'skyblue',label='Test 1',linewidth=2)
plt.plot(dynamic_reconnected[2]['Time'][::4],dynamic_reconnected[2]['Pressure(bar)'].rolling(window=10).mean()[::4],'cornflowerblue',label='Test 2',linewidth=2)
plt.plot(dynamic_reconnected[3]['Time'][::4],dynamic_reconnected[3]['Pressure(bar)'].rolling(window=10).mean()[::4],'steelblue',label='Test 3',linewidth=2)
# Set the labels and save the figure
plt.xlabel('Time (s)')
plt.ylabel('Pressure (MPa)')
plt.legend()
plt.savefig('./figures/app_dynamic_leakage_reconnected.pdf',bbox_inches = 'tight')
plt.clf()
print(f'\n ------ Succesfully saved all visualisations to /figures/ ------')
| 55.547244
| 198
| 0.697569
| 2,171
| 14,109
| 4.44035
| 0.115615
| 0.129253
| 0.060996
| 0.104564
| 0.785373
| 0.774481
| 0.756432
| 0.737033
| 0.693672
| 0.677593
| 0
| 0.041754
| 0.085052
| 14,109
| 253
| 199
| 55.766798
| 0.705012
| 0.208307
| 0
| 0.330935
| 0
| 0
| 0.279689
| 0.038111
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.028777
| 0
| 0.028777
| 0.007194
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
b6ae00bb2978d15a8f5376395304ee34c0ea376f
| 225
|
py
|
Python
|
src/stokvel/admin.py
|
ConnorMac/stokvel.io
|
055c3493c8138edc8d2f98e5c928653e5f402307
|
[
"MIT"
] | null | null | null |
src/stokvel/admin.py
|
ConnorMac/stokvel.io
|
055c3493c8138edc8d2f98e5c928653e5f402307
|
[
"MIT"
] | 4
|
2017-06-26T10:54:01.000Z
|
2017-07-23T20:55:49.000Z
|
src/stokvel/admin.py
|
ConnorMac/stokvel.io
|
055c3493c8138edc8d2f98e5c928653e5f402307
|
[
"MIT"
] | null | null | null |
from django.contrib import admin
from stokvel.models import User, Stokvel, Event, Vote
# Register your models here.
admin.site.register(User)
admin.site.register(Stokvel)
admin.site.register(Event)
admin.site.register(Vote)
| 25
| 53
| 0.804444
| 33
| 225
| 5.484848
| 0.424242
| 0.198895
| 0.375691
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.093333
| 225
| 8
| 54
| 28.125
| 0.887255
| 0.115556
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.333333
| 0
| 0.333333
| 0
| 0
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
b6ae94d1f153f50f5b5ae5df658df16f2ce57151
| 217
|
py
|
Python
|
modules/search.py
|
kamilsj/Syrah
|
3c5de50f5ef7178e44940bcea42e55ef8321084a
|
[
"MIT"
] | 4
|
2016-10-05T15:17:21.000Z
|
2021-02-04T10:04:39.000Z
|
modules/search.py
|
kamilsj/syrah
|
3c5de50f5ef7178e44940bcea42e55ef8321084a
|
[
"MIT"
] | null | null | null |
modules/search.py
|
kamilsj/syrah
|
3c5de50f5ef7178e44940bcea42e55ef8321084a
|
[
"MIT"
] | null | null | null |
class search:
def __init__():
pass
def ParseSearch(request):
tab = {}
if request.len > 0:
pass
pass
def search(request):
pass
| 15.5
| 29
| 0.419355
| 19
| 217
| 4.578947
| 0.578947
| 0.16092
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.009346
| 0.506912
| 217
| 14
| 30
| 15.5
| 0.803738
| 0
| 0
| 0.4
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.3
| false
| 0.4
| 0
| 0
| 0.4
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
b6af65dbbdcfb339e63c2f36ab564e8d764a1d3a
| 114
|
py
|
Python
|
MedIT_com/django_chatterbot/apps.py
|
PaolaDMadd/knock-knock-doctor-app
|
a58964620378d75591989298ed96a7c2f934f71e
|
[
"BSD-Source-Code"
] | null | null | null |
MedIT_com/django_chatterbot/apps.py
|
PaolaDMadd/knock-knock-doctor-app
|
a58964620378d75591989298ed96a7c2f934f71e
|
[
"BSD-Source-Code"
] | 2
|
2021-02-09T20:15:59.000Z
|
2021-02-09T20:16:10.000Z
|
MedIT_com/django_chatterbot/apps.py
|
PaolaDMadd/knok-knok-doctor-app
|
a58964620378d75591989298ed96a7c2f934f71e
|
[
"BSD-Source-Code"
] | 1
|
2021-02-03T17:22:46.000Z
|
2021-02-03T17:22:46.000Z
|
# from django.apps import AppConfig
# class DjangoChatterbotConfig(AppConfig):
# name = 'django_chatterbot'
| 19
| 42
| 0.754386
| 11
| 114
| 7.727273
| 0.818182
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.157895
| 114
| 5
| 43
| 22.8
| 0.885417
| 0.921053
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
fcac2bbc823e86a62998f44eab2262e5e8b40da7
| 1,733
|
py
|
Python
|
etc/old/__main__.py
|
timm/bnbad2
|
942792b2850b39fd38c3612fcff4613b7d8ef0c7
|
[
"MIT"
] | 1
|
2021-03-16T01:15:49.000Z
|
2021-03-16T01:15:49.000Z
|
etc/old/__main__.py
|
timm/bnbad2
|
942792b2850b39fd38c3612fcff4613b7d8ef0c7
|
[
"MIT"
] | 1
|
2021-01-20T15:09:35.000Z
|
2021-01-20T15:09:35.000Z
|
etc/old/__main__.py
|
timm/bnbad2
|
942792b2850b39fd38c3612fcff4613b7d8ef0c7
|
[
"MIT"
] | null | null | null |
# Non-parametric optimization.<br>
# Find interesting bits. Combine them. Repeat.<br>
# [home](http://menzies.us/bnbab2) :: [lib](http://menzies.us/bnbad2/lib.html) ::
# [cols](http://menzies.us/bnbad2/tab.html) :: [tbl](http://menzies.us/bnbad2/grow.html)<br>
# <hr>
# <a href="http://github.com/timm/bnbad2"><img src="https://github.com/timm/bnbad2/raw/main/etc/img/banner.png" align=left></a>
# <p><a href="https://zenodo.org/badge/latestdoi/326061406"><img src="https://zenodo.org/badge/326061406.svg"></a>
# <br><img src="https://img.shields.io/badge/language-python3,bash-blue">
# <br><a href="https://badge.fury.io/py/bnbad2"><img src="https://badge.fury.io/py/bnbad2.svg" alt="PyPI version" height="18"></a>
# <br><img src="https://img.shields.io/badge/purpose-ai%20,%20se-blueviolet">
# <br><a href="https://travis-ci.com/timm/bnbad2"><img src="https://travis-ci.com/timm/bnbad2.svg?branch=main"></a>
# <br><img src="https://img.shields.io/badge/license-mit-lightgrey"></p><hr>
"""
Optimizer, written as a data miner. Break the data up into regions
of 'bad' and 'better'. 'Interesting' things occur at very different
frequencies in 'bad' and 'better'. Find interesting bits. Combine
them. Repeat. Nearly all this processing takes log linear time.
:-------:
| Ba | Bad <----. planning = max(better - bad)
| 56 | | monitor = max(bad - better)
:-------:------: | tabu = min(bad + better)
| B | v active learning = find better == bad
| 5 | Better
:------:
"""
from .__init__ import *
print(3)
#if it.w: Eg.walk(it.w)
#if it.T: Eg.runall()
# elif it.t: Eg.run(it.t)
# elif it.V: version()
| 48.138889
| 130
| 0.61281
| 256
| 1,733
| 4.132813
| 0.484375
| 0.039698
| 0.072779
| 0.053875
| 0.278828
| 0.278828
| 0.087902
| 0.087902
| 0.087902
| 0
| 0
| 0.027121
| 0.170225
| 1,733
| 35
| 131
| 49.514286
| 0.708623
| 0.956145
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0.5
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 1
|
0
| 4
|
fcbb1d5d49103585ab961f52ce6905a86bf3f70c
| 8,891
|
py
|
Python
|
query/watdiv/query_graphs.py
|
mazlo/lodcc
|
dcc3403fe7785c9dc73f09154f397c0ff42f1920
|
[
"MIT"
] | 2
|
2018-12-09T16:34:22.000Z
|
2021-02-18T23:45:29.000Z
|
query/watdiv/query_graphs.py
|
mazlo/lodcc
|
dcc3403fe7785c9dc73f09154f397c0ff42f1920
|
[
"MIT"
] | null | null | null |
query/watdiv/query_graphs.py
|
mazlo/lodcc
|
dcc3403fe7785c9dc73f09154f397c0ff42f1920
|
[
"MIT"
] | 1
|
2018-04-30T08:25:09.000Z
|
2018-04-30T08:25:09.000Z
|
from graph_tool import Graph
def query_graph_l1():
G=Graph( directed=True )
v0=G.add_vertex()
v1=G.add_vertex()
v2=G.add_vertex()
v3=G.add_vertex()
G.add_edge(v0,v1) # e0
G.add_edge(v0,v2) # e1
G.add_edge(v2,v3) # e2
return G
def query_graph_l2():
G=Graph( directed=True )
v0=G.add_vertex()
v1=G.add_vertex()
v2=G.add_vertex()
v3=G.add_vertex()
G.add_edge(v2,v3) # e0, wsdbm:likes
G.add_edge(v2,v1) # e1, sorg:nationality
G.add_edge(v0,v1) # e2, gn:parentCountry, switched directions
return G
def query_graph_l3():
G=Graph( directed=True )
v0=G.add_vertex()
v1=G.add_vertex()
v2=G.add_vertex()
G.add_edge(v0,v1) # e0, wsdbm:likes
G.add_edge(v0,v2) # e1, wsdbm:subscribes
return G
def query_graph_l4():
G=Graph( directed=True )
v0=G.add_vertex()
v1=G.add_vertex()
v2=G.add_vertex()
G.add_edge(v0,v1) # e0, og:tag
G.add_edge(v0,v2) # e1, sorg:caption
return G
def query_graph_l5():
G=Graph( directed=True )
v0=G.add_vertex()
v1=G.add_vertex()
v2=G.add_vertex()
v3=G.add_vertex()
G.add_edge(v0,v1) # e0, sorg:jobTitle
G.add_edge(v0,v3) # e1, sorg:nationality
G.add_edge(v2,v3) # e2, gn:parentCountry
return G
def query_graph_s1():
"""query s1"""
G=Graph( directed=True )
v0=G.add_vertex()
v1=G.add_vertex()
v2=G.add_vertex()
v3=G.add_vertex()
v4=G.add_vertex()
v5=G.add_vertex()
v6=G.add_vertex()
v7=G.add_vertex()
v8=G.add_vertex()
v9=G.add_vertex()
G.add_edge(v0,v1) # e0, gr:includes
G.add_edge(v2,v0) # e1, gr:offers
G.add_edge(v0,v3) # e2, gr:price
G.add_edge(v0,v4) # e3, gr:serial_number
G.add_edge(v0,v5) # e4, gr:validFrom
G.add_edge(v0,v6) # e5, gr:validThrough
G.add_edge(v0,v7) # e6, sorg:eligible_Region
G.add_edge(v0,v8) # e7, sorg:eligible_Region
G.add_edge(v0,v9) # e8, gr:priceValidUntil
return G
def query_graph_s2():
"""query s2"""
G=Graph( directed=True )
v0=G.add_vertex()
v1=G.add_vertex()
v2=G.add_vertex()
v3=G.add_vertex()
v4=G.add_vertex()
G.add_edge(v0,v1) # e0, dc:Location
G.add_edge(v0,v2) # e1, sorg:nationality
G.add_edge(v0,v3) # e2, wsdbm:gender
G.add_edge(v0,v4) # e3, rdf:type
return G
def query_graph_s3():
"""query s3"""
G=Graph( directed=True )
v0=G.add_vertex()
v1=G.add_vertex()
v2=G.add_vertex()
v3=G.add_vertex()
v4=G.add_vertex()
G.add_edge(v0,v1) # e0, rdf:type
G.add_edge(v0,v2) # e1, sorg:caption
G.add_edge(v0,v3) # e2, wsdbm:hasGenre
G.add_edge(v0,v4) # e3, sorg:publisher
return G
def query_graph_s4():
"""query s4"""
G=Graph( directed=True )
v0=G.add_vertex()
v1=G.add_vertex()
v2=G.add_vertex()
v3=G.add_vertex()
v4=G.add_vertex()
G.add_edge(v0,v1) # e0, foaf:age
G.add_edge(v0,v2) # e1, foaf:familyName
G.add_edge(v3,v0) # e2, mo:artist
G.add_edge(v0,v4) # e3, sorg:nationality
return G
def query_graph_s5():
"""query s5"""
G=Graph( directed=True )
v0=G.add_vertex()
v1=G.add_vertex()
v2=G.add_vertex()
v3=G.add_vertex()
v4=G.add_vertex()
G.add_edge(v0,v1) # e0, dc:Location
G.add_edge(v0,v2) # e1, sorg:nationality
G.add_edge(v0,v3) # e2, wsdbm:gender
G.add_edge(v0,v4) # e3, rdf:type
return G
def query_graph_s6():
"""query s6"""
G=Graph( directed=True )
v0=G.add_vertex()
v1=G.add_vertex()
v2=G.add_vertex()
v3=G.add_vertex()
G.add_edge(v0,v1) # e0, mo:conductor
G.add_edge(v0,v2) # e1, rdf:type
G.add_edge(v0,v3) # e2, wsdbm:hasGenre
return G
def query_graph_s7():
"""query s7"""
G=Graph( directed=True )
v0=G.add_vertex()
v1=G.add_vertex()
v2=G.add_vertex()
v3=G.add_vertex()
G.add_edge(v0,v1) # e0, rdf:type
G.add_edge(v0,v2) # e1, sorg:text
G.add_edge(v3,v0) # e2, wsdbm:likes
return G
def query_graph_f1():
"""query f1"""
G=Graph( directed=True )
v0=G.add_vertex()
v1=G.add_vertex()
v2=G.add_vertex()
v3=G.add_vertex()
v4=G.add_vertex()
v5=G.add_vertex()
v6=G.add_vertex()
G.add_edge(v0,v1) # e0, og:tag
G.add_edge(v0,v2) # e1, rdf:type
G.add_edge(v3,v0) # e2, wsdbm:hasGenre
G.add_edge(v3,v4) # e3, sorg:trailer
G.add_edge(v3,v5) # e4, rdf:type
G.add_edge(v3,v6) # e5, sorg:keywords
return G
def query_graph_f2():
"""query f2"""
G=Graph( directed=True )
v0=G.add_vertex()
v1=G.add_vertex()
v2=G.add_vertex()
v3=G.add_vertex()
v4=G.add_vertex()
v5=G.add_vertex()
v6=G.add_vertex()
v7=G.add_vertex()
v8=G.add_vertex()
G.add_edge(v0,v1) # e0, foaf:homepage
G.add_edge(v0,v2) # e1, og:title
G.add_edge(v0,v3) # e2, rdf:type
G.add_edge(v0,v4) # e3, sorg:caption
G.add_edge(v0,v5) # e4, sorg:description
G.add_edge(v1,v6) # e5, sorg:url
G.add_edge(v1,v7) # e6, wsdbm:hits
G.add_edge(v0,v8) # e7, wsdbm:hasGenre
return G
def query_graph_f3():
"""query f3"""
G=Graph( directed=True )
v0=G.add_vertex()
v1=G.add_vertex()
v2=G.add_vertex()
v3=G.add_vertex()
v4=G.add_vertex()
v5=G.add_vertex()
v6=G.add_vertex()
G.add_edge(v0,v1) # e0, sorg:contentRating
G.add_edge(v0,v2) # e1, sorg:contentSize
G.add_edge(v0,v3) # e2, wsdbm:HasGenre
G.add_edge(v5,v0) # e3, wsdbm:purchaseFor
G.add_edge(v4,v5) # e4, wsdbm:makesPurchase
G.add_edge(v5,v6) # e5, wsdbm:purchaseDate
return G
def query_graph_f4():
"""query f4"""
G=Graph( directed=True )
v0=G.add_vertex()
v1=G.add_vertex()
v2=G.add_vertex()
v3=G.add_vertex()
v4=G.add_vertex()
v5=G.add_vertex()
v6=G.add_vertex()
v7=G.add_vertex()
v8=G.add_vertex()
v9=G.add_vertex()
G.add_edge(v0,v1) # e0, foaf:homepage
G.add_edge(v2,v0) # e1, gr:includes
G.add_edge(v0,v3) # e2, og:title
G.add_edge(v0,v4) # e3, sorg:description
G.add_edge(v0,v8) # e4, sorg:contentSize
G.add_edge(v1,v5) # e5, sorg:url
G.add_edge(v1,v6) # e6, wsdbm:hits
G.add_edge(v7,v1) # e7, wsdbm:likes
G.add_edge(v1,v9) # e8, sorg:language
return G
def query_graph_f5():
"""query f5"""
G=Graph( directed=True )
v0=G.add_vertex()
v1=G.add_vertex()
v2=G.add_vertex()
v3=G.add_vertex()
v4=G.add_vertex()
v5=G.add_vertex()
v6=G.add_vertex()
G.add_edge(v0,v1) # e0, gr:includes
G.add_edge(v2,v0) # e1, gr:offers
G.add_edge(v0,v3) # e2, gr:price
G.add_edge(v0,v4) # e3, gr:validThrough
G.add_edge(v1,v5) # e4, og:title
G.add_edge(v1,v6) # e5, rdf:type
return G
def query_graph_c1():
"""query c1"""
G=Graph( directed=True )
v0=G.add_vertex()
v1=G.add_vertex()
v2=G.add_vertex()
v3=G.add_vertex()
v4=G.add_vertex()
v5=G.add_vertex()
v6=G.add_vertex()
v7=G.add_vertex()
v8=G.add_vertex()
G.add_edge(v0,v1) # e0, sorg:caption
G.add_edge(v0,v2) # e1, sorg:text
G.add_edge(v0,v3) # e2, sorg:contentRating
G.add_edge(v0,v4) # e3, rev:hasReview
G.add_edge(v4,v5) # e4, rev:title
G.add_edge(v4,v6) # e5, rev:reviewer
G.add_edge(v7,v6) # e6, sorg:actor
G.add_edge(v7,v8) # e7, sorg:language
return G
def query_graph_c2():
"""query c2"""
G=Graph( directed=True )
v0=G.add_vertex()
v1=G.add_vertex()
v2=G.add_vertex()
v3=G.add_vertex()
v4=G.add_vertex()
v5=G.add_vertex()
v6=G.add_vertex()
v7=G.add_vertex()
v8=G.add_vertex()
v9=G.add_vertex()
v10=G.add_vertex()
G.add_edge(v0,v1) # e0, sorg:legalName
G.add_edge(v0,v2) # e1, gr:offers
G.add_edge(v2,v3) # e2, gr:includes
G.add_edge(v2,v5) # e3, sorg:eligibleRegion
G.add_edge(v3,v8) # e4, sorg:actor
G.add_edge(v8,v9) # e5, rev:totalVotes
G.add_edge(v7,v3) # e6, wsdbm:purchaseFor
G.add_edge(v4,v7) # e7, wsdbm:makesPurchase
G.add_edge(v4,v10) # e8, sorg:jobTitle
G.add_edge(v4,v6) # e9, foaf:homepage
return G
def query_graph_c3():
"""query c3"""
G=Graph( directed=True )
v0=G.add_vertex()
v1=G.add_vertex()
v2=G.add_vertex()
v3=G.add_vertex()
v4=G.add_vertex()
v5=G.add_vertex()
v6=G.add_vertex()
G.add_edge(v0,v1) # e0, wsdbm:likes
G.add_edge(v0,v2) # e1, wsdbm:friendOf
G.add_edge(v0,v3) # e2, dc:Location
G.add_edge(v0,v4) # e3, foaf:age
G.add_edge(v0,v5) # e4, wsdbm:gender
G.add_edge(v0,v6) # e5, foaf:givenName
return G
| 23.274869
| 65
| 0.592734
| 1,550
| 8,891
| 3.225806
| 0.073548
| 0.1808
| 0.246
| 0.134
| 0.873
| 0.764
| 0.6464
| 0.571
| 0.5636
| 0.5636
| 0
| 0.069917
| 0.245529
| 8,891
| 382
| 66
| 23.274869
| 0.675462
| 0.213812
| 0
| 0.857143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.069686
| false
| 0
| 0.003484
| 0
| 0.142857
| 0
| 0
| 0
| 0
| null | 0
| 1
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
fcc167a1c7e5cf52080f436b9548da16b8c306eb
| 26
|
py
|
Python
|
data/studio21_generated/introductory/3415/starter_code.py
|
vijaykumawat256/Prompt-Summarization
|
614f5911e2acd2933440d909de2b4f86653dc214
|
[
"Apache-2.0"
] | null | null | null |
data/studio21_generated/introductory/3415/starter_code.py
|
vijaykumawat256/Prompt-Summarization
|
614f5911e2acd2933440d909de2b4f86653dc214
|
[
"Apache-2.0"
] | null | null | null |
data/studio21_generated/introductory/3415/starter_code.py
|
vijaykumawat256/Prompt-Summarization
|
614f5911e2acd2933440d909de2b4f86653dc214
|
[
"Apache-2.0"
] | null | null | null |
def build_palindrome(s):
| 13
| 24
| 0.769231
| 4
| 26
| 4.75
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.115385
| 26
| 2
| 25
| 13
| 0.826087
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
fcda9dca6516cb647f9206d8c859b9bdfe11bde9
| 302
|
py
|
Python
|
Bitmap Creator/NanometerPixelConverter.py
|
mdshane/semhelper
|
eeb177cb2fec22e53f46c24fbcfa1485cfa78005
|
[
"MIT"
] | 1
|
2019-11-11T16:47:41.000Z
|
2019-11-11T16:47:41.000Z
|
Bitmap Creator/NanometerPixelConverter.py
|
mdshane/semhelper
|
eeb177cb2fec22e53f46c24fbcfa1485cfa78005
|
[
"MIT"
] | null | null | null |
Bitmap Creator/NanometerPixelConverter.py
|
mdshane/semhelper
|
eeb177cb2fec22e53f46c24fbcfa1485cfa78005
|
[
"MIT"
] | null | null | null |
class NanometerPixelConverter:
def __init__(self, pitch_nm: float):
self._pitch_nm = pitch_nm
def to_pixel(self, value_nm: float) -> int:
return int(value_nm / self._pitch_nm)
def to_nm(self, value_pixel: int) -> float:
return value_pixel * self._pitch_nm
| 30.2
| 47
| 0.65894
| 42
| 302
| 4.309524
| 0.309524
| 0.19337
| 0.243094
| 0.132597
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.248344
| 302
| 10
| 48
| 30.2
| 0.797357
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.428571
| false
| 0
| 0
| 0.285714
| 0.857143
| 0
| 0
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
fceb4d63190a0c8ed6d9bfd2e52a2864a4cfd3f7
| 288
|
py
|
Python
|
testplan/cli/commands/__init__.py
|
Morgan-Stanley/Testplan
|
9374d6e0da6ae9aa7a1b5e08b42cd21993485837
|
[
"Apache-2.0"
] | null | null | null |
testplan/cli/commands/__init__.py
|
Morgan-Stanley/Testplan
|
9374d6e0da6ae9aa7a1b5e08b42cd21993485837
|
[
"Apache-2.0"
] | null | null | null |
testplan/cli/commands/__init__.py
|
Morgan-Stanley/Testplan
|
9374d6e0da6ae9aa7a1b5e08b42cd21993485837
|
[
"Apache-2.0"
] | null | null | null |
from .readers import single_reader_commands, multi_reader_commands
from .writers import writer_commands
from ..utils.command_list import CommandList
reader_commands = CommandList(
commands=[
*single_reader_commands.commands,
*multi_reader_commands.commands,
]
)
| 24
| 66
| 0.774306
| 32
| 288
| 6.625
| 0.40625
| 0.330189
| 0.188679
| 0.254717
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.163194
| 288
| 11
| 67
| 26.181818
| 0.879668
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.333333
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
fcef0f3f0b1359e838edb042fc51185791eb4506
| 38
|
py
|
Python
|
taggit/__init__.py
|
theatlantic/django-taggit2
|
66bc750544fb0c338fd0ac3a388cd90cc02bece1
|
[
"BSD-3-Clause"
] | null | null | null |
taggit/__init__.py
|
theatlantic/django-taggit2
|
66bc750544fb0c338fd0ac3a388cd90cc02bece1
|
[
"BSD-3-Clause"
] | null | null | null |
taggit/__init__.py
|
theatlantic/django-taggit2
|
66bc750544fb0c338fd0ac3a388cd90cc02bece1
|
[
"BSD-3-Clause"
] | null | null | null |
__version__ = "{}.{}.{}".format(1,0,1)
| 38
| 38
| 0.526316
| 5
| 38
| 3.2
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.083333
| 0.052632
| 38
| 1
| 38
| 38
| 0.361111
| 0
| 0
| 0
| 0
| 0
| 0.205128
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
1e1da164cdc4f950fbb6d922767c6c744714f925
| 1,423
|
bzl
|
Python
|
js/private/starlark_codegen_utils.bzl
|
stoiky/rules_js
|
e61b61b98c2f5c733bf804f78db9f55b1fb2d599
|
[
"Apache-2.0"
] | null | null | null |
js/private/starlark_codegen_utils.bzl
|
stoiky/rules_js
|
e61b61b98c2f5c733bf804f78db9f55b1fb2d599
|
[
"Apache-2.0"
] | null | null | null |
js/private/starlark_codegen_utils.bzl
|
stoiky/rules_js
|
e61b61b98c2f5c733bf804f78db9f55b1fb2d599
|
[
"Apache-2.0"
] | null | null | null |
"Utilities for generating starlark source code"
def _to_list_attr(list, indent_count = 0, indent_size = 4, quote_value = True):
if not list:
return "[]"
tab = " " * indent_size
indent = tab * indent_count
result = "["
for v in list:
val = "\"{}\"".format(v) if quote_value else v
result += "\n%s%s%s," % (indent, tab, val)
result += "\n%s]" % indent
return result
def _to_dict_attr(dict, indent_count = 0, indent_size = 4, quote_key = True, quote_value = True):
if not len(dict):
return "{}"
tab = " " * indent_size
indent = tab * indent_count
result = "{"
for k, v in dict.items():
key = "\"{}\"".format(k) if quote_key else k
val = "\"{}\"".format(v) if quote_value else v
result += "\n%s%s%s: %s," % (indent, tab, key, val)
result += "\n%s}" % indent
return result
def _to_dict_list_attr(dict, indent_count = 0, indent_size = 4, quote_key = True):
if not len(dict):
return "{}"
tab = " " * indent_size
indent = tab * indent_count
result = "{"
for k, v in dict.items():
key = "\"{}\"".format(k) if quote_key else k
result += "\n%s%s%s: %s," % (indent, tab, key, v)
result += "\n%s}" % indent
return result
starlark_codegen_utils = struct(
to_list_attr = _to_list_attr,
to_dict_attr = _to_dict_attr,
to_dict_list_attr = _to_dict_list_attr,
)
| 31.622222
| 97
| 0.578356
| 208
| 1,423
| 3.721154
| 0.182692
| 0.020672
| 0.062016
| 0.069767
| 0.851421
| 0.780362
| 0.70801
| 0.671835
| 0.671835
| 0.625323
| 0
| 0.005753
| 0.267041
| 1,423
| 44
| 98
| 32.340909
| 0.736337
| 0.031623
| 0
| 0.575
| 0
| 0
| 0.078004
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.075
| false
| 0
| 0
| 0
| 0.225
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
1e2082b4c7d7c1da079de478df4e6adabc4ec4e7
| 1,462
|
py
|
Python
|
day3.py
|
Allen-xmz/selenium_basic
|
7735497abf45834aec0a6c1e607fea1e010d43e4
|
[
"Apache-2.0"
] | null | null | null |
day3.py
|
Allen-xmz/selenium_basic
|
7735497abf45834aec0a6c1e607fea1e010d43e4
|
[
"Apache-2.0"
] | null | null | null |
day3.py
|
Allen-xmz/selenium_basic
|
7735497abf45834aec0a6c1e607fea1e010d43e4
|
[
"Apache-2.0"
] | null | null | null |
# author:Allen
# str = 'tyuioph'
# range(10) #代表数值范围0-9
# for i in range(1,10,2):
# print(i)
# for i in range(len(str)):
# print(str[i])
# lis = [1,2,3,4,5,6,7,8,9] #[1,4,9,16,25,36,49,64,81]
# lis2 = []
# for i in lis: #等同于 lis2 = [i**2 for i in lis2]
# i = i**2
# lis2.append(i)
# print(lis2)
# lis = [1,2,3,4,5,6,7,8,9]
# lis1 = []
# lis2 = lis[::2]
# for i in lis2:
# i = i**2
# lis1.append(i)
# print(lis1)
# lis1 = []
# lis = [1,2,3,4,5,6,7,8,9]
# for i in lis: #等同于lis1 =[a**2 for a in lis if a %2 !=0]
# if i %2 != 0:
# i =i**2
# lis1.append(i)
# print(lis1)
# list = [3**a for a in range(6)]
# print(list)
#乘法表
# for i in range(1,10):
# for j in range(1,i+1):
# #print(j,'*',i,'=',i*j,end='\t')
# print('%d*%d=%d'%(j,i,j*i),end='\t') #格式化字符串
# print(end='\n')
#格式化字符串
# print( '%d*%d=%d' % (j,i,i*j) )
# print('我叫%s,今年%d了'%('小明',28)) #字符串用%s,数字用%d,小数用%f
# list =[6,3,4]
# for i in list:
# for j in list:
# for k in list:
# if i!=j and j!=k and i!=k:
# print(i*100+j*10+i)
# #求1加到100 的和
# a=1
# b=0
# while a <=100:
# b =a+b
# a+=1
# print(b)
# a = 1
# b = 0
# sum = 0
# while sum<=1000:
# sum = sum + a
# a=2**a
# b+=1
# print(b)
# def name(): #定义函数时,括号里的是参数;调用函数时,括号里是具体的值
# return 0 #return返回的值是给调用者看的,print是给终端打印的
import request
| 17.614458
| 73
| 0.453488
| 275
| 1,462
| 2.410909
| 0.269091
| 0.048265
| 0.072398
| 0.049774
| 0.233786
| 0.233786
| 0.161388
| 0.161388
| 0.054299
| 0.054299
| 0
| 0.110228
| 0.311218
| 1,462
| 82
| 74
| 17.829268
| 0.548163
| 0.885089
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
1e52467066ef905c61bda4b92c74fff43b2c32db
| 16
|
py
|
Python
|
rpc/__init__.py
|
MericD/Bitcoin-Transaction-Parser
|
c08c0efeb7b9ea8abea6905e5960d294abbdd6d1
|
[
"MIT"
] | null | null | null |
rpc/__init__.py
|
MericD/Bitcoin-Transaction-Parser
|
c08c0efeb7b9ea8abea6905e5960d294abbdd6d1
|
[
"MIT"
] | 1
|
2019-02-17T21:08:50.000Z
|
2019-02-17T21:19:06.000Z
|
rpc/__init__.py
|
MericD/Python-Bitcoin-Transaction-Parser
|
c08c0efeb7b9ea8abea6905e5960d294abbdd6d1
|
[
"MIT"
] | null | null | null |
__all__ =["rpc"]
| 16
| 16
| 0.625
| 2
| 16
| 3
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.0625
| 16
| 1
| 16
| 16
| 0.4
| 0
| 0
| 0
| 0
| 0
| 0.176471
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
1e64f2f795ba867e5ce20370fa7bc83b772d42cb
| 330
|
py
|
Python
|
adlmagics/adlmagics/presenters/text_presenter.py
|
Azure/Azure-Data-Service-Notebook
|
6bd28587c9fa0a7c1f9113f638b790b1773c5585
|
[
"MIT"
] | 6
|
2018-06-06T08:37:53.000Z
|
2020-06-01T13:13:13.000Z
|
adlmagics/adlmagics/presenters/text_presenter.py
|
Azure/Azure-Data-Service-Notebook
|
6bd28587c9fa0a7c1f9113f638b790b1773c5585
|
[
"MIT"
] | 30
|
2018-06-08T02:47:18.000Z
|
2018-07-25T07:07:07.000Z
|
adlmagics/adlmagics/presenters/text_presenter.py
|
Azure/Azure-Data-Service-Notebook
|
6bd28587c9fa0a7c1f9113f638b790b1773c5585
|
[
"MIT"
] | 5
|
2018-06-06T08:37:55.000Z
|
2021-01-07T09:15:15.000Z
|
from sys import stdout
from os import linesep
from adlmagics.presenters.presenter_base import PresenterBase
class TextPresenter(PresenterBase):
def is_presentable(self, obj):
return isinstance(obj, str)
def present(self, obj):
super(TextPresenter, self).present(obj)
stdout.write(obj + linesep)
| 25.384615
| 61
| 0.730303
| 40
| 330
| 5.975
| 0.6
| 0.058577
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.190909
| 330
| 13
| 62
| 25.384615
| 0.895131
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.222222
| false
| 0
| 0.333333
| 0.111111
| 0.777778
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 1
| 1
| 0
|
0
| 4
|
1eabe553543fb0487bd5639d79285f3b3027ee1f
| 676
|
py
|
Python
|
ffi/python/tests/test_default_record.py
|
Wave-View-Imaging/citi
|
82e99760489f02a9ad311b9bf178d0995e7926ea
|
[
"CNRI-Python"
] | null | null | null |
ffi/python/tests/test_default_record.py
|
Wave-View-Imaging/citi
|
82e99760489f02a9ad311b9bf178d0995e7926ea
|
[
"CNRI-Python"
] | 9
|
2021-05-12T15:30:00.000Z
|
2022-03-17T19:53:46.000Z
|
ffi/python/tests/test_default_record.py
|
Wave-View-Imaging/citi
|
82e99760489f02a9ad311b9bf178d0995e7926ea
|
[
"CNRI-Python"
] | null | null | null |
import unittest
from citi import Record
class TestDefaultRecord(unittest.TestCase):
def setUp(self):
self.record = Record()
def test_version(self):
self.assertEqual(self.record.version, "A.01.00")
def test_name(self):
self.assertEqual(self.record.name, "")
def test_comments(self):
self.assertEqual(len(self.record.comments), 0)
def test_devices(self):
self.assertEqual(len(self.record.devices), 0)
def test_independent_variable(self):
self.assertEqual(self.record.independent_variable, (
"", "", []
))
def test_data(self):
self.assertEqual(self.record.data, [])
| 23.310345
| 60
| 0.643491
| 79
| 676
| 5.405063
| 0.316456
| 0.131148
| 0.266979
| 0.215457
| 0.421546
| 0.149883
| 0
| 0
| 0
| 0
| 0
| 0.011494
| 0.227811
| 676
| 28
| 61
| 24.142857
| 0.806513
| 0
| 0
| 0
| 0
| 0
| 0.010355
| 0
| 0
| 0
| 0
| 0
| 0.315789
| 1
| 0.368421
| false
| 0
| 0.105263
| 0
| 0.526316
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
1ec6e72a4196cfc0a9ab1e7a5e2ecebd943b30f7
| 333
|
py
|
Python
|
tests/tools/linearizable/killcluster/generate_correct_out.py
|
mikesep/comdb2
|
b30daafa80221980416bd130dabbdb72de7c4fa0
|
[
"Apache-2.0"
] | 1,133
|
2017-05-17T16:01:52.000Z
|
2022-03-24T04:18:25.000Z
|
tests/tools/linearizable/killcluster/generate_correct_out.py
|
mikesep/comdb2
|
b30daafa80221980416bd130dabbdb72de7c4fa0
|
[
"Apache-2.0"
] | 1,843
|
2017-05-17T19:47:29.000Z
|
2022-03-31T20:51:54.000Z
|
tests/tools/linearizable/killcluster/generate_correct_out.py
|
mikesep/comdb2
|
b30daafa80221980416bd130dabbdb72de7c4fa0
|
[
"Apache-2.0"
] | 195
|
2017-05-17T16:14:19.000Z
|
2022-03-30T18:24:42.000Z
|
#!/usr/bin/python
print "[set hasql on] rc 0"
print "[set transaction serializable] rc 0"
print "[begin] rc 0"
print "[insert into jepsen values(1,1)] rc 0"
print "[insert into jepsen values(2,2)] rc 0"
i=0
while ( i < 2000000 ) :
print "(a=%d)" % i
i=i+1
print "[select * from t1 order by a] rc 0"
print "[commit] rc 0"
| 19.588235
| 45
| 0.627628
| 62
| 333
| 3.370968
| 0.467742
| 0.100478
| 0.191388
| 0.133971
| 0.287081
| 0.287081
| 0.287081
| 0
| 0
| 0
| 0
| 0.079848
| 0.21021
| 333
| 16
| 46
| 20.8125
| 0.714829
| 0.048048
| 0
| 0
| 0
| 0
| 0.612698
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 0.727273
| 0
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
1ecac0e7d78ee687c1bacf5cb1c561ad32c70ad4
| 8,123
|
py
|
Python
|
robogym/envs/dactyl/tests/test_cube_manipulator.py
|
0xflotus/robogym
|
5ec2fcbda9828941fe3072792dd25fb5a915bbbb
|
[
"MIT"
] | 288
|
2020-11-12T21:39:34.000Z
|
2022-03-19T23:27:50.000Z
|
robogym/envs/dactyl/tests/test_cube_manipulator.py
|
0xflotus/robogym
|
5ec2fcbda9828941fe3072792dd25fb5a915bbbb
|
[
"MIT"
] | 3
|
2020-12-12T19:19:30.000Z
|
2022-03-24T05:21:39.000Z
|
robogym/envs/dactyl/tests/test_cube_manipulator.py
|
0xflotus/robogym
|
5ec2fcbda9828941fe3072792dd25fb5a915bbbb
|
[
"MIT"
] | 31
|
2020-11-12T22:31:01.000Z
|
2022-02-28T20:34:48.000Z
|
import numpy as np
import pycuber
import robogym.utils.rotation as rotation
from robogym.envs.dactyl.full_perpendicular import FullPerpendicularSimulation
X_AXIS = 0
Y_AXIS = 1
Z_AXIS = 2
NEGATIVE_SIDE = 0
POSITIVE_SIDE = 1
def _full_side_idx(axis, side):
# DRIVER ORDER IS:
# -x, +x, -y, +y, -z, +z
return axis * 2 + side
def test_cube_manipulator_drivers():
"""
Test CubeManipulator class if it manages to manipulates cubelets properly
"""
mujoco_simulation = FullPerpendicularSimulation.build(n_substeps=10)
for axis in [X_AXIS, Y_AXIS, Z_AXIS]:
for side in [NEGATIVE_SIDE, POSITIVE_SIDE]:
# Reset simulation
mujoco_simulation.set_qpos("cube_all_joints", 0.0)
mujoco_simulation.cube_model.rotate_face(axis, side, np.pi / 2)
target_angle = np.zeros(6, dtype=float)
target_angle[_full_side_idx(axis, side)] = np.pi / 2
assert (
np.linalg.norm(
mujoco_simulation.get_qpos("cube_drivers") - target_angle
)
< 1e-6
)
def test_cube_manipulator_drivers_sequence():
"""
Test CubeManipulator class if it manages to manipulate cubelets properly
"""
mujoco_simulation = FullPerpendicularSimulation.build(n_substeps=10)
mujoco_simulation.cube_model.rotate_face(X_AXIS, POSITIVE_SIDE, np.pi / 2)
mujoco_simulation.cube_model.rotate_face(Y_AXIS, POSITIVE_SIDE, np.pi / 2)
mujoco_simulation.cube_model.rotate_face(Z_AXIS, POSITIVE_SIDE, np.pi / 2)
mujoco_simulation.cube_model.rotate_face(Y_AXIS, POSITIVE_SIDE, np.pi / 2)
mujoco_simulation.cube_model.rotate_face(X_AXIS, POSITIVE_SIDE, np.pi / 2)
target_angle = np.array([0.0, np.pi, 0.0, np.pi, 0.0, np.pi / 2])
assert (
np.linalg.norm(mujoco_simulation.get_qpos("cube_drivers") - target_angle) < 1e-6
)
POSSIBLE_COORDS = [-1, 0, 1]
def _assert_cubelet_coords(manipulator, original_coords, current_coords):
""" Check if given cubelet is present at given coords"""
indexes = original_coords.round().astype(int) + 1
coord_idx = indexes[0] * 9 + indexes[1] * 3 + indexes[2]
meta_info = manipulator.cubelet_meta_info[coord_idx]
assert np.linalg.norm(meta_info["coords"] - original_coords) < 1e-6
if meta_info["type"] == "cubelet":
mtx = manipulator._cubelet_rotation_matrix(meta_info, manipulator.sim.data.qpos)
actual_current_coords = mtx @ original_coords.astype(float)
assert np.linalg.norm(actual_current_coords - current_coords) < 1e-6
def test_cube_manipulator_cubelet_positions():
"""
Test CubeManipulator class if it manages to manipulates cubelets properly
"""
mujoco_simulation = FullPerpendicularSimulation.build(n_substeps=10)
for x_coord in POSSIBLE_COORDS:
for y_coord in POSSIBLE_COORDS:
for z_coord in POSSIBLE_COORDS:
coords = np.array([x_coord, y_coord, z_coord])
_assert_cubelet_coords(mujoco_simulation.cube_model, coords, coords)
mujoco_simulation.cube_model.rotate_face(X_AXIS, POSITIVE_SIDE, np.pi / 2)
# These are not touched
for x_coord in [0, -1]:
for y_coord in POSSIBLE_COORDS:
for z_coord in POSSIBLE_COORDS:
coords = np.array([x_coord, y_coord, z_coord])
_assert_cubelet_coords(mujoco_simulation.cube_model, coords, coords)
# Let's check four corner cubelets just to be sure
_assert_cubelet_coords(
mujoco_simulation.cube_model, np.array([1, 1, 1]), np.array([1, -1, 1])
)
_assert_cubelet_coords(
mujoco_simulation.cube_model, np.array([1, -1, 1]), np.array([1, -1, -1])
)
_assert_cubelet_coords(
mujoco_simulation.cube_model, np.array([1, -1, -1]), np.array([1, 1, -1])
)
_assert_cubelet_coords(
mujoco_simulation.cube_model, np.array([1, 1, -1]), np.array([1, 1, 1])
)
mujoco_simulation.cube_model.rotate_face(Y_AXIS, POSITIVE_SIDE, np.pi / 2)
_assert_cubelet_coords(
mujoco_simulation.cube_model, np.array([-1, 1, -1]), np.array([-1, 1, 1])
)
_assert_cubelet_coords(
mujoco_simulation.cube_model, np.array([-1, 1, 1]), np.array([1, 1, 1])
)
_assert_cubelet_coords(
mujoco_simulation.cube_model, np.array([1, 1, -1]), np.array([1, 1, -1])
)
_assert_cubelet_coords(
mujoco_simulation.cube_model, np.array([1, -1, -1]), np.array([-1, 1, -1])
)
def test_snap_rotate_face_with_threshold():
from robogym.envs.dactyl.full_perpendicular import FullPerpendicularSimulation
mujoco_simulation = FullPerpendicularSimulation.build(n_substeps=10)
mujoco_simulation.cube_model.snap_rotate_face_with_threshold(
X_AXIS, POSITIVE_SIDE, np.pi / 2
)
# These are not touched
for x_coord in [0, -1]:
for y_coord in POSSIBLE_COORDS:
for z_coord in POSSIBLE_COORDS:
coords = np.array([x_coord, y_coord, z_coord])
_assert_cubelet_coords(mujoco_simulation.cube_model, coords, coords)
# Let's check four corner cubelets just to be sure
_assert_cubelet_coords(
mujoco_simulation.cube_model, np.array([1, 1, 1]), np.array([1, -1, 1])
)
_assert_cubelet_coords(
mujoco_simulation.cube_model, np.array([1, -1, 1]), np.array([1, -1, -1])
)
_assert_cubelet_coords(
mujoco_simulation.cube_model, np.array([1, -1, -1]), np.array([1, 1, -1])
)
_assert_cubelet_coords(
mujoco_simulation.cube_model, np.array([1, 1, -1]), np.array([1, 1, 1])
)
# Rotate this face again by 45 degrees
mujoco_simulation.cube_model.snap_rotate_face_with_threshold(
X_AXIS, POSITIVE_SIDE, np.pi / 4
)
cubelets_before = mujoco_simulation.get_qpos("cube_cubelets").copy()
# None of these should do anything
mujoco_simulation.cube_model.snap_rotate_face_with_threshold(
Y_AXIS, POSITIVE_SIDE, np.pi / 8
)
mujoco_simulation.cube_model.snap_rotate_face_with_threshold(
Y_AXIS, NEGATIVE_SIDE, np.pi / 8
)
mujoco_simulation.cube_model.snap_rotate_face_with_threshold(
Z_AXIS, POSITIVE_SIDE, np.pi / 8
)
mujoco_simulation.cube_model.snap_rotate_face_with_threshold(
Z_AXIS, NEGATIVE_SIDE, np.pi / 8
)
cubelets_after = mujoco_simulation.get_qpos("cube_cubelets").copy()
assert np.linalg.norm(cubelets_before - cubelets_after) < 1e-6
# Revert
mujoco_simulation.cube_model.snap_rotate_face_with_threshold(
X_AXIS, POSITIVE_SIDE, -np.pi / 4
)
# Move a little
mujoco_simulation.cube_model.snap_rotate_face_with_threshold(
X_AXIS, POSITIVE_SIDE, 0.05
)
# Make sure cube gets realigned
mujoco_simulation.cube_model.snap_rotate_face_with_threshold(
Y_AXIS, POSITIVE_SIDE, np.pi / 2
)
_assert_cubelet_coords(
mujoco_simulation.cube_model, np.array([-1, 1, -1]), np.array([-1, 1, 1])
)
_assert_cubelet_coords(
mujoco_simulation.cube_model, np.array([-1, 1, 1]), np.array([1, 1, 1])
)
_assert_cubelet_coords(
mujoco_simulation.cube_model, np.array([1, 1, -1]), np.array([1, 1, -1])
)
_assert_cubelet_coords(
mujoco_simulation.cube_model, np.array([1, -1, -1]), np.array([-1, 1, -1])
)
cubelets_final = rotation.normalize_angles(
mujoco_simulation.get_qpos("cube_cubelets").copy()
)
assert (
np.linalg.norm(
cubelets_final - rotation.round_to_straight_angles(cubelets_final)
)
< 1e-8
)
def test_pycuber_conversion():
from robogym.envs.dactyl.full_perpendicular import FullPerpendicularSimulation
mujoco_simulation = FullPerpendicularSimulation.build()
for i in range(5):
cube = pycuber.Cube()
for action in np.random.choice(list("LRFBDU"), size=20, replace=True):
cube(str(action))
mujoco_simulation.cube_model.from_pycuber(cube)
cube2 = mujoco_simulation.cube_model.to_pycuber()
assert cube == cube2
| 31.980315
| 88
| 0.672658
| 1,113
| 8,123
| 4.601977
| 0.139263
| 0.02499
| 0.14838
| 0.185474
| 0.758883
| 0.734283
| 0.713198
| 0.691527
| 0.674932
| 0.671808
| 0
| 0.027125
| 0.219377
| 8,123
| 253
| 89
| 32.106719
| 0.780634
| 0.072756
| 0
| 0.442424
| 0
| 0
| 0.013523
| 0
| 0
| 0
| 0
| 0
| 0.163636
| 1
| 0.042424
| false
| 0
| 0.036364
| 0.006061
| 0.084848
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 1
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
948e88e23eaa5553fc728059de0106e830569862
| 192
|
py
|
Python
|
test/run_tests_not_in_package.py
|
abarker/pytest-helper
|
8580aee9bb95c3eceaac8273b46284d1862f8e6a
|
[
"MIT"
] | 2
|
2019-12-09T07:09:39.000Z
|
2020-04-16T15:16:56.000Z
|
test/run_tests_not_in_package.py
|
abarker/pytest-helper
|
8580aee9bb95c3eceaac8273b46284d1862f8e6a
|
[
"MIT"
] | null | null | null |
test/run_tests_not_in_package.py
|
abarker/pytest-helper
|
8580aee9bb95c3eceaac8273b46284d1862f8e6a
|
[
"MIT"
] | null | null | null |
from __future__ import print_function, absolute_import, division
if __name__ == "__main__":
import pytest_helper
pytest_helper.script_run("test_intro_example.py", pytest_args="-v")
| 24
| 71
| 0.776042
| 25
| 192
| 5.16
| 0.8
| 0.186047
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.130208
| 192
| 7
| 72
| 27.428571
| 0.772455
| 0
| 0
| 0
| 0
| 0
| 0.163158
| 0.110526
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0.25
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
94a061e1d0fa7f4832efa099edac13abb7acc260
| 2,929
|
py
|
Python
|
z2/part3/updated_part2_batch/jm/parser_errors_2/753513507.py
|
kozakusek/ipp-2020-testy
|
09aa008fa53d159672cc7cbf969a6b237e15a7b8
|
[
"MIT"
] | 1
|
2020-04-16T12:13:47.000Z
|
2020-04-16T12:13:47.000Z
|
z2/part3/updated_part2_batch/jm/parser_errors_2/753513507.py
|
kozakusek/ipp-2020-testy
|
09aa008fa53d159672cc7cbf969a6b237e15a7b8
|
[
"MIT"
] | 18
|
2020-03-06T17:50:15.000Z
|
2020-05-19T14:58:30.000Z
|
z2/part3/updated_part2_batch/jm/parser_errors_2/753513507.py
|
kozakusek/ipp-2020-testy
|
09aa008fa53d159672cc7cbf969a6b237e15a7b8
|
[
"MIT"
] | 18
|
2020-03-06T17:45:13.000Z
|
2020-06-09T19:18:31.000Z
|
from part1 import (
gamma_board,
gamma_busy_fields,
gamma_delete,
gamma_free_fields,
gamma_golden_move,
gamma_golden_possible,
gamma_move,
gamma_new,
)
"""
scenario: test_random_actions
uuid: 753513507
"""
"""
random actions, total chaos
"""
board = gamma_new(4, 4, 2, 8)
assert board is not None
assert gamma_move(board, 1, 0, 2) == 1
assert gamma_move(board, 1, 2, 1) == 1
assert gamma_move(board, 2, 0, 0) == 1
assert gamma_move(board, 1, 3, 1) == 1
assert gamma_move(board, 1, 0, 3) == 1
assert gamma_move(board, 2, 0, 0) == 0
assert gamma_move(board, 1, 2, 3) == 1
assert gamma_move(board, 1, 1, 2) == 1
assert gamma_move(board, 2, 0, 1) == 1
assert gamma_move(board, 2, 3, 0) == 1
assert gamma_move(board, 1, 3, 0) == 0
assert gamma_move(board, 1, 1, 3) == 1
assert gamma_free_fields(board, 1) == 6
assert gamma_golden_possible(board, 1) == 1
assert gamma_move(board, 2, 1, 1) == 1
board520860589 = gamma_board(board)
assert board520860589 is not None
assert board520860589 == ("111.\n"
"11..\n"
"2211\n"
"2..2\n")
del board520860589
board520860589 = None
assert gamma_move(board, 1, 2, 3) == 0
assert gamma_move(board, 1, 3, 1) == 0
assert gamma_busy_fields(board, 1) == 7
assert gamma_move(board, 2, 2, 2) == 1
assert gamma_move(board, 2, 1, 2) == 0
assert gamma_move(board, 1, 3, 2) == 1
assert gamma_move(board, 1, 0, 2) == 0
assert gamma_move(board, 2, 0, 1) == 0
assert gamma_move(board, 1, 0, 2) == 0
assert gamma_move(board, 2, 0, 2) == 0
assert gamma_move(board, 1, 0, 2) == 0
assert gamma_move(board, 2, 3, 3) == 1
assert gamma_move(board, 1, 0, 2) == 0
assert gamma_move(board, 1, 2, 3) == 0
assert gamma_busy_fields(board, 1) == 8
assert gamma_move(board, 2, 0, 1) == 0
assert gamma_move(board, 1, 3, 2) == 0
assert gamma_move(board, 1, 1, 0) == 1
assert gamma_move(board, 2, 0, 1) == 0
board859646833 = gamma_board(board)
assert board859646833 is not None
assert board859646833 == ("1112\n"
"1121\n"
"2211\n"
"21.2\n")
del board859646833
board859646833 = None
assert gamma_move(board, 1, 0, 2) == 0
assert gamma_busy_fields(board, 1) == 9
assert gamma_move(board, 2, 0, 2) == 0
assert gamma_move(board, 2, 1, 0) == 0
assert gamma_move(board, 1, 0, 2) == 0
assert gamma_move(board, 2, 3, 1) == 0
assert gamma_move(board, 2, 2, 1) == 0
assert gamma_busy_fields(board, 2) == 6
assert gamma_free_fields(board, 2) == 1
assert gamma_move(board, 1, 3, 1) == 0
assert gamma_move(board, 2, 0, 2) == 0
assert gamma_move(board, 1, 0, 2) == 0
assert gamma_move(board, 2, 0, 2) == 0
assert gamma_move(board, 1, 0, 2) == 0
assert gamma_move(board, 1, 0, 0) == 0
assert gamma_move(board, 2, 0, 2) == 0
assert gamma_golden_move(board, 2, 2, 3) == 1
assert gamma_move(board, 1, 0, 0) == 0
assert gamma_golden_possible(board, 1) == 1
assert gamma_move(board, 2, 2, 2) == 0
assert gamma_move(board, 2, 3, 2) == 0
gamma_delete(board)
| 29
| 46
| 0.662001
| 529
| 2,929
| 3.510397
| 0.083176
| 0.325794
| 0.371567
| 0.495423
| 0.726441
| 0.698438
| 0.692515
| 0.561659
| 0.399569
| 0.399569
| 0
| 0.139925
| 0.185046
| 2,929
| 100
| 47
| 29.29
| 0.638039
| 0
| 0
| 0.309524
| 0
| 0
| 0.016895
| 0
| 0
| 0
| 0
| 0
| 0.714286
| 1
| 0
| false
| 0
| 0.011905
| 0
| 0.011905
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
94cb36f31f866656bfb7aec75d7cb68b94d31302
| 530
|
py
|
Python
|
api/serializers.py
|
mbassale/noteprg
|
31042224c396441ba6954de4ed5d0b4f3e1efa71
|
[
"MIT"
] | null | null | null |
api/serializers.py
|
mbassale/noteprg
|
31042224c396441ba6954de4ed5d0b4f3e1efa71
|
[
"MIT"
] | 4
|
2021-03-30T12:57:11.000Z
|
2021-06-10T18:45:28.000Z
|
api/serializers.py
|
mbassale/noteprg
|
31042224c396441ba6954de4ed5d0b4f3e1efa71
|
[
"MIT"
] | null | null | null |
from django.contrib.auth.models import User, Group
from rest_framework import serializers
from notes.models import Note
class UserSerializer(serializers.ModelSerializer):
class Meta:
model = User
fields = ['id', 'username', 'email', 'groups']
class GroupSerializer(serializers.ModelSerializer):
class Meta:
model = Group
fields = ['id', 'name']
class NoteSerializer(serializers.ModelSerializer):
class Meta:
model = Note
fields = ['id', 'name', 'content', 'user']
| 24.090909
| 54
| 0.669811
| 55
| 530
| 6.436364
| 0.490909
| 0.220339
| 0.262712
| 0.29661
| 0.338983
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.218868
| 530
| 21
| 55
| 25.238095
| 0.855072
| 0
| 0
| 0.2
| 0
| 0
| 0.083019
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.2
| 0
| 0.6
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
a200d1af1bf3aa25cf92fb236dede1856a97675c
| 94
|
py
|
Python
|
3 - Python Web/Projeto Django/django-series-master/genero/admin.py
|
elton-souza/IGTI-Python
|
2633dd70af8403a6ab52f8f97ee53063dbb0ef77
|
[
"MIT"
] | null | null | null |
3 - Python Web/Projeto Django/django-series-master/genero/admin.py
|
elton-souza/IGTI-Python
|
2633dd70af8403a6ab52f8f97ee53063dbb0ef77
|
[
"MIT"
] | null | null | null |
3 - Python Web/Projeto Django/django-series-master/genero/admin.py
|
elton-souza/IGTI-Python
|
2633dd70af8403a6ab52f8f97ee53063dbb0ef77
|
[
"MIT"
] | null | null | null |
from django.contrib import admin
from genero.models import Genero
admin.site.register(Genero)
| 23.5
| 32
| 0.840426
| 14
| 94
| 5.642857
| 0.642857
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.095745
| 94
| 3
| 33
| 31.333333
| 0.929412
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.666667
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
a210888b7f59a5a543e6b931e6f9895be5bb72b2
| 3,453
|
py
|
Python
|
llvm_analysis/MainAnalysisPasses/debug_switch.py
|
plummm/dr_checker_x
|
339d8cda6b2ad119b778d941d6e4730eeda2f197
|
[
"BSD-2-Clause"
] | 12
|
2021-09-24T01:29:44.000Z
|
2022-03-04T17:32:57.000Z
|
llvm_analysis/MainAnalysisPasses/debug_switch.py
|
seclab-ucr/SUTURE
|
b970c35dfe79613bdd33526a99b73d9c814d733b
|
[
"BSD-2-Clause"
] | 1
|
2021-12-08T15:28:22.000Z
|
2021-12-09T00:07:53.000Z
|
llvm_analysis/MainAnalysisPasses/debug_switch.py
|
plummm/dr_checker_x
|
339d8cda6b2ad119b778d941d6e4730eeda2f197
|
[
"BSD-2-Clause"
] | 2
|
2021-12-20T10:09:53.000Z
|
2022-02-23T07:27:05.000Z
|
#!/usr/bin/python
import sys,os
import fileinput
rl = [
('SoundyAliasAnalysis/src/AliasAnalysisVisitor.cpp','#define DEBUG_GET_ELEMENT_PTR','//#define DEBUG_GET_ELEMENT_PTR'),
('SoundyAliasAnalysis/src/AliasAnalysisVisitor.cpp','#define DEBUG_STORE_INSTR','//#define DEBUG_STORE_INSTR'),
('SoundyAliasAnalysis/src/AliasAnalysisVisitor.cpp','#define DEBUG_CAST_INSTR','//#define DEBUG_CAST_INSTR'),
('SoundyAliasAnalysis/src/AliasAnalysisVisitor.cpp','#define DEBUG_UPDATE_POINTSTO','//#define DEBUG_UPDATE_POINTSTO'),
('SoundyAliasAnalysis/src/AliasAnalysisVisitor.cpp','#define DEBUG_HANDLE_INLINE_POINTER','//#define DEBUG_HANDLE_INLINE_POINTER'),
('SoundyAliasAnalysis/src/TaintUtils.cpp','#define DEBUG_ADD_NEW_TAINT_FLAG','//#define DEBUG_ADD_NEW_TAINT_FLAG'),
('SoundyAliasAnalysis/include/AliasObject.h','#define DEBUG_CREATE_DUMMY_OBJ_IF_NULL','//#define DEBUG_CREATE_DUMMY_OBJ_IF_NULL'),
('SoundyAliasAnalysis/include/AliasObject.h','#define DEBUG_FETCH_POINTS_TO_OBJECTS','//#define DEBUG_FETCH_POINTS_TO_OBJECTS'),
('SoundyAliasAnalysis/include/AliasObject.h','#define DEBUG_CHANGE_HEAPLOCATIONTYPE','//#define DEBUG_CHANGE_HEAPLOCATIONTYPE'),
('SoundyAliasAnalysis/include/AliasObject.h','#define DEBUG_UPDATE_FIELD_POINT','//#define DEBUG_UPDATE_FIELD_POINT'),
('SoundyAliasAnalysis/include/TaintInfo.h','#define DEBUG_UPDATE_FIELD_TAINT','//#define DEBUG_UPDATE_FIELD_TAINT'),
('SoundyAliasAnalysis/include/TaintInfo.h','#define DEBUG_FETCH_FIELD_TAINT','//#define DEBUG_FETCH_FIELD_TAINT'),
('SoundyAliasAnalysis/include/AliasObject.h','#define DEBUG_CREATE_EMB_OBJ','//#define DEBUG_CREATE_EMB_OBJ'),
('SoundyAliasAnalysis/include/AliasObject.h','#define DEBUG_CREATE_EMB_OBJ_CHAIN','//#define DEBUG_CREATE_EMB_OBJ_CHAIN'),
('SoundyAliasAnalysis/include/AliasObject.h','#define DEBUG_CREATE_HOST_OBJ','//#define DEBUG_CREATE_HOST_OBJ'),
('SoundyAliasAnalysis/include/AliasObject.h','#define DEBUG_CREATE_HOST_OBJ_CHAIN','//#define DEBUG_CREATE_HOST_OBJ_CHAIN'),
('SoundyAliasAnalysis/include/AliasObject.h','#define DEBUG_SPECIAL_FIELD_POINTTO','//#define DEBUG_SPECIAL_FIELD_POINTTO'),
('SoundyAliasAnalysis/include/AliasObject.h','#define DEBUG_SHARED_OBJ_CACHE','//#define DEBUG_SHARED_OBJ_CACHE'),
('SoundyAliasAnalysis/include/AliasObject.h','#define DEBUG_INFER_CONTAINER','//#define DEBUG_INFER_CONTAINER'),
('SoundyAliasAnalysis/include/AliasObject.h','#define DEBUG_OBJ_COPY','//#define DEBUG_OBJ_COPY'),
('Utils/include/InstructionUtils.h','#define TIMING','//#define TIMING'),
]
#Turn on/off the debug switch defined in the src files.
#sys.argv[1]: /path/to/MainAnalysisPasses-folder
def debug_switch(m):
io = 1
ir = 2
if sys.argv[2] != '0':
#turn on, so we should search for the off state string
io = 2
ir = 1
cr = 0
for r in rl:
fp = sys.argv[1] + '/' + r[0]
if not os.path.exists(fp):
continue
cr = cr + 1
for l in fileinput.input(fp, backup='.bak',inplace = True):
if l.find(r[io]) >= 0:
print r[ir]
else:
print l.rstrip()
print 'Replaced: %d' % cr
if __name__ == '__main__':
if len(sys.argv) < 3:
print 'Usage: ./debug_switch.py /path/to/MainAnalysisPasses 0|1'
else:
if sys.argv[2] == '0':
debug_switch(0)
else:
debug_switch(1)
| 57.55
| 135
| 0.719085
| 423
| 3,453
| 5.55792
| 0.260047
| 0.187154
| 0.071459
| 0.19396
| 0.686091
| 0.531263
| 0.229264
| 0.134836
| 0.104636
| 0
| 0
| 0.006369
| 0.136114
| 3,453
| 59
| 136
| 58.525424
| 0.781763
| 0.049233
| 0
| 0.058824
| 0
| 0
| 0.695029
| 0.518146
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0.019608
| 0.039216
| null | null | 0.078431
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
a21ca35b7e2a1d190841b13a603c67db916b9829
| 35
|
py
|
Python
|
excercise_book/task_3_4.py
|
bartekpacia/python-training
|
00a1047f70ab44cc5afed8619eb4eac0e406f3e3
|
[
"MIT"
] | null | null | null |
excercise_book/task_3_4.py
|
bartekpacia/python-training
|
00a1047f70ab44cc5afed8619eb4eac0e406f3e3
|
[
"MIT"
] | null | null | null |
excercise_book/task_3_4.py
|
bartekpacia/python-training
|
00a1047f70ab44cc5afed8619eb4eac0e406f3e3
|
[
"MIT"
] | null | null | null |
for i in range(0, 21):
print(i)
| 17.5
| 22
| 0.571429
| 8
| 35
| 2.5
| 0.875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.115385
| 0.257143
| 35
| 2
| 23
| 17.5
| 0.653846
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.5
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
bf588f442e03df1682c795a03dbcacdb04228e98
| 623
|
py
|
Python
|
python/anyascii/_data/_29c.py
|
casept/anyascii
|
d4f426b91751254b68eaa84c6cd23099edd668e6
|
[
"ISC"
] | null | null | null |
python/anyascii/_data/_29c.py
|
casept/anyascii
|
d4f426b91751254b68eaa84c6cd23099edd668e6
|
[
"ISC"
] | null | null | null |
python/anyascii/_data/_29c.py
|
casept/anyascii
|
d4f426b91751254b68eaa84c6cd23099edd668e6
|
[
"ISC"
] | null | null | null |
b='Chong Zhan Nheo Bian Weng Hong Pin Se Ni Fen Xu Shi Ju Jue Yu Guo Guo Hu Jing Li Xie Er Yuan Hai Jing Ke Zong Fei Peng Geng Jian Ni Xian Li Chao Er Geng Yu Hu Fei Ao Er Ke Ku Bo Ye Jiao Chao Geng Ru Yue Lin Yu Yue Zhai Xiao Mie Gui Jiu Tuo Xi Wei Zhuo Wei Kui Mei Hao Hang Fang Niu You Hua Lang Zhu Gui Bi Jia Tiao Troi Lu Kong Zui Ling Qi Zhu Jung Gu Zu Yang Su Kui Chang Yao Yu Shu Lai Yi Dou Ranh Wu Ying Fu Zhuan Fu Su Li Yao Tui Gui Lu Yan Qi Lang Zhu Gui Hu Jing Chi Troi Que Ju Zha Miao'
| 623
| 623
| 0.597111
| 124
| 623
| 3
| 0.725806
| 0.032258
| 0.053763
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.398074
| 623
| 1
| 623
| 623
| 0.992
| 0
| 0
| 0
| 0
| 1
| 0.991987
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
bf60d902397aea81aaf9647fa0f340becbdd6241
| 126
|
py
|
Python
|
hello.py
|
ehquin/cs3240-labdemo
|
4921d8b8625e9ffd422a0a34b428c3f216af6a77
|
[
"MIT"
] | null | null | null |
hello.py
|
ehquin/cs3240-labdemo
|
4921d8b8625e9ffd422a0a34b428c3f216af6a77
|
[
"MIT"
] | null | null | null |
hello.py
|
ehquin/cs3240-labdemo
|
4921d8b8625e9ffd422a0a34b428c3f216af6a77
|
[
"MIT"
] | null | null | null |
from helper import greeting
from newpython import grillz
if __name__ == '__main__':
greeting("hello")
print(grillz())
| 21
| 28
| 0.722222
| 15
| 126
| 5.533333
| 0.733333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.174603
| 126
| 6
| 29
| 21
| 0.798077
| 0
| 0
| 0
| 0
| 0
| 0.102362
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.4
| 0
| 0.4
| 0.2
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
bf9b00cf5950ccc15bcdc5b9ae4ed46403551028
| 117
|
py
|
Python
|
zifeiyu/admin.py
|
zifeiyusama/blog
|
8c87d93291e0a4193aefa83f1d732a46208cf23f
|
[
"MIT"
] | null | null | null |
zifeiyu/admin.py
|
zifeiyusama/blog
|
8c87d93291e0a4193aefa83f1d732a46208cf23f
|
[
"MIT"
] | null | null | null |
zifeiyu/admin.py
|
zifeiyusama/blog
|
8c87d93291e0a4193aefa83f1d732a46208cf23f
|
[
"MIT"
] | null | null | null |
from django.contrib.admin import site
site.site_header = 'ZIFEIYU'
site.site_title = '子非鱼'
site.index_title = '子非鱼'
| 19.5
| 37
| 0.760684
| 18
| 117
| 4.777778
| 0.611111
| 0.27907
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.119658
| 117
| 5
| 38
| 23.4
| 0.834951
| 0
| 0
| 0
| 0
| 0
| 0.111111
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.25
| 0
| 0.25
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
bfc229335b2ca762f2323f25aa7776e9b568511d
| 424
|
py
|
Python
|
pysit/_sphinx/from_astropy/ext/__init__.py
|
zfang-slim/pysit
|
8fca42b9749841abc302d1f8195a1437fad7ae4d
|
[
"BSD-3-Clause"
] | 64
|
2015-09-08T06:23:27.000Z
|
2022-03-09T23:35:24.000Z
|
pysit/_sphinx/from_astropy/ext/__init__.py
|
zfang-slim/pysit
|
8fca42b9749841abc302d1f8195a1437fad7ae4d
|
[
"BSD-3-Clause"
] | 23
|
2015-10-08T01:14:24.000Z
|
2021-07-15T11:37:05.000Z
|
pysit/_sphinx/from_astropy/ext/__init__.py
|
zfang-slim/pysit
|
8fca42b9749841abc302d1f8195a1437fad7ae4d
|
[
"BSD-3-Clause"
] | 48
|
2015-06-25T14:48:22.000Z
|
2021-12-06T19:50:25.000Z
|
"""
This package contains the sphinx extensions used by Astropy.
The `automodsumm` and `automodapi` modules contain extensions used by Astropy
to generate API documentation - see the docstrings for details. The `numpydoc`
module is dervied from the documentation tools numpy and scipy use to parse
docstrings in the numpy/scipy format, and are also used by Astropy. The
other modules are dependencies for `numpydoc`.
"""
| 42.4
| 79
| 0.792453
| 62
| 424
| 5.419355
| 0.612903
| 0.053571
| 0.116071
| 0.136905
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.158019
| 424
| 9
| 80
| 47.111111
| 0.941176
| 0.978774
| 0
| null | 1
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
bfcabe2a4378367fb84394a19499320be062b771
| 2,806
|
py
|
Python
|
Projetos/lista 4 ex 2 ex 4.py
|
anderson-br-ti/python
|
d65d851f0934267dff9256dfdac09b100efb3b45
|
[
"MIT"
] | null | null | null |
Projetos/lista 4 ex 2 ex 4.py
|
anderson-br-ti/python
|
d65d851f0934267dff9256dfdac09b100efb3b45
|
[
"MIT"
] | null | null | null |
Projetos/lista 4 ex 2 ex 4.py
|
anderson-br-ti/python
|
d65d851f0934267dff9256dfdac09b100efb3b45
|
[
"MIT"
] | null | null | null |
#Lista 4 Exercício 2
'''import random
lista = [ ]
for k in range (20):
lista.append (random.randint (1, 100))
PAR = [ ]
ÍMPAR = [ ]
for n in lista:
if n % 2 == 0:
PAR.append (n)
else:
ÍMPAR.append(n)
lista.sort()
PAR.sort()
ÍMPAR.sort()
print (lista)
print (PAR)
print (ÍMPAR)
#Lista 4 Exercício 5
#colocar 3 aspas no começo e final do texto
txt = The Python Software Foundation and the global Python community welcome and
encourage participation by everyone. Our community is based on mutual respect,
tolerance, and encouragement, and we are working to help each other live up to
these principles. We want our community to be more diverse: whoever you are,
and whatever your background, we welcome you.
import string
txt = txt.lower()
for c in string.punctuation:
txt = txt.replace (c, ' ')
txt = txt.split()
def tem_uma_letra_python(palavra):
for x in palavra:
if x in 'python':
return True
return False
#alinha com o for, só chego aqui se nenhuma
#letra está em "python"
lista = [ ]
for p in txt:
if tem_uma_letra_python(p) and len(p) > 4:
lista.append(p)
print (len (lista))
lista.sort()
print (lista)
'''
#Lista 5 Exercício E
fones = '''213752 216732 221063 221545 225583 229133 230648 233222 236043
237330 239636 240138 242123 246224 249183 252936 254711 257200 257607
261424 263814 266794 268649 273050 275001 277606 278997 283331 287104
287953 289137 291591 292559 292946 295180 295566 297529 300400 304707
306931 310638 313595 318449 319021 322082 323796 326266 326880 327249
329914 334392 334575 336723 336734 338808 343269 346040 350113 353631
357154 361633 361891 364889 365746 365749 366426 369156 369444 369689
372896 374983 375223 379163 380712 385640 386777 388599 389450 390178
392943 394742 395921 398644 398832 401149 402219 405364 408088 412901
417683 422267 424767 426613 430474 433910 435054 440052 444630 447852
449116 453865 457631 461750 462985 463328 466458 469601 473108 476773
477956 481991 482422 486195 488359 489209 489388 491928 496569 496964
497901 500877 502386 502715 507617 512526 512827 513796 518232 521455
524277 528496 529345 531231 531766 535067 535183 536593 537360 539055
540582 543708 547492 550779 551595 556493 558807 559102 562050 564962
569677 570945 575447 579937 580112 580680 582458 583012 585395 586244
587393 590483 593112 593894 594293 597525 598184 600455 600953 601523
605761 608618 609198 610141 610536 612636 615233 618314 622752 626345
626632 628889 629457 629643 633673 637656 641136 644176 644973 647617
652218 657143 659902 662224 666265 668010 672480 672695 676868 677125
678315'''.split()
def chato(fone):
for d in range (10): #0, 1, 2, 3, 4, 5, 6, 7, 8, 9
if str (d) + str (d) in fone:
#incompleto
| 35.518987
| 89
| 0.745902
| 422
| 2,806
| 4.945498
| 0.739336
| 0.008625
| 0.014375
| 0.016291
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.547035
| 0.200641
| 2,806
| 78
| 90
| 35.974359
| 0.383415
| 0.027085
| 0
| 0
| 0
| 0
| 0.927719
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
44fbd0e3a0e47709370d1891c4dba7005ac1865f
| 171
|
py
|
Python
|
mmdet/datasets/custom_dataset.py
|
SuzaKrish/mmdetection
|
31c16891d7493252262e738bcbf05326dba866b2
|
[
"Apache-2.0"
] | null | null | null |
mmdet/datasets/custom_dataset.py
|
SuzaKrish/mmdetection
|
31c16891d7493252262e738bcbf05326dba866b2
|
[
"Apache-2.0"
] | null | null | null |
mmdet/datasets/custom_dataset.py
|
SuzaKrish/mmdetection
|
31c16891d7493252262e738bcbf05326dba866b2
|
[
"Apache-2.0"
] | null | null | null |
form .coco import CocoDataset
from .registry import DATASETS
from .xml_style import XMLDataset
@DATASETS.register_module
class MyDataset(XMLDataset):
CLASSES = ('RBC')
| 21.375
| 33
| 0.80117
| 21
| 171
| 6.428571
| 0.761905
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.122807
| 171
| 7
| 34
| 24.428571
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0.017544
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0.5
| null | null | 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
780f95712b48d236e0026f4703ba6c6527cab249
| 145
|
py
|
Python
|
meross_iot/model/constants.py
|
dhocker/MerossIot
|
d4b7412602070a74429db2a563fdf325f666aa14
|
[
"MIT"
] | null | null | null |
meross_iot/model/constants.py
|
dhocker/MerossIot
|
d4b7412602070a74429db2a563fdf325f666aa14
|
[
"MIT"
] | null | null | null |
meross_iot/model/constants.py
|
dhocker/MerossIot
|
d4b7412602070a74429db2a563fdf325f666aa14
|
[
"MIT"
] | null | null | null |
DEFAULT_MEROSS_HTTP_API = "https://iot.meross.com"
DEFAULT_MQTT_HOST = "mqtt.meross.com"
DEFAULT_MQTT_PORT = 443
DEFAULT_COMMAND_TIMEOUT = 10.0
| 24.166667
| 50
| 0.8
| 23
| 145
| 4.652174
| 0.652174
| 0.168224
| 0.299065
| 0.373832
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.045455
| 0.089655
| 145
| 5
| 51
| 29
| 0.765152
| 0
| 0
| 0
| 0
| 0
| 0.256944
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
7814c63dc4f1b1bcecbd0fef12cd7d7fcecd6e3a
| 89
|
py
|
Python
|
brokers/apps.py
|
rishikesh67/trycookiecutter
|
a5748ddbd0020970341b8ce2674fb84009f1f8cf
|
[
"MIT"
] | 1
|
2021-06-02T04:50:43.000Z
|
2021-06-02T04:50:43.000Z
|
brokers/apps.py
|
rishikesh67/trycookiecutter
|
a5748ddbd0020970341b8ce2674fb84009f1f8cf
|
[
"MIT"
] | 4
|
2021-03-30T13:43:39.000Z
|
2021-09-22T19:16:10.000Z
|
brokers/apps.py
|
rishikesh67/trycookiecutter
|
a5748ddbd0020970341b8ce2674fb84009f1f8cf
|
[
"MIT"
] | null | null | null |
from django.apps import AppConfig
class BrokersConfig(AppConfig):
name = 'brokers'
| 14.833333
| 33
| 0.752809
| 10
| 89
| 6.7
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.168539
| 89
| 5
| 34
| 17.8
| 0.905405
| 0
| 0
| 0
| 0
| 0
| 0.078652
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
781a88931a0af0a22120ff487e00a0547cb7aa78
| 3,425
|
py
|
Python
|
fedjax/core/__init__.py
|
kho/fedjax
|
4b8b4ecf945fdfd6ad678ad88adaeabdbd960c60
|
[
"Apache-2.0"
] | null | null | null |
fedjax/core/__init__.py
|
kho/fedjax
|
4b8b4ecf945fdfd6ad678ad88adaeabdbd960c60
|
[
"Apache-2.0"
] | 1
|
2021-04-13T01:58:37.000Z
|
2021-04-13T01:58:37.000Z
|
fedjax/core/__init__.py
|
kho/fedjax
|
4b8b4ecf945fdfd6ad678ad88adaeabdbd960c60
|
[
"Apache-2.0"
] | null | null | null |
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""FedJAX core."""
# Test utilities.
from fedjax.core import test_util
# Client trainer.
from fedjax.core.client_trainer import ClientTrainer
from fedjax.core.client_trainer import ControlVariateTrainer
from fedjax.core.client_trainer import ControlVariateTrainerState
from fedjax.core.client_trainer import DefaultClientTrainer
from fedjax.core.client_trainer import DefaultClientTrainerState
from fedjax.core.client_trainer import train_multiple_clients
from fedjax.core.client_trainer import train_single_client
# Dataset utilities.
from fedjax.core.dataset_util import ClientDataHParams
from fedjax.core.dataset_util import create_tf_dataset_for_clients
from fedjax.core.dataset_util import DatasetOrIterable
from fedjax.core.dataset_util import preprocess_tf_dataset
# Evaluation utilities
from fedjax.core.evaluation_util import aggregate_metrics
from fedjax.core.evaluation_util import evaluate_multiple_clients
from fedjax.core.evaluation_util import evaluate_single_client
# Federated algorithm.
from fedjax.core.federated_algorithm import FederatedAlgorithm
# Metrics.
from fedjax.core.metrics import accuracy_fn
from fedjax.core.metrics import CountMetric
from fedjax.core.metrics import cross_entropy_loss_fn
from fedjax.core.metrics import dataclass
from fedjax.core.metrics import masked_accuracy_fn
from fedjax.core.metrics import masked_accuracy_fn_with_logits_mask
from fedjax.core.metrics import masked_count
from fedjax.core.metrics import masked_cross_entropy_loss_fn
from fedjax.core.metrics import MeanMetric
from fedjax.core.metrics import Metric
from fedjax.core.metrics import oov_rate
from fedjax.core.metrics import sequence_length
from fedjax.core.metrics import truncation_rate
# JAX model.
from fedjax.core.model import create_model_from_haiku
from fedjax.core.model import create_model_from_stax
from fedjax.core.model import Model
# JAX optimizer.
from fedjax.core.optimizer import get_optimizer
from fedjax.core.optimizer import Optimizer
from fedjax.core.optimizer import OptimizerName
# Dataset prefetching.
from fedjax.core.prefetch import PrefetchClientDatasetsIterator
# Regularization
from fedjax.core.regularizers import L2Regularizer
from fedjax.core.regularizers import Regularizer
# Serialization.
from fedjax.core.serialization import load_state
from fedjax.core.serialization import save_state
# PyTree utilities.
from fedjax.core.tree_util import tree_map
from fedjax.core.tree_util import tree_mean
from fedjax.core.tree_util import tree_multimap
# Common type definitions.
from fedjax.core.typing import Batch
from fedjax.core.typing import FederatedData
from fedjax.core.typing import MetricResults
from fedjax.core.typing import OptState
from fedjax.core.typing import Params
from fedjax.core.typing import PRNGKey
from fedjax.core.typing import PRNGSequence
from fedjax.core.typing import Updates
| 42.283951
| 74
| 0.849927
| 486
| 3,425
| 5.855967
| 0.302469
| 0.182713
| 0.250878
| 0.095924
| 0.564652
| 0.369642
| 0.192902
| 0.089951
| 0.031623
| 0
| 0
| 0.002922
| 0.10073
| 3,425
| 80
| 75
| 42.8125
| 0.921104
| 0.228905
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
782321b9f356138b76e51943cf87f692da6f76e3
| 1,090
|
py
|
Python
|
src/cp_request/design/replicate_block.py
|
aquariumbio/experiment-request
|
026e3eb767c47f980a35004e9ded5e4e33553693
|
[
"MIT"
] | null | null | null |
src/cp_request/design/replicate_block.py
|
aquariumbio/experiment-request
|
026e3eb767c47f980a35004e9ded5e4e33553693
|
[
"MIT"
] | null | null | null |
src/cp_request/design/replicate_block.py
|
aquariumbio/experiment-request
|
026e3eb767c47f980a35004e9ded5e4e33553693
|
[
"MIT"
] | null | null | null |
from cp_request.design.block_definition import BlockDefinition
from transform import RequestTransformer
class ReplicateBlock(BlockDefinition):
"""
Represents a design block definition consisting of a sum of a given number
of replicates of a block.
"""
def __init__(self, *, count: int, block: BlockDefinition):
self.__count = count
self.__block = block
def __repr__(self):
return "ReplicateBlock(count={}, block={})".format(
self.__count, repr(self.__block))
# TODO: implement str method
def __str__(self):
pass
def __eq__(self, other):
if not isinstance(other, ReplicateBlock):
return False
return self.count == other.count and self.block == other.block
def apply(self, visitor):
visitor.visit_replicate_block(self)
def transform(self, transformer: RequestTransformer):
return transformer.transform_replicate_block(self)
@property
def count(self):
return self.__count
@property
def block(self):
return self.__block
| 26.585366
| 78
| 0.66789
| 122
| 1,090
| 5.688525
| 0.377049
| 0.064842
| 0.060519
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.246789
| 1,090
| 40
| 79
| 27.25
| 0.845311
| 0.117431
| 0
| 0.08
| 0
| 0
| 0.036093
| 0.025478
| 0
| 0
| 0
| 0.025
| 0
| 1
| 0.32
| false
| 0.04
| 0.08
| 0.16
| 0.68
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
784912c7802fdce6eb4e6788689d0b0cac1f7597
| 832
|
py
|
Python
|
web2py/applications/test_app/modules/plugin_appreport/report_web2py.py
|
eddgt/web2py
|
956c67754bbbdeaa5479f61d6a91ce0de87861e9
|
[
"BSD-3-Clause"
] | null | null | null |
web2py/applications/test_app/modules/plugin_appreport/report_web2py.py
|
eddgt/web2py
|
956c67754bbbdeaa5479f61d6a91ce0de87861e9
|
[
"BSD-3-Clause"
] | null | null | null |
web2py/applications/test_app/modules/plugin_appreport/report_web2py.py
|
eddgt/web2py
|
956c67754bbbdeaa5479f61d6a91ce0de87861e9
|
[
"BSD-3-Clause"
] | null | null | null |
# coding: utf8
from gluon.html import *
from gluon.http import *
from gluon.validators import *
from gluon.sqlhtml import *
import utils_web2py
from libs.appreport.report import ReportHtmlDb
class ReportHtmlDbWeb2py(ReportHtmlDb):
def __init__(self, table, **kargs):
ReportHtmlDb.__init__(self, db = table._db, table = table, **kargs)
def _get_args(self):
return utils_web2py.UtilsWeb2py().prep_filter(vars = self.get('args', {}), table = self.get('table'))
def get_html(self):
#TODO: se records < 1 então exibir mensagem sem dados para exibir ?
records = self.db(self._get_args()).select()
return '<html><head><meta charset="%s" /></head>%s</html>'%(self.get('charset', 'utf-8'), BODY(H2(self.get('title', 'Report')),SQLTABLE(records, headers='fieldname:capitalize')))
| 30.814815
| 186
| 0.68149
| 109
| 832
| 5.045872
| 0.495413
| 0.063636
| 0.081818
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.011511
| 0.164663
| 832
| 26
| 187
| 32
| 0.779856
| 0.09375
| 0
| 0
| 0
| 0
| 0.134846
| 0
| 0
| 0
| 0
| 0.038462
| 0
| 1
| 0.214286
| false
| 0
| 0.428571
| 0.071429
| 0.857143
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
784f0a423262b806b216fb952e14aa2067042ccb
| 171
|
py
|
Python
|
login/views.py
|
django-africa/login
|
5e9c1d29e132d423acf77e29a98174f5a290b3a5
|
[
"MIT"
] | null | null | null |
login/views.py
|
django-africa/login
|
5e9c1d29e132d423acf77e29a98174f5a290b3a5
|
[
"MIT"
] | null | null | null |
login/views.py
|
django-africa/login
|
5e9c1d29e132d423acf77e29a98174f5a290b3a5
|
[
"MIT"
] | null | null | null |
from django.shortcuts import render
from django.views.generic import TemplateView
# Create your views here.
class HomeView(TemplateView):
template_name = 'base.html'
| 24.428571
| 45
| 0.795322
| 22
| 171
| 6.136364
| 0.772727
| 0.148148
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.134503
| 171
| 6
| 46
| 28.5
| 0.912162
| 0.134503
| 0
| 0
| 0
| 0
| 0.061644
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
78be9c6fa2490e9ad23814cfddb45bfff312c6d7
| 110
|
py
|
Python
|
svgrepodl/__main__.py
|
AllanCerveaux/svg_repo_dl
|
dcd98020b1543b0d978abac5e47b41d468468fc7
|
[
"MIT"
] | null | null | null |
svgrepodl/__main__.py
|
AllanCerveaux/svg_repo_dl
|
dcd98020b1543b0d978abac5e47b41d468468fc7
|
[
"MIT"
] | null | null | null |
svgrepodl/__main__.py
|
AllanCerveaux/svg_repo_dl
|
dcd98020b1543b0d978abac5e47b41d468468fc7
|
[
"MIT"
] | null | null | null |
#!/usr/bin/python
import sys
from .commands import cli
def main():
cli()
if __name__ == '__main__':
main()
| 12.222222
| 26
| 0.672727
| 16
| 110
| 4.125
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.163636
| 110
| 9
| 27
| 12.222222
| 0.717391
| 0.145455
| 0
| 0
| 0
| 0
| 0.085106
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.166667
| true
| 0
| 0.333333
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
78cd06399f3d27458c91f1f51d5a7b700ee20fa6
| 164
|
py
|
Python
|
crop_engine/crop/source_selection/__init__.py
|
Lars-H/slurp
|
0c7c8a5ca62145bedaff5791d6f54337674da2ea
|
[
"MIT"
] | 1
|
2021-06-29T07:59:50.000Z
|
2021-06-29T07:59:50.000Z
|
crop_engine/crop/source_selection/__init__.py
|
Lars-H/slurp
|
0c7c8a5ca62145bedaff5791d6f54337674da2ea
|
[
"MIT"
] | null | null | null |
crop_engine/crop/source_selection/__init__.py
|
Lars-H/slurp
|
0c7c8a5ca62145bedaff5791d6f54337674da2ea
|
[
"MIT"
] | null | null | null |
from naive import NaiveSourceSelection
from star_based import StarBasedSourceSelection
from utils import AskSourceSelector, HybridSourceSelector, StatSourceSelector
| 54.666667
| 77
| 0.908537
| 15
| 164
| 9.866667
| 0.733333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.079268
| 164
| 3
| 77
| 54.666667
| 0.980132
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
15339913599e5bb3ff765b9385ac259b45dc4b13
| 25
|
py
|
Python
|
pymanopt/_version.py
|
sz-123/pymanopt
|
1fbe5a8f8d51bf22af461e076d973fc98dfa835a
|
[
"BSD-3-Clause"
] | 2
|
2021-11-08T08:03:56.000Z
|
2021-11-08T09:25:06.000Z
|
pymanopt/_version.py
|
GAO915311/pymanopt
|
405abc0d1b337d03897c4827f4499cc6fe91aae8
|
[
"BSD-3-Clause"
] | null | null | null |
pymanopt/_version.py
|
GAO915311/pymanopt
|
405abc0d1b337d03897c4827f4499cc6fe91aae8
|
[
"BSD-3-Clause"
] | null | null | null |
__version__ = "0.2.6rc1"
| 12.5
| 24
| 0.68
| 4
| 25
| 3.25
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.181818
| 0.12
| 25
| 1
| 25
| 25
| 0.409091
| 0
| 0
| 0
| 0
| 0
| 0.32
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
15764731c118ca1d820686f887110c895fbcb1db
| 119
|
py
|
Python
|
run.py
|
Nizebulous/lighthouse
|
e02af152fc8b3bdd2ce55e70eb0cfe7768547113
|
[
"MIT"
] | null | null | null |
run.py
|
Nizebulous/lighthouse
|
e02af152fc8b3bdd2ce55e70eb0cfe7768547113
|
[
"MIT"
] | null | null | null |
run.py
|
Nizebulous/lighthouse
|
e02af152fc8b3bdd2ce55e70eb0cfe7768547113
|
[
"MIT"
] | null | null | null |
#!/usr/bin/env python
from lighthouse import app
if __name__ == '__main__':
app.run(host='0.0.0.0', debug=True)
| 14.875
| 39
| 0.663866
| 20
| 119
| 3.55
| 0.8
| 0.084507
| 0.084507
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.04
| 0.159664
| 119
| 7
| 40
| 17
| 0.67
| 0.168067
| 0
| 0
| 0
| 0
| 0.153061
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
1590aea1bc97c0d4509ce62171e90a432baea5fd
| 223
|
py
|
Python
|
takeaway/settings/fastapi/controller.py
|
mnaile/startapp
|
ef50311b4883501c5e2aab175b585f24f9c133d0
|
[
"MIT"
] | 7
|
2020-12-09T18:34:25.000Z
|
2022-03-16T06:49:16.000Z
|
takeaway/settings/fastapi/controller.py
|
mnaile/startapp
|
ef50311b4883501c5e2aab175b585f24f9c133d0
|
[
"MIT"
] | null | null | null |
takeaway/settings/fastapi/controller.py
|
mnaile/startapp
|
ef50311b4883501c5e2aab175b585f24f9c133d0
|
[
"MIT"
] | 1
|
2020-12-09T13:18:36.000Z
|
2020-12-09T13:18:36.000Z
|
controller = '''
from fastapi import APIRouter, HTTPException,Cookie, Depends,Header,File, Body,Query
from starlette.responses import JSONResponse
from core.factories import settings
import httpx
router = APIRouter()
'''
| 24.777778
| 84
| 0.798206
| 26
| 223
| 6.846154
| 0.769231
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.116592
| 223
| 9
| 85
| 24.777778
| 0.903553
| 0
| 0
| 0
| 0
| 0
| 0.910714
| 0.09375
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.571429
| 0
| 0.571429
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
ec5d1cb431a542802fec4174989c4edd02bc26e6
| 800
|
py
|
Python
|
asyncy/processing/mutations/StringMutations.py
|
zeebonk/platform-engine
|
c82feecad7a7e3786ed69e02bbeef712182a27ae
|
[
"Apache-2.0"
] | null | null | null |
asyncy/processing/mutations/StringMutations.py
|
zeebonk/platform-engine
|
c82feecad7a7e3786ed69e02bbeef712182a27ae
|
[
"Apache-2.0"
] | null | null | null |
asyncy/processing/mutations/StringMutations.py
|
zeebonk/platform-engine
|
c82feecad7a7e3786ed69e02bbeef712182a27ae
|
[
"Apache-2.0"
] | null | null | null |
# -*- coding: utf-8 -*-
class StringMutations:
@classmethod
def _list_shift(cls, l, n):
return l[n:] + l[:n]
@classmethod
def length(cls, mutation, value, story, line, operator, operand):
return len(value)
@classmethod
def replace(cls, mutation, value, story, line, operator, operand):
new_val = story.argument_by_name(mutation, 'with')
return value.replace(operand, new_val)
@classmethod
def split(cls, mutation, value, story, line, operator, operand):
return value.split(operand)
@classmethod
def uppercase(cls, mutation, value, story, line, operator, operand):
return value.upper()
@classmethod
def lowercase(cls, mutation, value, story, line, operator, operand):
return value.lower()
| 26.666667
| 72
| 0.64625
| 94
| 800
| 5.43617
| 0.351064
| 0.164384
| 0.156556
| 0.205479
| 0.46771
| 0.46771
| 0.46771
| 0.389432
| 0.299413
| 0
| 0
| 0.001634
| 0.235
| 800
| 29
| 73
| 27.586207
| 0.833333
| 0.02625
| 0
| 0.3
| 0
| 0
| 0.005148
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.3
| false
| 0
| 0
| 0.25
| 0.65
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
ec778d7a3ab0fd99f30f894d98317b0a18ff5a74
| 1,860
|
py
|
Python
|
tests/unit_tests/test_nn/test_converters/test_onnx/test_Sub.py
|
samysweb/dnnv
|
58fb95b7300914d9da28eed86c39eca473b1aaef
|
[
"MIT"
] | 5
|
2022-01-28T20:30:34.000Z
|
2022-03-17T09:26:52.000Z
|
tests/unit_tests/test_nn/test_converters/test_onnx/test_Sub.py
|
samysweb/dnnv
|
58fb95b7300914d9da28eed86c39eca473b1aaef
|
[
"MIT"
] | 9
|
2022-01-27T03:50:28.000Z
|
2022-02-08T18:42:17.000Z
|
tests/unit_tests/test_nn/test_converters/test_onnx/test_Sub.py
|
samysweb/dnnv
|
58fb95b7300914d9da28eed86c39eca473b1aaef
|
[
"MIT"
] | 2
|
2022-02-03T17:32:43.000Z
|
2022-03-24T16:38:49.000Z
|
import numpy as np
import onnxruntime
import pytest
from dnnv.nn.converters.onnx import *
from dnnv.nn.operations import *
def test_Sub():
x = np.array([1, 2, 3]).astype(np.float32)
y = np.array([3, 2, 1]).astype(np.float32)
z = x - y
op = Sub(x, y)
onnx_model = convert(OperationGraph([op]))
results = onnxruntime.backend.run(onnx_model, [])
assert len(results) == 1
result = results[0]
assert np.allclose(result, z)
op = Sub(Input((3,), np.dtype(np.float32)), Input((3,), np.dtype(np.float32)))
onnx_model = convert(OperationGraph([op]))
results = onnxruntime.backend.run(onnx_model, [x, y])
assert len(results) == 1
result = results[0]
assert np.allclose(result, z)
# TODO : need onnx opset version at least 14 for uint8
@pytest.mark.xfail
def test_Sub_rand():
x = np.random.randn(3, 4, 5).astype(np.float32)
y = np.random.randn(3, 4, 5).astype(np.float32)
z = x - y
op = Sub(x, y)
onnx_model = convert(OperationGraph([op]))
results = onnxruntime.backend.run(onnx_model, [])
assert len(results) == 1
result = results[0]
assert np.allclose(result, z)
x = np.random.randint(12, 24, size=(3, 4, 5), dtype=np.uint8)
y = np.random.randint(12, size=(3, 4, 5), dtype=np.uint8)
z = x - y
op = Sub(x, y)
onnx_model = convert(OperationGraph([op]))
results = onnxruntime.backend.run(onnx_model, [])
assert len(results) == 1
result = results[0]
assert np.allclose(result, z)
def test_Sub_broadcast():
x = np.random.randn(3, 4, 5).astype(np.float32)
y = np.random.randn(5).astype(np.float32)
z = x - y
op = Sub(x, y)
onnx_model = convert(OperationGraph([op]))
results = onnxruntime.backend.run(onnx_model, [])
assert len(results) == 1
result = results[0]
assert np.allclose(result, z)
| 26.571429
| 82
| 0.631183
| 283
| 1,860
| 4.095406
| 0.208481
| 0.077653
| 0.077653
| 0.129422
| 0.77308
| 0.75755
| 0.719586
| 0.686799
| 0.686799
| 0.685073
| 0
| 0.041525
| 0.210215
| 1,860
| 69
| 83
| 26.956522
| 0.747447
| 0.027957
| 0
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.014493
| 0.196078
| 1
| 0.058824
| false
| 0
| 0.098039
| 0
| 0.156863
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
ec90ea8dc82c1192aa8a5c3fe476f41eae8821bc
| 2,053
|
py
|
Python
|
tests/test_livecoin_api.py
|
altcointradingbot/trading
|
7e77f67730ace9520bf5e5ff27c3c80d81ac983a
|
[
"MIT"
] | null | null | null |
tests/test_livecoin_api.py
|
altcointradingbot/trading
|
7e77f67730ace9520bf5e5ff27c3c80d81ac983a
|
[
"MIT"
] | 1
|
2017-12-21T10:12:33.000Z
|
2017-12-21T10:12:33.000Z
|
tests/test_livecoin_api.py
|
altcointradingbot/trading
|
7e77f67730ace9520bf5e5ff27c3c80d81ac983a
|
[
"MIT"
] | null | null | null |
import unittest
from tradingbot.exchangers_api.livecoin_api import get_exchange_ticker
from tradingbot.exchangers_api.livecoin_api import get_exchange_last_trades
from tradingbot.exchangers_api.livecoin_api import get_exchange_order_book
from tradingbot.exchangers_api.livecoin_api import get_exchange_maxbid_minask
from tradingbot.exchangers_api.livecoin_api import get_exchange_restrictions
from tradingbot.exchangers_api.livecoin_api import get_info_coin_info
from tradingbot.exchangers_api.livecoin_api import get_exchange_trades
from tradingbot.exchangers_api.livecoin_api import get_exchange_client_orders
from tradingbot.exchangers_api.livecoin_api import get_payment_balances
from tradingbot.exchangers_api.livecoin_api import get_payment_balance
from tradingbot.exchangers_api.livecoin_api import get_exchange_commission
class TestLivecoinApi(unittest.TestCase):
def test_get_exchange_ticker(self):
self.assertGreater(len(get_exchange_ticker()), 0)
def test_get_exchange_last_trades(self):
self.assertGreater(len(get_exchange_last_trades("BTC/USD")), 0)
def test_get_exchange_order_book(self):
self.assertGreater(len(get_exchange_order_book("BTC/USD")), 0)
def test_get_exchange_maxbid_minask(self):
self.assertGreater(len(get_exchange_maxbid_minask()), 0)
def test_get_exchange_restrictions(self):
self.assertGreater(len(get_exchange_restrictions()), 0)
def test_get_info_coin_info(self):
self.assertGreater(len(get_info_coin_info()), 0)
def test_get_exchange_trades(self):
self.assertGreater(len(get_exchange_trades()), 0)
def test_get_exchange_client_orders(self):
self.assertGreater(len(get_exchange_client_orders()), 0)
def test_get_payment_balances(self):
self.assertGreater(len(get_payment_balances()), 0)
def test_get_payment_balance(self):
self.assertGreater(len(get_payment_balance("BTC")), 0)
def test_get_exchange_commission(self):
self.assertGreater(len(get_exchange_commission()), 0)
| 41.06
| 77
| 0.808573
| 279
| 2,053
| 5.541219
| 0.129032
| 0.170763
| 0.170763
| 0.192109
| 0.760026
| 0.657827
| 0.478008
| 0.392626
| 0.362225
| 0.078913
| 0
| 0.006061
| 0.115928
| 2,053
| 49
| 78
| 41.897959
| 0.84573
| 0
| 0
| 0
| 0
| 0
| 0.008281
| 0
| 0
| 0
| 0
| 0
| 0.314286
| 1
| 0.314286
| false
| 0
| 0.342857
| 0
| 0.685714
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
ecba60785adcdf276f713997fd5260d702d7bda7
| 106
|
py
|
Python
|
tests/test_settings/dummy_registry.py
|
costas-basdekis/aox
|
63a90fb722f29d9b2d26041f9035f99b6b21615e
|
[
"MIT"
] | 2
|
2021-11-10T22:38:49.000Z
|
2021-12-03T08:09:01.000Z
|
tests/test_settings/dummy_registry.py
|
costas-basdekis/aox
|
63a90fb722f29d9b2d26041f9035f99b6b21615e
|
[
"MIT"
] | null | null | null |
tests/test_settings/dummy_registry.py
|
costas-basdekis/aox
|
63a90fb722f29d9b2d26041f9035f99b6b21615e
|
[
"MIT"
] | null | null | null |
dummy_registry = {}
def dummy_register(name, value):
dummy_registry[name] = value
return value
| 13.25
| 32
| 0.698113
| 13
| 106
| 5.461538
| 0.538462
| 0.366197
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.207547
| 106
| 7
| 33
| 15.142857
| 0.845238
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
01ca5e3445524e2b500d3e02bccff52437bd6b02
| 392
|
py
|
Python
|
Devices/Suspicious_Device.py
|
d-crompton/final-project-product
|
991c76abd37cfecf61096010f41f87a1de922acc
|
[
"MIT"
] | null | null | null |
Devices/Suspicious_Device.py
|
d-crompton/final-project-product
|
991c76abd37cfecf61096010f41f87a1de922acc
|
[
"MIT"
] | null | null | null |
Devices/Suspicious_Device.py
|
d-crompton/final-project-product
|
991c76abd37cfecf61096010f41f87a1de922acc
|
[
"MIT"
] | null | null | null |
# Suspicious Devices - Child of Device
from Devices import Device
class SuspiciousDevice(Device.Device):
# Constructor
def __init__(self, last_ip, mac, manufacturer, os, dev_type):
super().__init__(last_ip, mac, manufacturer, os, dev_type)
self.category = "suspicious"
# Additional Function
def get_category(self):
return self.category
| 28
| 67
| 0.678571
| 45
| 392
| 5.622222
| 0.577778
| 0.047431
| 0.071146
| 0.166008
| 0.237154
| 0.237154
| 0.237154
| 0
| 0
| 0
| 0
| 0
| 0.237245
| 392
| 13
| 68
| 30.153846
| 0.846154
| 0.173469
| 0
| 0
| 0
| 0
| 0.032573
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.285714
| false
| 0
| 0.142857
| 0.142857
| 0.714286
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
01d39524b47f2479c4b9fa522abe15f01be99d03
| 1,535
|
py
|
Python
|
src/training/Core2/Chapter5Numbers/TestExercise5_3.py
|
MagicForest/Python
|
8af56e9384061504f05b229467c922ba71a433cb
|
[
"Apache-2.0"
] | null | null | null |
src/training/Core2/Chapter5Numbers/TestExercise5_3.py
|
MagicForest/Python
|
8af56e9384061504f05b229467c922ba71a433cb
|
[
"Apache-2.0"
] | null | null | null |
src/training/Core2/Chapter5Numbers/TestExercise5_3.py
|
MagicForest/Python
|
8af56e9384061504f05b229467c922ba71a433cb
|
[
"Apache-2.0"
] | null | null | null |
import unittest
import Exercise5_3
class TestExercise5_3(unittest.TestCase):
def test_get_score_level_A(self):
self.assertEquals('A', Exercise5_3.get_score_level(90))
self.assertEquals('A', Exercise5_3.get_score_level(95))
self.assertEquals('A', Exercise5_3.get_score_level(100))
def test_get_score_level_B(self):
self.assertEquals('B', Exercise5_3.get_score_level(80))
self.assertEquals('B', Exercise5_3.get_score_level(85))
self.assertEquals('B', Exercise5_3.get_score_level(89))
def test_get_score_level_C(self):
self.assertEquals('C', Exercise5_3.get_score_level(70))
self.assertEquals('C', Exercise5_3.get_score_level(75))
self.assertEquals('C', Exercise5_3.get_score_level(79))
def test_get_score_level_D(self):
self.assertEquals('D', Exercise5_3.get_score_level(60))
self.assertEquals('D', Exercise5_3.get_score_level(65))
self.assertEquals('D', Exercise5_3.get_score_level(69))
def test_get_score_level_F(self):
self.assertEquals('F', Exercise5_3.get_score_level(0))
self.assertEquals('F', Exercise5_3.get_score_level(50))
self.assertEquals('F', Exercise5_3.get_score_level(59))
def test_get_score_level_raise_error(self):
try:
Exercise5_3.get_score_level(102)
self.assertTrue(True)
except ValueError , value_error:
self.assertFalse(False)
if __name__ == '__main__':
unittest.main()
| 39.358974
| 65
| 0.685993
| 210
| 1,535
| 4.614286
| 0.228571
| 0.181631
| 0.29515
| 0.297214
| 0.76677
| 0.619195
| 0.619195
| 0.619195
| 0
| 0
| 0
| 0.056098
| 0.198697
| 1,535
| 39
| 66
| 39.358974
| 0.731707
| 0
| 0
| 0
| 0
| 0
| 0.015354
| 0
| 0
| 0
| 0
| 0
| 0.548387
| 0
| null | null | 0
| 0.064516
| null | null | 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
01fa9b6152c8622050a1db03240eacbf9cfbe608
| 51
|
py
|
Python
|
testData/refactor/renameUnResolve_after.py
|
alek-sun/pydantic-pycharm-plugin
|
6b07519aadf0ff8b8a644c1f9ede88e09c687c80
|
[
"Apache-2.0",
"MIT"
] | 238
|
2019-08-05T12:46:09.000Z
|
2022-03-25T08:53:25.000Z
|
testData/refactor/renameUnResolve_after.py
|
alek-sun/pydantic-pycharm-plugin
|
6b07519aadf0ff8b8a644c1f9ede88e09c687c80
|
[
"Apache-2.0",
"MIT"
] | 415
|
2019-07-15T17:39:35.000Z
|
2022-03-31T01:18:38.000Z
|
testData/refactor/renameUnResolve_after.py
|
collerek/pydantic-pycharm-plugin
|
7068ece42334cc9fbe927d779d199c86d5139888
|
[
"Apache-2.0",
"MIT"
] | 7
|
2019-08-09T01:03:16.000Z
|
2022-02-08T03:28:19.000Z
|
from pydantic import BaseModel
A(abc=int(123))
| 7.285714
| 30
| 0.72549
| 8
| 51
| 4.625
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.071429
| 0.176471
| 51
| 6
| 31
| 8.5
| 0.809524
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
bf0ff640628ed0be4651e66de28e1b9a57213eea
| 103
|
py
|
Python
|
Python/Fatec/exercico 3.py
|
marcelosilva7/Primeiro-repositorio
|
2550c86d07101bed84e0d110599a9492b1069263
|
[
"MIT"
] | null | null | null |
Python/Fatec/exercico 3.py
|
marcelosilva7/Primeiro-repositorio
|
2550c86d07101bed84e0d110599a9492b1069263
|
[
"MIT"
] | null | null | null |
Python/Fatec/exercico 3.py
|
marcelosilva7/Primeiro-repositorio
|
2550c86d07101bed84e0d110599a9492b1069263
|
[
"MIT"
] | null | null | null |
n = (input('Digite um numero para ser inventido! '))
print(f'o numero {n} invertido é {(n[::-1])}')
| 34.333333
| 54
| 0.601942
| 17
| 103
| 3.647059
| 0.823529
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.011765
| 0.174757
| 103
| 2
| 55
| 51.5
| 0.717647
| 0
| 0
| 0
| 0
| 0
| 0.732673
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.5
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
bf2fa6fd30fc644b16842f5ca453ebd9f8eb1279
| 317
|
py
|
Python
|
app/api/authentication.py
|
amikoj/web
|
3df8612a923d71dcc1a962daec9609347df54fd1
|
[
"Apache-2.0"
] | null | null | null |
app/api/authentication.py
|
amikoj/web
|
3df8612a923d71dcc1a962daec9609347df54fd1
|
[
"Apache-2.0"
] | null | null | null |
app/api/authentication.py
|
amikoj/web
|
3df8612a923d71dcc1a962daec9609347df54fd1
|
[
"Apache-2.0"
] | null | null | null |
# !/usr/bin/env python
# -*-coding:utf-8-*-
from flask_httpauth import HTTPBasicAuth
from .errors import unauthorized,forbidden
auth = HTTPBasicAuth()
@auth.verify_password
def verify_password(email,password):
return True
@auth.error_handler
def auth_error():
return unauthorized('Invalid credentials')
| 17.611111
| 46
| 0.763407
| 39
| 317
| 6.076923
| 0.666667
| 0.118143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.003623
| 0.129338
| 317
| 17
| 47
| 18.647059
| 0.855072
| 0.123028
| 0
| 0
| 0
| 0
| 0.069091
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.222222
| false
| 0.222222
| 0.222222
| 0.222222
| 0.666667
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
|
0
| 4
|
174926e9b58765fa9dc7f7f004a07e021d877997
| 1,033
|
py
|
Python
|
dcgoss/__init__.py
|
shelbyallenfranks/dcgoss
|
e0a8200880f8150f78013bd92dfd2e088725e240
|
[
"Apache-2.0"
] | null | null | null |
dcgoss/__init__.py
|
shelbyallenfranks/dcgoss
|
e0a8200880f8150f78013bd92dfd2e088725e240
|
[
"Apache-2.0"
] | null | null | null |
dcgoss/__init__.py
|
shelbyallenfranks/dcgoss
|
e0a8200880f8150f78013bd92dfd2e088725e240
|
[
"Apache-2.0"
] | null | null | null |
# Copyright 2020 Shelby Allen-Franks
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from .dcgoss import DCGoss
from .docker import Docker
from .docker_compose import DockerCompose
__version__ = '0.1.4'
def run(path, service, retry_timeout=300, retry_interval=0.2):
return DCGoss(path, Docker(), DockerCompose(path), retry_timeout, retry_interval).run(service)
def edit(path, service, retry_timeout=300, retry_interval=0.2):
return DCGoss(path, Docker(), DockerCompose(path), retry_timeout, retry_interval).edit(service)
| 36.892857
| 99
| 0.767667
| 154
| 1,033
| 5.064935
| 0.532468
| 0.076923
| 0.033333
| 0.041026
| 0.269231
| 0.269231
| 0.269231
| 0.269231
| 0.269231
| 0.269231
| 0
| 0.023783
| 0.145208
| 1,033
| 27
| 100
| 38.259259
| 0.85957
| 0.538238
| 0
| 0
| 0
| 0
| 0.010799
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0.375
| 0.25
| 0.875
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 1
| 1
| 0
|
0
| 4
|
17540329b05254c387da0235cf8bbf0100d84ca7
| 97
|
py
|
Python
|
bambu_comments/apps.py
|
iamsteadman/bambu-comments
|
55af6c1ac78c821cc9a547b4be3e8681fd281042
|
[
"Apache-2.0"
] | 1
|
2019-05-26T16:27:31.000Z
|
2019-05-26T16:27:31.000Z
|
bambu_comments/apps.py
|
iamsteadman/bambu-comments
|
55af6c1ac78c821cc9a547b4be3e8681fd281042
|
[
"Apache-2.0"
] | null | null | null |
bambu_comments/apps.py
|
iamsteadman/bambu-comments
|
55af6c1ac78c821cc9a547b4be3e8681fd281042
|
[
"Apache-2.0"
] | null | null | null |
from django.apps import AppConfig
class CommentsConfig(AppConfig):
verbose_name = 'Comments'
| 24.25
| 33
| 0.793814
| 11
| 97
| 6.909091
| 0.909091
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.134021
| 97
| 4
| 34
| 24.25
| 0.904762
| 0
| 0
| 0
| 0
| 0
| 0.081633
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
175c59c69f0c86654493655476c2ce7c3d1fdcab
| 367
|
py
|
Python
|
aitools/Modeling.py
|
werner-denzin/go.ai
|
c2bc1fa30b71f9879fc17b5fe7e37e67dc74850b
|
[
"MIT"
] | 1
|
2021-01-06T21:42:22.000Z
|
2021-01-06T21:42:22.000Z
|
aitools/Modeling.py
|
werner-denzin/go.ai
|
c2bc1fa30b71f9879fc17b5fe7e37e67dc74850b
|
[
"MIT"
] | null | null | null |
aitools/Modeling.py
|
werner-denzin/go.ai
|
c2bc1fa30b71f9879fc17b5fe7e37e67dc74850b
|
[
"MIT"
] | null | null | null |
from .Toolbox import Tool
class Train(Tool):
def __init__(self):
Tool.__init__(self)
print('Train is ready!')
class Validate(Tool):
def __init__(self):
Tool.__init__(self)
print('Validate is ready!')
class Evaluate(Tool):
def __init__(self):
Tool.__init__(self)
print('Evaluate is ready!')
| 19.315789
| 35
| 0.59673
| 43
| 367
| 4.534884
| 0.325581
| 0.246154
| 0.169231
| 0.230769
| 0.492308
| 0.492308
| 0.492308
| 0.492308
| 0
| 0
| 0
| 0
| 0.286104
| 367
| 19
| 36
| 19.315789
| 0.744275
| 0
| 0
| 0.461538
| 0
| 0
| 0.138587
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.230769
| false
| 0
| 0.076923
| 0
| 0.538462
| 0.230769
| 0
| 0
| 0
| null | 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
176096c428ba039821b059d1cfae575a17e5a482
| 205
|
py
|
Python
|
src/controller/activity.py
|
dkletz-hackathon/bncc-sano-api
|
0281962dcd6a8e4b9c1b97372964e98b59748a61
|
[
"MIT"
] | null | null | null |
src/controller/activity.py
|
dkletz-hackathon/bncc-sano-api
|
0281962dcd6a8e4b9c1b97372964e98b59748a61
|
[
"MIT"
] | null | null | null |
src/controller/activity.py
|
dkletz-hackathon/bncc-sano-api
|
0281962dcd6a8e4b9c1b97372964e98b59748a61
|
[
"MIT"
] | null | null | null |
from src.model import Activity
from src.exception import *
from core.util import *
def get_all_activities():
query = Activity.select().dicts()
return respond_data([activity for activity in query])
| 29.285714
| 57
| 0.756098
| 29
| 205
| 5.241379
| 0.689655
| 0.092105
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.15122
| 205
| 7
| 57
| 29.285714
| 0.873563
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.166667
| false
| 0
| 0.5
| 0
| 0.833333
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
1775e81cab4bcc122ed0ec6cf82fd29bb96f9dda
| 238
|
py
|
Python
|
rules_default/castervoice/lib/ctrl/mgr/errors/guidance_rejection.py
|
MLH-Fellowship/LarynxCode
|
840fee18c689a357052825607c27fc8e3e56571c
|
[
"MIT"
] | 1
|
2021-09-17T06:11:02.000Z
|
2021-09-17T06:11:02.000Z
|
rules_default/castervoice/lib/ctrl/mgr/errors/guidance_rejection.py
|
soma2000-lang/LarynxCode
|
840fee18c689a357052825607c27fc8e3e56571c
|
[
"MIT"
] | 5
|
2021-02-03T05:29:41.000Z
|
2021-02-08T01:14:11.000Z
|
rules_default/castervoice/lib/ctrl/mgr/errors/guidance_rejection.py
|
soma2000-lang/LarynxCode
|
840fee18c689a357052825607c27fc8e3e56571c
|
[
"MIT"
] | 4
|
2021-02-03T05:05:00.000Z
|
2021-07-14T06:21:10.000Z
|
class GuidanceRejectionException(Exception):
_MSG = "Unit tests should not write files unless they clean them up too."
def __init__(self):
super(GuidanceRejectionException, self).__init__(GuidanceRejectionException._MSG)
| 39.666667
| 89
| 0.773109
| 25
| 238
| 6.96
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.155462
| 238
| 6
| 89
| 39.666667
| 0.865672
| 0
| 0
| 0
| 0
| 0
| 0.267782
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0
| 0
| 0.75
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
17892a67a0a89c9504f2292a8504bcb3c18c4266
| 128
|
py
|
Python
|
iptv/__main__.py
|
unlocKing/iptv
|
17c18f0789b7692d4a97d7ff575980c6e35cc62e
|
[
"MIT"
] | 1
|
2021-08-19T05:31:14.000Z
|
2021-08-19T05:31:14.000Z
|
iptv/__main__.py
|
unlocKing/iptv
|
17c18f0789b7692d4a97d7ff575980c6e35cc62e
|
[
"MIT"
] | null | null | null |
iptv/__main__.py
|
unlocKing/iptv
|
17c18f0789b7692d4a97d7ff575980c6e35cc62e
|
[
"MIT"
] | 1
|
2019-01-18T11:20:49.000Z
|
2019-01-18T11:20:49.000Z
|
# -*- coding: utf-8 -*-
from iptv.main import main
if __name__ == '__main__':
# execute only if run as a script
main()
| 18.285714
| 37
| 0.617188
| 19
| 128
| 3.736842
| 0.789474
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.010309
| 0.242188
| 128
| 6
| 38
| 21.333333
| 0.721649
| 0.414063
| 0
| 0
| 0
| 0
| 0.111111
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
179c984099c88630a08101694b4ed504b2548260
| 928
|
py
|
Python
|
src/backend/models/path_name_manager.py
|
Juliiia/TraceVisualization
|
2e28c1f01699d23e7a537937aa46f8e85a374ce9
|
[
"MIT"
] | null | null | null |
src/backend/models/path_name_manager.py
|
Juliiia/TraceVisualization
|
2e28c1f01699d23e7a537937aa46f8e85a374ce9
|
[
"MIT"
] | null | null | null |
src/backend/models/path_name_manager.py
|
Juliiia/TraceVisualization
|
2e28c1f01699d23e7a537937aa46f8e85a374ce9
|
[
"MIT"
] | null | null | null |
#!/usr/bin/python3.6
def getPathToDataExchangeFolder():
return 'src/backend/dataExchange/'
def getPathToLogFolder():
return 'src/backend/log/'
def getPathToDataOutput():
return 'src/backend/dataOutput/'
def getPathOfMainJsonFile(artifact_name):
return getPathToDataExchangeFolder() + artifact_name + '.json'
def getPathOfNetworkJsonFile(artifact_name):
return getPathToDataExchangeFolder() + artifact_name + '_network.json'
def getPathOfNeighborBarchart(artifact_name):
return getPathToDataExchangeFolder() + artifact_name + '_neighbor_barchart.json'
def getPathOfSankeyDiagram(artifact_name):
return getPathToDataExchangeFolder() + artifact_name + '_sankey_diagram.json'
def getPathOfEntityOutputCSVFile(artifact_name):
return getPathToDataOutput() + artifact_name + '_entity_output.csv'
def getNodeId(artifact_name, counter):
return artifact_name + 'entity' + str(counter)
| 25.081081
| 84
| 0.779095
| 85
| 928
| 8.282353
| 0.388235
| 0.204545
| 0.127841
| 0.255682
| 0.323864
| 0.323864
| 0
| 0
| 0
| 0
| 0
| 0.00246
| 0.123922
| 928
| 37
| 85
| 25.081081
| 0.863469
| 0.020474
| 0
| 0
| 0
| 0
| 0.163916
| 0.078108
| 0
| 0
| 0
| 0
| 0
| 1
| 0.5
| false
| 0
| 0
| 0.5
| 1
| 0
| 0
| 0
| 0
| null | 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
|
0
| 4
|
bd83991f5938aa1760d981201b552f366498ed68
| 238
|
py
|
Python
|
lionrender/__init__.py
|
Kupoman/panda3d-lion-render
|
9d8cd41ec1b891a7ad940cd4ca6f8a08ff6b1002
|
[
"MIT"
] | null | null | null |
lionrender/__init__.py
|
Kupoman/panda3d-lion-render
|
9d8cd41ec1b891a7ad940cd4ca6f8a08ff6b1002
|
[
"MIT"
] | null | null | null |
lionrender/__init__.py
|
Kupoman/panda3d-lion-render
|
9d8cd41ec1b891a7ad940cd4ca6f8a08ff6b1002
|
[
"MIT"
] | null | null | null |
from .renderpass import Pass
from .gpubuffer import GpuBuffer
from .xfbbuffer import TransformFeedbackBuffer
from .filter_pass import (
FilterPass,
FxaaFilterPass,
)
from .scene_pass import (
ScenePass,
DepthScenePass,
)
| 18.307692
| 46
| 0.764706
| 24
| 238
| 7.5
| 0.541667
| 0.111111
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.180672
| 238
| 12
| 47
| 19.833333
| 0.923077
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.636364
| 0.454545
| 0
| 0.454545
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 0
|
0
| 4
|
bdb48078a5f0d488fcfa64db39f62a3c0d6834d3
| 108
|
py
|
Python
|
tests/fib.py
|
jplevyak/pyc
|
9f4bc49be78ba29427841460945ce63826fcd857
|
[
"BSD-3-Clause"
] | 3
|
2019-08-21T22:01:35.000Z
|
2021-07-25T00:21:28.000Z
|
tests/fib.py
|
jplevyak/pyc
|
9f4bc49be78ba29427841460945ce63826fcd857
|
[
"BSD-3-Clause"
] | null | null | null |
tests/fib.py
|
jplevyak/pyc
|
9f4bc49be78ba29427841460945ce63826fcd857
|
[
"BSD-3-Clause"
] | null | null | null |
def fib(x):
if x==0 or x==1:
return 1
else:
return fib(x-2)+fib(x-1)
print fib(33)
| 13.5
| 32
| 0.481481
| 22
| 108
| 2.363636
| 0.545455
| 0.230769
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.1
| 0.351852
| 108
| 7
| 33
| 15.428571
| 0.642857
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 0.166667
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.