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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
8d946bc922679a0c45c875a749f55134163578f9
| 1,860
|
py
|
Python
|
cmd/commands with command prompt/script.py
|
Phelipe-Sempreboni/python
|
8ad6d18df728d89e5b036759b3bdbec9c4d08f8a
|
[
"MIT"
] | null | null | null |
cmd/commands with command prompt/script.py
|
Phelipe-Sempreboni/python
|
8ad6d18df728d89e5b036759b3bdbec9c4d08f8a
|
[
"MIT"
] | null | null | null |
cmd/commands with command prompt/script.py
|
Phelipe-Sempreboni/python
|
8ad6d18df728d89e5b036759b3bdbec9c4d08f8a
|
[
"MIT"
] | null | null | null |
# Método 1 - Abrir o prompt de comando (CMD).
# Nota: Abrir o cmd em tela de comando no windows com a biblioteca os.
import os
os.system('start /wait cmd')
# Método 2 - Abrir o prompt de comando (CMD).
# Nota: Abrir o cmd em tela de comando no windows com a biblioteca os.
import os
os.system('start cmd')
# Método 3 - Abrir o prompt de comando (CMD).
# Nota: Abrir o cmd em tela de comando no windows com a biblioteca subprocess.
import subprocess
subprocess.run('start', shell = True)
# Método 4 - Abrir o prompt de comando (CMD).
# Nota: Abrir o cmd diretamente no terminal do Python.
import os
os.system('cmd')
# --------- # --------- # --------- # --------- # --------- # --------- # --------- # --------- # --------- # --------- # --------- # --------- # --------- # --------- # --------- # --------- # --------- # ---------
# Executar comandos para verificação de diretórios.
# Nota: Teremos o script inicial e um exemplo para verificar repositórios.
# Observação: para todos os cripts abaixo é possível utilizar no lugar do (dir) o (cd) para acessar os diretórios.
#Script inicial:
# Este script executado da maneira abaixo, mostra os repositórios do local.
import os
os.system('dir')
# Script de exemplo 1. Se por exemplo, for inserido o nome de um repositório e (.), ele mostrará todas as pastas ou arquivos dentro daquele repositório.
import os
os.system('dir Desktop.')
#Script de exemplo 2. Se for por exemplo, for inserido o nome de um repositório e aopós (\nome_repositório), ele entrará neste repositório e mostrará todas as pastas ou arquivos dentro daquele repositório.
import os
os.system('dir Desktop\Temp')
# --------- # --------- # --------- # --------- # --------- # --------- # --------- # --------- # --------- # --------- # --------- # --------- # --------- # --------- # --------- # --------- # --------- # ---------
| 45.365854
| 219
| 0.575806
| 233
| 1,860
| 4.592275
| 0.351931
| 0.04486
| 0.056075
| 0.08972
| 0.535514
| 0.517757
| 0.517757
| 0.517757
| 0.517757
| 0.517757
| 0
| 0.003906
| 0.174194
| 1,860
| 40
| 220
| 46.5
| 0.692708
| 0.819355
| 0
| 0.428571
| 0
| 0
| 0.221831
| 0
| 0
| 0
| 0
| 0.025
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 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
| 1
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
a5edb3b7e6ed7d44f71c82e0ba8bfb7254eca213
| 407
|
py
|
Python
|
tpDcc/dccs/mobu/core/gui.py
|
tpDcc/tpDcc-dccs-mobu
|
1e28dfa95d72aeaccf4c916259b7e07380758cc7
|
[
"MIT"
] | null | null | null |
tpDcc/dccs/mobu/core/gui.py
|
tpDcc/tpDcc-dccs-mobu
|
1e28dfa95d72aeaccf4c916259b7e07380758cc7
|
[
"MIT"
] | null | null | null |
tpDcc/dccs/mobu/core/gui.py
|
tpDcc/tpDcc-dccs-mobu
|
1e28dfa95d72aeaccf4c916259b7e07380758cc7
|
[
"MIT"
] | null | null | null |
#! /usr/bin/env python
# -*- coding: utf-8 -*-
"""
Module that contains functions and classes related to MotionBuilder UI
"""
from __future__ import print_function, division, absolute_import
from tpDcc.libs.qt.core import qtutils
def get_mobu_window():
"""
Return the MotionBuilder main window widget as a Python object
:return: Maya Window
"""
return qtutils.get_main_qt_window()
| 20.35
| 70
| 0.719902
| 55
| 407
| 5.127273
| 0.745455
| 0.085106
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.003012
| 0.184275
| 407
| 19
| 71
| 21.421053
| 0.846386
| 0.486486
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| true
| 0
| 0.5
| 0
| 1
| 0.25
| 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
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
a5eecd845b381f901adbb5a8415eb2dff1115a0c
| 259
|
py
|
Python
|
app/models/__init__.py
|
wallseat/fastapi-todo-app
|
5b9c6da9bce16960116a228db4b683d82ba058d0
|
[
"MIT"
] | null | null | null |
app/models/__init__.py
|
wallseat/fastapi-todo-app
|
5b9c6da9bce16960116a228db4b683d82ba058d0
|
[
"MIT"
] | null | null | null |
app/models/__init__.py
|
wallseat/fastapi-todo-app
|
5b9c6da9bce16960116a228db4b683d82ba058d0
|
[
"MIT"
] | null | null | null |
from sqlalchemy import MetaData
from sqlalchemy.orm import declarative_base
metadata = MetaData()
Base = declarative_base(metadata=metadata)
from .label import Label
from .todo import Todo, TodoLabels
__all__ = ["metadata", "Todo", "Label", "TodoLabels"]
| 21.583333
| 53
| 0.776062
| 31
| 259
| 6.290323
| 0.354839
| 0.14359
| 0.235897
| 0.317949
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.127413
| 259
| 11
| 54
| 23.545455
| 0.862832
| 0
| 0
| 0
| 0
| 0
| 0.104247
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.571429
| 0
| 0.571429
| 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
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
570e54cfdd211576887b7445284c3087f5cfa935
| 76
|
py
|
Python
|
tests/__init__.py
|
cghdev/openwrt-luci-rpc
|
fe793ac2ebb5df083b059379c25214d75b11ca6f
|
[
"Apache-2.0"
] | null | null | null |
tests/__init__.py
|
cghdev/openwrt-luci-rpc
|
fe793ac2ebb5df083b059379c25214d75b11ca6f
|
[
"Apache-2.0"
] | null | null | null |
tests/__init__.py
|
cghdev/openwrt-luci-rpc
|
fe793ac2ebb5df083b059379c25214d75b11ca6f
|
[
"Apache-2.0"
] | null | null | null |
# -*- coding: utf-8 -*-
"""Unit test package for openwrt_luci_rpc_wifi."""
| 19
| 50
| 0.644737
| 11
| 76
| 4.181818
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.015385
| 0.144737
| 76
| 3
| 51
| 25.333333
| 0.692308
| 0.881579
| 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
|
57595b08f6405dbee9916102cc1c1d87ca87181f
| 17,330
|
py
|
Python
|
app/upload/migrations/0001_initial.py
|
S3Infosoft/s3-payment-autoaudit
|
8854d263778bd03c0fbba28c438629b1c78a3654
|
[
"MIT"
] | null | null | null |
app/upload/migrations/0001_initial.py
|
S3Infosoft/s3-payment-autoaudit
|
8854d263778bd03c0fbba28c438629b1c78a3654
|
[
"MIT"
] | 6
|
2019-09-14T06:36:48.000Z
|
2020-05-02T04:03:58.000Z
|
app/upload/migrations/0001_initial.py
|
S3Infosoft/s3-payment-autoaudit
|
8854d263778bd03c0fbba28c438629b1c78a3654
|
[
"MIT"
] | null | null | null |
# Generated by Django 2.2.5 on 2019-09-30 17:43
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Type1',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('Booking_ID', models.CharField(max_length=30, unique=True)),
('No_of_nights', models.IntegerField(blank=True, null=True)),
('Check_In', models.CharField(blank=True, max_length=30, null=True)),
('Check_Out', models.CharField(blank=True, max_length=30, null=True)),
('Room', models.IntegerField(blank=True, null=True)),
('Night', models.IntegerField(blank=True, null=True)),
('Hotel_Sell_Price', models.CharField(blank=True, max_length=30, null=True)),
('Extra_Adult_Child_Charge', models.IntegerField(blank=True, null=True)),
('Hotel_Gross_Price', models.IntegerField(blank=True, null=True)),
('MMT_Commission', models.IntegerField(blank=True, null=True)),
('GST_18_Including_IGST_or_SGST_CGST', models.IntegerField(blank=True, null=True)),
('MMT_to_Pay_Hotel_A_B', models.IntegerField(blank=True, null=True)),
('GST_on_hotel_accommodation_charges_by_Ecommerce_Operator', models.IntegerField(blank=True, null=True)),
('Primary_Guest', models.CharField(blank=True, max_length=30, null=True)),
('E_mail', models.CharField(blank=True, max_length=30, null=True)),
('Contact_No', models.CharField(blank=True, max_length=50, null=True)),
('Room_Category', models.CharField(blank=True, max_length=30, null=True)),
('Meal_Plan', models.CharField(blank=True, max_length=30, null=True)),
],
),
migrations.CreateModel(
name='Type2',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('BookingID', models.IntegerField(unique=True)),
('Check_in', models.DateField(blank=True, null=True)),
('Check_out', models.DateField(blank=True, null=True)),
('Booked_On', models.DateField(blank=True, null=True)),
('PAH_Booking', models.CharField(blank=True, max_length=3, null=True)),
('Amount_to_be_collected_from_customer_only_for_PAH_booking', models.IntegerField(blank=True, null=True)),
('Payable_Amount', models.DecimalField(blank=True, decimal_places=2, max_digits=20, null=True)),
('Nett_Payable_to_Hotel', models.DecimalField(blank=True, decimal_places=2, max_digits=20, null=True)),
('Customer_Name', models.CharField(blank=True, max_length=30, null=True)),
('Booking_Status', models.CharField(blank=True, max_length=30, null=True)),
('Payment_Status', models.CharField(blank=True, max_length=30, null=True)),
('Booking_Vendor', models.CharField(blank=True, max_length=30, null=True)),
('Vendor_Booking_ID', models.CharField(blank=True, max_length=30, null=True)),
('Parent_Booking_ID_only_for_Cart_booking', models.CharField(blank=True, max_length=30, null=True)),
('No_of_Rooms', models.IntegerField(blank=True, null=True)),
('No_of_Nights', models.IntegerField(blank=True, null=True)),
('Room_Charges', models.IntegerField(blank=True, null=True)),
('Extra_Adult_Child_Charges', models.IntegerField(blank=True, null=True)),
('Hotel_Taxes', models.DecimalField(blank=True, decimal_places=2, max_digits=20, null=True)),
('Hotel_Gross_Charges', models.DecimalField(blank=True, decimal_places=2, max_digits=20, null=True)),
('Commission_Charges', models.DecimalField(blank=True, decimal_places=2, max_digits=20, null=True)),
('GST_Charges', models.DecimalField(blank=True, decimal_places=2, max_digits=20, null=True)),
('Commission_Including_GST', models.DecimalField(blank=True, decimal_places=2, max_digits=20, null=True)),
('Amount_Paid', models.IntegerField(blank=True, null=True)),
('Payment_Date', models.DateField(blank=True, null=True)),
('Payment_Id', models.CharField(blank=True, max_length=50, null=True)),
('Bank_Ref_VCC_No', models.CharField(blank=True, max_length=30, null=True)),
('Amount_adjusted', models.IntegerField(blank=True, null=True)),
('Adjustment_ID', models.DecimalField(blank=True, decimal_places=2, max_digits=20, null=True)),
],
),
migrations.CreateModel(
name='Type3',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('Reservation_number', models.IntegerField(unique=True)),
('Booked_on', models.CharField(blank=True, max_length=50, null=True)),
('Arrival', models.DateField(blank=True, null=True)),
('Departure', models.DateField(blank=True, null=True)),
('Booker_name', models.CharField(blank=True, max_length=30, null=True)),
('Guest_name', models.CharField(blank=True, max_length=30, null=True)),
('Rooms', models.IntegerField(blank=True, null=True)),
('Persons', models.IntegerField(blank=True, null=True)),
('Room_nights', models.IntegerField(blank=True, null=True)),
('Commission', models.IntegerField(blank=True, null=True)),
('Original_amount', models.IntegerField(blank=True, null=True)),
('Final_amount', models.IntegerField(blank=True, null=True)),
('Commission_amount', models.DecimalField(blank=True, decimal_places=2, max_digits=20, null=True)),
('Status', models.CharField(blank=True, max_length=30, null=True)),
('Guest_request', models.DecimalField(blank=True, decimal_places=2, max_digits=20, null=True)),
('Currency', models.CharField(blank=True, max_length=30, null=True)),
('Hotel_id', models.IntegerField(blank=True, null=True)),
],
),
migrations.CreateModel(
name='Type4',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('entity_id', models.CharField(blank=True, max_length=30, unique=True)),
('TYPE', models.CharField(blank=True, max_length=30, null=True)),
('debit', models.IntegerField(blank=True, null=True)),
('credit', models.IntegerField(blank=True, null=True)),
('amount', models.IntegerField(blank=True, null=True)),
('currency', models.CharField(blank=True, max_length=30, null=True)),
('fee', models.DecimalField(blank=True, decimal_places=2, max_digits=20, null=True)),
('tax', models.DecimalField(blank=True, decimal_places=2, max_digits=20, null=True)),
('on_hold', models.IntegerField(blank=True, null=True)),
('settled', models.IntegerField(blank=True, null=True)),
('created_at', models.DateTimeField(blank=True, null=True)),
('settled_at', models.DateTimeField(blank=True, null=True)),
('settlement_id', models.CharField(blank=True, max_length=30, null=True)),
('description', models.CharField(blank=True, max_length=30, null=True)),
('notes', models.CharField(blank=True, max_length=30, null=True)),
('payment_id', models.CharField(blank=True, max_length=30, null=True)),
('settlement_utr', models.CharField(blank=True, max_length=30, null=True)),
('order_id', models.CharField(blank=True, max_length=30, null=True)),
('order_receipt', models.DecimalField(blank=True, decimal_places=2, max_digits=20, null=True)),
('method', models.CharField(blank=True, max_length=30, null=True)),
('issuer_name', models.CharField(blank=True, max_length=30, null=True)),
('card_network', models.CharField(blank=True, max_length=30, null=True)),
('card_issuer', models.CharField(blank=True, max_length=30, null=True)),
('card_type', models.CharField(blank=True, max_length=30, null=True)),
('dispute_id', models.DecimalField(blank=True, decimal_places=2, max_digits=20, null=True)),
],
),
migrations.CreateModel(
name='Type5',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('CustomerCode', models.IntegerField(null=True)),
('MerchantName', models.CharField(blank=True, max_length=30, null=True)),
('TID', models.IntegerField(blank=True, null=True)),
('IFSC', models.CharField(blank=True, max_length=30, null=True)),
('RR_NO', models.IntegerField(blank=True, null=True)),
('Stan_No', models.IntegerField(blank=True, null=True)),
('Interchange', models.CharField(blank=True, max_length=30, null=True)),
('CardNo', models.CharField(blank=True, max_length=30, null=True)),
('CardType', models.CharField(blank=True, max_length=30, null=True)),
('TxnDate', models.CharField(max_length=30, null=True)),
('PaymentDate', models.CharField(blank=True, max_length=30, null=True)),
('PaymentRemarks1', models.CharField(blank=True, max_length=30, null=True)),
('K30_PRORATA_AMT', models.DecimalField(blank=True, decimal_places=2, max_digits=20, null=True)),
('K30_Benefit_Received', models.DecimalField(blank=True, decimal_places=2, max_digits=20, null=True)),
('TxnAmt', models.DecimalField(blank=True, decimal_places=2, max_digits=20, null=True)),
('MdrMswipePer', models.DecimalField(blank=True, decimal_places=2, max_digits=20, null=True)),
('MdrValue', models.DecimalField(blank=True, decimal_places=2, max_digits=20, null=True)),
('GST', models.DecimalField(blank=True, decimal_places=2, max_digits=20, null=True)),
('TDS_Amount', models.DecimalField(blank=True, decimal_places=2, max_digits=20, null=True)),
('Deduction', models.DecimalField(blank=True, decimal_places=2, max_digits=20, null=True)),
('Conveyance_fees_Rate', models.DecimalField(blank=True, decimal_places=2, max_digits=20, null=True)),
('Conveyance_fees_Amount', models.DecimalField(blank=True, decimal_places=2, max_digits=20, null=True)),
('Conveyance_fees_GST', models.DecimalField(blank=True, decimal_places=2, max_digits=20, null=True)),
('NetAmt', models.DecimalField(blank=True, decimal_places=2, max_digits=20, null=True)),
('Rent', models.DecimalField(blank=True, decimal_places=2, max_digits=20, null=True)),
('Adjustment', models.DecimalField(blank=True, decimal_places=2, max_digits=20, null=True)),
('FinalPayment', models.DecimalField(decimal_places=2, max_digits=20, null=True)),
('LoanDeductionRate', models.DecimalField(blank=True, decimal_places=2, max_digits=20, null=True)),
('LoanDeductionAmount', models.DecimalField(blank=True, decimal_places=2, max_digits=20, null=True)),
('AdditionalRecovery', models.DecimalField(blank=True, decimal_places=2, max_digits=20, null=True)),
('FinalPaymentToMeAfterLoanDeduction', models.DecimalField(blank=True, decimal_places=2, max_digits=20, null=True)),
('FinalPaymentToLoanProvider', models.DecimalField(blank=True, decimal_places=2, max_digits=20, null=True)),
('REMARKS', models.CharField(blank=True, max_length=30, null=True)),
('Mswipe_Ref_No', models.IntegerField(blank=True, null=True)),
('NEFT_Ref_No', models.IntegerField(blank=True, null=True)),
('ARN', models.IntegerField(blank=True, null=True)),
('Lender_UTR_No', models.IntegerField(blank=True, null=True)),
('Lender_Payment_Date', models.CharField(blank=True, max_length=30, null=True)),
('Approval_No', models.IntegerField(blank=True, null=True)),
('Invoice_no', models.CharField(blank=True, max_length=30, null=True)),
('RowId', models.CharField(blank=True, max_length=30, null=True)),
('Cust_GroupCustCode', models.CharField(blank=True, max_length=30, null=True)),
('StoreCode', models.CharField(blank=True, max_length=30, null=True)),
('Cust_Device_Id', models.IntegerField(blank=True, null=True)),
('PaymentRemarks2', models.CharField(blank=True, max_length=30, null=True)),
],
),
migrations.CreateModel(
name='Type6',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('Sr_no', models.IntegerField(blank=True, null=True)),
('Merchant_Name', models.CharField(blank=True, max_length=30, null=True)),
('DBA_Name', models.CharField(blank=True, max_length=30, null=True)),
('Merchant_Id', models.IntegerField(blank=True, null=True)),
('TID', models.IntegerField(blank=True, null=True)),
('Atom_Txn_ID', models.DecimalField(decimal_places=2, max_digits=20, null=True)),
('RRN', models.DecimalField(decimal_places=2, max_digits=20, null=True)),
('Auth_Code', models.IntegerField(null=True)),
('Currency', models.DecimalField(blank=True, decimal_places=2, max_digits=20, null=True)),
('Txn_Date', models.DateTimeField(null=True)),
('Txn_Type', models.IntegerField(blank=True, null=True)),
('Txn_Status', models.IntegerField(blank=True, null=True)),
('Recon_Status', models.CharField(blank=True, max_length=30, null=True)),
('Setteled_Date', models.DateField(blank=True, null=True)),
('Batch_number', models.IntegerField(blank=True, null=True)),
('Payment_Date', models.DateField(blank=True, null=True)),
('Amount', models.IntegerField(blank=True, null=True)),
('MSF', models.DecimalField(blank=True, decimal_places=2, max_digits=20, null=True)),
('GST', models.DecimalField(blank=True, decimal_places=2, max_digits=20, null=True)),
('GST_Slab', models.IntegerField(blank=True, null=True)),
('Cash_POS_Incent', models.IntegerField(blank=True, null=True)),
('net_Amount', models.DecimalField(blank=True, decimal_places=2, max_digits=20, null=True)),
('Local_Intl', models.CharField(blank=True, max_length=30, null=True)),
('mcc', models.IntegerField(blank=True, null=True)),
('City', models.CharField(blank=True, max_length=30, null=True)),
('Card_Number', models.CharField(blank=True, max_length=30, null=True)),
],
),
migrations.CreateModel(
name='Type7',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('Transaction_Date', models.DateField(null=True)),
('Transaction_Details', models.CharField(max_length=50, null=True)),
('Cheque_ID', models.CharField(blank=True, max_length=30, null=True)),
('Value_Date', models.DateField(blank=True, null=True)),
('Withdrawl_Amt', models.DecimalField(decimal_places=2, max_digits=20, null=True)),
('Deposit_Amt', models.DecimalField(decimal_places=2, max_digits=20, null=True)),
('Balance_INR', models.DecimalField(blank=True, decimal_places=2, max_digits=20, null=True)),
],
),
migrations.AddConstraint(
model_name='type7',
constraint=models.UniqueConstraint(fields=('Transaction_Date', 'Transaction_Details', 'Withdrawl_Amt', 'Deposit_Amt'), name='type7_unique'),
),
migrations.AddConstraint(
model_name='type6',
constraint=models.UniqueConstraint(fields=('Atom_Txn_ID', 'RRN', 'Auth_Code', 'Txn_Date'), name='type6_unique'),
),
migrations.AddConstraint(
model_name='type5',
constraint=models.UniqueConstraint(fields=('CustomerCode', 'TxnDate', 'FinalPayment'), name='type5_unique'),
),
]
| 73.432203
| 152
| 0.617253
| 1,958
| 17,330
| 5.286517
| 0.118488
| 0.125978
| 0.072843
| 0.095257
| 0.818182
| 0.792967
| 0.735195
| 0.623128
| 0.611825
| 0.507197
| 0
| 0.021379
| 0.233468
| 17,330
| 235
| 153
| 73.744681
| 0.757829
| 0.002597
| 0
| 0.20614
| 1
| 0
| 0.128276
| 0.020945
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.004386
| 0
| 0.02193
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 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
| 0
| 0
| 0
| 0
|
0
| 4
|
93911e62472f74410e36ed9e1a0857e401fab465
| 196
|
py
|
Python
|
tests/conftest.py
|
GeertLitjens/advent-readme-stars
|
db0643f5b6a1d21cfa2271e08794fdc3a1bdadcd
|
[
"MIT"
] | 10
|
2021-12-02T06:47:05.000Z
|
2022-01-10T06:53:15.000Z
|
tests/conftest.py
|
GeertLitjens/advent-readme-stars
|
db0643f5b6a1d21cfa2271e08794fdc3a1bdadcd
|
[
"MIT"
] | 6
|
2021-12-02T08:07:14.000Z
|
2021-12-17T13:20:09.000Z
|
tests/conftest.py
|
GeertLitjens/advent-readme-stars
|
db0643f5b6a1d21cfa2271e08794fdc3a1bdadcd
|
[
"MIT"
] | 4
|
2021-12-02T16:57:23.000Z
|
2021-12-14T01:55:47.000Z
|
import pytest
from .helpers import EXAMPLE_DATA_3, mock_responses
@pytest.fixture
def default_stars_response():
with mock_responses(EXAMPLE_DATA_3, require_all=False) as r:
yield r
| 19.6
| 64
| 0.77551
| 29
| 196
| 4.931034
| 0.724138
| 0.153846
| 0.167832
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.012195
| 0.163265
| 196
| 9
| 65
| 21.777778
| 0.859756
| 0
| 0
| 0
| 0
| 0
| 0
| 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
|
93bb929bb2c5d32230084f079d5377d450cd87ef
| 140
|
py
|
Python
|
CursoemVideo/challenge030.py
|
ElptsJunior/Python
|
7347b38947b439afa392764aafe0a55f808530dd
|
[
"MIT"
] | null | null | null |
CursoemVideo/challenge030.py
|
ElptsJunior/Python
|
7347b38947b439afa392764aafe0a55f808530dd
|
[
"MIT"
] | null | null | null |
CursoemVideo/challenge030.py
|
ElptsJunior/Python
|
7347b38947b439afa392764aafe0a55f808530dd
|
[
"MIT"
] | null | null | null |
number = int(input('Please insert any number'))
if number % 2 == 0 :
print('this number is par')
else:
print('this number is impar')
| 28
| 47
| 0.65
| 22
| 140
| 4.136364
| 0.681818
| 0.197802
| 0.32967
| 0.373626
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.018018
| 0.207143
| 140
| 5
| 48
| 28
| 0.801802
| 0
| 0
| 0
| 0
| 0
| 0.439716
| 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
|
93bc62727147342a7fa7ae23199c5df9d38fe772
| 12,298
|
py
|
Python
|
src_CAPITAL/status_difference.py
|
sanja7s/SR_Twitter
|
2eb499c9aa25ba6e9860cd77eac6832890d2c126
|
[
"MIT"
] | null | null | null |
src_CAPITAL/status_difference.py
|
sanja7s/SR_Twitter
|
2eb499c9aa25ba6e9860cd77eac6832890d2c126
|
[
"MIT"
] | null | null | null |
src_CAPITAL/status_difference.py
|
sanja7s/SR_Twitter
|
2eb499c9aa25ba6e9860cd77eac6832890d2c126
|
[
"MIT"
] | null | null | null |
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
'''
analyze assortativity of the graphs in terms of sentiment
'''
from igraph import *
import networkx as nx
import os
import numpy as np
import matplotlib.mlab as mlab
import matplotlib.pyplot as plt
import os
import matplotlib.cm as cm
from collections import defaultdict
import matplotlib
import pandas as pd
from scipy.stats.stats import pearsonr
import seaborn as sns
sns.set(color_codes=True, font_scale=2)
f_in_user_labels = "usr_num_CVs.tab"
##################
f_in_user_taxons = "user_taxons.tab"
f_in_user_concepts = "user_concepts.tab"
f_in_user_entities = "user_entities.tab"
#########################
#
f_in_user_sentiment = "user_sentiment.tab"
#
# mention graph
#########################
f_in_graph_weights = "mention_graph_weights.dat"
########################
IN_DIR = "../../../DATA/CAPITAL/"
os.chdir(IN_DIR)
def read_sem_capital(f_name, tname):
f = open(f_name, "r")
cap = defaultdict(int)
cnt = 0
for line in f:
if tname == 'sentiment':
(vid, vn, val) = line.split('\t')
val = float(val)
else:
(vid, val) = line.split('\t')
val = int(val)
cap[vid] = val
cnt += 1
return cap
# one time call
def save_edge_popularity_and_semantic_capital_diff():
sc = read_sem_capital('entities','entities')
G = Graph.Read_Ncol(f_in_graph_weights,names=True, directed=True, weights=True)
summary(G)
fo = open('sem_capital_edge_src_dest_INdeg.dat', 'w')
fow = open('sem_capital_edge_src_dest_weighted_INdeg.dat', 'w')
for e in G.es:
src_id = e.source
dest_id = e.target
src = G.vs[src_id]['name']
dest = G.vs[dest_id]['name']
sc_src = sc[src]
sc_dest = sc[dest]
deg_src = G.degree(src_id, mode=IN)
deg_dest = G.degree(dest_id, mode=IN)
w_deg_src = G.strength(src_id, mode=IN, weights='weight')
w_deg_dest = G.strength(dest_id, mode=IN, weights='weight')
fo.write(str(sc_src) + '\t' + str(sc_dest) + '\t'+ str(deg_src) + '\t' + str(deg_dest) + '\n')
fow.write(str(sc_src) + '\t' + str(sc_dest) + '\t'+ str(w_deg_src) + '\t' + str(w_deg_dest) + '\n')
def read_edge_popularity_and_semantic_capital_diff(f_in):
f = open(f_in, 'r')
res = []
for line in f:
(src_sc,dest_sc,src_IN,dest_IN) = line.split('\t')
res.append((float(src_sc)-float(dest_sc),(float(src_IN)-float(dest_IN))))
return res
def read_edge_semantic_capital_diff(f_in):
f = open(f_in, 'r')
res = []
for line in f:
(src_sc,dest_sc,src_IN,dest_IN) = line.split('\t')
res.append(float(src_sc)-float(dest_sc))
return res
# one time call
def save_edge_popularity_diff():
G = Graph.Read_Ncol(f_in_graph_weights,names=True, directed=True, weights=True)
summary(G)
fo = open('edge_src_dest_INdeg.dat', 'w')
fow = open('edge_src_dest_weighted_INdeg.dat', 'w')
for e in G.es:
src_id = e.source
dest_id = e.target
#src = G.vs[src_id]
#dest = G.vs[dest_id]
deg_src = G.degree(src_id, mode=IN)
deg_dest = G.degree(dest_id, mode=IN)
w_deg_src = G.strength(src_id, mode=IN, weights='weight')
w_deg_dest = G.strength(dest_id, mode=IN, weights='weight')
fo.write(str(deg_src) + '\t' + str(deg_dest) + '\n')
fow.write(str(w_deg_src) + '\t' + str(w_deg_dest) + '\n')
def read_edge_popularity_diff(f_in):
f = open(f_in, 'r')
res = []
for line in f:
(src,dest) = line.split('\t')
res.append(float(src)-float(dest))
return res
def plot_edge_popularity_diff_distr(x, tname):
x = np.array(x)
mu = np.mean(x)
sigma = np.std(x)
med = np.median(x)
lab = '$\mu=' + "{:.3f}".format(mu) \
+ '$, $\sigma= ' + "{:.3f}".format(sigma) + '$'
num_bins = 150
# the histogram of the data
n, bins, patches = plt.hist(x, normed=1, bins=num_bins, histtype='step',color='darkorchid')
#plt.clf() # Get rid of this histogram since not the one we want.
#nx_frac = n/float(len(n)) # Each bin divided by total number of objects.
#width = bins[1] - bins[0] # Width of each bin.
#x = np.ravel(zip(bins[:-1], bins[:-1]+width))
#y = np.ravel(zip(nx_frac,nx_frac))
plt.title(lab)
plt.tight_layout()
#plt.scatter(x,y,color='darkorchid',label=lab)
plt.xlabel('' + tname)
plt.ylabel('p('+ tname +')')
plt.yscale('log')
#plt.xscale('log')
#xint = range(int(min(x)), int(math.ceil(max(x))+1))
#plt.xticks(xint)
plt.xlim(-1000,1000)
#plt.grid(True)
plt.savefig(tname + 'weighted.png')
def plot_edge_popularity_diff_distr_seaborn(x, tname):
x = np.array(x)
mu = np.mean(x)
sigma = np.std(x)
med = np.median(x)
lab = '$\mu=' + "{:.3f}".format(mu) \
+ '$, $\sigma= ' + "{:.3f}".format(sigma) + '$'
xlabel = 'relative social status'
ylabel = 'kde'
fig7s = plt.gcf()
plt.rcParams['figure.figsize']=(8,6)
fig7s.set_size_inches((8,6))
plt.figure(figsize=(8, 6))
print max(x)
z = [xel if xel == 0 else np.log10(abs(xel))*np.sign(xel) for xel in x]
print max(z)
z = np.array(z)
with sns.axes_style("whitegrid"):
"""
g = sns.distplot(z, hist=0, \
#hist_kws={"histtype": "step", "linewidth": 1, "alpha": 0.3, "color": "g"}, \
color="r")
"""
g = sns.kdeplot(z, kernel='cos', c='r')
plt.title(lab)
labels = [r'$ -10^{4} $', r'$ -10^{3} $', r'$ -10^{2} $', \
r'$ -10^{1} $', r'$ 0 $', r'$ 10^1 $', r'$ 10^2 $', \
r'$ 10^3 $', r'$ 10^4 $']
g.set(xticklabels=labels)
plt.xlabel(xlabel)
plt.ylabel(ylabel)
plt.tight_layout()
plt.savefig(tname + 'weighted7log.eps', bbox_inches='tight', dpi=550)
def plot_edge_semantic_capital_diff_distr(x, tname):
x = np.array(x)
mu = np.mean(x)
sigma = np.std(x)
lab = '$\mu=' + "{:.3f}".format(mu) \
+ '$, $\sigma= ' + "{:.3f}".format(sigma) + '$'
num_bins = 60
# the histogram of the data
n, bins, patches = plt.hist(x, normed=1, bins=num_bins, histtype='step',color='darkorchid')
plt.title(lab)
plt.tight_layout()
#plt.scatter(x,y,color='darkorchid',label=lab)
plt.xlabel('' + tname)
plt.ylabel('p('+ tname +')')
plt.yscale('log')
#plt.xscale('log')
#xint = range(int(min(x)), int(math.ceil(max(x))+1))
#plt.xticks(xint)
#plt.ylim(0.000001,0.01)
#plt.grid(True)
plt.savefig(tname + 'weighted.png')
def plot_edge_semantic_capital_diff_distr_seaborn(x, tname):
x = np.array(x)
mu = np.mean(x)
sigma = np.std(x)
fig7s = plt.gcf()
plt.rcParams['figure.figsize']=(8,6)
fig7s.set_size_inches((8,6))
plt.figure(figsize=(8, 6))
lab = '$\mu=' + "{:.3f}".format(mu) \
+ '$, $\sigma= ' + "{:.3f}".format(sigma) + '$'
xlabel = 'relative semantic status'
ylabel = 'kde'
print max(x)
z = [xel if xel == 0 else np.log10(abs(xel))*np.sign(xel) for xel in x]
print max(z)
z = np.array(x)
with sns.axes_style("whitegrid"):
"""
g = sns.distplot(z, hist=0, \
#hist_kws={"histtype": "step", "linewidth": 1, "alpha": 0.3, "color": "g"}, \
color="r")
"""
g = sns.kdeplot(z, kernel='cos', c='r')
plt.title(lab)
plt.xlabel(xlabel)
plt.ylabel(ylabel)
plt.tight_layout()
plt.savefig(tname + 'weighted77.eps', bbox_inches='tight', dpi=550)
def plot_edge_popularity_distr_2(x, tname):
x = np.array(x)
mu = np.mean(x)
sigma = np.std(x)
lab = '$\mu=' + "{:.3f}".format(mu) \
+ '$, $\sigma= ' + "{:.3f}".format(sigma) + '$'
num_bins = 1500
# the histogram of the data
n, bins, patches = plt.hist(x, normed=1, bins=num_bins, histtype='step',color='darkorchid')
plt.clf() # Get rid of this histogram since not the one we want.
nx_frac = n/float(len(n)) # Each bin divided by total number of objects.
width = bins[1] - bins[0] # Width of each bin.
x = np.ravel(zip(bins[:-1], bins[:-1]+width))
y = np.ravel(zip(nx_frac,nx_frac))
plt.title(lab)
plt.scatter(x,y,color='darkorchid',label=lab)
plt.xlabel('' + tname)
plt.ylabel('p('+ tname +')')
plt.yscale('log')
#plt.xscale('log')
#xint = range(int(min(x)), int(math.ceil(max(x))+1))
#plt.xticks(xint)
plt.ylim(0.0000000001,0.01)
#plt.grid(True)
plt.savefig(tname + 'weighted_v2.png')
def plot_edge_sc_vs_pop_diff(diff, tname):
x = []
y = []
for el in diff:
x.append(el[0])
y.append(el[1])
lab = ''
plt.scatter(x,y,color='darkorchid',label=lab)
plt.xlabel('semantic capital status diff')
plt.ylabel('popularity status diff')
#plt.yscale('log')
#plt.xscale('log')
#xint = range(int(min(x)), int(math.ceil(max(x))+1))
#plt.xticks(xint)
plt.ylim(-1000,1000)
#plt.grid(True)
plt.savefig(tname + '.png')
def plot_edge_sc_vs_pop_diff_2(diff, tname):
coef_soc = 100
soc = []
sem = []
d = defaultdict(int)
for el in diff:
# sc
s1 = el[0]
sem.append(s1)
# pop
s2 = int(el[1]/coef_soc)
soc.append(s2)
if s1 in d:
d[s1][s2] += 1
else:
d[s1] = defaultdict(int)
d[s1][s2] += 1
soc=np.array(soc)
sem=np.array(sem)
print np.corrcoef(soc,sem)
print pearsonr(soc, sem)
x = []
y = []
v = []
for i in d:
for j in d[i]:
if d[i][j] > 0:
x.append(j*coef_soc)
y.append(i)
v.append(d[i][j])
plt.clf()
plt.scatter(x,y,s=v, c='darkorchid', edgecolors='none',alpha=0.4)
plt.ylabel('sem cap diff (source - receiver)')
plt.xlabel('pop status diff (source - receiver)')
plt.tight_layout()
plt.xlim(-1000,1000)
#plt.grid(True)
plt.savefig(tname + 'pretty.png')
def plot_edge_sc_vs_pop_diff_2_seaborn(diff, tname):
coef_soc = 100
soc = []
sem = []
d = defaultdict(int)
for el in diff:
# sc
s1 = el[0]
sem.append(s1)
# pop
s2 = int(el[1]/coef_soc)
soc.append(el[1])
if s1 in d:
d[s1][s2] += 1
else:
d[s1] = defaultdict(int)
d[s1][s2] += 1
x=np.array(soc)
y=np.array(sem)
ylabel = 'relative semantic status'
xlabel = 'relative social status'
print len(x)
print len(y)
print max(x)
z = [xel if xel == 0 else np.log10(abs(xel))*np.sign(xel) for xel in x]
print max(z)
z = np.array(z)
labels = [r'$ 10^{-4} $', r'$ 10^{-3} $', r'$ 10^{-2} $', \
r'$ 10^{-1} $', r'$ 10^0 $', r'$ 10^1 $', r'$ 10^2 $', \
r'$ 10^3 $', r'$ 10^4 $']
with sns.axes_style("white"):
g = sns.jointplot(x=z, y=y, kind="scatter", color="darkorchid").set_axis_labels(xlabel, ylabel)
#g.set(xticklabels=labels)
g.ax_joint.set_xticklabels(labels)
#plt.tight_layout()
plt.savefig(tname + 'scatter.eps', bbox_inches='tight')
def find_BI_diff():
bi = pd.read_csv('BI_indexR_full.txt',\
encoding='utf-8', delim_whitespace=1)
print max(bi['bi']), min(bi['bi'])
bidict = bi.set_index('id')['bi'].to_dict()
cnt = 0
for el in bidict:
if bidict[el] > 1:
bidict[el] = 1
cnt += 1
res = []
f = open(f_in_graph_weights, 'r')
for line in f:
(n1, n2, w) = line.split()
res.append(bidict[int(n1)] - bidict[int(n2)])
print res
return res
def plot_edge_BI_diff_distr_seaborn(x, tname):
x = np.array(x)
mu = np.mean(x)
sigma = np.std(x)
med = np.median(x)
lab = '$\mu=' + "{:.3f}".format(mu) \
+ '$, $\sigma= ' + "{:.3f}".format(sigma) + '$'
xlabel = 'relative status: Burt\'s index'
ylabel = 'kde'
fig7s = plt.gcf()
plt.rcParams['figure.figsize']=(8,6)
fig7s.set_size_inches((8,6))
plt.figure(figsize=(8, 6))
print max(x)
#z = [xel if xel == 0 else np.log10(abs(xel))*np.sign(xel) for xel in x]
#print max(z)
#z = np.array(z)
z = x
with sns.axes_style("whitegrid"):
"""
g = sns.distplot(z, hist=0, \
#hist_kws={"histtype": "step", "linewidth": 1, "alpha": 0.3, "color": "g"}, \
color="r")
"""
g = sns.kdeplot(z, c='r')
plt.title(lab)
#labels = [r'$ -10^{4} $', r'$ -10^{3} $', r'$ -10^{2} $', \
#r'$ -10^{1} $', r'$ 0 $', r'$ 10^1 $', r'$ 10^2 $', \
#r'$ 10^3 $', r'$ 10^4 $']
#g.set(xticklabels=labels)
plt.xlim(-1.1,1.1)
plt.xlabel(xlabel)
plt.ylabel(ylabel)
plt.tight_layout()
plt.savefig(tname + 'BI7log.eps', bbox_inches='tight', dpi=550)
#pop_diff = read_edge_popularity_diff('edge_src_dest_weighted_INdeg.dat')
#plot_edge_popularity_diff_distr_seaborn(pop_diff, 'popularity diff (source - receiver)')
#sc_diff = read_edge_semantic_capital_diff('sem_capital_edge_src_dest_weighted_INdeg.dat')
#plot_edge_semantic_capital_diff_distr_seaborn(sc_diff,'sem cap diff (source - receiver)')
#pop_sc_diff = read_edge_popularity_and_semantic_capital_diff('sem_capital_edge_src_dest_weighted_INdeg.dat')
#plot_edge_sc_vs_pop_diff_2(pop_sc_diff, 'pop vs. sem cap status diff')
#pop_sc_diff = read_edge_popularity_and_semantic_capital_diff('sem_capital_edge_src_dest_weighted_INdeg.dat')
#plot_edge_sc_vs_pop_diff_2_seaborn(pop_sc_diff, 'pop vs. sem cap status diff')
x = find_BI_diff()
plot_edge_BI_diff_distr_seaborn(x, 'BI')
| 25.097959
| 109
| 0.636526
| 2,107
| 12,298
| 3.554817
| 0.130517
| 0.010013
| 0.02283
| 0.015888
| 0.74753
| 0.728171
| 0.709212
| 0.683578
| 0.660614
| 0.630975
| 0
| 0.027491
| 0.157017
| 12,298
| 490
| 110
| 25.097959
| 0.694994
| 0.17328
| 0
| 0.580128
| 0
| 0
| 0.136206
| 0.018979
| 0.019231
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0.041667
| null | null | 0.041667
| 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
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
93c7f167332537bd43c5ee695464eeb558fcf5af
| 64
|
py
|
Python
|
8_kyu/Quarter_of_the_year.py
|
UlrichBerntien/Codewars-Katas
|
bbd025e67aa352d313564d3862db19fffa39f552
|
[
"MIT"
] | null | null | null |
8_kyu/Quarter_of_the_year.py
|
UlrichBerntien/Codewars-Katas
|
bbd025e67aa352d313564d3862db19fffa39f552
|
[
"MIT"
] | null | null | null |
8_kyu/Quarter_of_the_year.py
|
UlrichBerntien/Codewars-Katas
|
bbd025e67aa352d313564d3862db19fffa39f552
|
[
"MIT"
] | null | null | null |
def quarter_of(month: int) -> int:
return 1 + (month-1) // 3
| 32
| 34
| 0.59375
| 11
| 64
| 3.363636
| 0.727273
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.06
| 0.21875
| 64
| 2
| 35
| 32
| 0.68
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.5
| false
| 0
| 0
| 0.5
| 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
| 1
| 0
| 0
| 0
| 1
| 0
| 0
|
0
| 4
|
93de28798923bb56cb838b4896dcca1d3690262f
| 27
|
py
|
Python
|
notebooks/_solutions/pandas_04_time_series_data37.py
|
rprops/Python_DS-WS
|
b2fc449a74be0c82863e5fcf1ddbe7d64976d530
|
[
"BSD-3-Clause"
] | 183
|
2016-08-24T12:32:07.000Z
|
2022-03-26T14:05:04.000Z
|
notebooks/_solutions/pandas_04_time_series_data37.py
|
rprops/Python_DS-WS
|
b2fc449a74be0c82863e5fcf1ddbe7d64976d530
|
[
"BSD-3-Clause"
] | 100
|
2016-12-15T03:44:06.000Z
|
2022-03-07T08:14:07.000Z
|
notebooks/_solutions/pandas_04_time_series_data37.py
|
rprops/Python_DS-WS
|
b2fc449a74be0c82863e5fcf1ddbe7d64976d530
|
[
"BSD-3-Clause"
] | 204
|
2016-08-24T14:22:58.000Z
|
2022-03-29T15:09:03.000Z
|
data[data.index.month == 1]
| 27
| 27
| 0.703704
| 5
| 27
| 3.8
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.04
| 0.074074
| 27
| 1
| 27
| 27
| 0.72
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 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
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
9e2010daaaab72cad6f6756c0fff74d09ac258a4
| 188
|
py
|
Python
|
EventFilter/RPCRawToDigi/python/RPCTwinMuxRawToDigi_sqlite_cff.py
|
nistefan/cmssw
|
ea13af97f7f2117a4f590a5e654e06ecd9825a5b
|
[
"Apache-2.0"
] | null | null | null |
EventFilter/RPCRawToDigi/python/RPCTwinMuxRawToDigi_sqlite_cff.py
|
nistefan/cmssw
|
ea13af97f7f2117a4f590a5e654e06ecd9825a5b
|
[
"Apache-2.0"
] | null | null | null |
EventFilter/RPCRawToDigi/python/RPCTwinMuxRawToDigi_sqlite_cff.py
|
nistefan/cmssw
|
ea13af97f7f2117a4f590a5e654e06ecd9825a5b
|
[
"Apache-2.0"
] | null | null | null |
import FWCore.ParameterSet.Config as cms
from CondTools.RPC.RPCLinkMap_sqlite_cff import RPCLinkMapSource
from EventFilter.RPCRawToDigi.RPCTwinMuxRawToDigi_cfi import RPCTwinMuxRawToDigi
| 37.6
| 80
| 0.898936
| 21
| 188
| 7.904762
| 0.809524
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.069149
| 188
| 4
| 81
| 47
| 0.948571
| 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
|
f51ea60a7c68cb896ed4ca9cd8c917711983eacf
| 8,496
|
py
|
Python
|
mmtbx/conformation_dependent_library/tst_multi_residue_rna.py
|
dperl-sol/cctbx_project
|
b9e390221a2bc4fd00b9122e97c3b79c632c6664
|
[
"BSD-3-Clause-LBNL"
] | 155
|
2016-11-23T12:52:16.000Z
|
2022-03-31T15:35:44.000Z
|
mmtbx/conformation_dependent_library/tst_multi_residue_rna.py
|
dperl-sol/cctbx_project
|
b9e390221a2bc4fd00b9122e97c3b79c632c6664
|
[
"BSD-3-Clause-LBNL"
] | 590
|
2016-12-10T11:31:18.000Z
|
2022-03-30T23:10:09.000Z
|
mmtbx/conformation_dependent_library/tst_multi_residue_rna.py
|
dperl-sol/cctbx_project
|
b9e390221a2bc4fd00b9122e97c3b79c632c6664
|
[
"BSD-3-Clause-LBNL"
] | 115
|
2016-11-15T08:17:28.000Z
|
2022-02-09T15:30:14.000Z
|
from __future__ import absolute_import, division, print_function
from iotbx import pdb
from mmtbx.conformation_dependent_library.testing_utils import get_geometry_restraints_manager
#This is a very basic test of generate_residue_tuples for RNA/DNA
#sample structure lines are taken from 1ehz.pdb and have been modified at
# The P atom of residue 3 to introduce a chain break
pdblines = """ATOM 1 OP3 G A 1 50.193 51.190 50.534 1.00 99.85 O
ATOM 2 P G A 1 50.626 49.730 50.573 1.00100.19 P
ATOM 3 OP1 G A 1 49.854 48.893 49.562 1.00100.19 O
ATOM 4 OP2 G A 1 52.137 49.542 50.511 1.00 99.21 O
ATOM 5 O5' G A 1 50.161 49.136 52.023 1.00 99.82 O
ATOM 6 C5' G A 1 50.216 49.948 53.210 1.00 98.63 C
ATOM 7 C4' G A 1 50.968 49.231 54.309 1.00 97.84 C
ATOM 8 O4' G A 1 50.450 47.888 54.472 1.00 97.10 O
ATOM 9 C3' G A 1 52.454 49.030 54.074 1.00 98.07 C
ATOM 10 O3' G A 1 53.203 50.177 54.425 1.00 99.39 O
ATOM 11 C2' G A 1 52.781 47.831 54.957 1.00 96.96 C
ATOM 12 O2' G A 1 53.018 48.156 56.313 1.00 96.77 O
ATOM 13 C1' G A 1 51.502 47.007 54.836 1.00 95.70 C
ATOM 14 N9 G A 1 51.628 45.992 53.798 1.00 93.67 N
ATOM 15 C8 G A 1 51.064 46.007 52.547 1.00 92.60 C
ATOM 16 N7 G A 1 51.379 44.966 51.831 1.00 91.19 N
ATOM 17 C5 G A 1 52.197 44.218 52.658 1.00 91.47 C
ATOM 18 C6 G A 1 52.848 42.992 52.425 1.00 90.68 C
ATOM 19 O6 G A 1 52.826 42.291 51.404 1.00 90.38 O
ATOM 20 N1 G A 1 53.588 42.588 53.534 1.00 90.71 N
ATOM 21 C2 G A 1 53.685 43.282 54.716 1.00 91.21 C
ATOM 22 N2 G A 1 54.452 42.733 55.671 1.00 91.23 N
ATOM 23 N3 G A 1 53.077 44.429 54.946 1.00 91.92 N
ATOM 24 C4 G A 1 52.356 44.836 53.879 1.00 92.62 C
ATOM 25 P C A 2 54.635 50.420 53.741 1.00100.19 P
ATOM 26 OP1 C A 2 55.145 51.726 54.238 1.00100.19 O
ATOM 27 OP2 C A 2 54.465 50.204 52.269 1.00100.19 O
ATOM 28 O5' C A 2 55.563 49.261 54.342 1.00 98.27 O
ATOM 29 C5' C A 2 55.925 49.246 55.742 1.00 95.40 C
ATOM 30 C4' C A 2 56.836 48.075 56.049 1.00 93.33 C
ATOM 31 O4' C A 2 56.122 46.828 55.830 1.00 92.18 O
ATOM 32 C3' C A 2 58.090 47.947 55.197 1.00 92.75 C
ATOM 33 O3' C A 2 59.174 48.753 55.651 1.00 92.89 O
ATOM 34 C2' C A 2 58.416 46.463 55.298 1.00 91.81 C
ATOM 35 O2' C A 2 59.140 46.136 56.466 1.00 91.36 O
ATOM 36 C1' C A 2 57.022 45.836 55.356 1.00 90.59 C
ATOM 37 N1 C A 2 56.570 45.364 54.029 1.00 88.84 N
ATOM 38 C2 C A 2 57.094 44.157 53.520 1.00 88.64 C
ATOM 39 O2 C A 2 57.921 43.516 54.198 1.00 88.97 O
ATOM 40 N3 C A 2 56.686 43.721 52.301 1.00 87.36 N
ATOM 41 C4 C A 2 55.802 44.437 51.597 1.00 87.11 C
ATOM 42 N4 C A 2 55.430 43.972 50.397 1.00 86.30 N
ATOM 43 C5 C A 2 55.259 45.660 52.089 1.00 86.87 C
ATOM 44 C6 C A 2 55.663 46.080 53.296 1.00 88.01 C
ATOM 45 P G A 3 600.184 49.419 54.574 1.00 92.31 P
ATOM 46 OP1 G A 3 61.015 50.422 55.295 1.00 92.97 O
ATOM 47 OP2 G A 3 59.371 49.857 53.404 1.00 91.56 O
ATOM 48 O5' G A 3 61.137 48.219 54.105 1.00 88.57 O
ATOM 49 C5' G A 3 62.175 47.724 54.969 1.00 83.44 C
ATOM 50 C4' G A 3 62.769 46.443 54.422 1.00 79.87 C
ATOM 51 O4' G A 3 61.734 45.427 54.299 1.00 78.36 O
ATOM 52 C3' G A 3 63.405 46.499 53.040 1.00 78.97 C
ATOM 53 O3' G A 3 64.741 47.029 53.060 1.00 79.76 O
ATOM 54 C2' G A 3 63.359 45.032 52.608 1.00 77.19 C
ATOM 55 O2' G A 3 64.411 44.256 53.155 1.00 77.80 O
ATOM 56 C1' G A 3 62.018 44.572 53.194 1.00 73.98 C
ATOM 57 N9 G A 3 60.934 44.675 52.202 1.00 68.20 N
ATOM 58 C8 G A 3 60.024 45.702 52.050 1.00 65.03 C
ATOM 59 N7 G A 3 59.252 45.556 51.003 1.00 62.99 N
ATOM 60 C5 G A 3 59.655 44.348 50.447 1.00 59.95 C
ATOM 61 C6 G A 3 59.189 43.675 49.292 1.00 55.65 C
ATOM 62 O6 G A 3 58.287 44.013 48.522 1.00 53.32 O
ATOM 63 N1 G A 3 59.893 42.491 49.072 1.00 54.00 N
ATOM 64 C2 G A 3 60.906 42.006 49.876 1.00 55.46 C
ATOM 65 N2 G A 3 61.512 40.873 49.479 1.00 48.16 N
ATOM 66 N3 G A 3 61.312 42.605 50.983 1.00 56.69 N
ATOM 67 C4 G A 3 60.666 43.774 51.193 1.00 61.76 C"""
def main():
pdb_inp = pdb.input(lines=pdblines, source_info='rna_test_1ehz')
pdb_hierarchy = pdb_inp.construct_hierarchy()
geometry_restraints_manager = get_geometry_restraints_manager(raw_records=pdblines)
pdb_hierarchy.reset_i_seq_if_necessary()
from mmtbx.conformation_dependent_library import generate_residue_tuples
#P of G 3 has been changed from x=60.184 to x=600.184
#Check that this breaks connectivity
rna_residue_pairs = []
for pair in generate_residue_tuples(hierarchy=pdb_hierarchy,
geometry=geometry_restraints_manager,
length=2,
dna_rna_residues=True,
include_non_linked=False, #default behavior
backbone_only=False,
include_non_standard_residues=False,
verbose=False):
residue1 = pair[0]
residue2 = pair[1]
#sample output so you can see the pairs
chain1 = residue1.parent().parent().id
resname1 = residue1.resname
resseq1 = residue1.resseq+residue1.icode
resid1 = ":".join([chain1,resname1,resseq1])
chain2 = residue2.parent().parent().id
resname2 = residue2.resname
resseq2 = residue2.resseq+residue2.icode
resid2 = ":".join([chain2,resname2,resseq2])
#print(residue1.id_str(), "---", residue2.id_str())
#print(resid1,"---",resid2)
rna_residue_pairs.append(resid1+"---"+resid2)
assert len(rna_residue_pairs)==1
#Check that generate residue_tuples can find two total pairs
rna_residue_pairs = []
for pair in generate_residue_tuples(hierarchy=pdb_hierarchy,
geometry=geometry_restraints_manager,
length=2,
dna_rna_residues=True,
include_non_linked=True, #chnged for this test
backbone_only=False,
include_non_standard_residues=False,
verbose=False):
residue1 = pair[0]
residue2 = pair[1]
#sample output so you can see the pairs
chain1 = residue1.parent().parent().id
resname1 = residue1.resname
resseq1 = residue1.resseq+residue1.icode
resid1 = ":".join([chain1,resname1,resseq1])
chain2 = residue2.parent().parent().id
resname2 = residue2.resname
resseq2 = residue2.resseq+residue2.icode
resid2 = ":".join([chain2,resname2,resseq2])
#print(residue1.id_str(), "---", residue2.id_str())
#print(resid1,"---",resid2)
rna_residue_pairs.append(resid1+"---"+resid2)
assert len(rna_residue_pairs)==2
print("OK")
if __name__ == '__main__':
main()
| 59.830986
| 94
| 0.506944
| 1,499
| 8,496
| 2.81521
| 0.285524
| 0.044076
| 0.017062
| 0.008294
| 0.317773
| 0.281517
| 0.281517
| 0.281517
| 0.281517
| 0.281517
| 0
| 0.366365
| 0.415607
| 8,496
| 141
| 95
| 60.255319
| 0.483585
| 0.070386
| 0
| 0.31405
| 0
| 0.553719
| 0.675419
| 0
| 0
| 0
| 0
| 0
| 0.016529
| 1
| 0.008264
| false
| 0
| 0.033058
| 0
| 0.041322
| 0.016529
| 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
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
f55e9d44ab61a857336b8d59400fdf00c6406497
| 70
|
py
|
Python
|
Maths/Factorial/Python/factorial.py
|
srinivasharsha/codezilla
|
60c328d73071ff880b76893f85d84138b104cd02
|
[
"MIT"
] | null | null | null |
Maths/Factorial/Python/factorial.py
|
srinivasharsha/codezilla
|
60c328d73071ff880b76893f85d84138b104cd02
|
[
"MIT"
] | null | null | null |
Maths/Factorial/Python/factorial.py
|
srinivasharsha/codezilla
|
60c328d73071ff880b76893f85d84138b104cd02
|
[
"MIT"
] | null | null | null |
def fact(n):
if n==1:
return 1
return n*fact(n-1)
print(fact(2))
| 10
| 19
| 0.6
| 16
| 70
| 2.625
| 0.5
| 0.238095
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.071429
| 0.2
| 70
| 6
| 20
| 11.666667
| 0.678571
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0
| 0
| 0
| 0.6
| 0.2
| 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
| 1
| 0
|
0
| 4
|
f596731bfe00a67cc3c3588a033af918e91023e5
| 128
|
py
|
Python
|
netdev/vendors/hp/__init__.py
|
brechtold/netdev
|
89845631aa921a5f78cb33b755295ede61cbc199
|
[
"BSD-3-Clause"
] | null | null | null |
netdev/vendors/hp/__init__.py
|
brechtold/netdev
|
89845631aa921a5f78cb33b755295ede61cbc199
|
[
"BSD-3-Clause"
] | null | null | null |
netdev/vendors/hp/__init__.py
|
brechtold/netdev
|
89845631aa921a5f78cb33b755295ede61cbc199
|
[
"BSD-3-Clause"
] | null | null | null |
from .hp_comware import HPComware
from .hp_comware_limited import HPComwareLimited
__all__ = ['HPComware', 'HPComwareLimited']
| 25.6
| 48
| 0.820313
| 14
| 128
| 7
| 0.571429
| 0.122449
| 0.265306
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.101563
| 128
| 4
| 49
| 32
| 0.852174
| 0
| 0
| 0
| 0
| 0
| 0.195313
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.666667
| 0
| 0.666667
| 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
|
1935f884b0d831359ab167f71bb38f7ea963eee1
| 11,234
|
py
|
Python
|
BENCHMARKS/VMEC_TEST/compare_HELIOTRON.py
|
joseluisvelasco/STELLOPT
|
e064ebb96414d5afc4e205f43b44766558dca2af
|
[
"MIT"
] | 29
|
2020-05-08T01:47:34.000Z
|
2022-03-06T10:35:28.000Z
|
BENCHMARKS/VMEC_TEST/compare_HELIOTRON.py
|
joseluisvelasco/STELLOPT
|
e064ebb96414d5afc4e205f43b44766558dca2af
|
[
"MIT"
] | 77
|
2020-05-08T07:18:09.000Z
|
2022-03-30T11:20:33.000Z
|
BENCHMARKS/VMEC_TEST/compare_HELIOTRON.py
|
joseluisvelasco/STELLOPT
|
e064ebb96414d5afc4e205f43b44766558dca2af
|
[
"MIT"
] | 3
|
2021-02-10T13:47:08.000Z
|
2022-03-21T12:53:43.000Z
|
#!/usr/bin/env python3
import sys, os
sys.path.insert(0, '../../pySTEL/')
import numpy as np #For Arrays
from math import pi
from libstell.libstell import read_vmec
try:
qtCreatorPath=os.environ["STELLOPT_PATH"]
except KeyError:
print("Please set environment variable STELLOPT_PATH")
sys.exit(1)
failtol = 1.0
filename='wout_HELIOTRON.nc'
data=read_vmec(filename)
if not data:
print('ERROR Opening File: '+filename)
sys.exit(0)
else:
print('EXTENSION: '+filename)
print('==== Scalars ====')
varlist={}
varlist['aspect']=10.48284836721937
varlist['b0']=0.3485147596028901
varlist['wp']=0.033457749605936116
varlist['betatot']=0.10229126170889151
varlist['volume']=179.62680009982628
lfail = 0;
for temp in varlist:
act = varlist[temp]
cal = data[temp]
perct = 100*(abs(act-cal)/act)
print(' '+temp+': '+str(cal)+' '+str(act)+' '+str(int(perct))+'%')
if perct > failtol:
lfail = 1
print('==== Vectors ====')
varlist={}
#print(data['xm_nyq'].tolist())
varlist['iotaf']=np.array([[1.0], [1.0118110236220472], [1.0236220472440944], [1.0354330708661417], [1.047244094488189], [1.0590551181102361], [1.0708661417322833], [1.0826771653543308], [1.094488188976378], [1.1062992125984252], [1.1181102362204725], [1.1299212598425197], [1.141732283464567], [1.1535433070866141], [1.1653543307086613], [1.1771653543307088], [1.188976377952756], [1.2007874015748032], [1.2125984251968505], [1.2244094488188977], [1.236220472440945], [1.2480314960629921], [1.2598425196850394], [1.2716535433070866], [1.2834645669291338], [1.295275590551181], [1.3070866141732282], [1.3188976377952755], [1.3307086614173227], [1.34251968503937], [1.3543307086614171], [1.3661417322834646], [1.3779527559055118], [1.389763779527559], [1.4015748031496065], [1.4133858267716537], [1.425196850393701], [1.4370078740157481], [1.4488188976377954], [1.4606299212598426], [1.4724409448818898], [1.484251968503937], [1.4960629921259843], [1.5078740157480315], [1.5196850393700787], [1.531496062992126], [1.5433070866141732], [1.5551181102362204], [1.5669291338582676], [1.5787401574803148], [1.590551181102362], [1.6023622047244095], [1.6141732283464567], [1.625984251968504], [1.6377952755905512], [1.6496062992125986], [1.6614173228346458], [1.6732283464566928], [1.6850393700787403], [1.6968503937007875], [1.7086614173228347], [1.720472440944882], [1.7322834645669292], [1.7440944881889764], [1.7559055118110236], [1.7677165354330708], [1.779527559055118], [1.7913385826771653], [1.8031496062992125], [1.81496062992126], [1.8267716535433072], [1.8385826771653544], [1.8503937007874016], [1.8622047244094488], [1.874015748031496], [1.8858267716535433], [1.8976377952755907], [1.909448818897638], [1.9212598425196852], [1.9330708661417324], [1.9448818897637796], [1.9566929133858268], [1.968503937007874], [1.9803149606299213], [1.9921259842519685], [2.0039370078740157], [2.015748031496063], [2.02755905511811], [2.0393700787401574], [2.0511811023622046], [2.062992125984252], [2.074803149606299], [2.0866141732283463], [2.098425196850394], [2.110236220472441], [2.1220472440944884], [2.1338582677165356], [2.145669291338583], [2.15748031496063], [2.1692913385826773], [2.1811023622047245], [2.1929133858267718], [2.204724409448819], [2.216535433070866], [2.2283464566929134], [2.2401574803149606], [2.251968503937008], [2.263779527559055], [2.2755905511811023], [2.2874015748031495], [2.2992125984251968], [2.311023622047244], [2.322834645669291], [2.3346456692913384], [2.3464566929133857], [2.358267716535433], [2.37007874015748], [2.3818897637795273], [2.393700787401575], [2.405511811023622], [2.417322834645669], [2.4291338582677167], [2.440944881889764], [2.4527559055118107], [2.4645669291338583], [2.4763779527559056], [2.4881889763779528], [2.5]]
)
varlist['presf']=np.array([[17999.162998325995], [17717.93043586087], [17437.81387562775], [17159.929319858642], [16884.27676855354], [16610.856221712445], [16339.667679335358], [16070.711141422285], [15803.986607973218], [15539.494078988162], [15277.233554467111], [15017.20503441007], [14759.40851881704], [14503.844007688014], [14250.511501023], [13999.410998821997], [13750.542501085001], [13503.906007812016], [13259.501519003039], [13017.329034658072], [12777.388554777111], [12539.68007936016], [12304.203608407219], [12070.959141918285], [11839.946679893363], [11611.166222332446], [11384.61776923554], [11160.301320602644], [10938.216876433753], [10718.364436728874], [10500.744001488005], [10285.35557071114], [10072.19914439829], [9861.274722549446], [9652.58230516461], [9446.121892243786], [9241.893483786967], [9039.89707979416], [8840.13268026536], [8642.60028520057], [8447.29989459979], [8254.231508463017], [8063.395126790253], [7874.790749581501], [7688.418376836755], [7504.278008556019], [7322.36964473929], [7142.693285386572], [6965.248930497862], [6790.036580073161], [6617.056234112469], [6446.307892615785], [6277.7915555831105], [6111.507223014447], [5947.454894909792], [5785.634571269143], [5626.046252092505], [5468.689937379877], [5313.565627131255], [5160.673321346642], [5010.013020026041], [4861.584723169448], [4715.388430776862], [4571.4241428482865], [4429.691859383719], [4290.191580383163], [4152.923305846613], [4017.8870357740725], [3885.082770165541], [3754.510509021017], [3626.170252340504], [3500.0620001239995], [3376.185752371504], [3254.541509083018], [3135.12927025854], [3017.949035898071], [2903.0008060016107], [2790.2845805691604], [2679.8003596007193], [2571.548143096287], [2465.527931055862], [2361.7397234794475], [2260.1835203670416], [2160.8593217186444], [2063.767127534256], [1968.9069378138765], [1876.2787525575068], [1785.882571765145], [1697.7183954367918], [1611.786223572447], [1528.0860561721126], [1446.6178932357886], [1367.381734763471], [1290.377580755162], [1215.6054312108622], [1143.0652861305716], [1072.7571455142909], [1004.6810093620182], [938.836877673755], [875.2247504495001], [813.8446276892537], [754.6965093930168], [697.7803955607891], [643.0962861925709], [590.6441812883611], [540.4240808481596], [492.4359848719686], [446.679893359786], [403.1558063116118], [361.86372372744694], [322.8036456072905], [285.97557195114445], [251.37950275900678], [219.0154380308765], [188.88337776675667], [160.98332196664526], [135.3152706305422], [111.8792237584495], [90.67518135036423], [71.70314340628836], [54.9631099262219], [40.45508091016281], [28.17905635811413], [18.13503627007485], [10.323020646042957], [4.743009486018469], [1.395002790004374], [-0.8370016740030242]])
varlist['jcurv']=np.array([[-69942.04265715233], [-70936.29529563744], [-71930.54793412254], [-72755.84630674607], [-73781.3281661332], [-74820.91624594765], [-75874.94838754952], [-76739.03318754038], [-77478.13601519003], [-77978.7492766915], [-78362.08427982769], [-78579.75310254589], [-78766.74692188652], [-78891.82722999714], [-79064.54485319494], [-79246.00715313113], [-79508.70748520728], [-79804.79429874495], [-80181.25118019932], [-80590.66600827516], [-81065.54131373648], [-81564.08553702744], [-82112.51083398705], [-82676.7801070082], [-83278.87625102962], [-83891.93083805099], [-84535.26356212026], [-85186.86190706519], [-85864.00365151477], [-86548.18705915574], [-87254.91963748135], [-87968.29967526798], [-88702.15871753088], [-89442.99588696085], [-90202.6606638735], [-90969.46665969213], [-91753.92699746668], [-92545.67122229468], [-93354.0752203409], [-94170.24861382286], [-95002.36123472448], [-95842.43300198004], [-96697.45709297988], [-97560.83371842362], [-98438.782062064], [-99325.45090868286], [-100225.81526519654], [-101135.08625557389], [-102057.74386174417], [-102989.75842405639], [-103934.44282747405], [-104888.4870108658], [-105854.94446829453], [-106831.2176335961], [-107819.27096113218], [-108816.9994106418], [-109826.29396851774], [-110845.72459209048], [-111876.16587851863], [-112916.40443355398], [-113967.50265317858], [-115028.88754933652], [-116100.6330819208], [-117182.18365645359], [-118273.95214529635], [-119376.01212666712], [-120487.91063162246], [-121609.49378898791], [-122740.82391787824], [-123882.318982309], [-125033.2387013311], [-126193.66141368126], [-127363.40319673823], [-128543.10478098308], [-129731.93831062752], [-130930.04359940102], [-132137.2400617032], [-133354.19414708004], [-134580.07395524933], [-135815.04976771562], [-137058.93221037582], [-138312.35037187746], [-139574.63887508604], [-140845.85959796607], [-142125.97428999594], [-143415.50824142268], [-144713.95499383126], [-146021.29384473726], [-147337.67099887037], [-148663.40509138297], [-149998.27176237758], [-151342.1047038444], [-152695.28537834733], [-154057.8945652683], [-155430.06588608318], [-156811.42645927868], [-158202.66503287887], [-159603.5410503473], [-161014.6457653968], [-162435.30447381627], [-163866.61212231216], [-165307.97486453145], [-166760.38678396307], [-168223.06032297458], [-169697.40371534642], [-171182.56644916264], [-172679.8394508516], [-174188.33008592797], [-175709.62153185302], [-177242.9701278212], [-178789.66520101193], [-180349.0981889787], [-181922.6869022188], [-183509.86111286972], [-185112.35311374845], [-186729.16302170753], [-188362.62050664896], [-190010.4880557663], [-191678.23557029702], [-193360.177477549], [-195066.9713176102], [-196786.36236037104], [-198539.85195464685], [-200313.7363240046], [-202124.74801859685], [-203989.76911401088], [-205907.5279021599], [-207825.28669030895]])
for temp in varlist:
act = varlist[temp]
cal = data[temp]
perct = 100*sum(abs(act-cal)/act)
print(' '+temp+': '+str(cal[0])+' '+str(act[0])+' '+str(int(perct))+'%')
if perct > failtol:
lfail = 1
print('==== Arrays =====')
varlist={}
varlist['rmnc']=np.array([0.004061062051350977, 0.004726582615448221,0.003307142015676585])
varlist['zmns']=np.array([0.004777697912453389,0.004967282416496383,0.0033398560524154223])
varlist['lmns']=np.array([-0.0024012667846417535,-0.0019181126996661779,-0.0009001860252151725])
#varlist['bmnc']=np.array([0.0017944208587453313,0.0008256087535906062,0.00014668566648566114])
for temp in varlist:
mn = 4; k = 16
act = varlist[temp][0]
cal = data[temp][k,mn]
s = str(k)
m = str(int(data['xm'][mn]))
n = str(int(data['xn'][mn]))
perct = 100*abs((act-cal)/act)
print(' '+temp+'['+s+','+m+','+n+']: '+str(cal)+' '+str(act)+' '+str(int(perct))+'%')
if perct > failtol:
lfail = 1
mn = 4; k = 32
act = varlist[temp][1]
cal = data[temp][k,mn]
s = str(k)
m = str(int(data['xm'][mn]))
n = str(int(data['xn'][mn]))
perct = 100*abs((act-cal)/act)
print(' '+temp+'['+s+','+m+','+n+']: '+str(cal)+' '+str(act)+' '+str(int(perct))+'%')
if perct > failtol:
lfail = 1
mn = 4; k = 64
act = varlist[temp][2]
cal = data[temp][k,mn]
s = str(k)
m = str(int(data['xm'][mn]))
n = str(int(data['xn'][mn]))
perct = 100*abs((act-cal)/act)
print(' '+temp+'['+s+','+m+','+n+']: '+str(cal)+' '+str(act)+' '+str(int(perct))+'%')
if perct > failtol:
lfail = 1
print('=================')
if (lfail):
print(' STATUS: FAIL!!!!!')
else:
print(' STATUS: PASS')
sys.exit(0)
| 112.34
| 2,896
| 0.709542
| 1,161
| 11,234
| 6.860465
| 0.64255
| 0.008286
| 0.007533
| 0.007533
| 0.077213
| 0.077213
| 0.077213
| 0.077213
| 0.071186
| 0.066667
| 0
| 0.645393
| 0.08225
| 11,234
| 99
| 2,897
| 113.474747
| 0.127158
| 0.013797
| 0
| 0.477273
| 0
| 0
| 0.031524
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0.011364
| 0.045455
| 0
| 0.045455
| 0.159091
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
1957056e85578e203d62b0ad90b91da529aa75d8
| 195
|
py
|
Python
|
src/model/maze/MockMaze.py
|
Ja721kai/Maze-Solver-AI
|
37dc56cd389fad11f34bbdb887bad045442586ac
|
[
"MIT"
] | null | null | null |
src/model/maze/MockMaze.py
|
Ja721kai/Maze-Solver-AI
|
37dc56cd389fad11f34bbdb887bad045442586ac
|
[
"MIT"
] | 1
|
2019-09-24T13:30:37.000Z
|
2019-09-30T21:12:20.000Z
|
src/model/maze/MockMaze.py
|
Ja721kai/Maze-Solver-AI
|
37dc56cd389fad11f34bbdb887bad045442586ac
|
[
"MIT"
] | null | null | null |
import numpy as np
from src.model.maze.IMaze import IMaze
class MockMaze(IMaze):
def __init__(self):
super().__init__()
def to_string(self):
return super().to_string()
| 17.727273
| 38
| 0.661538
| 27
| 195
| 4.407407
| 0.666667
| 0.134454
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.225641
| 195
| 10
| 39
| 19.5
| 0.788079
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.285714
| false
| 0
| 0.285714
| 0.142857
| 0.857143
| 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
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
1973dcb5be90821b0e6ea55af67c2016419762fb
| 180
|
py
|
Python
|
myproject/IND_Project/backend/leetcodeproblems/urls.py
|
captainTOKIO/Premchand_Aug2022_fullstack_august_python1
|
5fbbdd106a764c2f862cf933fdcd69d6bf4ebdf0
|
[
"MIT"
] | null | null | null |
myproject/IND_Project/backend/leetcodeproblems/urls.py
|
captainTOKIO/Premchand_Aug2022_fullstack_august_python1
|
5fbbdd106a764c2f862cf933fdcd69d6bf4ebdf0
|
[
"MIT"
] | null | null | null |
myproject/IND_Project/backend/leetcodeproblems/urls.py
|
captainTOKIO/Premchand_Aug2022_fullstack_august_python1
|
5fbbdd106a764c2f862cf933fdcd69d6bf4ebdf0
|
[
"MIT"
] | null | null | null |
from django.urls import path
from leetcodeproblems.views import *
urlpatterns = [
path('', ReactView.as_view(), name="xxx"),
path('<int:pk>',ReactView.as_view())
]
| 22.5
| 47
| 0.655556
| 22
| 180
| 5.272727
| 0.681818
| 0.189655
| 0.258621
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.177778
| 180
| 8
| 48
| 22.5
| 0.783784
| 0
| 0
| 0
| 0
| 0
| 0.060773
| 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
|
19759b92fcf889b891ee2e4968d619d286b04839
| 136
|
py
|
Python
|
tests/conftest.py
|
cliffwhitworth/mypackage
|
b6533dd164db7cb64e741fcb4355e900fd28ddde
|
[
"MIT"
] | null | null | null |
tests/conftest.py
|
cliffwhitworth/mypackage
|
b6533dd164db7cb64e741fcb4355e900fd28ddde
|
[
"MIT"
] | null | null | null |
tests/conftest.py
|
cliffwhitworth/mypackage
|
b6533dd164db7cb64e741fcb4355e900fd28ddde
|
[
"MIT"
] | null | null | null |
import pytest
from mypackage.myexample import example
@pytest.fixture()
def example_test():
txt = 'hello'
return example(txt)
| 15.111111
| 39
| 0.727941
| 17
| 136
| 5.764706
| 0.705882
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.176471
| 136
| 9
| 40
| 15.111111
| 0.875
| 0
| 0
| 0
| 0
| 0
| 0.036496
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.166667
| 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
|
199a3d5ab3dc5adcb050a0f13dc9ac6972cb5b9c
| 138
|
py
|
Python
|
tests/cases/run/comparison2.py
|
3e45/minpiler
|
993bdb38d1e4709a412bb551f7eb213376bfe7d2
|
[
"MIT"
] | null | null | null |
tests/cases/run/comparison2.py
|
3e45/minpiler
|
993bdb38d1e4709a412bb551f7eb213376bfe7d2
|
[
"MIT"
] | 5
|
2022-02-12T19:53:08.000Z
|
2022-03-02T04:30:32.000Z
|
tests/cases/run/comparison2.py
|
3e45/minpiler
|
993bdb38d1e4709a412bb551f7eb213376bfe7d2
|
[
"MIT"
] | null | null | null |
from minpiler.std import M, emulator
M.print(0 == None, ";", 0 != None, ";", 0 is None, ";", 0 is not None)
emulator.kill()
# > 1;0;0;1
| 19.714286
| 70
| 0.572464
| 25
| 138
| 3.16
| 0.52
| 0.189873
| 0.151899
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.072072
| 0.195652
| 138
| 6
| 71
| 23
| 0.63964
| 0.065217
| 0
| 0
| 0
| 0
| 0.023622
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.333333
| 0
| 0.333333
| 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
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
5ff23b4cf784f1de27c1b1251258c8c086105c7c
| 3,538
|
py
|
Python
|
test/test_nmero_de_apartamentos_estimados_ine_controller.py
|
SergioCMDev/Busines-Inteligence-applied-to-tourism
|
61834a46fce22453e94b7bbdf8d4ecdcf128285a
|
[
"Apache-2.0"
] | null | null | null |
test/test_nmero_de_apartamentos_estimados_ine_controller.py
|
SergioCMDev/Busines-Inteligence-applied-to-tourism
|
61834a46fce22453e94b7bbdf8d4ecdcf128285a
|
[
"Apache-2.0"
] | null | null | null |
test/test_nmero_de_apartamentos_estimados_ine_controller.py
|
SergioCMDev/Busines-Inteligence-applied-to-tourism
|
61834a46fce22453e94b7bbdf8d4ecdcf128285a
|
[
"Apache-2.0"
] | null | null | null |
# coding: utf-8
from __future__ import absolute_import
from . import BaseTestCase
from six import BytesIO
from flask import json
class TestNmeroDeApartamentosEstimadosINEController(BaseTestCase):
""" NmeroDeApartamentosEstimadosINEController integration test stubs """
def test_obtener_numero_de_apartamentos_estimados_en_ciudad_en_anio(self):
"""
Test case for obtener_numero_de_apartamentos_estimados_en_ciudad_en_anio
Dado una ciudad y un año obtiene el número de apartamentos estimados en dicha ciudad en ese año
"""
query_string = [('Anio', 2002)]
response = self.client.open('/server/INE/NúmeroDeApartamentosEstimados/ObtenerNúmeroDeApartamentosEstimadosEnCiudadEnAnio/{Ciudad}'.format(Ciudad='Ciudad_example'),
method='GET',
query_string=query_string)
self.assert200(response, "Response body is : " + response.data.decode('utf-8'))
def test_obtener_numero_de_apartamentos_estimados_en_ciudad_en_anio_mensualmente dividido por meses(self):
"""
Test case for obtener_numero_de_apartamentos_estimados_en_ciudad_en_anio_mensualmente dividido por meses
Dado una ciudad y un año obtiene el número de apartamentos estimados en dicha ciudad en ese año dividido por meses
"""
query_string = [('Anio', 2002)]
response = self.client.open('/server/INE/NúmeroDeApartamentosEstimados/ObtenerCantidadTotalNúmeroDeApartamentosEstimadosEnCiudadEnAnioMensualmente/{Ciudad}'.format(Ciudad='Ciudad_example'),
method='GET',
query_string=query_string)
self.assert200(response, "Response body is : " + response.data.decode('utf-8'))
def test_obtener_numero_de_apartamentos_estimados_en_ciudad_en_rango_anios(self):
"""
Test case for obtener_numero_de_apartamentos_estimados_en_ciudad_en_rango_anios
Dado una ciudad y un rango de años obtiene el número de apartamentos estimados en dicha ciudad en esos años
"""
query_string = [('AnioInicio', 2002),
('AnioFin', 2004)]
response = self.client.open('/server/INE/NúmeroDeApartamentosEstimados/ObtenerCantidadTotalNúmeroDeApartamentosEstimadosEnCiudadEnRangoAnios/{Ciudad}'.format(Ciudad='Ciudad_example'),
method='GET',
query_string=query_string)
self.assert200(response, "Response body is : " + response.data.decode('utf-8'))
def test_obtener_numero_de_apartamentos_estimados_en_ciudad_en_rango_anios_en_mes(self):
"""
Test case for obtener_numero_de_apartamentos_estimados_en_ciudad_en_rango_anios_en_mes
Dado una ciudad, un mes y un rango de años obtiene el número de apartamentos estimados en dicha ciudad en esos años en ese mes
"""
query_string = [('AnioInicio', 2002),
('AnioFin', 2004),
('Mes', 'Enero')]
response = self.client.open('/server/INE/NúmeroDeApartamentosEstimados/ObtenerCantidadTotalNúmeroDeApartamentosEstimadosEnCiudadEnRangoAniosEnMes/{Ciudad}'.format(Ciudad='Ciudad_example'),
method='GET',
query_string=query_string)
self.assert200(response, "Response body is : " + response.data.decode('utf-8'))
if __name__ == '__main__':
import unittest
unittest.main()
| 52.029412
| 197
| 0.680611
| 371
| 3,538
| 6.202156
| 0.212938
| 0.073012
| 0.119948
| 0.130378
| 0.748805
| 0.743155
| 0.711864
| 0.659713
| 0.659713
| 0.659713
| 0
| 0.015287
| 0.241945
| 3,538
| 67
| 198
| 52.80597
| 0.842655
| 0.003674
| 0
| 0.457143
| 0
| 0
| 0.274092
| 0.186414
| 0
| 0
| 0
| 0
| 0.114286
| 0
| null | null | 0
| 0.142857
| null | null | 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
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
27739d2a04caf2b9cc7e58079b9103c314a09066
| 146
|
py
|
Python
|
WeatherPy/api_keys.py
|
admercier/python_api_challenge
|
094133220076e212ea29195899f52e81b51dba78
|
[
"ADSL"
] | null | null | null |
WeatherPy/api_keys.py
|
admercier/python_api_challenge
|
094133220076e212ea29195899f52e81b51dba78
|
[
"ADSL"
] | null | null | null |
WeatherPy/api_keys.py
|
admercier/python_api_challenge
|
094133220076e212ea29195899f52e81b51dba78
|
[
"ADSL"
] | null | null | null |
# OpenWeatherMap API Key
weather_api_key = "eeb909dcaefe8f86bd5b42aac61797bc"
# Google API Key
g_key = "AIzaSyB2LzrZz7y9I-0AeDPiR8EckxUQd54T9eo"
| 24.333333
| 52
| 0.835616
| 14
| 146
| 8.5
| 0.642857
| 0.151261
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.167939
| 0.10274
| 146
| 5
| 53
| 29.2
| 0.740458
| 0.253425
| 0
| 0
| 0
| 0
| 0.669811
| 0.669811
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 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
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
27e1a10c93c039567bb343e04af8080c6e832f74
| 133
|
py
|
Python
|
dotenv_linter/exceptions.py
|
skarzi/dotenv-linter
|
356bf28e5d81beecfe31df52543c51480b72f7d4
|
[
"MIT"
] | 1
|
2019-06-04T23:44:49.000Z
|
2019-06-04T23:44:49.000Z
|
dotenv_linter/exceptions.py
|
skarzi/dotenv-linter
|
356bf28e5d81beecfe31df52543c51480b72f7d4
|
[
"MIT"
] | null | null | null |
dotenv_linter/exceptions.py
|
skarzi/dotenv-linter
|
356bf28e5d81beecfe31df52543c51480b72f7d4
|
[
"MIT"
] | null | null | null |
# -*- coding: utf-8 -*-
class ParsingError(Exception):
"""Used when dotenv file has incorrect grammar and cannot be parsed."""
| 22.166667
| 75
| 0.676692
| 17
| 133
| 5.294118
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.009174
| 0.180451
| 133
| 5
| 76
| 26.6
| 0.816514
| 0.661654
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 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
| 0
| 0
| 1
| 0
|
0
| 4
|
7e107e01c1f83aaa66c372840068efdaa174bf7c
| 163
|
py
|
Python
|
problem0360.py
|
kmarcini/Project-Euler-Python
|
d644e8e1ec4fac70a9ab407ad5e1f0a75547c8d3
|
[
"BSD-3-Clause"
] | null | null | null |
problem0360.py
|
kmarcini/Project-Euler-Python
|
d644e8e1ec4fac70a9ab407ad5e1f0a75547c8d3
|
[
"BSD-3-Clause"
] | null | null | null |
problem0360.py
|
kmarcini/Project-Euler-Python
|
d644e8e1ec4fac70a9ab407ad5e1f0a75547c8d3
|
[
"BSD-3-Clause"
] | null | null | null |
###########################
#
# #360 Scary Sphere - Project Euler
# https://projecteuler.net/problem=360
#
# Code by Kevin Marciniak
#
###########################
| 18.111111
| 38
| 0.466258
| 14
| 163
| 5.428571
| 0.928571
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.041667
| 0.116564
| 163
| 8
| 39
| 20.375
| 0.486111
| 0.570552
| 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
fd8a4ed729240b7f2fff28b09d3a10e20459de3c
| 76
|
py
|
Python
|
src/config.py
|
jf20541/ARIMA
|
3eb1b791de8a4511c18d50bdf415197426bde7e4
|
[
"MIT"
] | null | null | null |
src/config.py
|
jf20541/ARIMA
|
3eb1b791de8a4511c18d50bdf415197426bde7e4
|
[
"MIT"
] | null | null | null |
src/config.py
|
jf20541/ARIMA
|
3eb1b791de8a4511c18d50bdf415197426bde7e4
|
[
"MIT"
] | null | null | null |
TRAINING = "../inputs/oil_data.csv"
LOG_TRAINING = "../inputs/log_data.csv"
| 25.333333
| 39
| 0.710526
| 11
| 76
| 4.636364
| 0.545455
| 0.54902
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.078947
| 76
| 2
| 40
| 38
| 0.728571
| 0
| 0
| 0
| 0
| 0
| 0.578947
| 0.578947
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 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
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
fd9e7445f3e92df5539949058a52af3f67e87e33
| 564
|
py
|
Python
|
mimemiko/mime.py
|
ndrwpvlv/mimemiko
|
9f33af286a22d6fecd587182203b72de323773d9
|
[
"MIT"
] | null | null | null |
mimemiko/mime.py
|
ndrwpvlv/mimemiko
|
9f33af286a22d6fecd587182203b72de323773d9
|
[
"MIT"
] | null | null | null |
mimemiko/mime.py
|
ndrwpvlv/mimemiko
|
9f33af286a22d6fecd587182203b72de323773d9
|
[
"MIT"
] | null | null | null |
import os
from mimemiko.library import BASIC_MIMETYPES, MIMETYPES
def mime_by_extension(extension: str) -> str:
return BASIC_MIMETYPES.get(extension) or MIMETYPES.get(extension) or None
def mime_by_extensions(extensions: list) -> list:
return [BASIC_MIMETYPES.get(extension) or MIMETYPES.get(extension) or None for extension in extensions]
def mime_by_path(path: str) -> str:
return mime_by_extension(os.path.splitext(path)[1])
def mime_by_paths(paths: list) -> list:
return [mime_by_extension(os.path.splitext(path)[1]) for path in paths]
| 29.684211
| 107
| 0.764184
| 85
| 564
| 4.894118
| 0.282353
| 0.086538
| 0.086538
| 0.221154
| 0.485577
| 0.485577
| 0.485577
| 0.485577
| 0.485577
| 0.293269
| 0
| 0.00409
| 0.132979
| 564
| 18
| 108
| 31.333333
| 0.846626
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.4
| false
| 0
| 0.2
| 0.4
| 1
| 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
|
fdb049c2aadde2ee1d2594f88dae50f6cd1dfd41
| 270
|
py
|
Python
|
libp2p/crypto/exceptions.py
|
g-r-a-n-t/py-libp2p
|
36a4a9150dcc53b42315b5c6868fccde5083963b
|
[
"Apache-2.0",
"MIT"
] | 315
|
2019-02-13T01:29:09.000Z
|
2022-03-28T13:44:07.000Z
|
libp2p/crypto/exceptions.py
|
pipermerriam/py-libp2p
|
379a157d6b67e86a616b2458af519bbe5fb26a51
|
[
"Apache-2.0",
"MIT"
] | 249
|
2019-02-22T05:00:07.000Z
|
2022-03-29T16:30:46.000Z
|
libp2p/crypto/exceptions.py
|
ralexstokes/py-libp2p
|
5144ab82894623969cb17baf0d4c64bd0a274068
|
[
"Apache-2.0",
"MIT"
] | 77
|
2019-02-24T19:45:17.000Z
|
2022-03-30T03:20:09.000Z
|
from libp2p.exceptions import BaseLibp2pError
class CryptographyError(BaseLibp2pError):
pass
class MissingDeserializerError(CryptographyError):
"""Raise if the requested deserialization routine is missing for some type
of cryptographic key."""
pass
| 20.769231
| 78
| 0.781481
| 27
| 270
| 7.814815
| 0.851852
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.013333
| 0.166667
| 270
| 12
| 79
| 22.5
| 0.924444
| 0.344444
| 0
| 0.4
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.4
| 0.2
| 0
| 0.6
| 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
| 0
| 0
| 1
| 0
|
0
| 4
|
fdb824986b4558f177acb8713abfbd6888ad197a
| 163
|
py
|
Python
|
apps/account/forms/__init__.py
|
youssriaboelseod/pyerp
|
9ef9873e2ff340010656f0c518bccf9d7a14dbaa
|
[
"MIT"
] | 115
|
2019-08-18T16:12:54.000Z
|
2022-03-29T14:17:20.000Z
|
apps/account/forms/__init__.py
|
youssriaboelseod/pyerp
|
9ef9873e2ff340010656f0c518bccf9d7a14dbaa
|
[
"MIT"
] | 22
|
2019-09-09T01:34:54.000Z
|
2022-03-12T00:33:40.000Z
|
apps/account/forms/__init__.py
|
youssriaboelseod/pyerp
|
9ef9873e2ff340010656f0c518bccf9d7a14dbaa
|
[
"MIT"
] | 83
|
2019-08-17T17:09:20.000Z
|
2022-03-25T04:46:53.000Z
|
# __init__.py
from .invoice import InvoiceForm, PRODUCT_FORMSET
from .move import AccountMoveForm, ACCOUNTING_NOTES, AccountMoveDetailForm, BaseAccountMoveFormSet
| 40.75
| 98
| 0.865031
| 16
| 163
| 8.4375
| 0.875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.08589
| 163
| 3
| 99
| 54.333333
| 0.90604
| 0.067485
| 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
|
fdd441bafd5e70aeedd10c4ba71e5f8ff691c07c
| 178
|
wsgi
|
Python
|
run_ws.wsgi
|
weso/CWR-admin
|
4442b70a71aaed5e71b8d7e456eb0657e9124f50
|
[
"MIT"
] | 8
|
2016-04-16T12:49:05.000Z
|
2020-07-15T14:28:42.000Z
|
run_ws.wsgi
|
weso/CWR-admin
|
4442b70a71aaed5e71b8d7e456eb0657e9124f50
|
[
"MIT"
] | null | null | null |
run_ws.wsgi
|
weso/CWR-admin
|
4442b70a71aaed5e71b8d7e456eb0657e9124f50
|
[
"MIT"
] | null | null | null |
#!/usr/bin/python
import sys
import logging
from cwr_admin import create_app
sys.path.insert(0,"/var/www/cwr_admin/")
#os.chdir("/var/www/cwr_admin")
application = create_app()
| 19.777778
| 40
| 0.758427
| 30
| 178
| 4.333333
| 0.633333
| 0.184615
| 0.138462
| 0.215385
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.006135
| 0.08427
| 178
| 9
| 41
| 19.777778
| 0.791411
| 0.258427
| 0
| 0
| 0
| 0
| 0.145038
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.6
| 0
| 0.6
| 0
| 0
| 0
| 0
| null | 0
| 0
| 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
| 1
| 0
| 1
| 0
|
0
| 4
|
fdfa1e2f8575123adb14e65a19b0c2553c8bce04
| 5,453
|
py
|
Python
|
test_dae_clf.py
|
khchow-gt/CLEVER-Robustness-Score
|
a240f53210c216dccacf89d0fb62d31a2e06ced8
|
[
"BSD-2-Clause"
] | null | null | null |
test_dae_clf.py
|
khchow-gt/CLEVER-Robustness-Score
|
a240f53210c216dccacf89d0fb62d31a2e06ced8
|
[
"BSD-2-Clause"
] | null | null | null |
test_dae_clf.py
|
khchow-gt/CLEVER-Robustness-Score
|
a240f53210c216dccacf89d0fb62d31a2e06ced8
|
[
"BSD-2-Clause"
] | null | null | null |
import os
import numpy as np
import keras.regularizers as regs
from keras.layers.core import Lambda
from setup_mnist import MNIST
from tensorflow.contrib.keras.api.keras.models import Sequential
from tensorflow.contrib.keras.api.keras.layers import Conv2D, UpSampling2D, AveragePooling2D
from tensorflow.contrib.keras.api.keras.layers import Lambda
from tensorflow.contrib.keras.api.keras.models import Sequential
from tensorflow.contrib.keras.api.keras.layers import Dense, Dropout, Activation, Flatten
from tensorflow.contrib.keras.api.keras.layers import Conv2D, MaxPooling2D
from tensorflow.contrib.keras.api.keras.layers import Lambda
from tensorflow.contrib.keras.api.keras.models import load_model
from tensorflow.contrib.keras.api.keras.optimizers import SGD
import tensorflow as tf
import os
os.environ['CUDA_VISIBLE_DEVICES'] = '-1'
def get_dae():
model = Sequential()
model.add(Lambda(lambda x_: x_ + 0.5, input_shape=(28, 28, 1)))
# Encoder
model.add(Conv2D(3, (3, 3), activation="sigmoid", padding="same", activity_regularizer=regs.l2(1e-9)))
model.add(AveragePooling2D((2, 2), padding="same"))
model.add(Conv2D(3, (3, 3), activation="sigmoid", padding="same", activity_regularizer=regs.l2(1e-9)))
# Decoder
model.add(Conv2D(3, (3, 3), activation="sigmoid", padding="same", activity_regularizer=regs.l2(1e-9)))
model.add(UpSampling2D((2, 2)))
model.add(Conv2D(3, (3, 3), activation="sigmoid", padding="same", activity_regularizer=regs.l2(1e-9)))
model.add(Conv2D(1, (3, 3), activation='sigmoid', padding='same', activity_regularizer=regs.l2(1e-9)))
model.add(Lambda(lambda x_: x_ - 0.5))
model.load_weights("./dae/mnist")
model.compile(loss='mean_squared_error', metrics=['mean_squared_error'], optimizer='adam')
return model
def get_clf():
"""
Standard neural network training procedure.
"""
model = Sequential()
model.add(Conv2D(32, (3, 3), input_shape=(28, 28, 1)))
model.add(Activation('relu'))
model.add(Conv2D(32, (3, 3)))
model.add(Activation('relu'))
model.add(MaxPooling2D(pool_size=(2, 2)))
model.add(Conv2D(64, (3, 3)))
model.add(Activation('relu'))
model.add(Conv2D(64, (3, 3)))
model.add(Activation('relu'))
model.add(MaxPooling2D(pool_size=(2, 2)))
model.add(Flatten())
model.add(Dense(200))
model.add(Activation('relu'))
model.add(Dropout(0.5))
model.add(Dense(200))
model.add(Activation('relu'))
model.add(Dense(10))
model.load_weights("./models/mnist")
def fn(correct, predicted):
return tf.nn.softmax_cross_entropy_with_logits(labels=correct, logits=predicted)
sgd = SGD(lr=0.01, decay=1e-6, momentum=0.9, nesterov=True)
model.compile(loss=fn, optimizer=sgd, metrics=['accuracy'])
return model
def get_dae_clf():
model1 = Sequential()
model1.add(Lambda(lambda x_: x_ + 0.5, input_shape=(28, 28, 1)))
# Encoder
model1.add(Conv2D(3, (3, 3), activation="sigmoid", padding="same", activity_regularizer=regs.l2(1e-9)))
model1.add(AveragePooling2D((2, 2), padding="same"))
model1.add(Conv2D(3, (3, 3), activation="sigmoid", padding="same", activity_regularizer=regs.l2(1e-9)))
# Decoder
model1.add(Conv2D(3, (3, 3), activation="sigmoid", padding="same", activity_regularizer=regs.l2(1e-9)))
model1.add(UpSampling2D((2, 2)))
model1.add(Conv2D(3, (3, 3), activation="sigmoid", padding="same", activity_regularizer=regs.l2(1e-9)))
model1.add(Conv2D(1, (3, 3), activation='sigmoid', padding='same', activity_regularizer=regs.l2(1e-9)))
model1.add(Lambda(lambda x_: x_ - 0.5))
model1.load_weights("./dae/mnist")
model1.compile(loss='mean_squared_error', metrics=['mean_squared_error'], optimizer='adam')
model2 = Sequential()
model2.add(Conv2D(32, (3, 3), input_shape=(28, 28, 1)))
model2.add(Activation('relu'))
model2.add(Conv2D(32, (3, 3)))
model2.add(Activation('relu'))
model2.add(MaxPooling2D(pool_size=(2, 2)))
model2.add(Conv2D(64, (3, 3)))
model2.add(Activation('relu'))
model2.add(Conv2D(64, (3, 3)))
model2.add(Activation('relu'))
model2.add(MaxPooling2D(pool_size=(2, 2)))
model2.add(Flatten())
model2.add(Dense(200))
model2.add(Activation('relu'))
model2.add(Dropout(0.5))
model2.add(Dense(200))
model2.add(Activation('relu'))
model2.add(Dense(10))
model2.load_weights("./models/mnist")
def fn(correct, predicted):
return tf.nn.softmax_cross_entropy_with_logits(labels=correct, logits=predicted)
model2.compile(loss=fn, optimizer=SGD(lr=0.01, decay=1e-6, momentum=0.9, nesterov=True), metrics=['accuracy'])
model = Sequential()
model.add(model1)
model.add(model2)
model.compile(loss=fn, optimizer=SGD(lr=0.01, decay=1e-6, momentum=0.9, nesterov=True), metrics=['accuracy'])
return model
if __name__ == '__main__':
dae = get_dae()
clf = get_clf()
dc = get_dae_clf()
data = MNIST()
y_true = np.argmax(data.test_labels, axis=1)
X_raw = data.test_data
X_dae = dae.predict(X_raw)
y_pred_raw = np.argmax(clf.predict(X_raw), axis=1)
y_pred_dae = clf.predict(X_dae)
y_pred_dc = dc.predict(X_raw)
print np.equal(y_pred_dae, y_pred_dc)
exit()
print "RAW: %.4f" % np.mean(y_pred_raw == y_true)
print "DAE: %.4f" % np.mean(y_pred_dae == y_true)
print "DC : %.4f" % np.mean(y_pred_dc == y_true)
| 34.512658
| 114
| 0.68256
| 798
| 5,453
| 4.546366
| 0.14787
| 0.061742
| 0.056229
| 0.05237
| 0.751378
| 0.740077
| 0.700937
| 0.68054
| 0.668688
| 0.652701
| 0
| 0.053437
| 0.148909
| 5,453
| 157
| 115
| 34.732484
| 0.728291
| 0.005685
| 0
| 0.428571
| 0
| 0
| 0.070362
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0.142857
| null | null | 0.035714
| 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
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
e311787c51ad7c8bbcca083eeb25e3adbdcb823a
| 148
|
py
|
Python
|
models/slowfast/main.py
|
LukasHedegaard/co3d
|
b95ca94ee6c01448bd292a6ec8cc6e3d606c74c4
|
[
"Apache-2.0"
] | 13
|
2021-06-02T09:44:49.000Z
|
2022-03-29T08:41:40.000Z
|
models/slowfast/main.py
|
LukasHedegaard/co3d
|
b95ca94ee6c01448bd292a6ec8cc6e3d606c74c4
|
[
"Apache-2.0"
] | null | null | null |
models/slowfast/main.py
|
LukasHedegaard/co3d
|
b95ca94ee6c01448bd292a6ec8cc6e3d606c74c4
|
[
"Apache-2.0"
] | 2
|
2021-10-10T09:56:09.000Z
|
2021-12-03T17:31:30.000Z
|
from ride import Main # isort:skip
from models.slowfast.slowfast import SlowFastRide
if __name__ == "__main__":
Main(SlowFastRide).argparse()
| 24.666667
| 49
| 0.763514
| 18
| 148
| 5.833333
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.141892
| 148
| 5
| 50
| 29.6
| 0.826772
| 0.067568
| 0
| 0
| 0
| 0
| 0.058824
| 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
|
e31875396c71a56dd99c9f5cc1834efb32493a4d
| 142
|
wsgi
|
Python
|
var/www/test/home.wsgi
|
gammaflauge/wsgi-example-windows
|
757e7c401019b31eb25f08dd910a3f615eab641c
|
[
"MIT"
] | null | null | null |
var/www/test/home.wsgi
|
gammaflauge/wsgi-example-windows
|
757e7c401019b31eb25f08dd910a3f615eab641c
|
[
"MIT"
] | null | null | null |
var/www/test/home.wsgi
|
gammaflauge/wsgi-example-windows
|
757e7c401019b31eb25f08dd910a3f615eab641c
|
[
"MIT"
] | null | null | null |
import bottle
application = bottle.default_app()
@bottle.route('/')
def home():
return "hello world from my bottle mod_wsgi home.wsgi!"
| 17.75
| 59
| 0.71831
| 20
| 142
| 5
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.15493
| 142
| 7
| 60
| 20.285714
| 0.833333
| 0
| 0
| 0
| 0
| 0
| 0.330986
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0
| 0.2
| 0.2
| 0.6
| 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
| 0
| 1
| 1
| 0
|
0
| 4
|
e3406637dbe817c86c64e33b39a8f7b4d2d9702e
| 219
|
py
|
Python
|
tests/mocks/pycopy-cpython_core/ussl.py
|
BradenM/micropython-stubber
|
042aee27685dcf0152b6580c005f8a20a04f9d59
|
[
"MIT"
] | 126
|
2019-07-19T14:42:41.000Z
|
2022-03-21T22:22:19.000Z
|
tests/mocks/pycopy-cpython_core/ussl.py
|
BradenM/micropython-stubber
|
042aee27685dcf0152b6580c005f8a20a04f9d59
|
[
"MIT"
] | 176
|
2020-10-18T14:31:03.000Z
|
2022-03-30T23:22:39.000Z
|
tests/mocks/pycopy-cpython_core/ussl.py
|
BradenM/micropython-stubber
|
042aee27685dcf0152b6580c005f8a20a04f9d59
|
[
"MIT"
] | 55
|
2019-08-02T09:32:33.000Z
|
2021-12-22T11:25:51.000Z
|
import micropython
import uio
import ssl
_ctx = ssl.create_default_context()
def wrap_socket(*args, **kw):
s = _ctx.wrap_socket(*args, **kw)
return uio.UioStream(s.makefile("rwb", buffering=0), is_bin=True)
| 18.25
| 69
| 0.712329
| 33
| 219
| 4.515152
| 0.69697
| 0.134228
| 0.187919
| 0.214765
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.005348
| 0.146119
| 219
| 11
| 70
| 19.909091
| 0.791444
| 0
| 0
| 0
| 0
| 0
| 0.013699
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.142857
| false
| 0
| 0.428571
| 0
| 0.714286
| 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
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
e3663c89648c76fc337838e8b75cdaddd05a2cc2
| 633
|
py
|
Python
|
python/y2019/d04/test_day04.py
|
luke-dixon/aoc
|
94851a5866a1ef29e3ba10098160cba883882683
|
[
"MIT"
] | 1
|
2021-01-12T20:04:01.000Z
|
2021-01-12T20:04:01.000Z
|
python/y2019/d04/test_day04.py
|
luke-dixon/aoc
|
94851a5866a1ef29e3ba10098160cba883882683
|
[
"MIT"
] | null | null | null |
python/y2019/d04/test_day04.py
|
luke-dixon/aoc
|
94851a5866a1ef29e3ba10098160cba883882683
|
[
"MIT"
] | null | null | null |
from unittest import TestCase
from . import day04
class Part1Test(TestCase):
def test_example1(self):
self.assertEqual(day04.part1('11111-11111'), 1)
def test_example2(self):
self.assertEqual(day04.part1('223450-223450'), 0)
def test_example3(self):
self.assertEqual(day04.part1('123789-123789'), 0)
class Part2Test(TestCase):
def test_example1(self):
self.assertEqual(day04.part2('112233-112233'), 1)
def test_example2(self):
self.assertEqual(day04.part2('123444-123444'), 0)
def test_example3(self):
self.assertEqual(day04.part2('111122-111122'), 1)
| 24.346154
| 57
| 0.680885
| 79
| 633
| 5.379747
| 0.316456
| 0.098824
| 0.268235
| 0.338824
| 0.668235
| 0.597647
| 0.597647
| 0.597647
| 0
| 0
| 0
| 0.20155
| 0.184834
| 633
| 25
| 58
| 25.32
| 0.622093
| 0
| 0
| 0.375
| 0
| 0
| 0.120063
| 0
| 0
| 0
| 0
| 0
| 0.375
| 1
| 0.375
| false
| 0
| 0.125
| 0
| 0.625
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 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
|
8b6221bf200184e4658e6443f0c599da3a2c45a0
| 55
|
py
|
Python
|
src/forecastmgmt/ui/__init__.py
|
vvladych/forecastmgmt
|
9eea272d00bb42031f49b5bb5af01388ecce31cf
|
[
"Unlicense"
] | null | null | null |
src/forecastmgmt/ui/__init__.py
|
vvladych/forecastmgmt
|
9eea272d00bb42031f49b5bb5af01388ecce31cf
|
[
"Unlicense"
] | 37
|
2015-07-01T22:18:51.000Z
|
2016-03-11T21:17:12.000Z
|
src/forecastmgmt/ui/masterdata/__init__.py
|
vvladych/forecastmgmt
|
9eea272d00bb42031f49b5bb5af01388ecce31cf
|
[
"Unlicense"
] | null | null | null |
__author__="vvladych"
__date__ ="$21.09.2014 23:56:50$"
| 27.5
| 33
| 0.727273
| 9
| 55
| 3.555556
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.269231
| 0.054545
| 55
| 2
| 33
| 27.5
| 0.346154
| 0
| 0
| 0
| 0
| 0
| 0.517857
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 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
|
4776bd054c9fafae52ed8a55a96c9b614a50f718
| 95,322
|
py
|
Python
|
myvenv/lib/python3.5/site-packages/snowballstemmer/turkish_stemmer.py
|
tuvapp/tuvappcom
|
5ca2be19f4b0c86a1d4a9553711a4da9d3f32841
|
[
"MIT"
] | 463
|
2015-01-15T08:17:42.000Z
|
2022-03-28T15:10:20.000Z
|
myvenv/lib/python3.5/site-packages/snowballstemmer/turkish_stemmer.py
|
tuvapp/tuvappcom
|
5ca2be19f4b0c86a1d4a9553711a4da9d3f32841
|
[
"MIT"
] | 93
|
2015-01-02T12:35:32.000Z
|
2021-12-12T22:42:33.000Z
|
myvenv/lib/python3.5/site-packages/snowballstemmer/turkish_stemmer.py
|
tuvapp/tuvappcom
|
5ca2be19f4b0c86a1d4a9553711a4da9d3f32841
|
[
"MIT"
] | 249
|
2015-01-07T22:49:49.000Z
|
2022-03-18T02:32:06.000Z
|
# self file was generated automatically by the Snowball to Python interpreter
from .basestemmer import BaseStemmer
from .among import Among
class TurkishStemmer(BaseStemmer):
'''
self class was automatically generated by a Snowball to Python interpreter
It implements the stemming algorithm defined by a snowball script.
'''
serialVersionUID = 1
a_0 = [
Among(u"m", -1, -1),
Among(u"n", -1, -1),
Among(u"miz", -1, -1),
Among(u"niz", -1, -1),
Among(u"muz", -1, -1),
Among(u"nuz", -1, -1),
Among(u"m\u00FCz", -1, -1),
Among(u"n\u00FCz", -1, -1),
Among(u"m\u0131z", -1, -1),
Among(u"n\u0131z", -1, -1)
]
a_1 = [
Among(u"leri", -1, -1),
Among(u"lar\u0131", -1, -1)
]
a_2 = [
Among(u"ni", -1, -1),
Among(u"nu", -1, -1),
Among(u"n\u00FC", -1, -1),
Among(u"n\u0131", -1, -1)
]
a_3 = [
Among(u"in", -1, -1),
Among(u"un", -1, -1),
Among(u"\u00FCn", -1, -1),
Among(u"\u0131n", -1, -1)
]
a_4 = [
Among(u"a", -1, -1),
Among(u"e", -1, -1)
]
a_5 = [
Among(u"na", -1, -1),
Among(u"ne", -1, -1)
]
a_6 = [
Among(u"da", -1, -1),
Among(u"ta", -1, -1),
Among(u"de", -1, -1),
Among(u"te", -1, -1)
]
a_7 = [
Among(u"nda", -1, -1),
Among(u"nde", -1, -1)
]
a_8 = [
Among(u"dan", -1, -1),
Among(u"tan", -1, -1),
Among(u"den", -1, -1),
Among(u"ten", -1, -1)
]
a_9 = [
Among(u"ndan", -1, -1),
Among(u"nden", -1, -1)
]
a_10 = [
Among(u"la", -1, -1),
Among(u"le", -1, -1)
]
a_11 = [
Among(u"ca", -1, -1),
Among(u"ce", -1, -1)
]
a_12 = [
Among(u"im", -1, -1),
Among(u"um", -1, -1),
Among(u"\u00FCm", -1, -1),
Among(u"\u0131m", -1, -1)
]
a_13 = [
Among(u"sin", -1, -1),
Among(u"sun", -1, -1),
Among(u"s\u00FCn", -1, -1),
Among(u"s\u0131n", -1, -1)
]
a_14 = [
Among(u"iz", -1, -1),
Among(u"uz", -1, -1),
Among(u"\u00FCz", -1, -1),
Among(u"\u0131z", -1, -1)
]
a_15 = [
Among(u"siniz", -1, -1),
Among(u"sunuz", -1, -1),
Among(u"s\u00FCn\u00FCz", -1, -1),
Among(u"s\u0131n\u0131z", -1, -1)
]
a_16 = [
Among(u"lar", -1, -1),
Among(u"ler", -1, -1)
]
a_17 = [
Among(u"niz", -1, -1),
Among(u"nuz", -1, -1),
Among(u"n\u00FCz", -1, -1),
Among(u"n\u0131z", -1, -1)
]
a_18 = [
Among(u"dir", -1, -1),
Among(u"tir", -1, -1),
Among(u"dur", -1, -1),
Among(u"tur", -1, -1),
Among(u"d\u00FCr", -1, -1),
Among(u"t\u00FCr", -1, -1),
Among(u"d\u0131r", -1, -1),
Among(u"t\u0131r", -1, -1)
]
a_19 = [
Among(u"cas\u0131na", -1, -1),
Among(u"cesine", -1, -1)
]
a_20 = [
Among(u"di", -1, -1),
Among(u"ti", -1, -1),
Among(u"dik", -1, -1),
Among(u"tik", -1, -1),
Among(u"duk", -1, -1),
Among(u"tuk", -1, -1),
Among(u"d\u00FCk", -1, -1),
Among(u"t\u00FCk", -1, -1),
Among(u"d\u0131k", -1, -1),
Among(u"t\u0131k", -1, -1),
Among(u"dim", -1, -1),
Among(u"tim", -1, -1),
Among(u"dum", -1, -1),
Among(u"tum", -1, -1),
Among(u"d\u00FCm", -1, -1),
Among(u"t\u00FCm", -1, -1),
Among(u"d\u0131m", -1, -1),
Among(u"t\u0131m", -1, -1),
Among(u"din", -1, -1),
Among(u"tin", -1, -1),
Among(u"dun", -1, -1),
Among(u"tun", -1, -1),
Among(u"d\u00FCn", -1, -1),
Among(u"t\u00FCn", -1, -1),
Among(u"d\u0131n", -1, -1),
Among(u"t\u0131n", -1, -1),
Among(u"du", -1, -1),
Among(u"tu", -1, -1),
Among(u"d\u00FC", -1, -1),
Among(u"t\u00FC", -1, -1),
Among(u"d\u0131", -1, -1),
Among(u"t\u0131", -1, -1)
]
a_21 = [
Among(u"sa", -1, -1),
Among(u"se", -1, -1),
Among(u"sak", -1, -1),
Among(u"sek", -1, -1),
Among(u"sam", -1, -1),
Among(u"sem", -1, -1),
Among(u"san", -1, -1),
Among(u"sen", -1, -1)
]
a_22 = [
Among(u"mi\u015F", -1, -1),
Among(u"mu\u015F", -1, -1),
Among(u"m\u00FC\u015F", -1, -1),
Among(u"m\u0131\u015F", -1, -1)
]
a_23 = [
Among(u"b", -1, 1),
Among(u"c", -1, 2),
Among(u"d", -1, 3),
Among(u"\u011F", -1, 4)
]
g_vowel = [17, 65, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 8, 0, 0, 0, 0, 0, 0, 1]
g_U = [1, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 1]
g_vowel1 = [1, 64, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]
g_vowel2 = [17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 130]
g_vowel3 = [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]
g_vowel4 = [17]
g_vowel5 = [65]
g_vowel6 = [65]
B_continue_stemming_noun_suffixes = False
I_strlen = 0
def copy_from(self, other):
self.B_continue_stemming_noun_suffixes = other.B_continue_stemming_noun_suffixes
self.I_strlen = other.I_strlen
super.copy_from(other)
def r_check_vowel_harmony(self):
# (, line 111
# test, line 112
v_1 = self.limit - self.cursor
# (, line 113
# (, line 114
# goto, line 114
try:
while True:
v_2 = self.limit - self.cursor
try:
if not self.in_grouping_b(TurkishStemmer.g_vowel, 97, 305):
raise lab1()
self.cursor = self.limit - v_2
raise lab0()
except lab1: pass
self.cursor = self.limit - v_2
if self.cursor <= self.limit_backward:
return False
self.cursor -= 1
except lab0: pass
# (, line 115
# or, line 116
try:
v_3 = self.limit - self.cursor
try:
# (, line 116
# literal, line 116
if not self.eq_s_b(1, u"a"):
raise lab3()
# goto, line 116
try:
while True:
v_4 = self.limit - self.cursor
try:
if not self.in_grouping_b(TurkishStemmer.g_vowel1, 97, 305):
raise lab5()
self.cursor = self.limit - v_4
raise lab4()
except lab5: pass
self.cursor = self.limit - v_4
if self.cursor <= self.limit_backward:
raise lab3()
self.cursor -= 1
except lab4: pass
raise lab2()
except lab3: pass
self.cursor = self.limit - v_3
try:
# (, line 117
# literal, line 117
if not self.eq_s_b(1, u"e"):
raise lab6()
# goto, line 117
try:
while True:
v_5 = self.limit - self.cursor
try:
if not self.in_grouping_b(TurkishStemmer.g_vowel2, 101, 252):
raise lab8()
self.cursor = self.limit - v_5
raise lab7()
except lab8: pass
self.cursor = self.limit - v_5
if self.cursor <= self.limit_backward:
raise lab6()
self.cursor -= 1
except lab7: pass
raise lab2()
except lab6: pass
self.cursor = self.limit - v_3
try:
# (, line 118
# literal, line 118
if not self.eq_s_b(1, u"\u0131"):
raise lab9()
# goto, line 118
try:
while True:
v_6 = self.limit - self.cursor
try:
if not self.in_grouping_b(TurkishStemmer.g_vowel3, 97, 305):
raise lab11()
self.cursor = self.limit - v_6
raise lab10()
except lab11: pass
self.cursor = self.limit - v_6
if self.cursor <= self.limit_backward:
raise lab9()
self.cursor -= 1
except lab10: pass
raise lab2()
except lab9: pass
self.cursor = self.limit - v_3
try:
# (, line 119
# literal, line 119
if not self.eq_s_b(1, u"i"):
raise lab12()
# goto, line 119
try:
while True:
v_7 = self.limit - self.cursor
try:
if not self.in_grouping_b(TurkishStemmer.g_vowel4, 101, 105):
raise lab14()
self.cursor = self.limit - v_7
raise lab13()
except lab14: pass
self.cursor = self.limit - v_7
if self.cursor <= self.limit_backward:
raise lab12()
self.cursor -= 1
except lab13: pass
raise lab2()
except lab12: pass
self.cursor = self.limit - v_3
try:
# (, line 120
# literal, line 120
if not self.eq_s_b(1, u"o"):
raise lab15()
# goto, line 120
try:
while True:
v_8 = self.limit - self.cursor
try:
if not self.in_grouping_b(TurkishStemmer.g_vowel5, 111, 117):
raise lab17()
self.cursor = self.limit - v_8
raise lab16()
except lab17: pass
self.cursor = self.limit - v_8
if self.cursor <= self.limit_backward:
raise lab15()
self.cursor -= 1
except lab16: pass
raise lab2()
except lab15: pass
self.cursor = self.limit - v_3
try:
# (, line 121
# literal, line 121
if not self.eq_s_b(1, u"\u00F6"):
raise lab18()
# goto, line 121
try:
while True:
v_9 = self.limit - self.cursor
try:
if not self.in_grouping_b(TurkishStemmer.g_vowel6, 246, 252):
raise lab20()
self.cursor = self.limit - v_9
raise lab19()
except lab20: pass
self.cursor = self.limit - v_9
if self.cursor <= self.limit_backward:
raise lab18()
self.cursor -= 1
except lab19: pass
raise lab2()
except lab18: pass
self.cursor = self.limit - v_3
try:
# (, line 122
# literal, line 122
if not self.eq_s_b(1, u"u"):
raise lab21()
# goto, line 122
try:
while True:
v_10 = self.limit - self.cursor
try:
if not self.in_grouping_b(TurkishStemmer.g_vowel5, 111, 117):
raise lab23()
self.cursor = self.limit - v_10
raise lab22()
except lab23: pass
self.cursor = self.limit - v_10
if self.cursor <= self.limit_backward:
raise lab21()
self.cursor -= 1
except lab22: pass
raise lab2()
except lab21: pass
self.cursor = self.limit - v_3
# (, line 123
# literal, line 123
if not self.eq_s_b(1, u"\u00FC"):
return False
# goto, line 123
try:
while True:
v_11 = self.limit - self.cursor
try:
if not self.in_grouping_b(TurkishStemmer.g_vowel6, 246, 252):
raise lab25()
self.cursor = self.limit - v_11
raise lab24()
except lab25: pass
self.cursor = self.limit - v_11
if self.cursor <= self.limit_backward:
return False
self.cursor -= 1
except lab24: pass
except lab2: pass
self.cursor = self.limit - v_1
return True
def r_mark_suffix_with_optional_n_consonant(self):
# (, line 132
# or, line 134
try:
v_1 = self.limit - self.cursor
try:
# (, line 133
# (, line 133
# test, line 133
v_2 = self.limit - self.cursor
# literal, line 133
if not self.eq_s_b(1, u"n"):
raise lab1()
self.cursor = self.limit - v_2
# next, line 133
if self.cursor <= self.limit_backward:
raise lab1()
self.cursor -= 1
# (, line 133
# test, line 133
v_3 = self.limit - self.cursor
if not self.in_grouping_b(TurkishStemmer.g_vowel, 97, 305):
raise lab1()
self.cursor = self.limit - v_3
raise lab0()
except lab1: pass
self.cursor = self.limit - v_1
# (, line 135
# (, line 135
# not, line 135
v_4 = self.limit - self.cursor
try:
# (, line 135
# test, line 135
v_5 = self.limit - self.cursor
# literal, line 135
if not self.eq_s_b(1, u"n"):
raise lab2()
self.cursor = self.limit - v_5
return False
except lab2: pass
self.cursor = self.limit - v_4
# test, line 135
v_6 = self.limit - self.cursor
# (, line 135
# next, line 135
if self.cursor <= self.limit_backward:
return False
self.cursor -= 1
# (, line 135
# test, line 135
v_7 = self.limit - self.cursor
if not self.in_grouping_b(TurkishStemmer.g_vowel, 97, 305):
return False
self.cursor = self.limit - v_7
self.cursor = self.limit - v_6
except lab0: pass
return True
def r_mark_suffix_with_optional_s_consonant(self):
# (, line 143
# or, line 145
try:
v_1 = self.limit - self.cursor
try:
# (, line 144
# (, line 144
# test, line 144
v_2 = self.limit - self.cursor
# literal, line 144
if not self.eq_s_b(1, u"s"):
raise lab1()
self.cursor = self.limit - v_2
# next, line 144
if self.cursor <= self.limit_backward:
raise lab1()
self.cursor -= 1
# (, line 144
# test, line 144
v_3 = self.limit - self.cursor
if not self.in_grouping_b(TurkishStemmer.g_vowel, 97, 305):
raise lab1()
self.cursor = self.limit - v_3
raise lab0()
except lab1: pass
self.cursor = self.limit - v_1
# (, line 146
# (, line 146
# not, line 146
v_4 = self.limit - self.cursor
try:
# (, line 146
# test, line 146
v_5 = self.limit - self.cursor
# literal, line 146
if not self.eq_s_b(1, u"s"):
raise lab2()
self.cursor = self.limit - v_5
return False
except lab2: pass
self.cursor = self.limit - v_4
# test, line 146
v_6 = self.limit - self.cursor
# (, line 146
# next, line 146
if self.cursor <= self.limit_backward:
return False
self.cursor -= 1
# (, line 146
# test, line 146
v_7 = self.limit - self.cursor
if not self.in_grouping_b(TurkishStemmer.g_vowel, 97, 305):
return False
self.cursor = self.limit - v_7
self.cursor = self.limit - v_6
except lab0: pass
return True
def r_mark_suffix_with_optional_y_consonant(self):
# (, line 153
# or, line 155
try:
v_1 = self.limit - self.cursor
try:
# (, line 154
# (, line 154
# test, line 154
v_2 = self.limit - self.cursor
# literal, line 154
if not self.eq_s_b(1, u"y"):
raise lab1()
self.cursor = self.limit - v_2
# next, line 154
if self.cursor <= self.limit_backward:
raise lab1()
self.cursor -= 1
# (, line 154
# test, line 154
v_3 = self.limit - self.cursor
if not self.in_grouping_b(TurkishStemmer.g_vowel, 97, 305):
raise lab1()
self.cursor = self.limit - v_3
raise lab0()
except lab1: pass
self.cursor = self.limit - v_1
# (, line 156
# (, line 156
# not, line 156
v_4 = self.limit - self.cursor
try:
# (, line 156
# test, line 156
v_5 = self.limit - self.cursor
# literal, line 156
if not self.eq_s_b(1, u"y"):
raise lab2()
self.cursor = self.limit - v_5
return False
except lab2: pass
self.cursor = self.limit - v_4
# test, line 156
v_6 = self.limit - self.cursor
# (, line 156
# next, line 156
if self.cursor <= self.limit_backward:
return False
self.cursor -= 1
# (, line 156
# test, line 156
v_7 = self.limit - self.cursor
if not self.in_grouping_b(TurkishStemmer.g_vowel, 97, 305):
return False
self.cursor = self.limit - v_7
self.cursor = self.limit - v_6
except lab0: pass
return True
def r_mark_suffix_with_optional_U_vowel(self):
# (, line 159
# or, line 161
try:
v_1 = self.limit - self.cursor
try:
# (, line 160
# (, line 160
# test, line 160
v_2 = self.limit - self.cursor
if not self.in_grouping_b(TurkishStemmer.g_U, 105, 305):
raise lab1()
self.cursor = self.limit - v_2
# next, line 160
if self.cursor <= self.limit_backward:
raise lab1()
self.cursor -= 1
# (, line 160
# test, line 160
v_3 = self.limit - self.cursor
if not self.out_grouping_b(TurkishStemmer.g_vowel, 97, 305):
raise lab1()
self.cursor = self.limit - v_3
raise lab0()
except lab1: pass
self.cursor = self.limit - v_1
# (, line 162
# (, line 162
# not, line 162
v_4 = self.limit - self.cursor
try:
# (, line 162
# test, line 162
v_5 = self.limit - self.cursor
if not self.in_grouping_b(TurkishStemmer.g_U, 105, 305):
raise lab2()
self.cursor = self.limit - v_5
return False
except lab2: pass
self.cursor = self.limit - v_4
# test, line 162
v_6 = self.limit - self.cursor
# (, line 162
# next, line 162
if self.cursor <= self.limit_backward:
return False
self.cursor -= 1
# (, line 162
# test, line 162
v_7 = self.limit - self.cursor
if not self.out_grouping_b(TurkishStemmer.g_vowel, 97, 305):
return False
self.cursor = self.limit - v_7
self.cursor = self.limit - v_6
except lab0: pass
return True
def r_mark_possessives(self):
# (, line 166
# among, line 167
if self.find_among_b(TurkishStemmer.a_0, 10) == 0:
return False
# (, line 169
# call mark_suffix_with_optional_U_vowel, line 169
if not self.r_mark_suffix_with_optional_U_vowel():
return False
return True
def r_mark_sU(self):
# (, line 172
# call check_vowel_harmony, line 173
if not self.r_check_vowel_harmony():
return False
if not self.in_grouping_b(TurkishStemmer.g_U, 105, 305):
return False
# (, line 175
# call mark_suffix_with_optional_s_consonant, line 175
if not self.r_mark_suffix_with_optional_s_consonant():
return False
return True
def r_mark_lArI(self):
# (, line 178
# among, line 179
if self.find_among_b(TurkishStemmer.a_1, 2) == 0:
return False
return True
def r_mark_yU(self):
# (, line 182
# call check_vowel_harmony, line 183
if not self.r_check_vowel_harmony():
return False
if not self.in_grouping_b(TurkishStemmer.g_U, 105, 305):
return False
# (, line 185
# call mark_suffix_with_optional_y_consonant, line 185
if not self.r_mark_suffix_with_optional_y_consonant():
return False
return True
def r_mark_nU(self):
# (, line 188
# call check_vowel_harmony, line 189
if not self.r_check_vowel_harmony():
return False
# among, line 190
if self.find_among_b(TurkishStemmer.a_2, 4) == 0:
return False
return True
def r_mark_nUn(self):
# (, line 193
# call check_vowel_harmony, line 194
if not self.r_check_vowel_harmony():
return False
# among, line 195
if self.find_among_b(TurkishStemmer.a_3, 4) == 0:
return False
# (, line 196
# call mark_suffix_with_optional_n_consonant, line 196
if not self.r_mark_suffix_with_optional_n_consonant():
return False
return True
def r_mark_yA(self):
# (, line 199
# call check_vowel_harmony, line 200
if not self.r_check_vowel_harmony():
return False
# among, line 201
if self.find_among_b(TurkishStemmer.a_4, 2) == 0:
return False
# (, line 202
# call mark_suffix_with_optional_y_consonant, line 202
if not self.r_mark_suffix_with_optional_y_consonant():
return False
return True
def r_mark_nA(self):
# (, line 205
# call check_vowel_harmony, line 206
if not self.r_check_vowel_harmony():
return False
# among, line 207
if self.find_among_b(TurkishStemmer.a_5, 2) == 0:
return False
return True
def r_mark_DA(self):
# (, line 210
# call check_vowel_harmony, line 211
if not self.r_check_vowel_harmony():
return False
# among, line 212
if self.find_among_b(TurkishStemmer.a_6, 4) == 0:
return False
return True
def r_mark_ndA(self):
# (, line 215
# call check_vowel_harmony, line 216
if not self.r_check_vowel_harmony():
return False
# among, line 217
if self.find_among_b(TurkishStemmer.a_7, 2) == 0:
return False
return True
def r_mark_DAn(self):
# (, line 220
# call check_vowel_harmony, line 221
if not self.r_check_vowel_harmony():
return False
# among, line 222
if self.find_among_b(TurkishStemmer.a_8, 4) == 0:
return False
return True
def r_mark_ndAn(self):
# (, line 225
# call check_vowel_harmony, line 226
if not self.r_check_vowel_harmony():
return False
# among, line 227
if self.find_among_b(TurkishStemmer.a_9, 2) == 0:
return False
return True
def r_mark_ylA(self):
# (, line 230
# call check_vowel_harmony, line 231
if not self.r_check_vowel_harmony():
return False
# among, line 232
if self.find_among_b(TurkishStemmer.a_10, 2) == 0:
return False
# (, line 233
# call mark_suffix_with_optional_y_consonant, line 233
if not self.r_mark_suffix_with_optional_y_consonant():
return False
return True
def r_mark_ki(self):
# (, line 236
# literal, line 237
if not self.eq_s_b(2, u"ki"):
return False
return True
def r_mark_ncA(self):
# (, line 240
# call check_vowel_harmony, line 241
if not self.r_check_vowel_harmony():
return False
# among, line 242
if self.find_among_b(TurkishStemmer.a_11, 2) == 0:
return False
# (, line 243
# call mark_suffix_with_optional_n_consonant, line 243
if not self.r_mark_suffix_with_optional_n_consonant():
return False
return True
def r_mark_yUm(self):
# (, line 246
# call check_vowel_harmony, line 247
if not self.r_check_vowel_harmony():
return False
# among, line 248
if self.find_among_b(TurkishStemmer.a_12, 4) == 0:
return False
# (, line 249
# call mark_suffix_with_optional_y_consonant, line 249
if not self.r_mark_suffix_with_optional_y_consonant():
return False
return True
def r_mark_sUn(self):
# (, line 252
# call check_vowel_harmony, line 253
if not self.r_check_vowel_harmony():
return False
# among, line 254
if self.find_among_b(TurkishStemmer.a_13, 4) == 0:
return False
return True
def r_mark_yUz(self):
# (, line 257
# call check_vowel_harmony, line 258
if not self.r_check_vowel_harmony():
return False
# among, line 259
if self.find_among_b(TurkishStemmer.a_14, 4) == 0:
return False
# (, line 260
# call mark_suffix_with_optional_y_consonant, line 260
if not self.r_mark_suffix_with_optional_y_consonant():
return False
return True
def r_mark_sUnUz(self):
# (, line 263
# among, line 264
if self.find_among_b(TurkishStemmer.a_15, 4) == 0:
return False
return True
def r_mark_lAr(self):
# (, line 267
# call check_vowel_harmony, line 268
if not self.r_check_vowel_harmony():
return False
# among, line 269
if self.find_among_b(TurkishStemmer.a_16, 2) == 0:
return False
return True
def r_mark_nUz(self):
# (, line 272
# call check_vowel_harmony, line 273
if not self.r_check_vowel_harmony():
return False
# among, line 274
if self.find_among_b(TurkishStemmer.a_17, 4) == 0:
return False
return True
def r_mark_DUr(self):
# (, line 277
# call check_vowel_harmony, line 278
if not self.r_check_vowel_harmony():
return False
# among, line 279
if self.find_among_b(TurkishStemmer.a_18, 8) == 0:
return False
return True
def r_mark_cAsInA(self):
# (, line 282
# among, line 283
if self.find_among_b(TurkishStemmer.a_19, 2) == 0:
return False
return True
def r_mark_yDU(self):
# (, line 286
# call check_vowel_harmony, line 287
if not self.r_check_vowel_harmony():
return False
# among, line 288
if self.find_among_b(TurkishStemmer.a_20, 32) == 0:
return False
# (, line 292
# call mark_suffix_with_optional_y_consonant, line 292
if not self.r_mark_suffix_with_optional_y_consonant():
return False
return True
def r_mark_ysA(self):
# (, line 296
# among, line 297
if self.find_among_b(TurkishStemmer.a_21, 8) == 0:
return False
# (, line 298
# call mark_suffix_with_optional_y_consonant, line 298
if not self.r_mark_suffix_with_optional_y_consonant():
return False
return True
def r_mark_ymUs_(self):
# (, line 301
# call check_vowel_harmony, line 302
if not self.r_check_vowel_harmony():
return False
# among, line 303
if self.find_among_b(TurkishStemmer.a_22, 4) == 0:
return False
# (, line 304
# call mark_suffix_with_optional_y_consonant, line 304
if not self.r_mark_suffix_with_optional_y_consonant():
return False
return True
def r_mark_yken(self):
# (, line 307
# literal, line 308
if not self.eq_s_b(3, u"ken"):
return False
# (, line 308
# call mark_suffix_with_optional_y_consonant, line 308
if not self.r_mark_suffix_with_optional_y_consonant():
return False
return True
def r_stem_nominal_verb_suffixes(self):
# (, line 311
# [, line 312
self.ket = self.cursor
# set continue_stemming_noun_suffixes, line 313
self.B_continue_stemming_noun_suffixes = True
# or, line 315
try:
v_1 = self.limit - self.cursor
try:
# (, line 314
# or, line 314
try:
v_2 = self.limit - self.cursor
try:
# call mark_ymUs_, line 314
if not self.r_mark_ymUs_():
raise lab3()
raise lab2()
except lab3: pass
self.cursor = self.limit - v_2
try:
# call mark_yDU, line 314
if not self.r_mark_yDU():
raise lab4()
raise lab2()
except lab4: pass
self.cursor = self.limit - v_2
try:
# call mark_ysA, line 314
if not self.r_mark_ysA():
raise lab5()
raise lab2()
except lab5: pass
self.cursor = self.limit - v_2
# call mark_yken, line 314
if not self.r_mark_yken():
raise lab1()
except lab2: pass
raise lab0()
except lab1: pass
self.cursor = self.limit - v_1
try:
# (, line 316
# call mark_cAsInA, line 316
if not self.r_mark_cAsInA():
raise lab6()
# (, line 316
# or, line 316
try:
v_3 = self.limit - self.cursor
try:
# call mark_sUnUz, line 316
if not self.r_mark_sUnUz():
raise lab8()
raise lab7()
except lab8: pass
self.cursor = self.limit - v_3
try:
# call mark_lAr, line 316
if not self.r_mark_lAr():
raise lab9()
raise lab7()
except lab9: pass
self.cursor = self.limit - v_3
try:
# call mark_yUm, line 316
if not self.r_mark_yUm():
raise lab10()
raise lab7()
except lab10: pass
self.cursor = self.limit - v_3
try:
# call mark_sUn, line 316
if not self.r_mark_sUn():
raise lab11()
raise lab7()
except lab11: pass
self.cursor = self.limit - v_3
try:
# call mark_yUz, line 316
if not self.r_mark_yUz():
raise lab12()
raise lab7()
except lab12: pass
self.cursor = self.limit - v_3
except lab7: pass
# call mark_ymUs_, line 316
if not self.r_mark_ymUs_():
raise lab6()
raise lab0()
except lab6: pass
self.cursor = self.limit - v_1
try:
# (, line 318
# call mark_lAr, line 319
if not self.r_mark_lAr():
raise lab13()
# ], line 319
self.bra = self.cursor
# delete, line 319
if not self.slice_del():
return False
# try, line 319
v_4 = self.limit - self.cursor
try:
# (, line 319
# [, line 319
self.ket = self.cursor
# (, line 319
# or, line 319
try:
v_5 = self.limit - self.cursor
try:
# call mark_DUr, line 319
if not self.r_mark_DUr():
raise lab16()
raise lab15()
except lab16: pass
self.cursor = self.limit - v_5
try:
# call mark_yDU, line 319
if not self.r_mark_yDU():
raise lab17()
raise lab15()
except lab17: pass
self.cursor = self.limit - v_5
try:
# call mark_ysA, line 319
if not self.r_mark_ysA():
raise lab18()
raise lab15()
except lab18: pass
self.cursor = self.limit - v_5
# call mark_ymUs_, line 319
if not self.r_mark_ymUs_():
self.cursor = self.limit - v_4
raise lab14()
except lab15: pass
except lab14: pass
# unset continue_stemming_noun_suffixes, line 320
self.B_continue_stemming_noun_suffixes = False
raise lab0()
except lab13: pass
self.cursor = self.limit - v_1
try:
# (, line 323
# call mark_nUz, line 323
if not self.r_mark_nUz():
raise lab19()
# (, line 323
# or, line 323
try:
v_6 = self.limit - self.cursor
try:
# call mark_yDU, line 323
if not self.r_mark_yDU():
raise lab21()
raise lab20()
except lab21: pass
self.cursor = self.limit - v_6
# call mark_ysA, line 323
if not self.r_mark_ysA():
raise lab19()
except lab20: pass
raise lab0()
except lab19: pass
self.cursor = self.limit - v_1
try:
# (, line 325
# (, line 325
# or, line 325
try:
v_7 = self.limit - self.cursor
try:
# call mark_sUnUz, line 325
if not self.r_mark_sUnUz():
raise lab24()
raise lab23()
except lab24: pass
self.cursor = self.limit - v_7
try:
# call mark_yUz, line 325
if not self.r_mark_yUz():
raise lab25()
raise lab23()
except lab25: pass
self.cursor = self.limit - v_7
try:
# call mark_sUn, line 325
if not self.r_mark_sUn():
raise lab26()
raise lab23()
except lab26: pass
self.cursor = self.limit - v_7
# call mark_yUm, line 325
if not self.r_mark_yUm():
raise lab22()
except lab23: pass
# ], line 325
self.bra = self.cursor
# delete, line 325
if not self.slice_del():
return False
# try, line 325
v_8 = self.limit - self.cursor
try:
# (, line 325
# [, line 325
self.ket = self.cursor
# call mark_ymUs_, line 325
if not self.r_mark_ymUs_():
self.cursor = self.limit - v_8
raise lab27()
except lab27: pass
raise lab0()
except lab22: pass
self.cursor = self.limit - v_1
# (, line 327
# call mark_DUr, line 327
if not self.r_mark_DUr():
return False
# ], line 327
self.bra = self.cursor
# delete, line 327
if not self.slice_del():
return False
# try, line 327
v_9 = self.limit - self.cursor
try:
# (, line 327
# [, line 327
self.ket = self.cursor
# (, line 327
# or, line 327
try:
v_10 = self.limit - self.cursor
try:
# call mark_sUnUz, line 327
if not self.r_mark_sUnUz():
raise lab30()
raise lab29()
except lab30: pass
self.cursor = self.limit - v_10
try:
# call mark_lAr, line 327
if not self.r_mark_lAr():
raise lab31()
raise lab29()
except lab31: pass
self.cursor = self.limit - v_10
try:
# call mark_yUm, line 327
if not self.r_mark_yUm():
raise lab32()
raise lab29()
except lab32: pass
self.cursor = self.limit - v_10
try:
# call mark_sUn, line 327
if not self.r_mark_sUn():
raise lab33()
raise lab29()
except lab33: pass
self.cursor = self.limit - v_10
try:
# call mark_yUz, line 327
if not self.r_mark_yUz():
raise lab34()
raise lab29()
except lab34: pass
self.cursor = self.limit - v_10
except lab29: pass
# call mark_ymUs_, line 327
if not self.r_mark_ymUs_():
self.cursor = self.limit - v_9
raise lab28()
except lab28: pass
except lab0: pass
# ], line 328
self.bra = self.cursor
# delete, line 328
if not self.slice_del():
return False
return True
def r_stem_suffix_chain_before_ki(self):
# (, line 332
# [, line 333
self.ket = self.cursor
# call mark_ki, line 334
if not self.r_mark_ki():
return False
# (, line 335
# or, line 342
try:
v_1 = self.limit - self.cursor
try:
# (, line 336
# call mark_DA, line 336
if not self.r_mark_DA():
raise lab1()
# ], line 336
self.bra = self.cursor
# delete, line 336
if not self.slice_del():
return False
# try, line 336
v_2 = self.limit - self.cursor
try:
# (, line 336
# [, line 336
self.ket = self.cursor
# or, line 338
try:
v_3 = self.limit - self.cursor
try:
# (, line 337
# call mark_lAr, line 337
if not self.r_mark_lAr():
raise lab4()
# ], line 337
self.bra = self.cursor
# delete, line 337
if not self.slice_del():
return False
# try, line 337
v_4 = self.limit - self.cursor
try:
# (, line 337
# call stem_suffix_chain_before_ki, line 337
if not self.r_stem_suffix_chain_before_ki():
self.cursor = self.limit - v_4
raise lab5()
except lab5: pass
raise lab3()
except lab4: pass
self.cursor = self.limit - v_3
# (, line 339
# call mark_possessives, line 339
if not self.r_mark_possessives():
self.cursor = self.limit - v_2
raise lab2()
# ], line 339
self.bra = self.cursor
# delete, line 339
if not self.slice_del():
return False
# try, line 339
v_5 = self.limit - self.cursor
try:
# (, line 339
# [, line 339
self.ket = self.cursor
# call mark_lAr, line 339
if not self.r_mark_lAr():
self.cursor = self.limit - v_5
raise lab6()
# ], line 339
self.bra = self.cursor
# delete, line 339
if not self.slice_del():
return False
# call stem_suffix_chain_before_ki, line 339
if not self.r_stem_suffix_chain_before_ki():
self.cursor = self.limit - v_5
raise lab6()
except lab6: pass
except lab3: pass
except lab2: pass
raise lab0()
except lab1: pass
self.cursor = self.limit - v_1
try:
# (, line 343
# call mark_nUn, line 343
if not self.r_mark_nUn():
raise lab7()
# ], line 343
self.bra = self.cursor
# delete, line 343
if not self.slice_del():
return False
# try, line 343
v_6 = self.limit - self.cursor
try:
# (, line 343
# [, line 343
self.ket = self.cursor
# or, line 345
try:
v_7 = self.limit - self.cursor
try:
# (, line 344
# call mark_lArI, line 344
if not self.r_mark_lArI():
raise lab10()
# ], line 344
self.bra = self.cursor
# delete, line 344
if not self.slice_del():
return False
raise lab9()
except lab10: pass
self.cursor = self.limit - v_7
try:
# (, line 346
# [, line 346
self.ket = self.cursor
# or, line 346
try:
v_8 = self.limit - self.cursor
try:
# call mark_possessives, line 346
if not self.r_mark_possessives():
raise lab13()
raise lab12()
except lab13: pass
self.cursor = self.limit - v_8
# call mark_sU, line 346
if not self.r_mark_sU():
raise lab11()
except lab12: pass
# ], line 346
self.bra = self.cursor
# delete, line 346
if not self.slice_del():
return False
# try, line 346
v_9 = self.limit - self.cursor
try:
# (, line 346
# [, line 346
self.ket = self.cursor
# call mark_lAr, line 346
if not self.r_mark_lAr():
self.cursor = self.limit - v_9
raise lab14()
# ], line 346
self.bra = self.cursor
# delete, line 346
if not self.slice_del():
return False
# call stem_suffix_chain_before_ki, line 346
if not self.r_stem_suffix_chain_before_ki():
self.cursor = self.limit - v_9
raise lab14()
except lab14: pass
raise lab9()
except lab11: pass
self.cursor = self.limit - v_7
# (, line 348
# call stem_suffix_chain_before_ki, line 348
if not self.r_stem_suffix_chain_before_ki():
self.cursor = self.limit - v_6
raise lab8()
except lab9: pass
except lab8: pass
raise lab0()
except lab7: pass
self.cursor = self.limit - v_1
# (, line 351
# call mark_ndA, line 351
if not self.r_mark_ndA():
return False
# (, line 351
# or, line 353
try:
v_10 = self.limit - self.cursor
try:
# (, line 352
# call mark_lArI, line 352
if not self.r_mark_lArI():
raise lab16()
# ], line 352
self.bra = self.cursor
# delete, line 352
if not self.slice_del():
return False
raise lab15()
except lab16: pass
self.cursor = self.limit - v_10
try:
# (, line 354
# (, line 354
# call mark_sU, line 354
if not self.r_mark_sU():
raise lab17()
# ], line 354
self.bra = self.cursor
# delete, line 354
if not self.slice_del():
return False
# try, line 354
v_11 = self.limit - self.cursor
try:
# (, line 354
# [, line 354
self.ket = self.cursor
# call mark_lAr, line 354
if not self.r_mark_lAr():
self.cursor = self.limit - v_11
raise lab18()
# ], line 354
self.bra = self.cursor
# delete, line 354
if not self.slice_del():
return False
# call stem_suffix_chain_before_ki, line 354
if not self.r_stem_suffix_chain_before_ki():
self.cursor = self.limit - v_11
raise lab18()
except lab18: pass
raise lab15()
except lab17: pass
self.cursor = self.limit - v_10
# (, line 356
# call stem_suffix_chain_before_ki, line 356
if not self.r_stem_suffix_chain_before_ki():
return False
except lab15: pass
except lab0: pass
return True
def r_stem_noun_suffixes(self):
# (, line 361
# or, line 363
try:
v_1 = self.limit - self.cursor
try:
# (, line 362
# [, line 362
self.ket = self.cursor
# call mark_lAr, line 362
if not self.r_mark_lAr():
raise lab1()
# ], line 362
self.bra = self.cursor
# delete, line 362
if not self.slice_del():
return False
# try, line 362
v_2 = self.limit - self.cursor
try:
# (, line 362
# call stem_suffix_chain_before_ki, line 362
if not self.r_stem_suffix_chain_before_ki():
self.cursor = self.limit - v_2
raise lab2()
except lab2: pass
raise lab0()
except lab1: pass
self.cursor = self.limit - v_1
try:
# (, line 364
# [, line 364
self.ket = self.cursor
# call mark_ncA, line 364
if not self.r_mark_ncA():
raise lab3()
# ], line 364
self.bra = self.cursor
# delete, line 364
if not self.slice_del():
return False
# try, line 365
v_3 = self.limit - self.cursor
try:
# (, line 365
# or, line 367
try:
v_4 = self.limit - self.cursor
try:
# (, line 366
# [, line 366
self.ket = self.cursor
# call mark_lArI, line 366
if not self.r_mark_lArI():
raise lab6()
# ], line 366
self.bra = self.cursor
# delete, line 366
if not self.slice_del():
return False
raise lab5()
except lab6: pass
self.cursor = self.limit - v_4
try:
# (, line 368
# [, line 368
self.ket = self.cursor
# or, line 368
try:
v_5 = self.limit - self.cursor
try:
# call mark_possessives, line 368
if not self.r_mark_possessives():
raise lab9()
raise lab8()
except lab9: pass
self.cursor = self.limit - v_5
# call mark_sU, line 368
if not self.r_mark_sU():
raise lab7()
except lab8: pass
# ], line 368
self.bra = self.cursor
# delete, line 368
if not self.slice_del():
return False
# try, line 368
v_6 = self.limit - self.cursor
try:
# (, line 368
# [, line 368
self.ket = self.cursor
# call mark_lAr, line 368
if not self.r_mark_lAr():
self.cursor = self.limit - v_6
raise lab10()
# ], line 368
self.bra = self.cursor
# delete, line 368
if not self.slice_del():
return False
# call stem_suffix_chain_before_ki, line 368
if not self.r_stem_suffix_chain_before_ki():
self.cursor = self.limit - v_6
raise lab10()
except lab10: pass
raise lab5()
except lab7: pass
self.cursor = self.limit - v_4
# (, line 370
# [, line 370
self.ket = self.cursor
# call mark_lAr, line 370
if not self.r_mark_lAr():
self.cursor = self.limit - v_3
raise lab4()
# ], line 370
self.bra = self.cursor
# delete, line 370
if not self.slice_del():
return False
# call stem_suffix_chain_before_ki, line 370
if not self.r_stem_suffix_chain_before_ki():
self.cursor = self.limit - v_3
raise lab4()
except lab5: pass
except lab4: pass
raise lab0()
except lab3: pass
self.cursor = self.limit - v_1
try:
# (, line 374
# [, line 374
self.ket = self.cursor
# (, line 374
# or, line 374
try:
v_7 = self.limit - self.cursor
try:
# call mark_ndA, line 374
if not self.r_mark_ndA():
raise lab13()
raise lab12()
except lab13: pass
self.cursor = self.limit - v_7
# call mark_nA, line 374
if not self.r_mark_nA():
raise lab11()
except lab12: pass
# (, line 375
# or, line 377
try:
v_8 = self.limit - self.cursor
try:
# (, line 376
# call mark_lArI, line 376
if not self.r_mark_lArI():
raise lab15()
# ], line 376
self.bra = self.cursor
# delete, line 376
if not self.slice_del():
return False
raise lab14()
except lab15: pass
self.cursor = self.limit - v_8
try:
# (, line 378
# call mark_sU, line 378
if not self.r_mark_sU():
raise lab16()
# ], line 378
self.bra = self.cursor
# delete, line 378
if not self.slice_del():
return False
# try, line 378
v_9 = self.limit - self.cursor
try:
# (, line 378
# [, line 378
self.ket = self.cursor
# call mark_lAr, line 378
if not self.r_mark_lAr():
self.cursor = self.limit - v_9
raise lab17()
# ], line 378
self.bra = self.cursor
# delete, line 378
if not self.slice_del():
return False
# call stem_suffix_chain_before_ki, line 378
if not self.r_stem_suffix_chain_before_ki():
self.cursor = self.limit - v_9
raise lab17()
except lab17: pass
raise lab14()
except lab16: pass
self.cursor = self.limit - v_8
# (, line 380
# call stem_suffix_chain_before_ki, line 380
if not self.r_stem_suffix_chain_before_ki():
raise lab11()
except lab14: pass
raise lab0()
except lab11: pass
self.cursor = self.limit - v_1
try:
# (, line 384
# [, line 384
self.ket = self.cursor
# (, line 384
# or, line 384
try:
v_10 = self.limit - self.cursor
try:
# call mark_ndAn, line 384
if not self.r_mark_ndAn():
raise lab20()
raise lab19()
except lab20: pass
self.cursor = self.limit - v_10
# call mark_nU, line 384
if not self.r_mark_nU():
raise lab18()
except lab19: pass
# (, line 384
# or, line 384
try:
v_11 = self.limit - self.cursor
try:
# (, line 384
# call mark_sU, line 384
if not self.r_mark_sU():
raise lab22()
# ], line 384
self.bra = self.cursor
# delete, line 384
if not self.slice_del():
return False
# try, line 384
v_12 = self.limit - self.cursor
try:
# (, line 384
# [, line 384
self.ket = self.cursor
# call mark_lAr, line 384
if not self.r_mark_lAr():
self.cursor = self.limit - v_12
raise lab23()
# ], line 384
self.bra = self.cursor
# delete, line 384
if not self.slice_del():
return False
# call stem_suffix_chain_before_ki, line 384
if not self.r_stem_suffix_chain_before_ki():
self.cursor = self.limit - v_12
raise lab23()
except lab23: pass
raise lab21()
except lab22: pass
self.cursor = self.limit - v_11
# (, line 384
# call mark_lArI, line 384
if not self.r_mark_lArI():
raise lab18()
except lab21: pass
raise lab0()
except lab18: pass
self.cursor = self.limit - v_1
try:
# (, line 386
# [, line 386
self.ket = self.cursor
# call mark_DAn, line 386
if not self.r_mark_DAn():
raise lab24()
# ], line 386
self.bra = self.cursor
# delete, line 386
if not self.slice_del():
return False
# try, line 386
v_13 = self.limit - self.cursor
try:
# (, line 386
# [, line 386
self.ket = self.cursor
# (, line 387
# or, line 389
try:
v_14 = self.limit - self.cursor
try:
# (, line 388
# call mark_possessives, line 388
if not self.r_mark_possessives():
raise lab27()
# ], line 388
self.bra = self.cursor
# delete, line 388
if not self.slice_del():
return False
# try, line 388
v_15 = self.limit - self.cursor
try:
# (, line 388
# [, line 388
self.ket = self.cursor
# call mark_lAr, line 388
if not self.r_mark_lAr():
self.cursor = self.limit - v_15
raise lab28()
# ], line 388
self.bra = self.cursor
# delete, line 388
if not self.slice_del():
return False
# call stem_suffix_chain_before_ki, line 388
if not self.r_stem_suffix_chain_before_ki():
self.cursor = self.limit - v_15
raise lab28()
except lab28: pass
raise lab26()
except lab27: pass
self.cursor = self.limit - v_14
try:
# (, line 390
# call mark_lAr, line 390
if not self.r_mark_lAr():
raise lab29()
# ], line 390
self.bra = self.cursor
# delete, line 390
if not self.slice_del():
return False
# try, line 390
v_16 = self.limit - self.cursor
try:
# (, line 390
# call stem_suffix_chain_before_ki, line 390
if not self.r_stem_suffix_chain_before_ki():
self.cursor = self.limit - v_16
raise lab30()
except lab30: pass
raise lab26()
except lab29: pass
self.cursor = self.limit - v_14
# (, line 392
# call stem_suffix_chain_before_ki, line 392
if not self.r_stem_suffix_chain_before_ki():
self.cursor = self.limit - v_13
raise lab25()
except lab26: pass
except lab25: pass
raise lab0()
except lab24: pass
self.cursor = self.limit - v_1
try:
# (, line 396
# [, line 396
self.ket = self.cursor
# or, line 396
try:
v_17 = self.limit - self.cursor
try:
# call mark_nUn, line 396
if not self.r_mark_nUn():
raise lab33()
raise lab32()
except lab33: pass
self.cursor = self.limit - v_17
# call mark_ylA, line 396
if not self.r_mark_ylA():
raise lab31()
except lab32: pass
# ], line 396
self.bra = self.cursor
# delete, line 396
if not self.slice_del():
return False
# try, line 397
v_18 = self.limit - self.cursor
try:
# (, line 397
# or, line 399
try:
v_19 = self.limit - self.cursor
try:
# (, line 398
# [, line 398
self.ket = self.cursor
# call mark_lAr, line 398
if not self.r_mark_lAr():
raise lab36()
# ], line 398
self.bra = self.cursor
# delete, line 398
if not self.slice_del():
return False
# call stem_suffix_chain_before_ki, line 398
if not self.r_stem_suffix_chain_before_ki():
raise lab36()
raise lab35()
except lab36: pass
self.cursor = self.limit - v_19
try:
# (, line 400
# [, line 400
self.ket = self.cursor
# or, line 400
try:
v_20 = self.limit - self.cursor
try:
# call mark_possessives, line 400
if not self.r_mark_possessives():
raise lab39()
raise lab38()
except lab39: pass
self.cursor = self.limit - v_20
# call mark_sU, line 400
if not self.r_mark_sU():
raise lab37()
except lab38: pass
# ], line 400
self.bra = self.cursor
# delete, line 400
if not self.slice_del():
return False
# try, line 400
v_21 = self.limit - self.cursor
try:
# (, line 400
# [, line 400
self.ket = self.cursor
# call mark_lAr, line 400
if not self.r_mark_lAr():
self.cursor = self.limit - v_21
raise lab40()
# ], line 400
self.bra = self.cursor
# delete, line 400
if not self.slice_del():
return False
# call stem_suffix_chain_before_ki, line 400
if not self.r_stem_suffix_chain_before_ki():
self.cursor = self.limit - v_21
raise lab40()
except lab40: pass
raise lab35()
except lab37: pass
self.cursor = self.limit - v_19
# call stem_suffix_chain_before_ki, line 402
if not self.r_stem_suffix_chain_before_ki():
self.cursor = self.limit - v_18
raise lab34()
except lab35: pass
except lab34: pass
raise lab0()
except lab31: pass
self.cursor = self.limit - v_1
try:
# (, line 406
# [, line 406
self.ket = self.cursor
# call mark_lArI, line 406
if not self.r_mark_lArI():
raise lab41()
# ], line 406
self.bra = self.cursor
# delete, line 406
if not self.slice_del():
return False
raise lab0()
except lab41: pass
self.cursor = self.limit - v_1
try:
# (, line 408
# call stem_suffix_chain_before_ki, line 408
if not self.r_stem_suffix_chain_before_ki():
raise lab42()
raise lab0()
except lab42: pass
self.cursor = self.limit - v_1
try:
# (, line 410
# [, line 410
self.ket = self.cursor
# or, line 410
try:
v_22 = self.limit - self.cursor
try:
# call mark_DA, line 410
if not self.r_mark_DA():
raise lab45()
raise lab44()
except lab45: pass
self.cursor = self.limit - v_22
try:
# call mark_yU, line 410
if not self.r_mark_yU():
raise lab46()
raise lab44()
except lab46: pass
self.cursor = self.limit - v_22
# call mark_yA, line 410
if not self.r_mark_yA():
raise lab43()
except lab44: pass
# ], line 410
self.bra = self.cursor
# delete, line 410
if not self.slice_del():
return False
# try, line 410
v_23 = self.limit - self.cursor
try:
# (, line 410
# [, line 410
self.ket = self.cursor
# (, line 410
# or, line 410
try:
v_24 = self.limit - self.cursor
try:
# (, line 410
# call mark_possessives, line 410
if not self.r_mark_possessives():
raise lab49()
# ], line 410
self.bra = self.cursor
# delete, line 410
if not self.slice_del():
return False
# try, line 410
v_25 = self.limit - self.cursor
try:
# (, line 410
# [, line 410
self.ket = self.cursor
# call mark_lAr, line 410
if not self.r_mark_lAr():
self.cursor = self.limit - v_25
raise lab50()
except lab50: pass
raise lab48()
except lab49: pass
self.cursor = self.limit - v_24
# call mark_lAr, line 410
if not self.r_mark_lAr():
self.cursor = self.limit - v_23
raise lab47()
except lab48: pass
# ], line 410
self.bra = self.cursor
# delete, line 410
if not self.slice_del():
return False
# [, line 410
self.ket = self.cursor
# call stem_suffix_chain_before_ki, line 410
if not self.r_stem_suffix_chain_before_ki():
self.cursor = self.limit - v_23
raise lab47()
except lab47: pass
raise lab0()
except lab43: pass
self.cursor = self.limit - v_1
# (, line 412
# [, line 412
self.ket = self.cursor
# or, line 412
try:
v_26 = self.limit - self.cursor
try:
# call mark_possessives, line 412
if not self.r_mark_possessives():
raise lab52()
raise lab51()
except lab52: pass
self.cursor = self.limit - v_26
# call mark_sU, line 412
if not self.r_mark_sU():
return False
except lab51: pass
# ], line 412
self.bra = self.cursor
# delete, line 412
if not self.slice_del():
return False
# try, line 412
v_27 = self.limit - self.cursor
try:
# (, line 412
# [, line 412
self.ket = self.cursor
# call mark_lAr, line 412
if not self.r_mark_lAr():
self.cursor = self.limit - v_27
raise lab53()
# ], line 412
self.bra = self.cursor
# delete, line 412
if not self.slice_del():
return False
# call stem_suffix_chain_before_ki, line 412
if not self.r_stem_suffix_chain_before_ki():
self.cursor = self.limit - v_27
raise lab53()
except lab53: pass
except lab0: pass
return True
def r_post_process_last_consonants(self):
# (, line 415
# [, line 416
self.ket = self.cursor
# substring, line 416
among_var = self.find_among_b(TurkishStemmer.a_23, 4)
if among_var == 0:
return False
# ], line 416
self.bra = self.cursor
if among_var == 0:
return False
elif among_var == 1:
# (, line 417
# <-, line 417
if not self.slice_from(u"p"):
return False
elif among_var == 2:
# (, line 418
# <-, line 418
if not self.slice_from(u"\u00E7"):
return False
elif among_var == 3:
# (, line 419
# <-, line 419
if not self.slice_from(u"t"):
return False
elif among_var == 4:
# (, line 420
# <-, line 420
if not self.slice_from(u"k"):
return False
return True
def r_append_U_to_stems_ending_with_d_or_g(self):
# (, line 430
# test, line 431
v_1 = self.limit - self.cursor
# (, line 431
# or, line 431
try:
v_2 = self.limit - self.cursor
try:
# literal, line 431
if not self.eq_s_b(1, u"d"):
raise lab1()
raise lab0()
except lab1: pass
self.cursor = self.limit - v_2
# literal, line 431
if not self.eq_s_b(1, u"g"):
return False
except lab0: pass
self.cursor = self.limit - v_1
# or, line 433
try:
v_3 = self.limit - self.cursor
try:
# (, line 432
# test, line 432
v_4 = self.limit - self.cursor
# (, line 432
# (, line 432
# goto, line 432
try:
while True:
v_5 = self.limit - self.cursor
try:
if not self.in_grouping_b(TurkishStemmer.g_vowel, 97, 305):
raise lab5()
self.cursor = self.limit - v_5
raise lab4()
except lab5: pass
self.cursor = self.limit - v_5
if self.cursor <= self.limit_backward:
raise lab3()
self.cursor -= 1
except lab4: pass
# or, line 432
try:
v_6 = self.limit - self.cursor
try:
# literal, line 432
if not self.eq_s_b(1, u"a"):
raise lab7()
raise lab6()
except lab7: pass
self.cursor = self.limit - v_6
# literal, line 432
if not self.eq_s_b(1, u"\u0131"):
raise lab3()
except lab6: pass
self.cursor = self.limit - v_4
# <+, line 432
c = self.cursor
self.insert(self.cursor, self.cursor, u"\u0131")
self.cursor = c
raise lab2()
except lab3: pass
self.cursor = self.limit - v_3
try:
# (, line 434
# test, line 434
v_7 = self.limit - self.cursor
# (, line 434
# (, line 434
# goto, line 434
try:
while True:
v_8 = self.limit - self.cursor
try:
if not self.in_grouping_b(TurkishStemmer.g_vowel, 97, 305):
raise lab10()
self.cursor = self.limit - v_8
raise lab9()
except lab10: pass
self.cursor = self.limit - v_8
if self.cursor <= self.limit_backward:
raise lab8()
self.cursor -= 1
except lab9: pass
# or, line 434
try:
v_9 = self.limit - self.cursor
try:
# literal, line 434
if not self.eq_s_b(1, u"e"):
raise lab12()
raise lab11()
except lab12: pass
self.cursor = self.limit - v_9
# literal, line 434
if not self.eq_s_b(1, u"i"):
raise lab8()
except lab11: pass
self.cursor = self.limit - v_7
# <+, line 434
c = self.cursor
self.insert(self.cursor, self.cursor, u"i")
self.cursor = c
raise lab2()
except lab8: pass
self.cursor = self.limit - v_3
try:
# (, line 436
# test, line 436
v_10 = self.limit - self.cursor
# (, line 436
# (, line 436
# goto, line 436
try:
while True:
v_11 = self.limit - self.cursor
try:
if not self.in_grouping_b(TurkishStemmer.g_vowel, 97, 305):
raise lab15()
self.cursor = self.limit - v_11
raise lab14()
except lab15: pass
self.cursor = self.limit - v_11
if self.cursor <= self.limit_backward:
raise lab13()
self.cursor -= 1
except lab14: pass
# or, line 436
try:
v_12 = self.limit - self.cursor
try:
# literal, line 436
if not self.eq_s_b(1, u"o"):
raise lab17()
raise lab16()
except lab17: pass
self.cursor = self.limit - v_12
# literal, line 436
if not self.eq_s_b(1, u"u"):
raise lab13()
except lab16: pass
self.cursor = self.limit - v_10
# <+, line 436
c = self.cursor
self.insert(self.cursor, self.cursor, u"u")
self.cursor = c
raise lab2()
except lab13: pass
self.cursor = self.limit - v_3
# (, line 438
# test, line 438
v_13 = self.limit - self.cursor
# (, line 438
# (, line 438
# goto, line 438
try:
while True:
v_14 = self.limit - self.cursor
try:
if not self.in_grouping_b(TurkishStemmer.g_vowel, 97, 305):
raise lab19()
self.cursor = self.limit - v_14
raise lab18()
except lab19: pass
self.cursor = self.limit - v_14
if self.cursor <= self.limit_backward:
return False
self.cursor -= 1
except lab18: pass
# or, line 438
try:
v_15 = self.limit - self.cursor
try:
# literal, line 438
if not self.eq_s_b(1, u"\u00F6"):
raise lab21()
raise lab20()
except lab21: pass
self.cursor = self.limit - v_15
# literal, line 438
if not self.eq_s_b(1, u"\u00FC"):
return False
except lab20: pass
self.cursor = self.limit - v_13
# <+, line 438
c = self.cursor
self.insert(self.cursor, self.cursor, u"\u00FC")
self.cursor = c
except lab2: pass
return True
def r_more_than_one_syllable_word(self):
# (, line 445
# test, line 446
v_1 = self.cursor
# (, line 446
# atleast, line 446
v_2 = 2
# atleast, line 446
try:
while True:
try:
v_3 = self.cursor
try:
# (, line 446
# gopast, line 446
try:
while True:
try:
if not self.in_grouping(TurkishStemmer.g_vowel, 97, 305):
raise lab4()
raise lab3()
except lab4: pass
if self.cursor >= self.limit:
raise lab2()
self.cursor += 1
except lab3: pass
v_2 -= 1
raise lab1()
except lab2: pass
self.cursor = v_3
raise lab0()
except lab1: pass
except lab0: pass
if v_2 > 0:
return False
self.cursor = v_1
return True
def r_is_reserved_word(self):
# (, line 449
# or, line 451
try:
v_1 = self.cursor
try:
# test, line 450
v_2 = self.cursor
# (, line 450
# gopast, line 450
try:
while True:
try:
# literal, line 450
if not self.eq_s(2, u"ad"):
raise lab3()
raise lab2()
except lab3: pass
if self.cursor >= self.limit:
raise lab1()
self.cursor += 1
except lab2: pass
# (, line 450
self.I_strlen = 2;
# (, line 450
if not self.I_strlen == self.limit:
raise lab1()
self.cursor = v_2
raise lab0()
except lab1: pass
self.cursor = v_1
# test, line 452
v_4 = self.cursor
# (, line 452
# gopast, line 452
try:
while True:
try:
# literal, line 452
if not self.eq_s(5, u"soyad"):
raise lab5()
raise lab4()
except lab5: pass
if self.cursor >= self.limit:
return False
self.cursor += 1
except lab4: pass
# (, line 452
self.I_strlen = 5;
# (, line 452
if not self.I_strlen == self.limit:
return False
self.cursor = v_4
except lab0: pass
return True
def r_postlude(self):
# (, line 455
# not, line 456
v_1 = self.cursor
try:
# (, line 456
# call is_reserved_word, line 456
if not self.r_is_reserved_word():
raise lab0()
return False
except lab0: pass
self.cursor = v_1
# backwards, line 457
self.limit_backward = self.cursor
self.cursor = self.limit
# (, line 457
# do, line 458
v_2 = self.limit - self.cursor
try:
# call append_U_to_stems_ending_with_d_or_g, line 458
if not self.r_append_U_to_stems_ending_with_d_or_g():
raise lab1()
except lab1: pass
self.cursor = self.limit - v_2
# do, line 459
v_3 = self.limit - self.cursor
try:
# call post_process_last_consonants, line 459
if not self.r_post_process_last_consonants():
raise lab2()
except lab2: pass
self.cursor = self.limit - v_3
self.cursor = self.limit_backward
return True
def _stem(self):
# (, line 464
# (, line 465
# call more_than_one_syllable_word, line 465
if not self.r_more_than_one_syllable_word():
return False
# (, line 466
# backwards, line 467
self.limit_backward = self.cursor
self.cursor = self.limit
# (, line 467
# do, line 468
v_1 = self.limit - self.cursor
try:
# call stem_nominal_verb_suffixes, line 468
if not self.r_stem_nominal_verb_suffixes():
raise lab0()
except lab0: pass
self.cursor = self.limit - v_1
# Boolean test continue_stemming_noun_suffixes, line 469
if not self.B_continue_stemming_noun_suffixes:
return False
# do, line 470
v_2 = self.limit - self.cursor
try:
# call stem_noun_suffixes, line 470
if not self.r_stem_noun_suffixes():
raise lab1()
except lab1: pass
self.cursor = self.limit - v_2
self.cursor = self.limit_backward
# call postlude, line 473
if not self.r_postlude():
return False
return True
def equals(self, o):
return isinstance(o, TurkishStemmer)
def hashCode(self):
return hash("TurkishStemmer")
class lab0(BaseException): pass
class lab1(BaseException): pass
class lab2(BaseException): pass
class lab3(BaseException): pass
class lab4(BaseException): pass
class lab5(BaseException): pass
class lab6(BaseException): pass
class lab7(BaseException): pass
class lab8(BaseException): pass
class lab9(BaseException): pass
class lab10(BaseException): pass
class lab11(BaseException): pass
class lab12(BaseException): pass
class lab13(BaseException): pass
class lab14(BaseException): pass
class lab15(BaseException): pass
class lab16(BaseException): pass
class lab17(BaseException): pass
class lab18(BaseException): pass
class lab19(BaseException): pass
class lab20(BaseException): pass
class lab21(BaseException): pass
class lab22(BaseException): pass
class lab23(BaseException): pass
class lab24(BaseException): pass
class lab25(BaseException): pass
class lab26(BaseException): pass
class lab27(BaseException): pass
class lab28(BaseException): pass
class lab29(BaseException): pass
class lab30(BaseException): pass
class lab31(BaseException): pass
class lab32(BaseException): pass
class lab33(BaseException): pass
class lab34(BaseException): pass
class lab35(BaseException): pass
class lab36(BaseException): pass
class lab37(BaseException): pass
class lab38(BaseException): pass
class lab39(BaseException): pass
class lab40(BaseException): pass
class lab41(BaseException): pass
class lab42(BaseException): pass
class lab43(BaseException): pass
class lab44(BaseException): pass
class lab45(BaseException): pass
class lab46(BaseException): pass
class lab47(BaseException): pass
class lab48(BaseException): pass
class lab49(BaseException): pass
class lab50(BaseException): pass
class lab51(BaseException): pass
class lab52(BaseException): pass
class lab53(BaseException): pass
| 36.634128
| 99
| 0.395523
| 9,559
| 95,322
| 3.787007
| 0.055759
| 0.120718
| 0.060663
| 0.104972
| 0.76
| 0.697956
| 0.631354
| 0.513287
| 0.420718
| 0.343398
| 0
| 0.089513
| 0.529332
| 95,322
| 2,601
| 100
| 36.648212
| 0.717352
| 0.123917
| 0
| 0.774973
| 1
| 0
| 0.008136
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.024149
| false
| 0.130626
| 0.001098
| 0.001098
| 0.172887
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
479bc5f3f46b7ede70f260b6421fe2a67ea8079c
| 410
|
py
|
Python
|
vi/vi/csp/variable.py
|
pveierland/permve-ntnu-it3105
|
6a7e4751de47b091c1c9c59560c19a8452698d81
|
[
"CC0-1.0"
] | null | null | null |
vi/vi/csp/variable.py
|
pveierland/permve-ntnu-it3105
|
6a7e4751de47b091c1c9c59560c19a8452698d81
|
[
"CC0-1.0"
] | null | null | null |
vi/vi/csp/variable.py
|
pveierland/permve-ntnu-it3105
|
6a7e4751de47b091c1c9c59560c19a8452698d81
|
[
"CC0-1.0"
] | null | null | null |
class Variable(object):
def __init__(self, identity, constraints = None):
self.identity = identity
self.constraints = constraints or set()
def __eq__(self, other):
return self.identity == (other.identity if other is Variable else other)
def __hash__(self):
return hash(self.identity)
def __str__(self):
return "Variable({0})".format(self.identity)
| 29.285714
| 80
| 0.65122
| 48
| 410
| 5.229167
| 0.4375
| 0.239044
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.003215
| 0.241463
| 410
| 13
| 81
| 31.538462
| 0.803859
| 0
| 0
| 0
| 0
| 0
| 0.031707
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.4
| false
| 0
| 0
| 0.3
| 0.8
| 0
| 0
| 0
| 0
| null | 1
| 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
| 0
| 1
| 1
| 0
|
0
| 4
|
47bad9e63e8ad56805bac209ddb5ba2d9e72e136
| 94
|
py
|
Python
|
pineboolib/q3widgets/__init__.py
|
juanjosepablos/pineboo
|
f6ce515aec6e0139821bb9c1d62536d9fb50dae4
|
[
"MIT"
] | 2
|
2015-09-19T16:54:49.000Z
|
2016-09-12T08:06:29.000Z
|
pineboolib/q3widgets/__init__.py
|
Aulla/pineboo
|
3ad6412d365a6ad65c3bb2bdc03f5798d7c37004
|
[
"MIT"
] | 36
|
2017-11-05T21:13:47.000Z
|
2020-08-26T15:56:15.000Z
|
pineboolib/qt3_widgets/__init__.py
|
deavid/pineboo
|
acc96ab6d5b8bb182990af6dea4bf0986af15549
|
[
"MIT"
] | 9
|
2015-01-15T18:15:42.000Z
|
2019-05-05T18:53:00.000Z
|
"""
Qt3 UI emulation module.
Selection of widgets that emulate behavior from Qt3/Eneboo.
"""
| 15.666667
| 59
| 0.744681
| 13
| 94
| 5.384615
| 0.923077
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.025316
| 0.159574
| 94
| 5
| 60
| 18.8
| 0.860759
| 0.904255
| 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
|
47bd894f88ecb3536d4318f4157c059322dcf02a
| 532
|
py
|
Python
|
libs/config/chromosome_config.py
|
Hunteerq/GeneticAlgorithms
|
267512e21a5c6ca1d0ffcd7162ea4bd6c8ca58ed
|
[
"Apache-2.0"
] | null | null | null |
libs/config/chromosome_config.py
|
Hunteerq/GeneticAlgorithms
|
267512e21a5c6ca1d0ffcd7162ea4bd6c8ca58ed
|
[
"Apache-2.0"
] | 1
|
2020-03-22T00:24:24.000Z
|
2020-03-22T00:30:04.000Z
|
libs/config/chromosome_config.py
|
Hunteerq/GeneticAlgorithms
|
267512e21a5c6ca1d0ffcd7162ea4bd6c8ca58ed
|
[
"Apache-2.0"
] | null | null | null |
class ChromosomeConfig:
def __init__(self, cross_type, mut_type, cross_prob, mut_prob):
self.__cross_type = cross_type
self.__mut_type = mut_type
self.__cross_prob = cross_prob
self.__mut_prob = mut_prob
@property
def cross_type(self):
return self.__cross_type
@property
def mut_type(self):
return self.__mut_type
@property
def cross_prob(self):
return self.__cross_prob
@property
def mut_prob(self):
return self.__mut_prob
| 19.703704
| 67
| 0.654135
| 69
| 532
| 4.463768
| 0.15942
| 0.146104
| 0.181818
| 0.116883
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.278195
| 532
| 26
| 68
| 20.461538
| 0.802083
| 0
| 0
| 0.222222
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.277778
| false
| 0
| 0
| 0.222222
| 0.555556
| 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
|
9a503473349c0a4beb41a698ab76a552f1f53c3f
| 130
|
py
|
Python
|
backend/app/api/utils/prefetch.py
|
shizidushu/simple-report-data-table-vuetify
|
41a459a2d8ae23f32b7aaa717ebf4182a625eecc
|
[
"MIT"
] | 13
|
2020-01-06T13:35:22.000Z
|
2021-07-27T15:54:19.000Z
|
backend/app/api/utils/prefetch.py
|
shizidushu/simple-report-data-table-vuetify
|
41a459a2d8ae23f32b7aaa717ebf4182a625eecc
|
[
"MIT"
] | 5
|
2021-03-10T03:27:24.000Z
|
2022-02-26T22:02:32.000Z
|
backend/app/api/utils/prefetch.py
|
shizidushu/simple-report-data-table-vuetify
|
41a459a2d8ae23f32b7aaa717ebf4182a625eecc
|
[
"MIT"
] | 3
|
2020-01-06T13:38:26.000Z
|
2021-04-26T11:03:42.000Z
|
# define functions to get data (like options)
import time
def get_choices():
time.sleep(5)
return(['foo', 'bar', 'julia'])
| 26
| 45
| 0.661538
| 19
| 130
| 4.473684
| 0.894737
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.009346
| 0.176923
| 130
| 5
| 46
| 26
| 0.785047
| 0.330769
| 0
| 0
| 0
| 0
| 0.127907
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| true
| 0
| 0.25
| 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
| 1
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
9a50c4bb55688d1250809059b1e11975ec6c3731
| 230
|
py
|
Python
|
tests/test_app.py
|
sd19surf/flask
|
3369b3bd74ea7e0489f3c3ba14482aaf89d33a88
|
[
"MIT"
] | null | null | null |
tests/test_app.py
|
sd19surf/flask
|
3369b3bd74ea7e0489f3c3ba14482aaf89d33a88
|
[
"MIT"
] | null | null | null |
tests/test_app.py
|
sd19surf/flask
|
3369b3bd74ea7e0489f3c3ba14482aaf89d33a88
|
[
"MIT"
] | null | null | null |
from app import create_app
def test_index(client):
response = client.get("/")
assert response.data == b"Index Page"
def test_hello(client):
response = client.get("/hello")
assert response.data == b"Hello World!"
| 23
| 43
| 0.682609
| 32
| 230
| 4.8125
| 0.5
| 0.090909
| 0.25974
| 0.298701
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.182609
| 230
| 9
| 44
| 25.555556
| 0.819149
| 0
| 0
| 0
| 0
| 0
| 0.126087
| 0
| 0
| 0
| 0
| 0
| 0.285714
| 1
| 0.285714
| false
| 0
| 0.142857
| 0
| 0.428571
| 0
| 0
| 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
9a5dd9316bac95586a3ccb5d323e2e5a41518ab2
| 429
|
py
|
Python
|
resources/card.py
|
PCM1945/pybank
|
790fc944c0e8ead1aeb17e1b52b089ff6949e399
|
[
"MIT"
] | null | null | null |
resources/card.py
|
PCM1945/pybank
|
790fc944c0e8ead1aeb17e1b52b089ff6949e399
|
[
"MIT"
] | null | null | null |
resources/card.py
|
PCM1945/pybank
|
790fc944c0e8ead1aeb17e1b52b089ff6949e399
|
[
"MIT"
] | null | null | null |
class credit_card(object):
def __init__(self, name, sec_code, code):
credit = 0
self.name = name
self.sec_code = sec_code
self.code = code
self.credit = float(credit)
def add_credi(self, credit):
self.credit += float(credit)
def remove_credi(self, credit):
self.credit -= float(credit)
def print_credit(self):
return self.credit
| 19.5
| 45
| 0.58042
| 53
| 429
| 4.490566
| 0.320755
| 0.252101
| 0.189076
| 0.264706
| 0.428571
| 0.327731
| 0.327731
| 0.327731
| 0
| 0
| 0
| 0.003436
| 0.321678
| 429
| 21
| 46
| 20.428571
| 0.814433
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.307692
| false
| 0
| 0
| 0.076923
| 0.461538
| 0.076923
| 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
7bd1ca53786e36591d2f20ba3ab3592593c9afcd
| 50
|
py
|
Python
|
hello.py
|
kinoshitadaisuke/helloworld
|
b661826793fbd079ad0b6743e71d725b1f22a739
|
[
"BSD-3-Clause"
] | null | null | null |
hello.py
|
kinoshitadaisuke/helloworld
|
b661826793fbd079ad0b6743e71d725b1f22a739
|
[
"BSD-3-Clause"
] | null | null | null |
hello.py
|
kinoshitadaisuke/helloworld
|
b661826793fbd079ad0b6743e71d725b1f22a739
|
[
"BSD-3-Clause"
] | null | null | null |
#!/usr/pkg/bin/python3.9
print ("hello, world!")
| 12.5
| 24
| 0.64
| 8
| 50
| 4
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.044444
| 0.1
| 50
| 3
| 25
| 16.666667
| 0.666667
| 0.46
| 0
| 0
| 0
| 0
| 0.5
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 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
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
7be754782634c2221bd61c3a2a9e78bcf4ccbaf7
| 112
|
py
|
Python
|
list01/ex12.py
|
FlavioBrusamolin/py-scripts
|
d80b9efc7fc1b59a5cf110180efc03cdc839cd23
|
[
"MIT"
] | null | null | null |
list01/ex12.py
|
FlavioBrusamolin/py-scripts
|
d80b9efc7fc1b59a5cf110180efc03cdc839cd23
|
[
"MIT"
] | null | null | null |
list01/ex12.py
|
FlavioBrusamolin/py-scripts
|
d80b9efc7fc1b59a5cf110180efc03cdc839cd23
|
[
"MIT"
] | null | null | null |
salary = float(input('Enter your salary: '))
print(f'Rise: {salary * 0.1 if salary > 1500 else salary * 0.15}')
| 37.333333
| 66
| 0.660714
| 19
| 112
| 3.894737
| 0.736842
| 0.189189
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.095745
| 0.160714
| 112
| 2
| 67
| 56
| 0.691489
| 0
| 0
| 0
| 0
| 0
| 0.669643
| 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
|
7bf16dc416113147fa62ceb8e14a9b9acc85a669
| 103
|
py
|
Python
|
test_SVN.py
|
krivolapov/Python_tips
|
fa4f979d0cd9bf05d1f355261856595c301433c5
|
[
"MIT"
] | null | null | null |
test_SVN.py
|
krivolapov/Python_tips
|
fa4f979d0cd9bf05d1f355261856595c301433c5
|
[
"MIT"
] | null | null | null |
test_SVN.py
|
krivolapov/Python_tips
|
fa4f979d0cd9bf05d1f355261856595c301433c5
|
[
"MIT"
] | null | null | null |
# -*- coding: utf-8 -*-
"""
Created on Fri Jun 19 13:42:26 2020
@author: makkri01
"""
print(test SVN)
| 12.875
| 35
| 0.61165
| 17
| 103
| 3.705882
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.178571
| 0.184466
| 103
| 8
| 36
| 12.875
| 0.571429
| 0.203884
| 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
|
d022166b2a37a8a9ff1ddc5feef05bf831d4e763
| 97
|
py
|
Python
|
main.py
|
Wally869/MusiStrata-Interpreter
|
20c55626aae31255796dd494441ad5b5f47367dc
|
[
"MIT"
] | null | null | null |
main.py
|
Wally869/MusiStrata-Interpreter
|
20c55626aae31255796dd494441ad5b5f47367dc
|
[
"MIT"
] | null | null | null |
main.py
|
Wally869/MusiStrata-Interpreter
|
20c55626aae31255796dd494441ad5b5f47367dc
|
[
"MIT"
] | null | null | null |
from CommandLine import MusiStrataCLI
if __name__ == "__main__":
MusiStrataCLI().cmdloop()
| 16.166667
| 37
| 0.742268
| 9
| 97
| 7.111111
| 0.888889
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.154639
| 97
| 6
| 38
| 16.166667
| 0.780488
| 0
| 0
| 0
| 0
| 0
| 0.083333
| 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
|
d032829fbf9451136f04799a89aaf2faaa387cfd
| 167
|
py
|
Python
|
pythonx/start_vdebug.py
|
jm009/vdebug
|
ff982623dc1d3c3df0f5c0de3f270c1c62a1820e
|
[
"MIT"
] | null | null | null |
pythonx/start_vdebug.py
|
jm009/vdebug
|
ff982623dc1d3c3df0f5c0de3f270c1c62a1820e
|
[
"MIT"
] | null | null | null |
pythonx/start_vdebug.py
|
jm009/vdebug
|
ff982623dc1d3c3df0f5c0de3f270c1c62a1820e
|
[
"MIT"
] | null | null | null |
import inspect
import os
import sys
directory = os.path.dirname(inspect.getfile(inspect.currentframe()))
sys.path.append(directory)
import vdebug.debugger_interface
| 18.555556
| 68
| 0.820359
| 22
| 167
| 6.181818
| 0.590909
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.083832
| 167
| 8
| 69
| 20.875
| 0.888889
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 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
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
d063912b4979082af80ce424c607daa71cdba5e1
| 604
|
py
|
Python
|
stimpy/stim.py
|
kclamar/stimpy
|
71cf458573444bb26d90fa56ed8f3ec69e31bf38
|
[
"MIT"
] | null | null | null |
stimpy/stim.py
|
kclamar/stimpy
|
71cf458573444bb26d90fa56ed8f3ec69e31bf38
|
[
"MIT"
] | null | null | null |
stimpy/stim.py
|
kclamar/stimpy
|
71cf458573444bb26d90fa56ed8f3ec69e31bf38
|
[
"MIT"
] | null | null | null |
from __future__ import annotations
from typing import Type
from psychopy import visual
class StimulusData:
"""Class for storing stimulus properties.
:param stimulus_type: Type of visual stimulus.
:param kwargs: Keyword arguments for the constructor of ``stimulus_type``.
"""
def __init__(self, stimulus_type: Type[visual.BaseVisualStim], **kwargs):
self.__stimulus_type = stimulus_type
self.__kwargs = kwargs
@property
def stimulus_type(self):
return self.__stimulus_type
@property
def kwargs(self):
return self.__kwargs.copy()
| 23.230769
| 78
| 0.705298
| 70
| 604
| 5.757143
| 0.4
| 0.208437
| 0.119107
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.218543
| 604
| 25
| 79
| 24.16
| 0.853814
| 0.266556
| 0
| 0.153846
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.230769
| false
| 0
| 0.230769
| 0.153846
| 0.692308
| 0
| 0
| 0
| 0
| null | 1
| 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
| 0
| 1
| 1
| 0
|
0
| 4
|
d06ba11699b82c5891be94a577b00c57d62b2eee
| 151
|
py
|
Python
|
environments/__init__.py
|
dogeplusplus/torch-actor-critic
|
c12f5a6845fe27cf0f2b231a88e7b6d9f5985960
|
[
"MIT"
] | null | null | null |
environments/__init__.py
|
dogeplusplus/torch-actor-critic
|
c12f5a6845fe27cf0f2b231a88e7b6d9f5985960
|
[
"MIT"
] | null | null | null |
environments/__init__.py
|
dogeplusplus/torch-actor-critic
|
c12f5a6845fe27cf0f2b231a88e7b6d9f5985960
|
[
"MIT"
] | null | null | null |
from gym.envs.registration import register
register(
id="DeepMindWallRunner-v0",
entry_point="environments.wall_runner:DeepMindWallRunner"
)
| 18.875
| 61
| 0.788079
| 16
| 151
| 7.3125
| 0.875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.007519
| 0.119205
| 151
| 7
| 62
| 21.571429
| 0.87218
| 0
| 0
| 0
| 0
| 0
| 0.423841
| 0.423841
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.2
| 0
| 0.2
| 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
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
d0abc32d7e553e9a165efd2bbc83498928ea0525
| 167
|
py
|
Python
|
src/chrome/server/mouseToJson.py
|
Ultra-Seven/StreamAssignments
|
ad22c7c2dea4b70c929e6c6fb20dd63acdf80a62
|
[
"MIT"
] | null | null | null |
src/chrome/server/mouseToJson.py
|
Ultra-Seven/StreamAssignments
|
ad22c7c2dea4b70c929e6c6fb20dd63acdf80a62
|
[
"MIT"
] | null | null | null |
src/chrome/server/mouseToJson.py
|
Ultra-Seven/StreamAssignments
|
ad22c7c2dea4b70c929e6c6fb20dd63acdf80a62
|
[
"MIT"
] | null | null | null |
#!/usr/bin/env python
# encoding: utf-8
import json
import bsddb3 as bsddb
db = bsddb.hashopen('mouse.bdb');
for key in db:
j = json.loads(db[key+""])
print j
| 18.555556
| 33
| 0.658683
| 29
| 167
| 3.793103
| 0.758621
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.014706
| 0.185629
| 167
| 8
| 34
| 20.875
| 0.794118
| 0.215569
| 0
| 0
| 0
| 0
| 0.069767
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0.333333
| null | null | 0.166667
| 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
|
d0accb0378d213385cfee39860314c5dd96a7716
| 97
|
py
|
Python
|
DataMatcher/apps.py
|
meowton/dataset-case
|
0c1f0c4a9778ab215e52223be2ae46fd6fa311c9
|
[
"MIT"
] | null | null | null |
DataMatcher/apps.py
|
meowton/dataset-case
|
0c1f0c4a9778ab215e52223be2ae46fd6fa311c9
|
[
"MIT"
] | 5
|
2021-03-30T13:57:32.000Z
|
2021-09-22T19:24:27.000Z
|
DataMatcher/apps.py
|
meowton/dataset-case
|
0c1f0c4a9778ab215e52223be2ae46fd6fa311c9
|
[
"MIT"
] | null | null | null |
from django.apps import AppConfig
class DatamatcherConfig(AppConfig):
name = 'DataMatcher'
| 16.166667
| 35
| 0.773196
| 10
| 97
| 7.5
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.154639
| 97
| 5
| 36
| 19.4
| 0.914634
| 0
| 0
| 0
| 0
| 0
| 0.113402
| 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
|
d0cb11bbb1ee96bd6b8701b5ee2ae0b9b08000f0
| 103
|
py
|
Python
|
carbonate/__init__.py
|
codacy-badger/carbonate3
|
20ff4684e68a04148023526c3f140b065041771b
|
[
"MIT"
] | null | null | null |
carbonate/__init__.py
|
codacy-badger/carbonate3
|
20ff4684e68a04148023526c3f140b065041771b
|
[
"MIT"
] | 1
|
2019-04-26T10:07:02.000Z
|
2019-04-26T10:07:02.000Z
|
carbonate/__init__.py
|
codacy-badger/carbonate3
|
20ff4684e68a04148023526c3f140b065041771b
|
[
"MIT"
] | 1
|
2019-03-11T15:36:07.000Z
|
2019-03-11T15:36:07.000Z
|
"""
Tools for managing a federated Carbon cluster.
"""
class CarbonateException(Exception):
pass
| 12.875
| 46
| 0.728155
| 11
| 103
| 6.818182
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.174757
| 103
| 7
| 47
| 14.714286
| 0.882353
| 0.446602
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.5
| 0
| 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
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
ef6e7d86ccc27db53adb061896dc4047821c6ef6
| 403
|
py
|
Python
|
xmake_tests/test_eval.py
|
andreycizov/python-xmake
|
e3bb0f82499453be761a4be46cb1670553dcaeee
|
[
"Apache-2.0"
] | null | null | null |
xmake_tests/test_eval.py
|
andreycizov/python-xmake
|
e3bb0f82499453be761a4be46cb1670553dcaeee
|
[
"Apache-2.0"
] | 1
|
2018-07-14T03:45:33.000Z
|
2018-07-14T03:52:13.000Z
|
xmake_tests/test_eval.py
|
andreycizov/python-xmake
|
e3bb0f82499453be761a4be46cb1670553dcaeee
|
[
"Apache-2.0"
] | null | null | null |
import unittest
from xmake.dsl import Eval, Con, Log
from xmake_tests.test_seq import executor
class TestEval(unittest.TestCase):
def test_eval(self):
self.assertEqual(5, executor(Eval(Con(2), Con(3), 'a + b')))
self.assertEqual(5, executor(Eval(Con(2), Con(3), lambda a, b: a + b)))
self.assertEqual(5, executor(Eval(Log(Eval(Con(2), Con(3), lambda a, b: Con(a + b))))))
| 33.583333
| 95
| 0.655087
| 66
| 403
| 3.954545
| 0.363636
| 0.038314
| 0.183908
| 0.275862
| 0.505747
| 0.505747
| 0.505747
| 0.383142
| 0.275862
| 0
| 0
| 0.027108
| 0.176179
| 403
| 11
| 96
| 36.636364
| 0.759036
| 0
| 0
| 0
| 0
| 0
| 0.012407
| 0
| 0
| 0
| 0
| 0
| 0.375
| 1
| 0.125
| false
| 0
| 0.375
| 0
| 0.625
| 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
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
ef7b9c6ae85dd2f6d2a30436239f9475432b491e
| 283
|
py
|
Python
|
ambra_sdk/service/entrypoints/patient.py
|
dicomgrid/sdk-python
|
bb12eed311bad73dfb863917df4dc5cbcd91a447
|
[
"Apache-2.0"
] | 9
|
2020-04-20T23:45:44.000Z
|
2021-04-18T11:22:17.000Z
|
ambra_sdk/service/entrypoints/patient.py
|
dicomgrid/sdk-python
|
bb12eed311bad73dfb863917df4dc5cbcd91a447
|
[
"Apache-2.0"
] | 13
|
2020-02-08T16:15:05.000Z
|
2021-09-13T22:55:28.000Z
|
ambra_sdk/service/entrypoints/patient.py
|
dicomgrid/sdk-python
|
bb12eed311bad73dfb863917df4dc5cbcd91a447
|
[
"Apache-2.0"
] | 6
|
2020-03-25T17:47:45.000Z
|
2021-04-18T11:22:19.000Z
|
from ambra_sdk.service.entrypoints.generated.patient import \
AsyncPatient as GAsyncPatient
from ambra_sdk.service.entrypoints.generated.patient import Patient as GPatient
class Patient(GPatient):
"""Patient."""
class AsyncPatient(GAsyncPatient):
"""AsyncPatient."""
| 23.583333
| 79
| 0.773852
| 30
| 283
| 7.233333
| 0.433333
| 0.082949
| 0.110599
| 0.175115
| 0.479263
| 0.479263
| 0.479263
| 0.479263
| 0
| 0
| 0
| 0
| 0.123675
| 283
| 11
| 80
| 25.727273
| 0.875
| 0.077739
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.4
| 0
| 0.8
| 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
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
ef907d3e7cc9ae597f191d0e648ea3e64d892947
| 95
|
py
|
Python
|
smarsy/enums.py
|
dkultasev/smarsy-py
|
951eb30408455b1f12b19557e56967930cfe2f66
|
[
"MIT"
] | null | null | null |
smarsy/enums.py
|
dkultasev/smarsy-py
|
951eb30408455b1f12b19557e56967930cfe2f66
|
[
"MIT"
] | 36
|
2020-04-02T06:28:16.000Z
|
2020-07-06T06:06:46.000Z
|
smarsy/enums.py
|
dkultasev/smarsy-py
|
951eb30408455b1f12b19557e56967930cfe2f66
|
[
"MIT"
] | 1
|
2020-03-28T12:28:04.000Z
|
2020-03-28T12:28:04.000Z
|
from enum import Enum
class Urls(Enum):
LOGIN = 'https://smarsy.ua/login.php?jsid=Login'
| 15.833333
| 52
| 0.694737
| 15
| 95
| 4.4
| 0.733333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.157895
| 95
| 5
| 53
| 19
| 0.825
| 0
| 0
| 0
| 0
| 0
| 0.4
| 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
|
efb9e4fee054974469ad24934841cad4347b568e
| 12,587
|
py
|
Python
|
api/source/test/python/datacube/api/test_query.py
|
alex-ip/agdc
|
9e9eb556c33792440a3736f64cd5f628cf3a1385
|
[
"BSD-3-Clause"
] | null | null | null |
api/source/test/python/datacube/api/test_query.py
|
alex-ip/agdc
|
9e9eb556c33792440a3736f64cd5f628cf3a1385
|
[
"BSD-3-Clause"
] | null | null | null |
api/source/test/python/datacube/api/test_query.py
|
alex-ip/agdc
|
9e9eb556c33792440a3736f64cd5f628cf3a1385
|
[
"BSD-3-Clause"
] | null | null | null |
#!/usr/bin/env python
# ===============================================================================
# Copyright (c) 2014 Geoscience Australia
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither Geoscience Australia nor the names of its contributors may be
# used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# ===============================================================================
__author__ = "Simon Oldfield"
import logging
from datacube.api import parse_date_min, parse_date_max, Satellite, DatasetType
from datacube.api.query import list_cells_as_list, list_tiles_as_list
from datacube.api.query import list_cells_vector_file_as_list
from datacube.api.query import MONTHS_BY_SEASON, Season
from datacube.api.query import LS7_SLC_OFF_EXCLUSION, LS7_SLC_OFF_ACQ_MIN
from datacube.api.query import LS8_PRE_WRS_2_EXCLUSION, LS8_PRE_WRS_2_ACQ_MAX
logging.basicConfig(level=logging.DEBUG, format='%(asctime)s %(levelname)s %(message)s')
_log = logging.getLogger()
TEST_CELL_X = 120
TEST_CELL_Y = -25
TEST_YEAR = 2005
TEST_YEAR_STR = str(TEST_YEAR)
TEST_MONTHS = MONTHS_BY_SEASON[Season.SUMMER]
TEST_VECTOR_FILE = "Mainlands.shp"
TEST_VECTOR_LAYER = 0
TEST_VECTOR_FEATURE = 4
def test_list_cells_120_020_2005_ls578(config=None):
cells = list_cells_as_list(x=[TEST_CELL_X], y=[TEST_CELL_Y],
acq_min=parse_date_min(TEST_YEAR_STR), acq_max=parse_date_max(TEST_YEAR_STR),
satellites=[Satellite.LS5, Satellite.LS7, Satellite.LS8],
dataset_types=[DatasetType.ARG25],
config=config)
assert(cells and len(list(cells)) > 0)
for cell in cells:
_log.info("Found cell xy = %s", cell.xy)
assert(cell.x == TEST_CELL_X and cell.y == TEST_CELL_Y and cell.xy == (TEST_CELL_X, TEST_CELL_Y))
def test_list_cells_120_020_2005_ls578_no_ls7_slc(config=None):
cells = list_cells_as_list(x=[TEST_CELL_X], y=[TEST_CELL_Y],
acq_min=parse_date_min(TEST_YEAR_STR),
acq_max=parse_date_max(TEST_YEAR_STR),
satellites=[Satellite.LS5, Satellite.LS7, Satellite.LS8],
dataset_types=[DatasetType.ARG25],
exclude=[LS7_SLC_OFF_EXCLUSION],
config=config)
assert(cells and len(list(cells)) > 0)
for cell in cells:
_log.info("Found cell xy = %s", cell.xy)
assert(cell.x == TEST_CELL_X and cell.y == TEST_CELL_Y and cell.xy == (TEST_CELL_X, TEST_CELL_Y))
def test_list_cells_120_020_2005_ls578_no_ls8_pre_wrs_2(config=None):
cells = list_cells_as_list(x=[TEST_CELL_X], y=[TEST_CELL_Y],
acq_min=parse_date_min(TEST_YEAR_STR), acq_max=parse_date_max(TEST_YEAR_STR),
satellites=[Satellite.LS5, Satellite.LS7, Satellite.LS8],
dataset_types=[DatasetType.ARG25],
exclude=[LS8_PRE_WRS_2_EXCLUSION],
config=config)
assert(cells and len(list(cells)) > 0)
for cell in cells:
_log.info("Found cell xy = %s", cell.xy)
assert(cell.x == TEST_CELL_X and cell.y == TEST_CELL_Y and cell.xy == (TEST_CELL_X, TEST_CELL_Y))
def test_list_cells_120_020_2005_ls578_summer(config=None):
cells = list_cells_as_list(x=[TEST_CELL_X], y=[TEST_CELL_Y],
acq_min=parse_date_min(TEST_YEAR_STR), acq_max=parse_date_max(TEST_YEAR_STR),
satellites=[Satellite.LS5, Satellite.LS7, Satellite.LS8],
dataset_types=[DatasetType.ARG25],
months=TEST_MONTHS,
config=config)
assert(cells and len(list(cells)) > 0)
for cell in cells:
_log.info("Found cell xy = %s", cell.xy)
assert(cell.x == TEST_CELL_X and cell.y == TEST_CELL_Y and cell.xy == (TEST_CELL_X, TEST_CELL_Y))
def test_list_tiles_120_020_2005_ls578(config=None):
dataset_types = [DatasetType.ARG25, DatasetType.PQ25, DatasetType.FC25]
tiles = list_tiles_as_list(x=[TEST_CELL_X], y=[TEST_CELL_Y],
acq_min=parse_date_min(TEST_YEAR_STR), acq_max=parse_date_max(TEST_YEAR_STR),
satellites=[Satellite.LS5, Satellite.LS7, Satellite.LS8],
dataset_types=dataset_types,
config=config)
assert(tiles and len(list(tiles)) > 0)
for tile in tiles:
_log.info("Found tile xy = %s", tile.xy)
assert(tile.x == TEST_CELL_X and tile.y == TEST_CELL_Y and tile.xy == (TEST_CELL_X, TEST_CELL_Y)
and tile.end_datetime_year == TEST_YEAR
and ds in tile.datasets for ds in dataset_types)
def test_list_tiles_120_020_2005_ls578_no_ls7_slc(config=None):
dataset_types = [DatasetType.ARG25, DatasetType.PQ25, DatasetType.FC25]
tiles = list_tiles_as_list(x=[TEST_CELL_X], y=[TEST_CELL_Y],
acq_min=parse_date_min(TEST_YEAR_STR),
acq_max=parse_date_max(TEST_YEAR_STR),
satellites=[Satellite.LS5, Satellite.LS7, Satellite.LS8],
dataset_types=dataset_types,
exclude=[LS7_SLC_OFF_EXCLUSION],
config=config)
assert(tiles and len(list(tiles)) > 0)
for tile in tiles:
_log.info("Found tile xy = %s", tile.xy)
dataset = tile.datasets[DatasetType.ARG25]
assert dataset
_log.info("Found ARG25 dataset [%s]", dataset.path)
assert(tile.x == TEST_CELL_X and tile.y == TEST_CELL_Y and tile.xy == (TEST_CELL_X, TEST_CELL_Y)
and tile.end_datetime_year == TEST_YEAR
and (ds in tile.datasets for ds in dataset_types)
and (dataset.satellite != Satellite.LS7 or tile.end_datetime.date() <= LS7_SLC_OFF_ACQ_MIN))
def test_list_tiles_120_020_2005_ls578_no_ls8_pre_wrs_2(config=None):
dataset_types = [DatasetType.ARG25, DatasetType.PQ25, DatasetType.FC25]
tiles = list_tiles_as_list(x=[TEST_CELL_X], y=[TEST_CELL_Y],
acq_min=parse_date_min(TEST_YEAR_STR),
acq_max=parse_date_max(TEST_YEAR_STR),
satellites=[Satellite.LS5, Satellite.LS7, Satellite.LS8],
dataset_types=dataset_types,
exclude=[LS8_PRE_WRS_2_EXCLUSION],
config=config)
assert(tiles and len(list(tiles)) > 0)
for tile in tiles:
_log.info("Found tile xy = %s", tile.xy)
dataset = tile.datasets[DatasetType.ARG25]
assert dataset
_log.info("Found ARG25 dataset [%s]", dataset.path)
assert(tile.x == TEST_CELL_X and tile.y == TEST_CELL_Y and tile.xy == (TEST_CELL_X, TEST_CELL_Y)
and tile.end_datetime_year == TEST_YEAR
and (ds in tile.datasets for ds in dataset_types)
and (dataset.satellite != Satellite.LS8 or tile.end_datetime.date() >= LS8_PRE_WRS_2_ACQ_MAX))
def test_list_tiles_120_020_2005_ls578_summer(config=None):
dataset_types = [DatasetType.ARG25, DatasetType.PQ25, DatasetType.FC25]
tiles = list_tiles_as_list(x=[TEST_CELL_X], y=[TEST_CELL_Y],
acq_min=parse_date_min(TEST_YEAR_STR),
acq_max=parse_date_max(TEST_YEAR_STR),
satellites=[Satellite.LS5, Satellite.LS7, Satellite.LS8],
dataset_types=dataset_types,
months=TEST_MONTHS,
config=config)
assert(tiles and len(list(tiles)) > 0)
for tile in tiles:
_log.info("Found tile xy = %s", tile.xy)
assert(tile.x == TEST_CELL_X and tile.y == TEST_CELL_Y and tile.xy == (TEST_CELL_X, TEST_CELL_Y)
and tile.end_datetime_year == TEST_YEAR
and (ds in tile.datasets for ds in dataset_types)
and tile.end_datetime_month in [m.value for m in TEST_MONTHS])
# AOI
def test_list_cells_act_2005_ls578(config=None):
cells = list_cells_vector_file_as_list(vector_file=TEST_VECTOR_FILE,
vector_layer=TEST_VECTOR_LAYER,
vector_feature=TEST_VECTOR_FEATURE,
satellites=[Satellite.LS5, Satellite.LS7, Satellite.LS8],
acq_min=parse_date_min(TEST_YEAR_STR),
acq_max=parse_date_max(TEST_YEAR_STR),
dataset_types=[DatasetType.ARG25], config=None)
assert(cells and len(list(cells)) == 2)
for cell in cells:
_log.info("Found cell xy = %s", cell.xy)
assert((cell.x == 148 or cell.x == 149) and cell.y == -36)
# def test_list_tiles_act_2005_ls578(config=None):
#
# dataset_types = [DatasetType.ARG25, DatasetType.PQ25, DatasetType.FC25]
#
# tiles = list_tiles_vector_file_as_list(vector_file="Mainlands.shp", vector_layer=0, vector_feature=4,
# acq_min=parse_date_min("2005"), acq_max=parse_date_max("2005"),
# satellites=[Satellite.LS5, Satellite.LS7, Satellite.LS8],
# dataset_types=dataset_types,
# config=config)
#
# assert(tiles and len(list(tiles)) > 0)
#
# for tile in tiles:
# _log.info("Found tile xy = %s", tile.xy)
# assert((tile.x == 148 or tile.x == 149) and tile.y == -36
# and tile.end_datetime_year == 2005
# and (ds in tile.datasets for ds in dataset_types)
# and tile.end_datetime_month in [m.value for m in MONTHS_BY_SEASON[Season.SUMMER]])
# def test_list_tiles_act_2005_ls578_summer(config=None):
#
# dataset_types = [DatasetType.ARG25, DatasetType.PQ25, DatasetType.FC25]
#
# tiles = list_tiles_vector_file_as_list(vector_file="Mainlands.shp", vector_layer=0, vector_feature=4,
# acq_min=parse_date_min("2005"), acq_max=parse_date_max("2005"),
# satellites=[Satellite.LS5, Satellite.LS7, Satellite.LS8],
# dataset_types=dataset_types,
# months=MONTHS_BY_SEASON[Season.SUMMER],
# config=config)
#
# assert(tiles and len(list(tiles)) > 0)
#
# for tile in tiles:
# _log.info("Found tile xy = %s", tile.xy)
# assert((tile.x == 148 or tile.x == 149) and tile.y == -36
# and tile.end_datetime_year == 2005
# and (ds in tile.datasets for ds in dataset_types)
# and tile.end_datetime_month in [m.value for m in MONTHS_BY_SEASON[Season.SUMMER]])
| 45.440433
| 109
| 0.609279
| 1,653
| 12,587
| 4.344828
| 0.128857
| 0.055695
| 0.031328
| 0.022278
| 0.786967
| 0.755221
| 0.730437
| 0.698273
| 0.686856
| 0.675578
| 0
| 0.035066
| 0.290856
| 12,587
| 276
| 110
| 45.605072
| 0.76955
| 0.294987
| 0
| 0.737589
| 0
| 0
| 0.031108
| 0
| 0
| 0
| 0
| 0
| 0.141844
| 1
| 0.06383
| false
| 0
| 0.049645
| 0
| 0.113475
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 1
| 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
|
efcd3eaa31581622b0beb036ea7800bebd1952fe
| 50
|
py
|
Python
|
smolpy/__init__.py
|
jcrist/smolpy
|
59069c15ddffcdd5be4e6e46bfdbe7203e1a9fd1
|
[
"BSD-3-Clause"
] | 1
|
2021-09-27T16:52:16.000Z
|
2021-09-27T16:52:16.000Z
|
smolpy/__init__.py
|
jcrist/smolpy
|
59069c15ddffcdd5be4e6e46bfdbe7203e1a9fd1
|
[
"BSD-3-Clause"
] | null | null | null |
smolpy/__init__.py
|
jcrist/smolpy
|
59069c15ddffcdd5be4e6e46bfdbe7203e1a9fd1
|
[
"BSD-3-Clause"
] | null | null | null |
from .vm import VM
from .function import Function
| 16.666667
| 30
| 0.8
| 8
| 50
| 5
| 0.5
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.16
| 50
| 2
| 31
| 25
| 0.952381
| 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
|
efd986962135efbd7d804e871d22afcc4330d114
| 583
|
py
|
Python
|
gosling/tests/test_data.py
|
gosling-lang/gos
|
0099d51e03b1e27aba5fa7554770eb27078716ed
|
[
"MIT"
] | 32
|
2021-09-08T18:18:49.000Z
|
2022-02-22T00:27:02.000Z
|
gosling/tests/test_data.py
|
gosling-lang/gos
|
0099d51e03b1e27aba5fa7554770eb27078716ed
|
[
"MIT"
] | 18
|
2021-09-08T16:18:09.000Z
|
2022-03-25T19:25:28.000Z
|
gosling/tests/test_data.py
|
manzt/ipygosling
|
0099d51e03b1e27aba5fa7554770eb27078716ed
|
[
"MIT"
] | 2
|
2022-02-18T13:43:55.000Z
|
2022-03-11T17:49:41.000Z
|
import gosling.data as data
def test_data():
url = "http://localhost:8080/data.csv"
assert data.csv(url) == {"type": "csv", "url": url}
assert data.bigwig(url) == {"type": "bigwig", "url": url}
assert data.beddb(url) == {"type": "beddb", "url": url}
assert data.vector(url) == {"type": "vector", "url": url}
assert data.multivec(url) == {"type": "multivec", "url": url}
assert data.bam(url, indexUrl=url) == {"type": "bam", "url": url, "indexUrl": url}
values = [{"x": 1, "y": 2}]
assert data.json(values) == {"type": "json", "values": values}
| 38.866667
| 86
| 0.572899
| 79
| 583
| 4.21519
| 0.316456
| 0.21021
| 0.18018
| 0.24024
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.012579
| 0.181818
| 583
| 14
| 87
| 41.642857
| 0.685535
| 0
| 0
| 0
| 0
| 0
| 0.217839
| 0
| 0
| 0
| 0
| 0
| 0.636364
| 1
| 0.090909
| false
| 0
| 0.090909
| 0
| 0.181818
| 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
|
efd9eacca7045bce73b5eb8e51c7e644767af735
| 46
|
py
|
Python
|
permute.py
|
itsmesatwik/LeetCodeSolutions
|
c1901c75ce2c277b92338c6ba645d3e7f85fac79
|
[
"MIT"
] | null | null | null |
permute.py
|
itsmesatwik/LeetCodeSolutions
|
c1901c75ce2c277b92338c6ba645d3e7f85fac79
|
[
"MIT"
] | null | null | null |
permute.py
|
itsmesatwik/LeetCodeSolutions
|
c1901c75ce2c277b92338c6ba645d3e7f85fac79
|
[
"MIT"
] | null | null | null |
class Solution:
def permute(self, nums):
| 11.5
| 28
| 0.673913
| 6
| 46
| 5.166667
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.217391
| 46
| 3
| 29
| 15.333333
| 0.861111
| 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
|
effb0643628b77648edfd999db4785e123c29d45
| 331
|
py
|
Python
|
Algorithms/Python/is-this-a-triangle.py
|
KhushMody/Ds-Algo-HacktoberFest
|
2cb5bdcfcdcb87b67ee31941cc9afc466507a05b
|
[
"MIT"
] | 12
|
2020-10-04T06:48:29.000Z
|
2021-02-16T17:54:04.000Z
|
Algorithms/Python/is-this-a-triangle.py
|
akshita-sharma8609/Ds-Algo-HacktoberFest-1
|
03f228c31b363648fa87d27a120e7d352009b08c
|
[
"MIT"
] | 14
|
2020-10-04T09:09:52.000Z
|
2021-10-16T19:59:23.000Z
|
Algorithms/Python/is-this-a-triangle.py
|
akshita-sharma8609/Ds-Algo-HacktoberFest-1
|
03f228c31b363648fa87d27a120e7d352009b08c
|
[
"MIT"
] | 55
|
2020-10-04T03:09:25.000Z
|
2021-10-16T09:00:12.000Z
|
# Implement a method tht accepts 3 integer values "a, b and c".
# The method should return True if a triangle can be built with the sides of given length and False in any other case.
# All triangles must have surface greater than 0 to be accepted
def is_triangle(a, b, c):
return True if a+b>c and a+c>b and c+b>a else False
| 47.285714
| 118
| 0.734139
| 68
| 331
| 3.558824
| 0.632353
| 0.024793
| 0.041322
| 0.107438
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.007634
| 0.208459
| 331
| 6
| 119
| 55.166667
| 0.916031
| 0.728097
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.5
| false
| 0
| 0
| 0.5
| 1
| 0
| 0
| 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
| 1
| 1
| 0
|
0
| 4
|
effc7bdcf3792c7ddbbc3cd3e12700b423c25a6e
| 1,861
|
py
|
Python
|
djautotask/migrations/0076_auto_20200923_0953.py
|
KerkhoffTechnologies/django-autotask
|
458ff0bf65e3ca85fb954f907f05c4c614904afc
|
[
"MIT"
] | 4
|
2019-04-18T17:12:07.000Z
|
2021-12-30T21:42:10.000Z
|
djautotask/migrations/0076_auto_20200923_0953.py
|
KerkhoffTechnologies/django-autotask
|
458ff0bf65e3ca85fb954f907f05c4c614904afc
|
[
"MIT"
] | 32
|
2018-05-30T20:31:22.000Z
|
2022-02-17T21:36:50.000Z
|
djautotask/migrations/0076_auto_20200923_0953.py
|
KerkhoffTechnologies/django-autotask
|
458ff0bf65e3ca85fb954f907f05c4c614904afc
|
[
"MIT"
] | 5
|
2018-05-25T23:33:45.000Z
|
2022-01-04T22:01:46.000Z
|
# Generated by Django 3.1 on 2020-09-23 09:53
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('djautotask', '0075_taskpredecessor'),
]
operations = [
migrations.AlterModelOptions(
name='allocationcode',
options={'get_latest_by': 'modified'},
),
migrations.AlterModelOptions(
name='servicecall',
options={'get_latest_by': 'modified'},
),
migrations.AlterModelOptions(
name='servicecalltask',
options={'get_latest_by': 'modified'},
),
migrations.AlterModelOptions(
name='servicecalltaskresource',
options={'get_latest_by': 'modified'},
),
migrations.AlterModelOptions(
name='servicecallticket',
options={'get_latest_by': 'modified'},
),
migrations.AlterModelOptions(
name='servicecallticketresource',
options={'get_latest_by': 'modified'},
),
migrations.AlterModelOptions(
name='task',
options={'get_latest_by': 'modified'},
),
migrations.AlterModelOptions(
name='tasknote',
options={'get_latest_by': 'modified'},
),
migrations.AlterModelOptions(
name='taskpredecessor',
options={'get_latest_by': 'modified'},
),
migrations.AlterModelOptions(
name='tasksecondaryresource',
options={'get_latest_by': 'modified'},
),
migrations.AlterModelOptions(
name='ticketnote',
options={'get_latest_by': 'modified'},
),
migrations.AlterModelOptions(
name='ticketsecondaryresource',
options={'get_latest_by': 'modified'},
),
]
| 30.016129
| 50
| 0.558839
| 133
| 1,861
| 7.631579
| 0.285714
| 0.319212
| 0.366502
| 0.212808
| 0.64335
| 0.617734
| 0.617734
| 0.617734
| 0
| 0
| 0
| 0.014196
| 0.318646
| 1,861
| 61
| 51
| 30.508197
| 0.786278
| 0.023106
| 0
| 0.654545
| 1
| 0
| 0.257709
| 0.050661
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.018182
| 0
| 0.072727
| 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
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
560148da63e9c3794cccdc2a118830f3df08b3f1
| 215
|
py
|
Python
|
Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-003/ph-3.11-arithmetic-with-int-f.py
|
shihab4t/Books-Code
|
b637b6b2ad42e11faf87d29047311160fe3b2490
|
[
"Unlicense"
] | null | null | null |
Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-003/ph-3.11-arithmetic-with-int-f.py
|
shihab4t/Books-Code
|
b637b6b2ad42e11faf87d29047311160fe3b2490
|
[
"Unlicense"
] | null | null | null |
Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-003/ph-3.11-arithmetic-with-int-f.py
|
shihab4t/Books-Code
|
b637b6b2ad42e11faf87d29047311160fe3b2490
|
[
"Unlicense"
] | null | null | null |
number1 = input("Please enter a number and press enter: ")
number2 = input("Please enter another nunber and press enter ")
number1 = int(number1)
number2 = int(number2)
print("number1 + number2 =", number1+number2)
| 35.833333
| 63
| 0.739535
| 29
| 215
| 5.482759
| 0.448276
| 0.264151
| 0.201258
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.054348
| 0.144186
| 215
| 5
| 64
| 43
| 0.809783
| 0
| 0
| 0
| 0
| 0
| 0.474419
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.2
| 1
| 0
| 0
| null | 1
| 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
| 0
| 0
| 0
| 0
|
0
| 4
|
4bef395f449e8d9f7a63fdd937179279360b0412
| 92
|
py
|
Python
|
ABC051/A.py
|
shimomura314/AtcoderCodes
|
db1d62a7715f5f1b3c40eceff8d34f0f34839f41
|
[
"MIT"
] | null | null | null |
ABC051/A.py
|
shimomura314/AtcoderCodes
|
db1d62a7715f5f1b3c40eceff8d34f0f34839f41
|
[
"MIT"
] | null | null | null |
ABC051/A.py
|
shimomura314/AtcoderCodes
|
db1d62a7715f5f1b3c40eceff8d34f0f34839f41
|
[
"MIT"
] | null | null | null |
s = list(input())
a = "".join(s[:5])
b = "".join(s[6:13])
c = "".join(s[14:21])
print(a,b,c)
| 18.4
| 21
| 0.478261
| 21
| 92
| 2.095238
| 0.619048
| 0.340909
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.1
| 0.130435
| 92
| 5
| 22
| 18.4
| 0.45
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.2
| 1
| 0
| 0
| null | 1
| 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
|
4bf68071db62dacf3ae103ff9ec823fad28349e8
| 569
|
py
|
Python
|
tests/fixtures/building_blocks/halogen.py
|
fiszczyp/stk
|
56e75c493a472d98ccbf3af14cc9ce7f12cbe3d7
|
[
"MIT"
] | null | null | null |
tests/fixtures/building_blocks/halogen.py
|
fiszczyp/stk
|
56e75c493a472d98ccbf3af14cc9ce7f12cbe3d7
|
[
"MIT"
] | null | null | null |
tests/fixtures/building_blocks/halogen.py
|
fiszczyp/stk
|
56e75c493a472d98ccbf3af14cc9ce7f12cbe3d7
|
[
"MIT"
] | null | null | null |
import pytest
import stk
@pytest.fixture(scope='function')
def tmp_bromine2():
return stk.BuildingBlock('[Br]CCC[Br]', ['bromine'])
@pytest.fixture(scope='function')
def tmp_bromine2_alt1():
return stk.BuildingBlock('[Br]CNC[Br]', ['bromine'])
@pytest.fixture(scope='session')
def difluorene2():
return stk.BuildingBlock('Fc1c(F)cc(F)c(F)c1', ['difluorene'])
@pytest.fixture(scope='session')
def difluorene_dibromine():
return stk.BuildingBlock(
smiles='Fc1c(F)cc(Br)c(Br)c1',
functional_groups=['difluorene', 'dibromine']
)
| 21.884615
| 66
| 0.683656
| 72
| 569
| 5.333333
| 0.388889
| 0.135417
| 0.1875
| 0.135417
| 0.401042
| 0.208333
| 0.208333
| 0
| 0
| 0
| 0
| 0.016194
| 0.13181
| 569
| 25
| 67
| 22.76
| 0.761134
| 0
| 0
| 0.235294
| 0
| 0
| 0.233743
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.235294
| true
| 0
| 0.117647
| 0.235294
| 0.588235
| 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
| 1
| 0
| 0
| 1
| 0
| 0
|
0
| 4
|
ef0452957d6b233a8573b34db28cd11058064799
| 7,761
|
py
|
Python
|
output_raw/output_input_Lx2Ly5.py
|
ryuikaneko/itps_contraction
|
10816fb6c90d77f5a3b2f804ab22573d1d676eb4
|
[
"MIT"
] | 1
|
2019-12-19T05:03:37.000Z
|
2019-12-19T05:03:37.000Z
|
output_raw/output_input_Lx2Ly5.py
|
ryuikaneko/itps_contraction
|
10816fb6c90d77f5a3b2f804ab22573d1d676eb4
|
[
"MIT"
] | null | null | null |
output_raw/output_input_Lx2Ly5.py
|
ryuikaneko/itps_contraction
|
10816fb6c90d77f5a3b2f804ab22573d1d676eb4
|
[
"MIT"
] | null | null | null |
def Contract_scalar_2x5(\
t0_6,t1_6,t2_6,t3_6,\
t0_5,t1_5,t2_5,t3_5,\
t0_4,t1_4,t2_4,t3_4,\
t0_3,t1_3,t2_3,t3_3,\
t0_2,t1_2,t2_2,t3_2,\
t0_1,t1_1,t2_1,t3_1,\
t0_0,t1_0,t2_0,t3_0,\
o1_5,o2_5,\
o1_4,o2_4,\
o1_3,o2_3,\
o1_2,o2_2,\
o1_1,o2_1\
):
##############################
# ./input/input_Lx2Ly5.dat
##############################
# (o1_2*(t1_2*((t0_2*((t1_1*((t1_1.conj()*o1_1)*(t1_0*(t0_0*t0_1))))*(t2_1*((o2_1*t2_1.conj())*(t2_0*(t3_0*t3_1))))))*(t1_2.conj()*(t2_2.conj()*((o2_2*t2_2)*(t3_2*(t0_3*(t1_3.conj()*((t1_3*o1_3)*(t2_3*((t2_3.conj()*o2_3)*(t3_3*(t0_4*(t1_4*((t1_4.conj()*o1_4)*(t2_4*((t2_4.conj()*o2_4)*(t3_4*((t2_5*((o2_5*t2_5.conj())*(t2_6*(t3_6*t3_5))))*(t1_5.conj()*((o1_5*t1_5)*(t0_5*(t0_6*t1_6))))))))))))))))))))))))
# cpu_cost= 3.22004e+13 memory= 4.00042e+10
# final_bond_order ()
##############################
return np.tensordot(
o1_2, np.tensordot(
t1_2, np.tensordot(
np.tensordot(
t0_2, np.tensordot(
np.tensordot(
t1_1, np.tensordot(
np.tensordot(
t1_1.conj(), o1_1, ([4], [1])
), np.tensordot(
t1_0, np.tensordot(
t0_0, t0_1, ([1], [0])
), ([1], [0])
), ([0, 3], [5, 2])
), ([0, 3, 4], [6, 4, 2])
), np.tensordot(
t2_1, np.tensordot(
np.tensordot(
o2_1, t2_1.conj(), ([1], [4])
), np.tensordot(
t2_0, np.tensordot(
t3_0, t3_1, ([0], [1])
), ([0], [0])
), ([3, 4], [5, 2])
), ([2, 3, 4], [6, 4, 0])
), ([1, 3, 4], [0, 2, 4])
), ([0], [2])
), np.tensordot(
t1_2.conj(), np.tensordot(
t2_2.conj(), np.tensordot(
np.tensordot(
o2_2, t2_2, ([0], [4])
), np.tensordot(
t3_2, np.tensordot(
t0_3, np.tensordot(
t1_3.conj(), np.tensordot(
np.tensordot(
t1_3, o1_3, ([4], [0])
), np.tensordot(
t2_3, np.tensordot(
np.tensordot(
t2_3.conj(), o2_3, ([4], [1])
), np.tensordot(
t3_3, np.tensordot(
t0_4, np.tensordot(
t1_4, np.tensordot(
np.tensordot(
t1_4.conj(), o1_4, ([4], [1])
), np.tensordot(
t2_4, np.tensordot(
np.tensordot(
t2_4.conj(), o2_4, ([4], [1])
), np.tensordot(
t3_4, np.tensordot(
np.tensordot(
t2_5, np.tensordot(
np.tensordot(
o2_5, t2_5.conj(), ([1], [4])
), np.tensordot(
t2_6, np.tensordot(
t3_6, t3_5, ([1], [0])
), ([1], [0])
), ([2, 3], [2, 5])
), ([1, 2, 4], [4, 6, 0])
), np.tensordot(
t1_5.conj(), np.tensordot(
np.tensordot(
o1_5, t1_5, ([0], [4])
), np.tensordot(
t0_5, np.tensordot(
t0_6, t1_6, ([1], [0])
), ([1], [0])
), ([1, 2], [1, 4])
), ([0, 1, 4], [4, 6, 0])
), ([0, 2, 4], [2, 0, 5])
), ([0], [2])
), ([1, 2], [4, 2])
), ([1, 2, 4], [5, 4, 2])
), ([1, 2], [5, 2])
), ([1, 2, 4], [7, 3, 2])
), ([1, 2, 3], [7, 0, 2])
), ([0], [5])
), ([1, 2], [7, 2])
), ([1, 2, 4], [8, 4, 2])
), ([1, 2], [6, 0])
), ([1, 2, 4], [8, 4, 2])
), ([1, 2, 3], [7, 2, 0])
), ([0], [5])
), ([2, 3], [6, 1])
), ([1, 2, 4], [8, 4, 0])
), ([1, 2], [6, 0])
), ([0, 2, 4, 5, 6, 7], [7, 0, 1, 5, 3, 6])
), ([0, 1, 2, 3], [0, 4, 3, 1])
), ([0, 1], [0, 1])
)
| 66.333333
| 409
| 0.182064
| 587
| 7,761
| 2.168654
| 0.061329
| 0.406127
| 0.122545
| 0.207384
| 0.464258
| 0.14454
| 0.012569
| 0.012569
| 0
| 0
| 0
| 0.194479
| 0.687283
| 7,761
| 116
| 410
| 66.905172
| 0.330037
| 0.063265
| 0
| 0.321101
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.009174
| false
| 0
| 0
| 0.009174
| 0.018349
| 0
| 0
| 0
| 0
| null | 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 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
|
ef04da6ae79f6d50a083652d22ff6a8153543c78
| 166
|
py
|
Python
|
iso8601utils/__init__.py
|
movermeyer/iso8601utils
|
6e101dfa0b69b8387f733681da7b2595df621d4d
|
[
"BSD-4-Clause"
] | 4
|
2017-07-10T09:21:18.000Z
|
2019-08-20T02:38:27.000Z
|
iso8601utils/__init__.py
|
movermeyer/iso8601utils
|
6e101dfa0b69b8387f733681da7b2595df621d4d
|
[
"BSD-4-Clause"
] | 5
|
2017-02-20T20:24:46.000Z
|
2021-10-16T16:29:12.000Z
|
iso8601utils/__init__.py
|
movermeyer/iso8601utils
|
6e101dfa0b69b8387f733681da7b2595df621d4d
|
[
"BSD-4-Clause"
] | 3
|
2018-10-19T08:27:55.000Z
|
2021-06-26T19:46:36.000Z
|
from iso8601utils.interval import interval
from iso8601utils.duration import duration
__all__ = ['interval', 'duration', 'parsers', 'validators']
__version__='0.1.2'
| 33.2
| 59
| 0.783133
| 19
| 166
| 6.421053
| 0.631579
| 0.262295
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.072848
| 0.090361
| 166
| 5
| 60
| 33.2
| 0.735099
| 0
| 0
| 0
| 0
| 0
| 0.227545
| 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
|
ef228858a73731b6954f5f9f5c8097f3baf7f877
| 4,135
|
py
|
Python
|
Projeto_02/Forca.py
|
Evandro02/Evandro_All_Projects
|
1b1632a703f866153007fa53388362ae97bd1781
|
[
"MIT"
] | null | null | null |
Projeto_02/Forca.py
|
Evandro02/Evandro_All_Projects
|
1b1632a703f866153007fa53388362ae97bd1781
|
[
"MIT"
] | null | null | null |
Projeto_02/Forca.py
|
Evandro02/Evandro_All_Projects
|
1b1632a703f866153007fa53388362ae97bd1781
|
[
"MIT"
] | null | null | null |
import random
def Abertura_do_jogo():
print('\n*************************************')
print(' Bem vindo no jogo da Forca! ')
print('*************************************\n')
def Inserir_palavaras():
arquivo = open("Palavras.txt","r")
listas_Palavras = []
for linha in arquivo:
linha = linha.strip()
listas_Palavras.append(linha)
arquivo.close()
numero = random.randrange(0,len(listas_Palavras))
palavra_secreta = listas_Palavras[numero].upper()
return palavra_secreta
def Mensagem_final(acertou, palavra_secreta):
if(acertou):
print("Parabéns, você ganhou!")
print(" ___________ ")
print(" '._==_==_=_.' ")
print(" .-\\: /-. ")
print(" | (|:. |) | ")
print(" '-|:. |-' ")
print(" \\::. / ")
print(" '::. .' ")
print(" ) ( ")
print(" _.' '._ ")
print(" '-------' ")
else:
print("Puxa, você foi enforcado!")
print("A palavra era {}".format(palavra_secreta))
print(" _______________ ")
print(" / \ ")
print(" / \ ")
print("// \/\ ")
print("\| XXXX XXXX | / ")
print(" | XXXX XXXX |/ ")
print(" | XXX XXX | ")
print(" | | ")
print(" \__ XXX __/ ")
print(" |\ XXX /| ")
print(" | | | | ")
print(" | I I I I I I I | ")
print(" | I I I I I I | ")
print(" \_ _/ ")
print(" \_ _/ ")
print(" \_______/ ")
def desenha_forca(erros):
print(" _______ ")
print(" |/ | ")
if(erros == 1):
print(" | (_) ")
print(" | ")
print(" | ")
print(" | ")
if(erros == 2):
print(" | (_) ")
print(" | \ ")
print(" | ")
print(" | ")
if(erros == 3):
print(" | (_) ")
print(" | \| ")
print(" | ")
print(" | ")
if(erros == 4):
print(" | (_) ")
print(" | \|/ ")
print(" | ")
print(" | ")
if(erros == 5):
print(" | (_) ")
print(" | \|/ ")
print(" | | ")
print(" | ")
if(erros == 6):
print(" | (_) ")
print(" | \|/ ")
print(" | | ")
print(" | / ")
if (erros == 7):
print(" | (_) ")
print(" | \|/ ")
print(" | | ")
print(" | / \ ")
print(" | ")
print("_|___ ")
print()
def main():
Abertura_do_jogo()
palavra_secreta = Inserir_palavaras()
enforcou = False
acertou = False
tentativas = 0
letras_acertadas = ['_' for letra in palavra_secreta]
print(letras_acertadas)
while(not enforcou and not acertou):
chute = input('Qual letra? ')
chute = chute.strip().upper()
if(chute in palavra_secreta):
index = 0
for letra in palavra_secreta:
if (chute.upper() == letra.upper()):
letras_acertadas [index] = letra
index += 1
else:
tentativas += 1
desenha_forca(tentativas)
enforcou = tentativas == 7
acertou = '_' not in letras_acertadas
print(letras_acertadas)
Mensagem_final(acertou, palavra_secreta)
print('\nGAME OVER')
if(__name__ == "__main__"):
main()
| 29.326241
| 59
| 0.344377
| 277
| 4,135
| 4.768953
| 0.281588
| 0.317941
| 0.329296
| 0.287661
| 0.314913
| 0.208176
| 0.085541
| 0.03785
| 0.03785
| 0
| 0
| 0.006164
| 0.489964
| 4,135
| 141
| 60
| 29.326241
| 0.620199
| 0
| 0
| 0.295652
| 0
| 0
| 0.337337
| 0.01952
| 0
| 0
| 0
| 0
| 0
| 1
| 0.043478
| false
| 0
| 0.008696
| 0
| 0.06087
| 0.591304
| 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
| 0
| 1
|
0
| 4
|
ef2c930025a12e7a5418403b15f69b0346bfc0a3
| 3,780
|
py
|
Python
|
preds/playerpreds.py
|
chulchultrain/FriendLeague
|
bf754f2c5e5a1e559a38f8b4617c87d6fb5f26ac
|
[
"MIT"
] | 1
|
2020-01-02T05:46:42.000Z
|
2020-01-02T05:46:42.000Z
|
preds/playerpreds.py
|
chulchultrain/FriendLeague
|
bf754f2c5e5a1e559a38f8b4617c87d6fb5f26ac
|
[
"MIT"
] | 5
|
2017-06-11T22:09:26.000Z
|
2020-01-04T02:59:49.000Z
|
preds/playerpreds.py
|
chulchultrain/FriendLeague
|
bf754f2c5e5a1e559a38f8b4617c87d6fb5f26ac
|
[
"MIT"
] | null | null | null |
import leagreq.match_detail as match_detail
import leagreq.match_timeline as match_timeline
import leagreq.champ_detail as champ_detail
import utils.league_util as league_util
# generates a player condition function that operates on a match id
# inputs: id - account id of the player in question
# player_cond_predicate - the predicate we wish to test
# - the predicate should take the participant_data as an input
# output: a player condition function that takes a match id as input and returns a boolean based on whether the condition is true or not
def player_cond(id,player_cond_predicate):
def inner(m_id,cursor):
m_d = match_detail.match_data_from_id(m_id,cursor)
if m_d is None:
return False
in_map = match_detail.inter_map(m_d)
part_data = match_detail.id_to_data(in_map,id,id_type='account_id',result_type='part_data')
if part_data is None:
return False
return player_cond_predicate(part_data)
return inner
#def player_list_cond(id_li,player_cond_predicate):
# def inner(m_id):
# m_d = match_detail.match_d`ata_from_id(m_id)
# if m_d is None:
# return False
# res = True
# for id in id_li:
# part_data = match_detail.player_data_from_match(m_d,id)
# if part_data is None:
# a player predicate generator that takes in a champion name as input and outputs a predicate function that operates on player data
# tests whether a certain champ is played
# input: champ_name - the name of the champion to be tested
# output: a predicate function that tests whether the player was playing that champ
def plays_champ(champ_name):
id = champ_detail.id_from_champion(champ_name)
def inner(p_d):
return p_d['championId'] == id
return inner
# accessory function for the is_lane function. calculates what lane is being played
def is_role(role):
def inner(p_d):
return match_detail.calc_role(p_d) == role
return inner
#TODO:
def champ_role(champ_name=None,role=None):
id = champ_detail.id_from_champion(champ_name)
def inner(p_d):
res = True
if champ_name is not None:
res = res and plays_champ(champ_name)(p_d)
if role is not None:
res = res and is_role(role)(p_d)
return res
return inner
# a player predicate generator that takes in a lane as input and outputs a predicate function that operates on player data
# tests whether a certain lane is played
# input: lane - the lane to be tested
# output: a predicate function that tests whether the player was playing that lane
def is_lane(lane):
def inner(p_d):
return match_detail.calc_role(p_d) == lane
return inner
def got_first_blood():
def inner(p_d):
#if p_d is None:
# print("PARTICIPANT DATA IS NONE")
if 'firstBloodKill' in p_d['stats']:
return p_d['stats']['firstBloodKill']
else:
return False
return inner
def testing():
with league_util.conn_postgre() as cnx:
with cnx.cursor() as cursor:
is_top = is_lane('TOP')
i_am_top = player_cond(38566957,is_top)
assert(i_am_top(2858500164,cursor))
is_mid = is_lane('MIDDLE')
i_am_mid = player_cond(38566957,is_mid)
assert(i_am_mid(2858500164,cursor) == False)
is_camille = plays_champ('Camille')
i_am_camille = player_cond(38566957,is_camille)
assert(i_am_camille(2858500164,cursor))
christina_is_camille = player_cond(48258111,is_camille)
assert(christina_is_camille(2858500164,cursor) == False)
cnx.commit()
if __name__ == "__main__":
testing()
| 37.8
| 136
| 0.678836
| 573
| 3,780
| 4.235602
| 0.200698
| 0.010713
| 0.018541
| 0.020602
| 0.334569
| 0.281005
| 0.266172
| 0.224145
| 0.193655
| 0.193655
| 0
| 0.025433
| 0.251058
| 3,780
| 99
| 137
| 38.181818
| 0.831862
| 0.380952
| 0
| 0.258065
| 1
| 0
| 0.039343
| 0
| 0
| 0
| 0
| 0.010101
| 0.064516
| 1
| 0.209677
| false
| 0
| 0.064516
| 0.048387
| 0.516129
| 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
|
ef3c21cdf142abea481c9add588dbd9c703342e9
| 362
|
py
|
Python
|
package/diana/apis/__init__.py
|
thomasyi17/diana2
|
2167053dfe15b782d96cb1e695047433f302d4dd
|
[
"MIT"
] | 15
|
2019-02-12T23:26:09.000Z
|
2021-12-21T08:53:58.000Z
|
package/diana/apis/__init__.py
|
thomasyi17/diana2
|
2167053dfe15b782d96cb1e695047433f302d4dd
|
[
"MIT"
] | 2
|
2019-01-23T21:13:12.000Z
|
2019-06-28T15:45:51.000Z
|
package/diana/apis/__init__.py
|
thomasyi17/diana2
|
2167053dfe15b782d96cb1e695047433f302d4dd
|
[
"MIT"
] | 6
|
2019-01-23T20:22:50.000Z
|
2022-02-03T03:27:04.000Z
|
from diana.apis.legacy.csvfile import CsvFile
from diana.apis.legacy.redis import Redis
from .dcmdir import DcmDir, ImageDir, ReportDir
from .montage import Montage
from .orthanc import Orthanc
from .proxied_dicom import ProxiedDicom
from .observables import ObservableOrthanc, ObservableDcmDir, ObservableProxiedDicom
from diana.apis.legacy.xnat import Xnat
| 30.166667
| 84
| 0.842541
| 46
| 362
| 6.608696
| 0.434783
| 0.088816
| 0.128289
| 0.1875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.107735
| 362
| 12
| 85
| 30.166667
| 0.941176
| 0
| 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
| 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
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
ef6208732da2181c2f84421b98a1a2fe0ce649d7
| 479
|
py
|
Python
|
016-sum.py
|
richardvecsey/python-basics
|
b66abef77bce2ddd6f2f39b631e1dd97a9aa2fac
|
[
"MIT"
] | 3
|
2019-12-29T18:52:21.000Z
|
2020-02-20T09:18:08.000Z
|
016-sum.py
|
richardvecsey/python-basics
|
b66abef77bce2ddd6f2f39b631e1dd97a9aa2fac
|
[
"MIT"
] | null | null | null |
016-sum.py
|
richardvecsey/python-basics
|
b66abef77bce2ddd6f2f39b631e1dd97a9aa2fac
|
[
"MIT"
] | 2
|
2020-02-20T09:18:13.000Z
|
2020-06-04T04:51:44.000Z
|
"""
Return sum of iterable and start value
--------------------------------------
Input: value optional: start value
Return: sum of values
"""
numbers = [0, 1, 2, 3, 4, 5]
print('numbers: {}\n sum: {}'.format(numbers, sum(numbers)))
start_value = 10
print('numbers: {} + start value: {}\n sum: {}'.format(numbers, start_value, sum(numbers, start_value)))
numbers = [0, 1, 2, 3, 4, 5, -10]
print('numbers: {}\n sum: {}'.format(numbers, sum(numbers)))
| 29.9375
| 105
| 0.557411
| 64
| 479
| 4.125
| 0.328125
| 0.227273
| 0.257576
| 0.193182
| 0.393939
| 0.393939
| 0.393939
| 0.295455
| 0
| 0
| 0
| 0.041026
| 0.185804
| 479
| 16
| 106
| 29.9375
| 0.635897
| 0.304802
| 0
| 0.333333
| 0
| 0
| 0.26045
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.5
| 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
| 0
| 1
|
0
| 4
|
322cc20fc96ccb84ec6b10678fb3467943edf1e9
| 32
|
py
|
Python
|
BOJ/week02/string/ex11654.py
|
FridayAlgorithm/taesong_study
|
50c07ee6ead0fb5bb80e0decb03b801cbbbabf9c
|
[
"MIT"
] | null | null | null |
BOJ/week02/string/ex11654.py
|
FridayAlgorithm/taesong_study
|
50c07ee6ead0fb5bb80e0decb03b801cbbbabf9c
|
[
"MIT"
] | null | null | null |
BOJ/week02/string/ex11654.py
|
FridayAlgorithm/taesong_study
|
50c07ee6ead0fb5bb80e0decb03b801cbbbabf9c
|
[
"MIT"
] | 2
|
2020-12-27T15:03:46.000Z
|
2021-03-06T14:13:34.000Z
|
word = input()
print(ord(word))
| 10.666667
| 16
| 0.65625
| 5
| 32
| 4.2
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.125
| 32
| 2
| 17
| 16
| 0.75
| 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
|
32883149f833cf7eea10fe0b94db403013b73f34
| 82
|
py
|
Python
|
Contest/NIKKEI2019-qual/b/main.py
|
mpses/AtCoder
|
9c101fcc0a1394754fcf2385af54b05c30a5ae2a
|
[
"CC0-1.0"
] | null | null | null |
Contest/NIKKEI2019-qual/b/main.py
|
mpses/AtCoder
|
9c101fcc0a1394754fcf2385af54b05c30a5ae2a
|
[
"CC0-1.0"
] | null | null | null |
Contest/NIKKEI2019-qual/b/main.py
|
mpses/AtCoder
|
9c101fcc0a1394754fcf2385af54b05c30a5ae2a
|
[
"CC0-1.0"
] | null | null | null |
#!/usr/bin/env python3
_, *a = open(0)
print(sum(len(set(i))-1 for i in zip(*a)))
| 20.5
| 42
| 0.597561
| 18
| 82
| 2.666667
| 0.888889
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.042254
| 0.134146
| 82
| 3
| 43
| 27.333333
| 0.633803
| 0.256098
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 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
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
328c2d6b23a53d0f15823490c9f46fe63d4ef124
| 8,122
|
py
|
Python
|
S4/S4 Library/generated/protocolbuffers/Math_pb2.py
|
NeonOcean/Environment
|
ca658cf66e8fd6866c22a4a0136d415705b36d26
|
[
"CC-BY-4.0"
] | 1
|
2021-05-20T19:33:37.000Z
|
2021-05-20T19:33:37.000Z
|
S4/S4 Library/generated/protocolbuffers/Math_pb2.py
|
NeonOcean/Environment
|
ca658cf66e8fd6866c22a4a0136d415705b36d26
|
[
"CC-BY-4.0"
] | null | null | null |
S4/S4 Library/generated/protocolbuffers/Math_pb2.py
|
NeonOcean/Environment
|
ca658cf66e8fd6866c22a4a0136d415705b36d26
|
[
"CC-BY-4.0"
] | null | null | null |
from google.protobuf import descriptor
from google.protobuf import message
from google.protobuf import reflection
from google.protobuf import descriptor_pb2
DESCRIPTOR = descriptor.FileDescriptor(name='Math.proto', package='EA.Sims4.Network', serialized_pb='\n\nMath.proto\x12\x10EA.Sims4.Network"\x1f\n\x07Vector2\x12\t\n\x01x\x18\x01 \x02(\x02\x12\t\n\x01y\x18\x02 \x02(\x02"*\n\x07Vector3\x12\t\n\x01x\x18\x01 \x02(\x02\x12\t\n\x01y\x18\x02 \x02(\x02\x12\t\n\x01z\x18\x03 \x02(\x02"8\n\nQuaternion\x12\t\n\x01x\x18\x01 \x02(\x02\x12\t\n\x01y\x18\x02 \x02(\x02\x12\t\n\x01z\x18\x03 \x02(\x02\x12\t\n\x01w\x18\x04 \x02(\x02"n\n\tTransform\x12.\n\x0btranslation\x18\x01 \x01(\x0b2\x19.EA.Sims4.Network.Vector3\x121\n\x0borientation\x18\x02 \x01(\x0b2\x1c.EA.Sims4.Network.Quaternion"k\n\x0bLinearCurve\x128\n\x06points\x18\x01 \x03(\x0b2(.EA.Sims4.Network.LinearCurve.CurvePoint\x1a"\n\nCurvePoint\x12\t\n\x01x\x18\x01 \x02(\x02\x12\t\n\x01y\x18\x02 \x02(\x02')
_VECTOR2 = descriptor.Descriptor(name='Vector2', full_name='EA.Sims4.Network.Vector2', filename=None, file=DESCRIPTOR, containing_type=None, fields=[descriptor.FieldDescriptor(name='x', full_name='EA.Sims4.Network.Vector2.x', index=0, number=1, type=2, cpp_type=6, label=2, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), descriptor.FieldDescriptor(name='y', full_name='EA.Sims4.Network.Vector2.y', index=1, number=2, type=2, cpp_type=6, label=2, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None)], extensions=[], nested_types=[], enum_types=[], options=None, is_extendable=False, extension_ranges=[], serialized_start=32, serialized_end=63)
_VECTOR3 = descriptor.Descriptor(name='Vector3', full_name='EA.Sims4.Network.Vector3', filename=None, file=DESCRIPTOR, containing_type=None, fields=[descriptor.FieldDescriptor(name='x', full_name='EA.Sims4.Network.Vector3.x', index=0, number=1, type=2, cpp_type=6, label=2, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), descriptor.FieldDescriptor(name='y', full_name='EA.Sims4.Network.Vector3.y', index=1, number=2, type=2, cpp_type=6, label=2, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), descriptor.FieldDescriptor(name='z', full_name='EA.Sims4.Network.Vector3.z', index=2, number=3, type=2, cpp_type=6, label=2, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None)], extensions=[], nested_types=[], enum_types=[], options=None, is_extendable=False, extension_ranges=[], serialized_start=65, serialized_end=107)
_QUATERNION = descriptor.Descriptor(name='Quaternion', full_name='EA.Sims4.Network.Quaternion', filename=None, file=DESCRIPTOR, containing_type=None, fields=[descriptor.FieldDescriptor(name='x', full_name='EA.Sims4.Network.Quaternion.x', index=0, number=1, type=2, cpp_type=6, label=2, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), descriptor.FieldDescriptor(name='y', full_name='EA.Sims4.Network.Quaternion.y', index=1, number=2, type=2, cpp_type=6, label=2, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), descriptor.FieldDescriptor(name='z', full_name='EA.Sims4.Network.Quaternion.z', index=2, number=3, type=2, cpp_type=6, label=2, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), descriptor.FieldDescriptor(name='w', full_name='EA.Sims4.Network.Quaternion.w', index=3, number=4, type=2, cpp_type=6, label=2, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None)], extensions=[], nested_types=[], enum_types=[], options=None, is_extendable=False, extension_ranges=[], serialized_start=109, serialized_end=165)
_TRANSFORM = descriptor.Descriptor(name='Transform', full_name='EA.Sims4.Network.Transform', filename=None, file=DESCRIPTOR, containing_type=None, fields=[descriptor.FieldDescriptor(name='translation', full_name='EA.Sims4.Network.Transform.translation', index=0, number=1, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), descriptor.FieldDescriptor(name='orientation', full_name='EA.Sims4.Network.Transform.orientation', index=1, number=2, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None)], extensions=[], nested_types=[], enum_types=[], options=None, is_extendable=False, extension_ranges=[], serialized_start=167, serialized_end=277)
_LINEARCURVE_CURVEPOINT = descriptor.Descriptor(name='CurvePoint', full_name='EA.Sims4.Network.LinearCurve.CurvePoint', filename=None, file=DESCRIPTOR, containing_type=None, fields=[descriptor.FieldDescriptor(name='x', full_name='EA.Sims4.Network.LinearCurve.CurvePoint.x', index=0, number=1, type=2, cpp_type=6, label=2, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), descriptor.FieldDescriptor(name='y', full_name='EA.Sims4.Network.LinearCurve.CurvePoint.y', index=1, number=2, type=2, cpp_type=6, label=2, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None)], extensions=[], nested_types=[], enum_types=[], options=None, is_extendable=False, extension_ranges=[], serialized_start=352, serialized_end=386)
_LINEARCURVE = descriptor.Descriptor(name='LinearCurve', full_name='EA.Sims4.Network.LinearCurve', filename=None, file=DESCRIPTOR, containing_type=None, fields=[descriptor.FieldDescriptor(name='points', full_name='EA.Sims4.Network.LinearCurve.points', index=0, number=1, type=11, cpp_type=10, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None)], extensions=[], nested_types=[_LINEARCURVE_CURVEPOINT], enum_types=[], options=None, is_extendable=False, extension_ranges=[], serialized_start=279, serialized_end=386)
_TRANSFORM.fields_by_name['translation'].message_type = _VECTOR3
_TRANSFORM.fields_by_name['orientation'].message_type = _QUATERNION
_LINEARCURVE_CURVEPOINT.containing_type = _LINEARCURVE
_LINEARCURVE.fields_by_name['points'].message_type = _LINEARCURVE_CURVEPOINT
DESCRIPTOR.message_types_by_name['Vector2'] = _VECTOR2
DESCRIPTOR.message_types_by_name['Vector3'] = _VECTOR3
DESCRIPTOR.message_types_by_name['Quaternion'] = _QUATERNION
DESCRIPTOR.message_types_by_name['Transform'] = _TRANSFORM
DESCRIPTOR.message_types_by_name['LinearCurve'] = _LINEARCURVE
class Vector2(message.Message, metaclass=reflection.GeneratedProtocolMessageType):
DESCRIPTOR = _VECTOR2
class Vector3(message.Message, metaclass=reflection.GeneratedProtocolMessageType):
DESCRIPTOR = _VECTOR3
class Quaternion(message.Message, metaclass=reflection.GeneratedProtocolMessageType):
DESCRIPTOR = _QUATERNION
class Transform(message.Message, metaclass=reflection.GeneratedProtocolMessageType):
DESCRIPTOR = _TRANSFORM
class LinearCurve(message.Message, metaclass=reflection.GeneratedProtocolMessageType):
class CurvePoint(message.Message, metaclass=reflection.GeneratedProtocolMessageType):
DESCRIPTOR = _LINEARCURVE_CURVEPOINT
DESCRIPTOR = _LINEARCURVE
| 203.05
| 1,439
| 0.804359
| 1,172
| 8,122
| 5.364334
| 0.09727
| 0.061078
| 0.053444
| 0.047718
| 0.786703
| 0.735486
| 0.618896
| 0.605376
| 0.605376
| 0.605376
| 0
| 0.045804
| 0.053804
| 8,122
| 39
| 1,440
| 208.25641
| 0.772284
| 0
| 0
| 0
| 0
| 0.03125
| 0.18456
| 0.158212
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.125
| 0
| 0.46875
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
328d9eeabd62f8643fadc58eb8bdc9543d6b128b
| 289
|
py
|
Python
|
Chapter 2 - first neurons/batch-of-data.py
|
benricok/pyNeural
|
5fc5710359e3a8d16d9bbb83679854bb07a817ad
|
[
"MIT"
] | null | null | null |
Chapter 2 - first neurons/batch-of-data.py
|
benricok/pyNeural
|
5fc5710359e3a8d16d9bbb83679854bb07a817ad
|
[
"MIT"
] | null | null | null |
Chapter 2 - first neurons/batch-of-data.py
|
benricok/pyNeural
|
5fc5710359e3a8d16d9bbb83679854bb07a817ad
|
[
"MIT"
] | null | null | null |
batch = [[1, 5, 6, 2], # shape (8,4)
[3, 2, 1, 3],
[5, 2, 1, 2],
[6, 4, 8, 4],
[2, 8, 5, 3],
[1, 1, 9, 4],
[6, 6, 0, 4],
[8, 7, 6, 4]]
# https://nnfs.io/lqw
# https://nnfs.io/vyu
# https://nnfs.io/jei
# https://nnfs.io/bkw
| 19.266667
| 37
| 0.346021
| 52
| 289
| 1.923077
| 0.365385
| 0.36
| 0.44
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.191011
| 0.384083
| 289
| 14
| 38
| 20.642857
| 0.370787
| 0.314879
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| null | 1
| 1
| 0
| 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
|
32a653df4ef40a821cc27727d639913db8d14f47
| 82
|
py
|
Python
|
mst/cli.py
|
PychronLabsLLC/pyMassSpecTools
|
12d5c5ff715667dfc99bf438b2931dcb249b2c21
|
[
"Apache-2.0"
] | null | null | null |
mst/cli.py
|
PychronLabsLLC/pyMassSpecTools
|
12d5c5ff715667dfc99bf438b2931dcb249b2c21
|
[
"Apache-2.0"
] | null | null | null |
mst/cli.py
|
PychronLabsLLC/pyMassSpecTools
|
12d5c5ff715667dfc99bf438b2931dcb249b2c21
|
[
"Apache-2.0"
] | null | null | null |
def welcome():
print("welcome to pyMassSpecTools")
def cli():
welcome()
| 11.714286
| 39
| 0.634146
| 9
| 82
| 5.777778
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.219512
| 82
| 6
| 40
| 13.666667
| 0.8125
| 0
| 0
| 0
| 0
| 0
| 0.317073
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.5
| true
| 0
| 0
| 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
| 1
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
08982a116fe58971d415ee57f6c28c793a115f30
| 50
|
py
|
Python
|
ober/documents/__init__.py
|
samober/ober-ml
|
d546906d9d7c265a27dfc73ac7070e7f040889a3
|
[
"Apache-2.0"
] | null | null | null |
ober/documents/__init__.py
|
samober/ober-ml
|
d546906d9d7c265a27dfc73ac7070e7f040889a3
|
[
"Apache-2.0"
] | null | null | null |
ober/documents/__init__.py
|
samober/ober-ml
|
d546906d9d7c265a27dfc73ac7070e7f040889a3
|
[
"Apache-2.0"
] | null | null | null |
from documents import DocumentDatabase, BatchStats
| 50
| 50
| 0.9
| 5
| 50
| 9
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.08
| 50
| 1
| 50
| 50
| 0.978261
| 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
|
089aa96f300128ec8c429bb3923048b0bc737690
| 208
|
py
|
Python
|
tests/regressiontests/commands_sql/models.py
|
skyl/django
|
843e7450ddcb820b2bdc6d47d6c4aab9820a46c4
|
[
"BSD-3-Clause"
] | 1
|
2017-12-01T06:26:57.000Z
|
2017-12-01T06:26:57.000Z
|
tests/regressiontests/commands_sql/models.py
|
skyl/django
|
843e7450ddcb820b2bdc6d47d6c4aab9820a46c4
|
[
"BSD-3-Clause"
] | null | null | null |
tests/regressiontests/commands_sql/models.py
|
skyl/django
|
843e7450ddcb820b2bdc6d47d6c4aab9820a46c4
|
[
"BSD-3-Clause"
] | 1
|
2021-09-14T06:09:11.000Z
|
2021-09-14T06:09:11.000Z
|
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
@python_2_unicode_compatible
class Book(models.Model):
title = models.CharField(max_length=100, db_index=True)
| 26
| 61
| 0.826923
| 31
| 208
| 5.290323
| 0.677419
| 0.121951
| 0.170732
| 0.292683
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.026738
| 0.100962
| 208
| 7
| 62
| 29.714286
| 0.850267
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.4
| 0
| 0.8
| 0
| 0
| 0
| 0
| null | 0
| 0
| 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
| 1
| 0
| 1
| 0
|
0
| 4
|
08cfc291a43d316b9df42e6a054ed58bc700bdbc
| 7,064
|
py
|
Python
|
tests/test_config_schema.py
|
nmichlo/eunomia
|
5c6ef13b5af5335d4437867953b5eaa872ac56bb
|
[
"MIT"
] | 3
|
2021-02-07T17:55:46.000Z
|
2021-02-15T11:58:36.000Z
|
tests/test_config_schema.py
|
nmichlo/eunomia
|
5c6ef13b5af5335d4437867953b5eaa872ac56bb
|
[
"MIT"
] | null | null | null |
tests/test_config_schema.py
|
nmichlo/eunomia
|
5c6ef13b5af5335d4437867953b5eaa872ac56bb
|
[
"MIT"
] | null | null | null |
import pytest
from eunomia.config import keys as K, Option, Group
from eunomia.config import validate as V
# ========================================================================= #
# Test YAML & Custom Tags #
# ========================================================================= #
def _do_identifier_tests(validator, prefix=''):
# check simple valid
validator(prefix + 'valid_id')
with pytest.raises(ValueError): # TODO: fix , match="is_not_special_key"):
validator(prefix + '__type__')
with pytest.raises(ValueError): # TODO: fix , match="is_not_reserved"):
validator(prefix + '__invalid_id__')
validator(prefix + '_okay_id_')
with pytest.raises(ValueError): # TODO: fix , match="is_identifier"):
validator(prefix + '1234')
with pytest.raises(ValueError): # TODO: fix , match="is_not_keyword"):
validator(prefix + 'with')
with pytest.raises(TypeError): # TODO: fix , match="should be instance of"):
validator(1234)
def test_identifier():
_do_identifier_tests(V.validate_config_identifier)
def test_pkg_path():
# check - absolute
assert V.validate_package_path('') == ''
assert V.validate_package_path('valid1') == 'valid1'
assert V.validate_package_path('valid1.valid2') == 'valid1.valid2'
with pytest.raises(ValueError): V.validate_package_path('valid1.')
# check - relative
assert V.validate_package_path('.') == '.'
assert V.validate_package_path('.valid1') == '.valid1'
assert V.validate_package_path('.valid1.valid2') == '.valid1.valid2'
with pytest.raises(ValueError): V.validate_package_path('.valid1.')
# check splits - absolute
assert V.split_package_path('') == ([], False)
assert V.split_package_path('valid1') == (['valid1'], False)
assert V.split_package_path('valid1.valid2') == (['valid1', 'valid2'], False)
with pytest.raises(ValueError): V.split_package_path('valid1.')
# check splits - relative
assert V.split_package_path('.') == ([], True)
assert V.split_package_path('.valid1') == (['valid1'], True)
assert V.split_package_path('.valid1.valid2') == (['valid1', 'valid2'], True)
with pytest.raises(ValueError): V.split_package_path('.valid1.')
# check identifiers, should be same as above
_do_identifier_tests(V.validate_package_path)
_do_identifier_tests(V.validate_package_path, prefix='valid1.')
_do_identifier_tests(V.validate_package_path, prefix='_marker_.')
with pytest.raises(ValueError): # TODO: fix , match='is_not_reserved'):
_do_identifier_tests(V.validate_package_path, prefix='__invalid1__.')
# check group...
with pytest.raises(ValueError): # TODO: fix , match='is_identifier'):
V.validate_package_path('valid1/valid2/valid3')
# check special keys
V.validate_package_path('<root>')
V.validate_package_path('<group>')
# split special keys
with pytest.raises(RuntimeError): V.split_package_path('<root>')
with pytest.raises(RuntimeError): V.split_package_path('<group>')
def test_group_path():
# check - relative
assert V.validate_config_path('') == ''
assert V.validate_config_path('valid1') == 'valid1'
assert V.validate_config_path('valid1/valid2') == 'valid1/valid2'
with pytest.raises(ValueError): V.validate_config_path('valid1/')
# check - absolute
assert V.validate_config_path('/') == '/'
assert V.validate_config_path('/valid1') == '/valid1'
assert V.validate_config_path('/valid1/valid2') == '/valid1/valid2'
with pytest.raises(ValueError): V.validate_config_path('/valid1/')
# check splits - relative
assert V.split_config_path('') == ([], True)
assert V.split_config_path('valid1') == (['valid1'], True)
assert V.split_config_path('valid1/valid2') == (['valid1', 'valid2'], True)
with pytest.raises(ValueError): V.split_config_path('valid1/')
# check splits - absolute
assert V.split_config_path('/') == ([], False)
assert V.split_config_path('/valid1') == (['valid1'], False)
assert V.split_config_path('/valid1/valid2') == (['valid1', 'valid2'], False)
with pytest.raises(ValueError): V.split_config_path('/valid1/')
# check identifiers, should be same as above
_do_identifier_tests(V.validate_config_path)
_do_identifier_tests(V.validate_config_path, prefix='valid1/')
_do_identifier_tests(V.validate_config_path, prefix='_marker_/')
with pytest.raises(ValueError): # TODO: fix , match='is_not_reserved'):
_do_identifier_tests(V.validate_config_path, prefix='__invalid1__/')
# check group...
with pytest.raises(ValueError): # TODO: fix , match='is_identifier'):
V.validate_config_path('valid1.valid2.valid3')
# check special keys
with pytest.raises(ValueError): V.validate_config_path('<root>')
with pytest.raises(ValueError): V.validate_config_path('<group>')
# split special keys
with pytest.raises(RuntimeError): V.split_package_path('<root>')
with pytest.raises(RuntimeError): V.split_package_path('<group>')
def test_defaults():
# check self
V.validate_defaults_item('<self>')
with pytest.raises(ValueError):
V.validate_defaults_item('<self>s')
# check strings
V.validate_defaults_item('option1')
V.validate_defaults_item('/option1')
V.validate_defaults_item('group/option1')
V.validate_defaults_item('/group/option1')
with pytest.raises(ValueError):
V.validate_defaults_item('/1invalidgroup/option1')
# check dictionaries
V.validate_defaults_item({'': 'option1'})
V.validate_defaults_item({'/': 'option1'})
V.validate_defaults_item({'group': 'option1'})
V.validate_defaults_item({'/group': 'option1'})
with pytest.raises(ValueError):
V.validate_defaults_item({'/group/subgroup': '1invalidopt'})
with pytest.raises(ValueError):
V.validate_defaults_item({'/1invalidgroup/subgroup': 'option1'})
# check tuples
V.validate_defaults_item({'': 'option1'})
V.validate_defaults_item({'/': 'option1'})
V.validate_defaults_item({'group': 'option1'})
V.validate_defaults_item({'/group': 'option1'})
with pytest.raises(TypeError):
V.validate_defaults_item(['', 'option1'])
with pytest.raises(TypeError):
V.validate_defaults_item(('', 'option1'))
# check options as refs
V.validate_defaults_item(Group(), allow_config_nodes=True)
V.validate_defaults_item(Option(), allow_config_nodes=True)
with pytest.raises(TypeError, match='disabled as the group key for default entry'):
V.validate_defaults_item(Group())
with pytest.raises(TypeError, match='disabled as the group key for default entry'):
V.validate_defaults_item(Option())
# check lots
V.validate_option_defaults([
'group1/option1',
'/group2/option2',
{'/group/subgroup': 'option1'},
{'group/subgroup2': 'option2'},
'<self>',
Option(),
], allow_config_nodes=True)
| 42.047619
| 87
| 0.667327
| 831
| 7,064
| 5.394705
| 0.11071
| 0.110417
| 0.11064
| 0.10774
| 0.845862
| 0.794111
| 0.784073
| 0.723623
| 0.63172
| 0.5677
| 0
| 0.016966
| 0.165629
| 7,064
| 167
| 88
| 42.299401
| 0.743638
| 0.146234
| 0
| 0.254386
| 0
| 0
| 0.161409
| 0.007511
| 0
| 0
| 0
| 0.005988
| 0.210526
| 1
| 0.04386
| false
| 0
| 0.026316
| 0
| 0.070175
| 0
| 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
|
08e1b7778b4f1ca1d849103b8a420765e305c8f8
| 218
|
py
|
Python
|
arcade/python/arcade-theCore/01_IntroGates/002_LargestNumber.py
|
netor27/codefights-arcade-solutions
|
69701ab06d45902c79ec9221137f90b75969d8c8
|
[
"MIT"
] | null | null | null |
arcade/python/arcade-theCore/01_IntroGates/002_LargestNumber.py
|
netor27/codefights-arcade-solutions
|
69701ab06d45902c79ec9221137f90b75969d8c8
|
[
"MIT"
] | null | null | null |
arcade/python/arcade-theCore/01_IntroGates/002_LargestNumber.py
|
netor27/codefights-arcade-solutions
|
69701ab06d45902c79ec9221137f90b75969d8c8
|
[
"MIT"
] | null | null | null |
def largestNumber(n):
'''
Given an integer n, return the largest number that contains exactly n digits.
'''
return 10 ** n - 1
print(largestNumber(1))
print(largestNumber(5))
print(largestNumber(10))
| 19.818182
| 81
| 0.678899
| 29
| 218
| 5.103448
| 0.62069
| 0.364865
| 0.256757
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.04023
| 0.201835
| 218
| 10
| 82
| 21.8
| 0.810345
| 0.353211
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0
| 0
| 0
| 0.4
| 0.6
| 1
| 0
| 0
| null | 1
| 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
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
3e99c9642556dfaebfcf33425f0581bb2c16124b
| 73
|
py
|
Python
|
tests/test_dict.py
|
microdog/hello-gfw
|
d335bcceec672d4d677444fca708e0758bbfae71
|
[
"MIT"
] | 2
|
2015-05-20T08:33:46.000Z
|
2018-10-31T07:18:50.000Z
|
tests/test_dict.py
|
microdog/hello-gfw
|
d335bcceec672d4d677444fca708e0758bbfae71
|
[
"MIT"
] | 1
|
2015-11-12T02:58:42.000Z
|
2015-11-16T18:06:29.000Z
|
tests/test_dict.py
|
microdog/hello-gfw
|
d335bcceec672d4d677444fca708e0758bbfae71
|
[
"MIT"
] | null | null | null |
__author__ = 'Microdog <dlangu0393@gmail.com>'
import unittest
# TODO
| 10.428571
| 46
| 0.739726
| 8
| 73
| 6.25
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.064516
| 0.150685
| 73
| 6
| 47
| 12.166667
| 0.741935
| 0.054795
| 0
| 0
| 0
| 0
| 0.462687
| 0.328358
| 0
| 0
| 0
| 0.166667
| 0
| 1
| 0
| false
| 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
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
3ec2ef0eae14845999c359f2278d765a8ca95835
| 23
|
py
|
Python
|
org/hasii/chip8/Version.py
|
hasii2011/Chip8Emulator
|
96be8c0d01ccae0492ce0f980af905ec5c690f1a
|
[
"MIT"
] | null | null | null |
org/hasii/chip8/Version.py
|
hasii2011/Chip8Emulator
|
96be8c0d01ccae0492ce0f980af905ec5c690f1a
|
[
"MIT"
] | 8
|
2019-08-12T23:33:12.000Z
|
2020-12-09T01:31:17.000Z
|
org/hasii/chip8/Version.py
|
hasii2011/Chip8Emulator
|
96be8c0d01ccae0492ce0f980af905ec5c690f1a
|
[
"MIT"
] | null | null | null |
Version: str = '1.0.0'
| 11.5
| 22
| 0.565217
| 5
| 23
| 2.6
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.157895
| 0.173913
| 23
| 1
| 23
| 23
| 0.526316
| 0
| 0
| 0
| 0
| 0
| 0.217391
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 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
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
3ecd5e0a3303f483544415fa2da88ec899e0705b
| 2,657
|
py
|
Python
|
tensorflow_checkpoint_reader/pb/tensorflow/core/protobuf/tpu/dynamic_padding_pb2.py
|
shawwn/tensorflow-checkpoint-reader
|
f0e65548411e3bd66a07e36bb1850907a05952d0
|
[
"MIT"
] | 1
|
2021-12-02T15:06:09.000Z
|
2021-12-02T15:06:09.000Z
|
tensorflow_checkpoint_reader/pb/tensorflow/core/protobuf/tpu/dynamic_padding_pb2.py
|
shawwn/tensorflow-checkpoint-reader
|
f0e65548411e3bd66a07e36bb1850907a05952d0
|
[
"MIT"
] | null | null | null |
tensorflow_checkpoint_reader/pb/tensorflow/core/protobuf/tpu/dynamic_padding_pb2.py
|
shawwn/tensorflow-checkpoint-reader
|
f0e65548411e3bd66a07e36bb1850907a05952d0
|
[
"MIT"
] | null | null | null |
'Generated protocol buffer code.'
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
_sym_db = _symbol_database.Default()
DESCRIPTOR = _descriptor.FileDescriptor(name='tensorflow/core/protobuf/tpu/dynamic_padding.proto', package='tensorflow.tpu', syntax='proto3', serialized_options=b'\xf8\x01\x01', create_key=_descriptor._internal_create_key, serialized_pb=b'\n2tensorflow/core/protobuf/tpu/dynamic_padding.proto\x12\x0etensorflow.tpu"O\n\nPaddingMap\x12\x11\n\targ_index\x18\x01 \x01(\x05\x12\x13\n\x0bshape_index\x18\x02 \x01(\x05\x12\x19\n\x11padding_arg_index\x18\x03 \x01(\x05B\x03\xf8\x01\x01b\x06proto3')
_PADDINGMAP = _descriptor.Descriptor(name='PaddingMap', full_name='tensorflow.tpu.PaddingMap', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[_descriptor.FieldDescriptor(name='arg_index', full_name='tensorflow.tpu.PaddingMap.arg_index', index=0, number=1, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor(name='shape_index', full_name='tensorflow.tpu.PaddingMap.shape_index', index=1, number=2, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor(name='padding_arg_index', full_name='tensorflow.tpu.PaddingMap.padding_arg_index', index=2, number=3, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key)], extensions=[], nested_types=[], enum_types=[], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[], serialized_start=70, serialized_end=149)
DESCRIPTOR.message_types_by_name['PaddingMap'] = _PADDINGMAP
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
PaddingMap = _reflection.GeneratedProtocolMessageType('PaddingMap', (_message.Message,), {'DESCRIPTOR': _PADDINGMAP, '__module__': 'tensorflow.core.protobuf.tpu.dynamic_padding_pb2'})
_sym_db.RegisterMessage(PaddingMap)
DESCRIPTOR._options = None
| 177.133333
| 1,521
| 0.83026
| 366
| 2,657
| 5.70765
| 0.270492
| 0.043083
| 0.063667
| 0.064624
| 0.477741
| 0.462901
| 0.355194
| 0.317855
| 0.317855
| 0.317855
| 0
| 0.033215
| 0.048175
| 2,657
| 14
| 1,522
| 189.785714
| 0.792803
| 0.011667
| 0
| 0
| 1
| 0.076923
| 0.24247
| 0.182605
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.307692
| 0
| 0.307692
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
412204b22a83cef81f0965f07036f20fd48cae7f
| 356
|
py
|
Python
|
scripts/eo_getdate.py
|
Zeitsperre/flyingpigeon
|
678370bf428af7ffe11ee79be3b8a89c73215e5e
|
[
"Apache-2.0"
] | 1
|
2016-12-04T18:01:49.000Z
|
2016-12-04T18:01:49.000Z
|
scripts/eo_getdate.py
|
Zeitsperre/flyingpigeon
|
678370bf428af7ffe11ee79be3b8a89c73215e5e
|
[
"Apache-2.0"
] | 13
|
2017-03-16T15:44:21.000Z
|
2019-08-19T16:56:04.000Z
|
scripts/eo_getdate.py
|
Zeitsperre/flyingpigeon
|
678370bf428af7ffe11ee79be3b8a89c73215e5e
|
[
"Apache-2.0"
] | null | null | null |
from osgeo import gdal
an1 = '/home/nils/birdhouse/var/lib/pywps/cache/flyingpigeon/EO_data/PSScene4Band/analytic/20171126_084818_100e.tif'
an2 = '/home/nils/birdhouse/var/lib/pywps/cache/flyingpigeon/EO_data/PSScene4Band/analytic/20171126_084819_100e.tif'
raster = an1
ds = gdal.Open(raster, 0)
print ds.GetMetadataItem("TIFFTAG_DATETIME")
ds = None
| 27.384615
| 116
| 0.800562
| 52
| 356
| 5.346154
| 0.615385
| 0.057554
| 0.122302
| 0.143885
| 0.568345
| 0.568345
| 0.568345
| 0.568345
| 0.568345
| 0.568345
| 0
| 0.121581
| 0.075843
| 356
| 12
| 117
| 29.666667
| 0.723404
| 0
| 0
| 0
| 0
| 0.285714
| 0.653521
| 0.608451
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0.142857
| null | null | 0.142857
| 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
| 1
| 1
| 1
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
f5c22c130b6983e1331a6671fbfc4de0392c7538
| 223
|
py
|
Python
|
beacon/exceptions.py
|
esquarer/beacon-py
|
7224e07fe88370c3eadd490f7de41d21aa03350f
|
[
"BSD-2-Clause"
] | 11
|
2018-12-06T12:34:40.000Z
|
2022-02-09T13:35:27.000Z
|
beacon/exceptions.py
|
esquarer/beacon-py
|
7224e07fe88370c3eadd490f7de41d21aa03350f
|
[
"BSD-2-Clause"
] | 12
|
2018-11-27T10:29:44.000Z
|
2020-07-21T11:55:33.000Z
|
beacon/exceptions.py
|
esquarer/beacon-py
|
7224e07fe88370c3eadd490f7de41d21aa03350f
|
[
"BSD-2-Clause"
] | 4
|
2018-12-12T12:35:13.000Z
|
2019-10-10T15:11:53.000Z
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Custom exception used by Beacon."""
from __future__ import absolute_import
class ConfigurationError(ValueError):
pass
class InvalidDSN(ConfigurationError):
pass
| 15.928571
| 38
| 0.721973
| 25
| 223
| 6.24
| 0.84
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.005319
| 0.156951
| 223
| 13
| 39
| 17.153846
| 0.824468
| 0.336323
| 0
| 0.4
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.4
| 0.2
| 0
| 0.6
| 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
| 0
| 0
| 1
| 0
|
0
| 4
|
f5ca66e53fc7df4f4427397a233122c888c5c692
| 147
|
py
|
Python
|
baal/active/dataset/__init__.py
|
llv22/baal_tf2.4_mac
|
6eed225f8b57e61d8d16b1868ea655384c566700
|
[
"Apache-2.0"
] | null | null | null |
baal/active/dataset/__init__.py
|
llv22/baal_tf2.4_mac
|
6eed225f8b57e61d8d16b1868ea655384c566700
|
[
"Apache-2.0"
] | null | null | null |
baal/active/dataset/__init__.py
|
llv22/baal_tf2.4_mac
|
6eed225f8b57e61d8d16b1868ea655384c566700
|
[
"Apache-2.0"
] | null | null | null |
from .numpy import ActiveNumpyArray
from .pytorch_dataset import ActiveLearningDataset
# Do not include HF Dataset here as it requires more deps.
| 29.4
| 58
| 0.829932
| 20
| 147
| 6.05
| 0.85
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.142857
| 147
| 4
| 59
| 36.75
| 0.960317
| 0.380952
| 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
|
de1dbb40b33f481a74d52200e2560c44a215d24d
| 87
|
py
|
Python
|
bukber/apps.py
|
ppabcd/django-bukber
|
8a5d272e988a63082977deb5ba026876d4c70ee4
|
[
"BSD-3-Clause"
] | null | null | null |
bukber/apps.py
|
ppabcd/django-bukber
|
8a5d272e988a63082977deb5ba026876d4c70ee4
|
[
"BSD-3-Clause"
] | null | null | null |
bukber/apps.py
|
ppabcd/django-bukber
|
8a5d272e988a63082977deb5ba026876d4c70ee4
|
[
"BSD-3-Clause"
] | null | null | null |
from django.apps import AppConfig
class BukberConfig(AppConfig):
name = 'bukber'
| 14.5
| 33
| 0.747126
| 10
| 87
| 6.5
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.172414
| 87
| 5
| 34
| 17.4
| 0.902778
| 0
| 0
| 0
| 0
| 0
| 0.068966
| 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
|
de3778e1970dd9314e225fd4a535e514c412b0e9
| 76
|
py
|
Python
|
objectTests.py
|
diallog/GCPpy
|
dabd55ece1c12c1a390a228cd04cb7eb110e564b
|
[
"Unlicense"
] | null | null | null |
objectTests.py
|
diallog/GCPpy
|
dabd55ece1c12c1a390a228cd04cb7eb110e564b
|
[
"Unlicense"
] | null | null | null |
objectTests.py
|
diallog/GCPpy
|
dabd55ece1c12c1a390a228cd04cb7eb110e564b
|
[
"Unlicense"
] | null | null | null |
#! #!/usr/bin/env python3
# PURPOSE: Initial exploration of OOP in python3
| 19
| 48
| 0.723684
| 11
| 76
| 5
| 0.909091
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.03125
| 0.157895
| 76
| 3
| 49
| 25.333333
| 0.828125
| 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
|
de6d2a9feeb4a3ffc3b8bfb11e87f600a6951487
| 26
|
py
|
Python
|
PaddleCV/adversarial/advbox/models/__init__.py
|
suytingwan/models
|
ccdbfe77d071cc19b55fb9f4b738912e35d982ef
|
[
"Apache-2.0"
] | 819
|
2019-06-10T08:33:28.000Z
|
2022-03-29T10:55:25.000Z
|
PaddleCV/adversarial/advbox/models/__init__.py
|
suytingwan/models
|
ccdbfe77d071cc19b55fb9f4b738912e35d982ef
|
[
"Apache-2.0"
] | 38
|
2019-07-11T01:57:41.000Z
|
2022-03-15T06:59:21.000Z
|
PaddleCV/adversarial/advbox/models/__init__.py
|
suytingwan/models
|
ccdbfe77d071cc19b55fb9f4b738912e35d982ef
|
[
"Apache-2.0"
] | 167
|
2019-06-12T09:11:34.000Z
|
2022-03-28T15:54:46.000Z
|
"""
Models __init__.py
"""
| 8.666667
| 18
| 0.615385
| 3
| 26
| 4
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.115385
| 26
| 3
| 19
| 8.666667
| 0.521739
| 0.692308
| 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
|
de712cbdc4dc7d324186be305c8bd5f73a830995
| 187
|
py
|
Python
|
lib_rovpp/policies/rovpp_v2_policy.py
|
iReynaldo/lib_rovpp
|
eb201adc948e9375123c2e2301ee524392dd7b0d
|
[
"BSD-3-Clause"
] | 1
|
2021-12-05T07:42:35.000Z
|
2021-12-05T07:42:35.000Z
|
lib_rovpp/policies/rovpp_v2_policy.py
|
iReynaldo/lib_rovpp
|
eb201adc948e9375123c2e2301ee524392dd7b0d
|
[
"BSD-3-Clause"
] | null | null | null |
lib_rovpp/policies/rovpp_v2_policy.py
|
iReynaldo/lib_rovpp
|
eb201adc948e9375123c2e2301ee524392dd7b0d
|
[
"BSD-3-Clause"
] | null | null | null |
from .rovpp_v2_lite_policy import ROVPPV2LitePolicy
class ROVPPV2Policy(ROVPPV2LitePolicy):
name = "ROV++V2"
from .lite_converter import _new_ann_is_better, _best_by_hole_size
| 23.375
| 70
| 0.807487
| 25
| 187
| 5.56
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.030864
| 0.13369
| 187
| 7
| 71
| 26.714286
| 0.82716
| 0
| 0
| 0
| 0
| 0
| 0.037433
| 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
|
de990c1dcb5b24d83ef2a666acc4b24dc20985ca
| 143
|
py
|
Python
|
athletes/app_forms/athlete_forms.py
|
shermanng10/superathletebuilder
|
dbaf98d5bbb5d93575985a89f244d1732b16c7bc
|
[
"MIT"
] | null | null | null |
athletes/app_forms/athlete_forms.py
|
shermanng10/superathletebuilder
|
dbaf98d5bbb5d93575985a89f244d1732b16c7bc
|
[
"MIT"
] | null | null | null |
athletes/app_forms/athlete_forms.py
|
shermanng10/superathletebuilder
|
dbaf98d5bbb5d93575985a89f244d1732b16c7bc
|
[
"MIT"
] | null | null | null |
from django import forms
from ..models import Athlete
class AthleteForm(forms.ModelForm):
class Meta:
model = Athlete
fields = '__all__'
| 17.875
| 35
| 0.755245
| 18
| 143
| 5.777778
| 0.722222
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.167832
| 143
| 7
| 36
| 20.428571
| 0.87395
| 0
| 0
| 0
| 0
| 0
| 0.048951
| 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
|
decc37f78d57f2496f91f30ecc1e291d0843f548
| 246
|
py
|
Python
|
websubsub/admin.py
|
Fak3/websubsub
|
f7ca8953197104483b152367c716028d841facbb
|
[
"MIT"
] | 4
|
2018-03-18T03:44:24.000Z
|
2019-08-10T00:40:54.000Z
|
websubsub/admin.py
|
Fak3/websubsub
|
f7ca8953197104483b152367c716028d841facbb
|
[
"MIT"
] | 9
|
2020-02-12T13:38:38.000Z
|
2021-06-02T01:03:43.000Z
|
websubsub/admin.py
|
Fak3/websubsub
|
f7ca8953197104483b152367c716028d841facbb
|
[
"MIT"
] | 2
|
2019-08-10T00:41:00.000Z
|
2020-02-09T10:09:59.000Z
|
from django.contrib import admin
from .models import Subscription
@admin.register(Subscription)
class SubscriptionAdmin(admin.ModelAdmin):
list_display = ('pk', 'topic', 'subscribe_status', 'callback_urlname')
list_filter = ('topic',)
| 24.6
| 74
| 0.752033
| 27
| 246
| 6.703704
| 0.740741
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.126016
| 246
| 9
| 75
| 27.333333
| 0.84186
| 0
| 0
| 0
| 0
| 0
| 0.179592
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 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
|
deee6939b40b939892a6cd7f7daeff81de4e17bc
| 1,164
|
py
|
Python
|
application/user_types.py
|
tolstislon/cases_parser
|
5e72505e301e18e071b3210b6487dc25d0b3ac21
|
[
"MIT"
] | null | null | null |
application/user_types.py
|
tolstislon/cases_parser
|
5e72505e301e18e071b3210b6487dc25d0b3ac21
|
[
"MIT"
] | null | null | null |
application/user_types.py
|
tolstislon/cases_parser
|
5e72505e301e18e071b3210b6487dc25d0b3ac21
|
[
"MIT"
] | null | null | null |
from dataclasses import dataclass
from typing import Tuple
@dataclass
class Config:
jira_url: str
jira_user: str
jira_password: str
jira_issue_path: str
jira_endpoint: str
project_path: str
project_cases: str
def __post_init__(self):
if self.jira_url.endswith('/'):
self.jira_url = self.jira_url[:-1]
if not self.jira_issue_path.startswith('/'):
self.jira_issue_path = f'/{self.jira_issue_path}'
if not self.jira_issue_path.endswith('/'):
self.jira_issue_path = f'{self.jira_issue_path}/'
if not self.jira_endpoint.startswith('/'):
self.jira_endpoint = f'/{self.jira_endpoint}'
if '@' in self.jira_user:
raise ValueError('You must specify a username and not an email')
def get_issue_url(self, issue: str) -> str:
return f'{self.jira_url}{self.jira_issue_path}{issue}'
def get_endpoint(self, issue: str) -> str:
endpoint = self.jira_endpoint.format(issue_key=issue)
return f'{self.jira_url}{endpoint}'
def get_auth(self) -> Tuple[str, str]:
return self.jira_user, self.jira_password
| 32.333333
| 76
| 0.652062
| 163
| 1,164
| 4.386503
| 0.269939
| 0.212587
| 0.145455
| 0.166434
| 0.265734
| 0.177622
| 0.134266
| 0.134266
| 0.134266
| 0.134266
| 0
| 0.001122
| 0.234536
| 1,164
| 35
| 77
| 33.257143
| 0.801347
| 0
| 0
| 0
| 0
| 0
| 0.158935
| 0.116838
| 0
| 0
| 0
| 0
| 0
| 1
| 0.137931
| false
| 0.068966
| 0.068966
| 0.068966
| 0.586207
| 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
| 0
| 0
| 1
| 0
| 0
| 1
| 0
|
0
| 4
|
720eca0188ccf565fd5900fdca5ad65f5a155610
| 638
|
py
|
Python
|
dj_beneficiary/test_utils/admin.py
|
Digital-Prophets/dj-beneficiary
|
be82f7fe0f3e7644a93095cdf95bb0acbd271e7f
|
[
"MIT"
] | null | null | null |
dj_beneficiary/test_utils/admin.py
|
Digital-Prophets/dj-beneficiary
|
be82f7fe0f3e7644a93095cdf95bb0acbd271e7f
|
[
"MIT"
] | 2
|
2021-12-29T09:15:07.000Z
|
2021-12-29T22:58:36.000Z
|
dj_beneficiary/test_utils/admin.py
|
Digital-Prophets/dj-beneficiary
|
be82f7fe0f3e7644a93095cdf95bb0acbd271e7f
|
[
"MIT"
] | 1
|
2021-12-29T08:29:36.000Z
|
2021-12-29T08:29:36.000Z
|
from django.contrib import admin
from django.contrib import admin
# Put your models admin models here
from dj_beneficiary.test_utils.models import (
District,
IndividualBeneficiary,
Beneficiary,
Province,
Ward,
)
@admin.register(IndividualBeneficiary)
class IndividualBeneficiaryAdmin(admin.ModelAdmin):
pass
@admin.register(Beneficiary)
class BeneficiaryAdmin(admin.ModelAdmin):
pass
@admin.register(Province)
class ProvinceAdmin(admin.ModelAdmin):
pass
@admin.register(District)
class DistrictAdmin(admin.ModelAdmin):
pass
@admin.register(Ward)
class WardAdmin(admin.ModelAdmin):
pass
| 17.243243
| 51
| 0.768025
| 68
| 638
| 7.176471
| 0.382353
| 0.133197
| 0.194672
| 0.196721
| 0.377049
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.15047
| 638
| 36
| 52
| 17.722222
| 0.900369
| 0.051724
| 0
| 0.291667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.208333
| 0.125
| 0
| 0.333333
| 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
| 0
| 1
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
7227e5ff06b1319e7b20c5b567fded64278545e2
| 192
|
py
|
Python
|
d3rlpy/iterators/__init__.py
|
ningyixue/AIPI530_Final_Project
|
b95353ffd003692a37a59042dfcd744a18b7e802
|
[
"MIT"
] | 565
|
2020-08-01T02:44:28.000Z
|
2022-03-30T15:00:54.000Z
|
d3rlpy/iterators/__init__.py
|
ningyixue/AIPI530_Final_Project
|
b95353ffd003692a37a59042dfcd744a18b7e802
|
[
"MIT"
] | 144
|
2020-08-01T03:45:10.000Z
|
2022-03-30T14:51:16.000Z
|
d3rlpy/iterators/__init__.py
|
ningyixue/AIPI530_Final_Project
|
b95353ffd003692a37a59042dfcd744a18b7e802
|
[
"MIT"
] | 103
|
2020-08-26T13:27:34.000Z
|
2022-03-31T12:24:27.000Z
|
from .base import TransitionIterator
from .random_iterator import RandomIterator
from .round_iterator import RoundIterator
__all__ = ["TransitionIterator", "RoundIterator", "RandomIterator"]
| 32
| 67
| 0.833333
| 18
| 192
| 8.555556
| 0.555556
| 0.181818
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.09375
| 192
| 5
| 68
| 38.4
| 0.885057
| 0
| 0
| 0
| 0
| 0
| 0.234375
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.75
| 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
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
a0ce6793fb2bd15acb94093a5edfbeca3c9636e2
| 154
|
py
|
Python
|
docker/xfce-python/src/samples/loguru-test-app/main.py
|
dosongpon/headless-coding-g3
|
510d12972dacb5704e90829f308b1a7ac29ae4d2
|
[
"MIT"
] | 7
|
2021-03-22T04:35:05.000Z
|
2022-03-05T01:56:47.000Z
|
docker/xfce-python/src/samples/loguru-test-app/main.py
|
dosongpon/headless-coding-g3
|
510d12972dacb5704e90829f308b1a7ac29ae4d2
|
[
"MIT"
] | null | null | null |
docker/xfce-python/src/samples/loguru-test-app/main.py
|
dosongpon/headless-coding-g3
|
510d12972dacb5704e90829f308b1a7ac29ae4d2
|
[
"MIT"
] | 9
|
2021-03-27T23:45:03.000Z
|
2022-03-29T19:00:50.000Z
|
from loguru import logger
logger.info ("Hello, World!")
logger.warning ("Warning, World!")
logger.error ("Error, World!")
logger.debug ("Debug, World!")
| 22
| 34
| 0.707792
| 20
| 154
| 5.45
| 0.5
| 0.302752
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.11039
| 154
| 6
| 35
| 25.666667
| 0.79562
| 0
| 0
| 0
| 0
| 0
| 0.350649
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.2
| 0
| 0.2
| 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
|
9d1768d95e80a8b549ed9c3f8affae2ec01aa2d2
| 119
|
py
|
Python
|
open_facebook/__init__.py
|
gilsonbp/Django-facebook
|
7c6900be332f4e9e2ac66a37de5d94d7edfbd3dc
|
[
"BSD-3-Clause"
] | 606
|
2015-01-01T17:47:57.000Z
|
2022-03-27T12:04:02.000Z
|
open_facebook/__init__.py
|
gilsonbp/Django-facebook
|
7c6900be332f4e9e2ac66a37de5d94d7edfbd3dc
|
[
"BSD-3-Clause"
] | 106
|
2015-01-22T15:34:15.000Z
|
2022-02-20T09:42:49.000Z
|
open_facebook/__init__.py
|
gilsonbp/Django-facebook
|
7c6900be332f4e9e2ac66a37de5d94d7edfbd3dc
|
[
"BSD-3-Clause"
] | 331
|
2015-01-03T14:45:58.000Z
|
2022-03-19T12:44:16.000Z
|
from open_facebook.api import (OpenFacebook, FacebookConnection,
FacebookAuthorization)
| 39.666667
| 64
| 0.647059
| 8
| 119
| 9.5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.310924
| 119
| 2
| 65
| 59.5
| 0.926829
| 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
|
9d25fa8c1e8a43aab0be7b8b8355d5a189dc4797
| 78
|
py
|
Python
|
Codewars/7kyu/exes-and-ohs/Python/solution1.py
|
RevansChen/online-judge
|
ad1b07fee7bd3c49418becccda904e17505f3018
|
[
"MIT"
] | 7
|
2017-09-20T16:40:39.000Z
|
2021-08-31T18:15:08.000Z
|
Codewars/7kyu/exes-and-ohs/Python/solution1.py
|
RevansChen/online-judge
|
ad1b07fee7bd3c49418becccda904e17505f3018
|
[
"MIT"
] | null | null | null |
Codewars/7kyu/exes-and-ohs/Python/solution1.py
|
RevansChen/online-judge
|
ad1b07fee7bd3c49418becccda904e17505f3018
|
[
"MIT"
] | null | null | null |
# Python - 2.7.6
xo = lambda s: s.lower().count('x') == s.lower().count('o')
| 19.5
| 59
| 0.538462
| 15
| 78
| 2.8
| 0.733333
| 0.285714
| 0.52381
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.045455
| 0.153846
| 78
| 3
| 60
| 26
| 0.590909
| 0.179487
| 0
| 0
| 0
| 0
| 0.032258
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| null | 1
| 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
| 0
| 0
| 0
| 0
|
0
| 4
|
9d36027e9579d8d4ee2418bd9ecf52328c994815
| 324
|
py
|
Python
|
pydrepr/drepr/outputs/base_subset_output_class.py
|
scorpio975/d-repr
|
1d08024192642233d42d29e1d05f8713ee265bca
|
[
"MIT"
] | 5
|
2019-10-02T01:04:50.000Z
|
2022-03-08T09:39:50.000Z
|
pydrepr/drepr/outputs/base_subset_output_class.py
|
scorpio975/d-repr
|
1d08024192642233d42d29e1d05f8713ee265bca
|
[
"MIT"
] | 3
|
2020-06-13T22:09:48.000Z
|
2021-04-23T08:23:49.000Z
|
pydrepr/drepr/outputs/base_subset_output_class.py
|
scorpio975/d-repr
|
1d08024192642233d42d29e1d05f8713ee265bca
|
[
"MIT"
] | 5
|
2019-10-02T03:01:27.000Z
|
2021-02-02T13:34:35.000Z
|
from abc import ABC, abstractmethod
from typing import List, Tuple, Any, Iterable, Union
from drepr.outputs.base_output_class import BaseOutputClass
from drepr.outputs.base_output_predicate import BaseOutputPredicate
from drepr.outputs.base_record import BaseRecord
class BaseSubsetOutputClass(BaseOutputClass):
pass
| 29.454545
| 67
| 0.848765
| 40
| 324
| 6.75
| 0.55
| 0.1
| 0.177778
| 0.222222
| 0.192593
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.108025
| 324
| 10
| 68
| 32.4
| 0.934256
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.142857
| 0.714286
| 0
| 0.857143
| 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
| 0
| 1
| 1
| 1
| 0
| 0
| 0
|
0
| 4
|
9d4f6c965a557eb1a88785f8ac96739d39bd341b
| 294
|
py
|
Python
|
ohsiha/core/forms.py
|
nikojii/ohsiha
|
2284234ee2bda4b2945673c86dd3c08dfee3ddb2
|
[
"MIT"
] | null | null | null |
ohsiha/core/forms.py
|
nikojii/ohsiha
|
2284234ee2bda4b2945673c86dd3c08dfee3ddb2
|
[
"MIT"
] | null | null | null |
ohsiha/core/forms.py
|
nikojii/ohsiha
|
2284234ee2bda4b2945673c86dd3c08dfee3ddb2
|
[
"MIT"
] | null | null | null |
from django import forms
from django.contrib.auth.forms import UserCreationForm
from django.contrib.auth.models import User
class RegisterForm(UserCreationForm):
email = forms.EmailField(max_length=254)
class Meta:
model = User
fields = ('username', 'email', 'password1', 'password2', )
| 29.4
| 60
| 0.772109
| 36
| 294
| 6.277778
| 0.611111
| 0.132743
| 0.150442
| 0.185841
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.01938
| 0.122449
| 294
| 10
| 60
| 29.4
| 0.856589
| 0
| 0
| 0
| 0
| 0
| 0.105085
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0.125
| 0.375
| 0
| 0.75
| 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
| 0
| 0
| 1
| 1
| 0
| 1
| 0
|
0
| 4
|
9d56183e5c207f6219fc0df31bfe6cc173f1b6f9
| 201
|
py
|
Python
|
pentest-scripts/python-web-penetration-testing-cookbook/Chapter_05_Code/send_cookies.py
|
paulveillard/cybersecurity-penetration-testing
|
a5afff13ec25afd0cf16ef966d35bddb91518af4
|
[
"Apache-2.0"
] | 6
|
2021-12-07T21:02:12.000Z
|
2022-03-03T12:08:14.000Z
|
pentest-scripts/python-web-penetration-testing-cookbook/Chapter_05_Code/send_cookies.py
|
paulveillard/cybersecurity-penetration-testing
|
a5afff13ec25afd0cf16ef966d35bddb91518af4
|
[
"Apache-2.0"
] | null | null | null |
pentest-scripts/python-web-penetration-testing-cookbook/Chapter_05_Code/send_cookies.py
|
paulveillard/cybersecurity-penetration-testing
|
a5afff13ec25afd0cf16ef966d35bddb91518af4
|
[
"Apache-2.0"
] | 1
|
2022-01-15T23:57:36.000Z
|
2022-01-15T23:57:36.000Z
|
import requests
url = 'http://www.packtpub.com/'
req = requests.get(url)
print req.cookies
cookies = dict(admin='True')
cookie_req = requests.get(url, cookies=cookies)
print cookie_req.text
| 20.1
| 48
| 0.716418
| 29
| 201
| 4.896552
| 0.551724
| 0.15493
| 0.197183
| 0.239437
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.149254
| 201
| 10
| 49
| 20.1
| 0.830409
| 0
| 0
| 0
| 0
| 0
| 0.145078
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0.142857
| null | null | 0.285714
| 1
| 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
19f1ba010e97b11580e2f2bbbcd5cc2e1ce678b0
| 226
|
py
|
Python
|
tough_convert/__init__.py
|
afqueiruga/tough_convert
|
1fef3e7d271ed7cf30daceccdbe40d0fea0e4814
|
[
"BSD-3-Clause"
] | 8
|
2018-10-21T09:56:46.000Z
|
2021-12-18T06:40:18.000Z
|
tough_convert/__init__.py
|
afqueiruga/tough_convert
|
1fef3e7d271ed7cf30daceccdbe40d0fea0e4814
|
[
"BSD-3-Clause"
] | 3
|
2018-10-10T21:38:42.000Z
|
2018-11-05T23:02:35.000Z
|
tough_convert/__init__.py
|
afqueiruga/tough_convert
|
1fef3e7d271ed7cf30daceccdbe40d0fea0e4814
|
[
"BSD-3-Clause"
] | null | null | null |
"""
Tough_convert
"""
from .meshmakerinputs import *
from .vtk_writer import *
from .silo_writer import *
from .gmsh_writer import *
from .flac3d_writer import *
from .read_tough_data import *
from .read_tough2_data import *
| 18.833333
| 31
| 0.769912
| 31
| 226
| 5.322581
| 0.419355
| 0.363636
| 0.387879
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.010309
| 0.141593
| 226
| 11
| 32
| 20.545455
| 0.840206
| 0.057522
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 1
| 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
| 0
| 0
|
0
| 4
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.