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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
496f9fb09ed8ca073a1b323b69ca4902f734d230 | 1,269 | py | Python | distanceCalc.py | jmoehler/CityDistance | 0a7eb898db8ea0dbada43239652ae4aad935dda3 | [
"MIT"
] | null | null | null | distanceCalc.py | jmoehler/CityDistance | 0a7eb898db8ea0dbada43239652ae4aad935dda3 | [
"MIT"
] | null | null | null | distanceCalc.py | jmoehler/CityDistance | 0a7eb898db8ea0dbada43239652ae4aad935dda3 | [
"MIT"
] | null | null | null | from math import cos, acos, pi, sqrt, sin
class City:
def __init__(self, name, lat, lon, temp):
self.name = name
self.lat = lat
self.lon = lon
self.temp = temp
def describe(self):
print("Die Koordinaten von %s sind %f Lat und %f Lon. Die Temperatur beträgt %.1f Grad Celcius." %(self.name, self.lat, self.lon, self.temp))
def info(self):
print("Die Koordinaten von %s sind %.1f Lat und %.1f Lon." %(self.name, self.lat, self.lon))
def __str__(self):
return "Die Koordinaten von %s sind %.1f Lat und %.1f Lon." %(self.name, self.lat, self.lon)
def __repr__(self):
return self.__str__()
def diffGamma(alpha, beta):
# differenz von winkel alpha zu Winkel beta
dGamma = alpha - beta
dGammaRad = pi / 180 * dGamma
# Erdradius in km
r = 6378
# länge auf lat berechnen
return r*sqrt(2*(1-cos(dGammaRad)))
def distanceBase(dilat, dilon):
# insgesammte länge berechnen
return sqrt(dilon**2 + dilat**2)
def distance(city1, city2):
dilat = diffGamma(city1.lat, city2.lat)
dilon = diffGamma(city1.lon, city2.lon)
return distanceBase(dilat, dilon)
def tempDiff(city1, city2):
return abs(city1.temp - city2.temp) | 34.297297 | 149 | 0.624901 | 180 | 1,269 | 4.316667 | 0.35 | 0.05148 | 0.056628 | 0.069498 | 0.234234 | 0.234234 | 0.20592 | 0.15444 | 0.15444 | 0.15444 | 0 | 0.027513 | 0.255319 | 1,269 | 37 | 150 | 34.297297 | 0.794709 | 0.097715 | 0 | 0 | 0 | 0.035714 | 0.164768 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.321429 | false | 0 | 0.035714 | 0.142857 | 0.607143 | 0.071429 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 3 |
496fe4328017b0a5588279aa7e57db6731bb4964 | 95 | py | Python | zoo/auditing/apps.py | uliana291/the-zoo | a15a4162c39553abe91224f4feff5d3b66f9413e | [
"MIT"
] | 90 | 2018-11-20T10:58:24.000Z | 2022-02-19T16:12:46.000Z | zoo/auditing/apps.py | uliana291/the-zoo | a15a4162c39553abe91224f4feff5d3b66f9413e | [
"MIT"
] | 348 | 2018-11-21T09:22:31.000Z | 2021-11-03T13:45:08.000Z | zoo/auditing/apps.py | aexvir/the-zoo | 7816afb9a0a26c6058b030b4a987c73e952d92bd | [
"MIT"
] | 11 | 2018-12-08T18:42:07.000Z | 2021-02-21T06:27:58.000Z | from django.apps import AppConfig
class AuditingConfig(AppConfig):
name = "zoo.auditing"
| 15.833333 | 33 | 0.757895 | 11 | 95 | 6.545455 | 0.909091 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.157895 | 95 | 5 | 34 | 19 | 0.9 | 0 | 0 | 0 | 0 | 0 | 0.126316 | 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 | 0 | 0 | 0 | 3 |
497231bff7e8e9d345553a23f55adb1bd3c5a759 | 1,761 | py | Python | graphx.py | clever-username/baseball-card-inventory | 9940ba746072892961b7ade586e63f7deb26d2e6 | [
"MIT"
] | 1 | 2021-05-18T21:32:43.000Z | 2021-05-18T21:32:43.000Z | graphx.py | clever-username/baseball-card-inventory | 9940ba746072892961b7ade586e63f7deb26d2e6 | [
"MIT"
] | null | null | null | graphx.py | clever-username/baseball-card-inventory | 9940ba746072892961b7ade586e63f7deb26d2e6 | [
"MIT"
] | 2 | 2015-05-18T14:52:01.000Z | 2015-05-19T18:21:51.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Simple color picker program."""
BANNER = """ .::::::::::::::::::::::::::::::::::::::::::::::::.
.. .... ..
.. ...... ... ..
|S .F.Cards.. F.G ia
nt sS.F.Gi||BASE BAL LB
AS EBALLBASEBA||S .F. Gi
an tsS.F.Giants S. F.
Gi ||BASEBALLBA SE BA
LL BASEBA||N.Y.Yankees.F .Gia nt
sS .F.Gi||BASEBALLBASEBALLBASEB A|
|S .F.MetsS.F.GiantsS.F.Gi||BASE BA
LL BA SEBALLBASEBA||S.T.L.Cards.Reds S.
F. Gi||B ASEBALLBASEBALLBASEBA||S.F.GiantsS.F .G
ia nt sS.F.Gi||BASEBALLBASEBALLBASEBA||S.F .G
ia ntsT.B.Rayss.F.Gi||BASEBALL BA
S EBALLBASEBA|'`''''''''''' S
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
____ ____ ____ _ ____ ____ ____
| __ )| __ ) / ___| / \ | _ \| _ \/ ___|
| _ \| _ \ _____| | / _ \ | |_) | | | \___ \
| |_) | |_) |_____| |___ / ___ \| _ <| |_| |___) |
|____/|____/ \____/_/ \_|_| \_|____/|____/
"""
| 60.724138 | 76 | 0.244747 | 100 | 1,761 | 3.4 | 0.51 | 0.070588 | 0.035294 | 0.061765 | 0.064706 | 0.064706 | 0.064706 | 0 | 0 | 0 | 0 | 0.001353 | 0.580352 | 1,761 | 28 | 77 | 62.892857 | 0.458728 | 0.040318 | 0 | 0 | 0 | 0.130435 | 0.988116 | 0.203803 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
4975be83811ebc74df1baade17e5a1895d1cf649 | 353 | py | Python | C_D_Playlist.py | fairoz-ahmed/Casper_Player | f71a26002907e474a9274771565ce781beddcca4 | [
"MIT"
] | null | null | null | C_D_Playlist.py | fairoz-ahmed/Casper_Player | f71a26002907e474a9274771565ce781beddcca4 | [
"MIT"
] | null | null | null | C_D_Playlist.py | fairoz-ahmed/Casper_Player | f71a26002907e474a9274771565ce781beddcca4 | [
"MIT"
] | null | null | null | import tkinter.messagebox
from tkinter import *
from tkinter import ttk
from tkinter import filedialog
import threading
from pygame import mixer
from mutagen.mp3 import MP3
import os
import easygui
import time
import playlist_window as pw
import Main as main
#from PIL import ImageTk,Image
def redirect(path):
main.play_music(path)
| 20.764706 | 31 | 0.78187 | 52 | 353 | 5.269231 | 0.519231 | 0.120438 | 0.186131 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.006969 | 0.186969 | 353 | 16 | 32 | 22.0625 | 0.947735 | 0.082153 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.071429 | false | 0 | 0.857143 | 0 | 0.928571 | 0 | 0 | 0 | 0 | null | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 3 |
4985efb3cec903d0cb0d0b5c74721d37a531530f | 93 | py | Python | pyball/models/config/stats_group.py | SebastianDang/PyBall | d1965aa01477b5ee0db9c0463ec584a7e3997395 | [
"MIT"
] | 74 | 2018-03-04T22:58:46.000Z | 2021-07-06T12:28:50.000Z | pyball/models/config/stats_group.py | SebastianDang/PyBall | d1965aa01477b5ee0db9c0463ec584a7e3997395 | [
"MIT"
] | 18 | 2018-03-10T19:17:54.000Z | 2020-01-04T15:42:47.000Z | pyball/models/config/stats_group.py | SebastianDang/PyBall | d1965aa01477b5ee0db9c0463ec584a7e3997395 | [
"MIT"
] | 13 | 2018-03-06T02:39:38.000Z | 2020-01-17T04:38:53.000Z | from dataclasses import dataclass
@dataclass
class StatsGroup:
displayName: str = None
| 13.285714 | 33 | 0.774194 | 10 | 93 | 7.2 | 0.9 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.182796 | 93 | 6 | 34 | 15.5 | 0.947368 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.25 | 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 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
b8d3d895be119a8b71cde792e94daf1fc8fa955b | 479 | py | Python | vwgconnect/account.py | Farfar/vwgbroker | 9acc9f1a259e26aa830a9534a6dea3cee21c09ff | [
"Apache-2.0"
] | null | null | null | vwgconnect/account.py | Farfar/vwgbroker | 9acc9f1a259e26aa830a9534a6dea3cee21c09ff | [
"Apache-2.0"
] | null | null | null | vwgconnect/account.py | Farfar/vwgbroker | 9acc9f1a259e26aa830a9534a6dea3cee21c09ff | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import re
import time
import logging
import asyncio
import hashlib
import jwt
class Account:
def __init__(self, username, password, spin=None, brand):
self._username = username
self._password = password
self._spin = spin
self._brand = brand
async def login():
if "@" in self._username:
if self._password is not None:
return True
return False
| 18.423077 | 61 | 0.611691 | 58 | 479 | 4.87931 | 0.568966 | 0.127208 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.005988 | 0.302714 | 479 | 25 | 62 | 19.16 | 0.841317 | 0.08977 | 0 | 0 | 0 | 0 | 0.002315 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0.176471 | 0.352941 | null | null | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 3 |
b8d7d6b700479d42df11c33ef276f3c562f44f38 | 159 | py | Python | basic_algorithms/primeiro_ultimo_nome.py | Yta-ux/python_algorithms | 62dd2d897e2f2de8783e68df3022170a86e9132e | [
"MIT"
] | 1 | 2022-01-26T22:15:17.000Z | 2022-01-26T22:15:17.000Z | basic_algorithms/primeiro_ultimo_nome.py | Yta-ux/python_algorithms | 62dd2d897e2f2de8783e68df3022170a86e9132e | [
"MIT"
] | null | null | null | basic_algorithms/primeiro_ultimo_nome.py | Yta-ux/python_algorithms | 62dd2d897e2f2de8783e68df3022170a86e9132e | [
"MIT"
] | null | null | null | nome = input('Nome Completo:').title().strip().split()
print(f"""Prazer em Conhece-lo
Seu Primeiro Nome e: {nome[0]}
Seu Ultimo Nome e: {nome[len(nome)-1]}""") | 39.75 | 54 | 0.666667 | 27 | 159 | 3.925926 | 0.703704 | 0.09434 | 0.169811 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.013986 | 0.100629 | 159 | 4 | 55 | 39.75 | 0.727273 | 0 | 0 | 0 | 0 | 0 | 0.65 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 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 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
b8ed8469a90e01bd0b314d93c23d97aa1b93965d | 143 | py | Python | (3)Algorithms/operator_boolean.py | mass9/Python | 66499164e36a4fe9630029d34b292ab06f849b2f | [
"MIT"
] | null | null | null | (3)Algorithms/operator_boolean.py | mass9/Python | 66499164e36a4fe9630029d34b292ab06f849b2f | [
"MIT"
] | null | null | null | (3)Algorithms/operator_boolean.py | mass9/Python | 66499164e36a4fe9630029d34b292ab06f849b2f | [
"MIT"
] | null | null | null | from operator import*
a = -1
b = 5
print('a= ',a)
print('b= ',b)
print()
print(not_(a))
print(truth(a))
print(is_(a,b))
print(is_not(a,b))
| 9.533333 | 21 | 0.594406 | 29 | 143 | 2.827586 | 0.37931 | 0.219512 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.016529 | 0.153846 | 143 | 14 | 22 | 10.214286 | 0.661157 | 0 | 0 | 0 | 0 | 0 | 0.041958 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.1 | 0 | 0.1 | 0.7 | 1 | 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 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 3 |
b8f9dd022646dc722a37cd9325b2748aca492315 | 180 | py | Python | src/lesson_developer_tools/unittest_truth.py | jasonwee/asus-rt-n14uhp-mrtg | 4fa96c3406e32ea6631ce447db6d19d70b2cd061 | [
"Apache-2.0"
] | 3 | 2018-08-14T09:33:52.000Z | 2022-03-21T12:31:58.000Z | src/lesson_developer_tools/unittest_truth.py | jasonwee/asus-rt-n14uhp-mrtg | 4fa96c3406e32ea6631ce447db6d19d70b2cd061 | [
"Apache-2.0"
] | null | null | null | src/lesson_developer_tools/unittest_truth.py | jasonwee/asus-rt-n14uhp-mrtg | 4fa96c3406e32ea6631ce447db6d19d70b2cd061 | [
"Apache-2.0"
] | null | null | null | import unittest
class TruthTest(unittest.TestCase):
def testAssertTrue(self):
self.assertTrue(True)
def testAssertFalse(self):
self.assertFalse(False)
| 15 | 35 | 0.694444 | 18 | 180 | 6.944444 | 0.722222 | 0.128 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.216667 | 180 | 11 | 36 | 16.363636 | 0.886525 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.666667 | 1 | 0.333333 | false | 0 | 0.166667 | 0 | 0.666667 | 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 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
770b263fbdf34c06e41fa87b5529ee3e705b5a07 | 20 | py | Python | test/__init__.py | miguelcarrasco/anothercryptosolver | 57ac6be024574a46492d1e84782ff02763e57010 | [
"MIT"
] | null | null | null | test/__init__.py | miguelcarrasco/anothercryptosolver | 57ac6be024574a46492d1e84782ff02763e57010 | [
"MIT"
] | null | null | null | test/__init__.py | miguelcarrasco/anothercryptosolver | 57ac6be024574a46492d1e84782ff02763e57010 | [
"MIT"
] | null | null | null | __author__ = 'deon'
| 10 | 19 | 0.7 | 2 | 20 | 5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.15 | 20 | 1 | 20 | 20 | 0.588235 | 0 | 0 | 0 | 0 | 0 | 0.2 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
770c61ce8220d1f9ab5e398ccfbfd93f6911fe13 | 317 | py | Python | programming/python/ex004.py | Vinicius-Moraes20/personal-projects | c041909ab1c66eeca11768f8f7944eb351c8b8e7 | [
"MIT"
] | null | null | null | programming/python/ex004.py | Vinicius-Moraes20/personal-projects | c041909ab1c66eeca11768f8f7944eb351c8b8e7 | [
"MIT"
] | null | null | null | programming/python/ex004.py | Vinicius-Moraes20/personal-projects | c041909ab1c66eeca11768f8f7944eb351c8b8e7 | [
"MIT"
] | null | null | null | valor = input("Digite algo: ")
print("É do tipo", type(valor))
print("Valor numérico:", valor.isnumeric())
print("Valor Alfa:", valor.isalpha())
print("Valor Alfanumérico:", valor.isalnum())
print("Valor ASCII:", valor.isascii())
print("Valor Decimal", valor.isdecimal())
print("Valor Printavel", valor.isprintable()) | 39.625 | 45 | 0.712934 | 40 | 317 | 5.65 | 0.525 | 0.265487 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.082019 | 317 | 8 | 46 | 39.625 | 0.776632 | 0 | 0 | 0 | 0 | 0 | 0.336478 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0.875 | 0 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 3 |
770d8f29602f5abced8ace8b5ba5e47df2e792c0 | 335 | py | Python | src/data/preprocessors/__init__.py | paulwarkentin/tf-ssd-vgg | f48e3ccbb8eb092d3cb82a9d90164c7328880477 | [
"MIT"
] | 5 | 2021-09-26T07:19:42.000Z | 2022-03-11T23:25:36.000Z | ssd/src/data/preprocessors/__init__.py | bharatmahaur/ComparativeStudy | 2e3b6de882acc2a465e1b7c8bcd23cc9c8181d3d | [
"Apache-2.0"
] | null | null | null | ssd/src/data/preprocessors/__init__.py | bharatmahaur/ComparativeStudy | 2e3b6de882acc2a465e1b7c8bcd23cc9c8181d3d | [
"Apache-2.0"
] | null | null | null | ##
## /src/data/preprocessors/__init__.py
##
## Created by Paul Warkentin <paul@warkentin.email> on 15/07/2018.
## Updated by Paul Warkentin <paul@warkentin.email> on 15/07/2018.
##
from .bbox_preprocessor import BBoxPreprocessor
from .default_preprocessor import DefaultPreprocessor
from .image_preprocessor import ImagePreprocessor
| 30.454545 | 66 | 0.797015 | 42 | 335 | 6.190476 | 0.571429 | 0.2 | 0.115385 | 0.146154 | 0.330769 | 0.330769 | 0.330769 | 0.330769 | 0.330769 | 0.330769 | 0 | 0.053156 | 0.101493 | 335 | 10 | 67 | 33.5 | 0.810631 | 0.486567 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 3 |
7732d1b5ac77c6e2332d3fe38f546a806fa00262 | 434 | py | Python | miniamf/adapters/_array.py | zackw/pyamf | 59ca667e37a20d8464b098f4ebec89de6f319413 | [
"MIT"
] | 14 | 2017-05-04T17:22:30.000Z | 2020-01-23T06:30:19.000Z | miniamf/adapters/_array.py | zackw/pyamf | 59ca667e37a20d8464b098f4ebec89de6f319413 | [
"MIT"
] | 1 | 2020-05-16T06:28:02.000Z | 2020-05-16T06:28:02.000Z | miniamf/adapters/_array.py | zackw/pyamf | 59ca667e37a20d8464b098f4ebec89de6f319413 | [
"MIT"
] | 6 | 2017-09-13T19:30:35.000Z | 2021-07-26T14:41:57.000Z | # Copyright (c) The PyAMF Project.
# See LICENSE.txt for details.
"""
U{array<http://docs.python.org/library/array.html>} adapter module.
Will convert all array.array instances to a python list before encoding. All
type information is lost (but degrades nicely).
@since: 0.5
"""
from __future__ import absolute_import
import array
import miniamf
from miniamf.adapters import util
miniamf.add_type(array.ArrayType, util.to_list)
| 21.7 | 76 | 0.774194 | 66 | 434 | 4.984848 | 0.727273 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.005305 | 0.131336 | 434 | 19 | 77 | 22.842105 | 0.867374 | 0.619816 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.8 | 0 | 0.8 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 3 |
7736dad67e1bf0f9644b352cfa50dc3d03404717 | 211 | py | Python | src/westpa/core/reweight/__init__.py | burntyellow/adelman_ci | cca251a51b34843faed0275cce01d7a307829993 | [
"MIT"
] | 140 | 2015-01-07T23:30:36.000Z | 2022-03-28T17:15:30.000Z | lib/west_tools/westpa/reweight/__init__.py | burntyellow/westpa | 9dc62478fcef0001b9c038cd56a40b6be1b9d64a | [
"MIT"
] | 157 | 2015-01-03T03:38:36.000Z | 2022-03-31T14:12:16.000Z | lib/west_tools/westpa/reweight/__init__.py | burntyellow/westpa | 9dc62478fcef0001b9c038cd56a40b6be1b9d64a | [
"MIT"
] | 56 | 2015-01-02T21:21:40.000Z | 2022-03-03T16:27:54.000Z |
'''
Function(s) for the postanalysis toolkit
'''
import logging
log = logging.getLogger(__name__)
from . import _reweight
from ._reweight import (stats_process, reweight_for_c)
from .matrix import FluxMatrix
| 17.583333 | 54 | 0.781991 | 27 | 211 | 5.777778 | 0.666667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.132701 | 211 | 11 | 55 | 19.181818 | 0.852459 | 0.189573 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.8 | 0 | 0.8 | 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 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 3 |
775087ff0c58dbd29b82c1af2c4f5dcf0ce17d5d | 844 | py | Python | pysparkling/sql/expressions/literals.py | ptallada/pysparkling | f0e8e8d039f3313c2693b7c7576cb1b7ba5a6d78 | [
"Apache-2.0"
] | 260 | 2015-05-11T18:08:44.000Z | 2022-01-15T13:19:43.000Z | pysparkling/sql/expressions/literals.py | ptallada/pysparkling | f0e8e8d039f3313c2693b7c7576cb1b7ba5a6d78 | [
"Apache-2.0"
] | 79 | 2015-06-02T09:53:25.000Z | 2021-09-26T11:18:18.000Z | pysparkling/sql/expressions/literals.py | ptallada/pysparkling | f0e8e8d039f3313c2693b7c7576cb1b7ba5a6d78 | [
"Apache-2.0"
] | 50 | 2015-06-06T17:00:58.000Z | 2022-01-15T13:19:18.000Z | from ..utils import AnalysisException
from .expressions import Expression
class Literal(Expression):
def __init__(self, value):
super().__init__()
self.value = value
def eval(self, row, schema):
return self.value
def __str__(self):
if self.value is True:
return "true"
if self.value is False:
return "false"
if self.value is None:
return "NULL"
return str(self.value)
def get_literal_value(self):
if hasattr(self.value, "expr") or isinstance(self.value, Expression):
raise AnalysisException("Value should not be a Column or an Expression,"
f" but got {type(self)}: {self}")
return self.value
def args(self):
return (self.value, )
__all__ = ["Literal"]
| 25.575758 | 84 | 0.582938 | 99 | 844 | 4.787879 | 0.424242 | 0.208861 | 0.094937 | 0.082278 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.319905 | 844 | 32 | 85 | 26.375 | 0.825784 | 0 | 0 | 0.083333 | 0 | 0 | 0.117299 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.208333 | false | 0 | 0.083333 | 0.083333 | 0.625 | 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 | 0 | 1 | 0 | 0 | 3 |
7755642e2df8bfea6999683ed9d91b14f6530187 | 5,560 | py | Python | interpreter/code/tests/test_basic.py | yunkai123/my-500lines-notes | 60fd3b18919b5bcb90ddece9e088c1c152438972 | [
"MIT"
] | null | null | null | interpreter/code/tests/test_basic.py | yunkai123/my-500lines-notes | 60fd3b18919b5bcb90ddece9e088c1c152438972 | [
"MIT"
] | null | null | null | interpreter/code/tests/test_basic.py | yunkai123/my-500lines-notes | 60fd3b18919b5bcb90ddece9e088c1c152438972 | [
"MIT"
] | null | null | null | """ Byterund 的基本测试"""
import vmtest
class It(vmtest.VmTestCase):
def test1(self):
self.assert_ok("""\
class Thing(object):
@staticmethod
def smeth(x):
print(x)
@classmethod
def cmeth(cls, x):
print(x)
Thing.smeth(1492)
Thing.cmeth(1776)
""")
def test_contstant(self):
self.assert_ok("17")
def test_for_loop(self):
self.assert_ok("""\
out = ""
for i in range(5):
out = out + str(i)
print(out)
""")
def test_slice(self):
self.assert_ok("""\
print("hello, world"[3:8])
""")
self.assert_ok("""\
print("hello, world"[:8])
""")
self.assert_ok("""\
print("hello, world"[3:])
""")
self.assert_ok("""\
print("hello, world"[:])
""")
self.assert_ok("""\
print("hello, world"[::-1])
""")
self.assert_ok("""\
print("hello, world"[3:8:2])
""")
def test_slice_assignment(self):
self.assert_ok("""\
l = list(range(10))
l[3:8] = ["x"]
print(l)
""")
self.assert_ok("""\
l = list(range(10))
l[:8] = ["x"]
print(l)
""")
self.assert_ok("""\
l = list(range(10))
l[3:] = ["x"]
print(l)
""")
self.assert_ok("""\
l = list(range(10))
l[:] = ["x"]
print(l)
""")
def test_building_stuff(self):
self.assert_ok("""\
print((1+1, 2+2, 3+3))
""")
self.assert_ok("""\
print([1+1, 2+2, 3+3])
""")
self.assert_ok("""\
print({1:1+1, 2:2+2, 3:3+3})
""")
def test_subscripting(self):
self.assert_ok("""\
l = list(range(10))
print("%s %s %s" % (l[0], l[3], l[9]))
""")
self.assert_ok("""\
l = list(range(10))
l[5] = 17
print(l)
""")
def test_list_comprehension(self):
self.assert_ok("""\
x = [z*z for z in range(5)]
assert x == [0, 1, 4, 9, 16]
""")
def test_unary_operators(self):
self.assert_ok("""\
x = 8
print(-x, ~x, not x)
""")
def test_attributes(self):
self.assert_ok("""\
l = lambda: 1 # Just to have an object...
l.foo = 17
print(hasattr(l, "foo"), l.foo)
# del l.foo
# print(hasattr(l, "foo"))
""")
def test_import(self):
self.assert_ok("""\
import math
print(math.pi, math.e)
from math import sqrt
print(sqrt(2))
# from math import * # not supported
# print(sin(2))
""")
def test_staticmethods(self):
self.assert_ok("""\
class Thing(object):
@staticmethod
def smeth(x):
print(x)
@classmethod
def cmeth(cls, x):
print(x)
Thing.smeth(1492)
Thing.cmeth(1776)
""")
def test_unbound_methods(self):
self.assert_ok("""\
class Thing(object):
def meth(self, x):
print(x)
m = Thing.meth
m(Thing(), 1815)
""")
def test_unpacking(self):
self.assert_ok("""\
a, b, c = (1, 2, 3)
assert a == 1
assert b == 2
assert c == 3
""")
def test_exec_function(self):
self.assert_ok("""\
g = {}
exec("a = 11", g, g)
assert g['a'] == 11
""")
def test_jump_if_true_or_pop(self):
self.assert_ok("""\
def f(a, b):
return a or b
assert f(17, 0) == 17
assert f(0, 23) == 23
assert f(0, "") == ""
""")
def test_jump_if_false_or_pop(self):
self.assert_ok("""\
def f(a, b):
return not(a and b)
assert f(17, 0) is True
assert f(0, 23) is True
assert f(0, "") is True
assert f(17, 23) is False
""")
def test_pop_jump_if_true(self):
self.assert_ok("""\
def f(a):
if not a:
return 'foo'
else:
return 'bar'
assert f(0) == 'foo'
assert f(1) == 'bar'
""")
class TestComparisons(vmtest.VmTestCase):
def test_in(self):
self.assert_ok("""\
assert "x" in "xyz"
assert "x" not in "abc"
assert "x" in ("x", "y", "z")
assert "x" not in ("a", "b", "c")
""")
def test_less(self):
self.assert_ok("""\
assert 1 < 3
assert 1 <= 2 and 1 <= 1
assert "a" < "b"
assert "a" <= "b" and "a" <= "a"
""")
def test_greater(self):
self.assert_ok("""\
assert 3 > 1
assert 3 >= 1 and 3 >= 3
assert "z" > "a"
assert "z" >= "a" and "z" >= "z"
""") | 25.62212 | 55 | 0.380935 | 613 | 5,560 | 3.340946 | 0.174551 | 0.15625 | 0.1875 | 0.164063 | 0.472656 | 0.380859 | 0.354492 | 0.30127 | 0.245117 | 0.231934 | 0 | 0.044816 | 0.46223 | 5,560 | 217 | 56 | 25.62212 | 0.640134 | 0.002518 | 0 | 0.494792 | 0 | 0.005208 | 0.680866 | 0 | 0 | 0 | 0 | 0 | 0.302083 | 1 | 0.109375 | false | 0 | 0.026042 | 0 | 0.166667 | 0.140625 | 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 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
775d1ff6bf052dcb5d8a678cb806eb618f0ebf92 | 26,692 | py | Python | pysnmp-with-texts/GENERIC-3COM-VLAN-MIB-1-0-7.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 8 | 2019-05-09T17:04:00.000Z | 2021-06-09T06:50:51.000Z | pysnmp-with-texts/GENERIC-3COM-VLAN-MIB-1-0-7.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 4 | 2019-05-31T16:42:59.000Z | 2020-01-31T21:57:17.000Z | pysnmp-with-texts/GENERIC-3COM-VLAN-MIB-1-0-7.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 10 | 2019-04-30T05:51:36.000Z | 2022-02-16T03:33:41.000Z | #
# PySNMP MIB module GENERIC-3COM-VLAN-MIB-1-0-7 (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/GENERIC-3COM-VLAN-MIB-1-0-7
# Produced by pysmi-0.3.4 at Wed May 1 11:09:00 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
OctetString, ObjectIdentifier, Integer = mibBuilder.importSymbols("ASN1", "OctetString", "ObjectIdentifier", "Integer")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ConstraintsUnion, SingleValueConstraint, ValueRangeConstraint, ValueSizeConstraint, ConstraintsIntersection = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsUnion", "SingleValueConstraint", "ValueRangeConstraint", "ValueSizeConstraint", "ConstraintsIntersection")
ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup")
NotificationType, Counter32, Integer32, ObjectIdentity, Counter64, IpAddress, MibIdentifier, iso, ModuleIdentity, Unsigned32, Gauge32, TimeTicks, MibScalar, MibTable, MibTableRow, MibTableColumn, Bits, enterprises = mibBuilder.importSymbols("SNMPv2-SMI", "NotificationType", "Counter32", "Integer32", "ObjectIdentity", "Counter64", "IpAddress", "MibIdentifier", "iso", "ModuleIdentity", "Unsigned32", "Gauge32", "TimeTicks", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Bits", "enterprises")
TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString")
class RowStatus(Integer32):
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))
namedValues = NamedValues(("active", 1), ("notInService", 2), ("notReady", 3), ("createAndGo", 4), ("createAndWait", 5), ("destroy", 6))
a3Com = MibIdentifier((1, 3, 6, 1, 4, 1, 43))
generic = MibIdentifier((1, 3, 6, 1, 4, 1, 43, 10))
genExperimental = MibIdentifier((1, 3, 6, 1, 4, 1, 43, 10, 1))
genVirtual = MibIdentifier((1, 3, 6, 1, 4, 1, 43, 10, 1, 14))
a3ComVlanGroup = MibIdentifier((1, 3, 6, 1, 4, 1, 43, 10, 1, 14, 1))
a3ComVlanProtocolsGroup = MibIdentifier((1, 3, 6, 1, 4, 1, 43, 10, 1, 14, 2))
a3ComVirtualGroup = MibIdentifier((1, 3, 6, 1, 4, 1, 43, 10, 1, 14, 3))
a3ComEncapsulationGroup = MibIdentifier((1, 3, 6, 1, 4, 1, 43, 10, 1, 14, 4))
class A3ComVlanType(Integer32):
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20))
namedValues = NamedValues(("vlanLayer2", 1), ("vlanUnspecifiedProtocols", 2), ("vlanIPProtocol", 3), ("vlanIPXProtocol", 4), ("vlanAppleTalkProtocol", 5), ("vlanXNSProtocol", 6), ("vlanISOProtocol", 7), ("vlanDECNetProtocol", 8), ("vlanNetBIOSProtocol", 9), ("vlanSNAProtocol", 10), ("vlanVINESProtocol", 11), ("vlanX25Protocol", 12), ("vlanIGMPProtocol", 13), ("vlanSessionLayer", 14), ("vlanNetBeui", 15), ("vlanLayeredProtocols", 16), ("vlanIPXIIProtocol", 17), ("vlanIPX8022Protocol", 18), ("vlanIPX8023Protocol", 19), ("vlanIPX8022SNAPProtocol", 20))
class A3ComVlanLayer3Type(Integer32):
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13))
namedValues = NamedValues(("vlanIPProtocol", 1), ("vlanIPXProtocol", 2), ("vlanAppleTalkProtocol", 3), ("vlanXNSProtocol", 4), ("vlanSNAProtocol", 5), ("vlanDECNetProtocol", 6), ("vlanNetBIOSProtocol", 7), ("vlanVINESProtocol", 8), ("vlanX25Protocol", 9), ("vlanIPXIIProtocol", 10), ("vlanIPX8022Protocol", 11), ("vlanIPX8023Protocol", 12), ("vlanIPX8022SNAPProtocol", 13))
class A3ComVlanModeType(Integer32):
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3))
namedValues = NamedValues(("vlanUseDefault", 1), ("vlanOpen", 2), ("vlanClosed", 3))
a3ComVlanGlobalMappingTable = MibTable((1, 3, 6, 1, 4, 1, 43, 10, 1, 14, 1, 1), )
if mibBuilder.loadTexts: a3ComVlanGlobalMappingTable.setStatus('mandatory')
if mibBuilder.loadTexts: a3ComVlanGlobalMappingTable.setDescription('This table lists VLAN interfaces that are globally identified. A single entry exists in this list for each VLAN interface in the system that is bound to a global identifier.')
a3ComVlanGlobalMappingEntry = MibTableRow((1, 3, 6, 1, 4, 1, 43, 10, 1, 14, 1, 1, 1), ).setIndexNames((0, "GENERIC-3COM-VLAN-MIB-1-0-7", "a3ComVlanGlobalMappingIdentifier"))
if mibBuilder.loadTexts: a3ComVlanGlobalMappingEntry.setStatus('mandatory')
if mibBuilder.loadTexts: a3ComVlanGlobalMappingEntry.setDescription('An individual VLAN interface global mapping entry. Entries in this table are created by setting the a3ComVlanIfGlobalIdentifier object in the a3ComVlanIfTable to a non-zero value.')
a3ComVlanGlobalMappingIdentifier = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 10, 1, 14, 1, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535)))
if mibBuilder.loadTexts: a3ComVlanGlobalMappingIdentifier.setStatus('mandatory')
if mibBuilder.loadTexts: a3ComVlanGlobalMappingIdentifier.setDescription('An index into the a3ComVlanGlobalMappingTable and an administratively assigned global VLAN identifier. The value of this object globally identifies the VLAN interface. For VLAN interfaces, on different network devices, which are part of the same globally identified VLAN, the value of this object will be the same.')
a3ComVlanGlobalMappingIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 10, 1, 14, 1, 1, 1, 2), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: a3ComVlanGlobalMappingIfIndex.setStatus('mandatory')
if mibBuilder.loadTexts: a3ComVlanGlobalMappingIfIndex.setDescription('The value of a3ComVlanIfIndex for the VLAN interface in the a3ComVlanIfTable, which is bound to the global identifier specified by this entry.')
a3ComVlanIfTable = MibTable((1, 3, 6, 1, 4, 1, 43, 10, 1, 14, 1, 2), )
if mibBuilder.loadTexts: a3ComVlanIfTable.setStatus('mandatory')
if mibBuilder.loadTexts: a3ComVlanIfTable.setDescription('This table lists VLAN interfaces that exist within a device. A single entry exists in this list for each VLAN interface in the system. A VLAN interface may be created, destroyed and/or mapped to a globally identified vlan.')
a3ComVlanIfEntry = MibTableRow((1, 3, 6, 1, 4, 1, 43, 10, 1, 14, 1, 2, 1), ).setIndexNames((0, "GENERIC-3COM-VLAN-MIB-1-0-7", "a3ComVlanIfIndex"))
if mibBuilder.loadTexts: a3ComVlanIfEntry.setStatus('mandatory')
if mibBuilder.loadTexts: a3ComVlanIfEntry.setDescription('An individual VLAN interface entry. When an NMS wishes to create a new entry in this table, it must obtain a non-zero index from the a3ComNextAvailableVirtIfIndex object. Row creation in this table will fail if the chosen index value does not match the current value returned from the a3ComNextAvailableVirtIfIndex object.')
a3ComVlanIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 10, 1, 14, 1, 2, 1, 1), Integer32())
if mibBuilder.loadTexts: a3ComVlanIfIndex.setStatus('mandatory')
if mibBuilder.loadTexts: a3ComVlanIfIndex.setDescription("The index value of this row and the vlan's ifIndex in the ifTable. The NMS obtains the index value for this row by reading the a3ComNextAvailableVirtIfIndex object.")
a3ComVlanIfDescr = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 10, 1, 14, 1, 2, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 80))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: a3ComVlanIfDescr.setStatus('mandatory')
if mibBuilder.loadTexts: a3ComVlanIfDescr.setDescription('This is a description of the VLAN interface.')
a3ComVlanIfType = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 10, 1, 14, 1, 2, 1, 3), A3ComVlanType()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: a3ComVlanIfType.setStatus('mandatory')
if mibBuilder.loadTexts: a3ComVlanIfType.setDescription('The VLAN interface type.')
a3ComVlanIfGlobalIdentifier = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 10, 1, 14, 1, 2, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: a3ComVlanIfGlobalIdentifier.setStatus('mandatory')
if mibBuilder.loadTexts: a3ComVlanIfGlobalIdentifier.setDescription('An administratively assigned global VLAN identifier. For VLAN interfaces, on different network devices, which are part of the same globally identified VLAN, the value of this object will be the same. The binding between a global identifier and a VLAN interface can be created or removed. To create a binding an NMS must write a non-zero value to this object. To delete a binding, the NMS must write a zero to this object.')
a3ComVlanIfInfo = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 10, 1, 14, 1, 2, 1, 5), OctetString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: a3ComVlanIfInfo.setStatus('mandatory')
if mibBuilder.loadTexts: a3ComVlanIfInfo.setDescription('A TLV encoded information string for the VLAN interface. The information contained within this string corresponds to VLAN information not contained within this table, but contained elsewhere within this MIB module. The purpose of this string is to provide an NMS with a quick read mechanism of all related VLAN interface information. The encoding rules are defined according to: tag = 2 bytes length = 2 bytes value = n bytes The following tags are defined: TAG OBJECT DESCRIPTION 1 a3ComIpVlanIpNetAddress IP Network Address of IP VLAN 2 a3ComIpVlanIpNetMask IP Network Mask of IP VLAN')
a3ComVlanIfStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 10, 1, 14, 1, 2, 1, 6), RowStatus()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: a3ComVlanIfStatus.setStatus('mandatory')
if mibBuilder.loadTexts: a3ComVlanIfStatus.setDescription('The status column for this VLAN interface. This OBJECT can be set to: active(1) createAndGo(4) createAndWait(5) destroy(6) The following values may be read: active(1) notInService(2) notReady(3). Setting this object to createAndGo(4) causes the agent to attempt to create and commit the row based on the contents of the objects in the row. If all necessary information is present in the row and the values are acceptible to the agent, the agent will change the status to active(1). If any of the necessary objects are not available, the agent will reject the creation request. Setting this object to createAndWait(5) causes a row in in this table to be created. The agent sets the status to notInService(2) if all of the information is present in the row and the values are acceptible to the agent; otherwise, the agent sets the status to notReady(3). Setting this object to active(1) is only valid when the current status is active(1) or notInService(2). When the state of the row transitions to active(1), the agent creates the corresponding row in the ifTable.. Setting this object to destroy(6) will remove the corresponding VLAN interface, remove the entry in this table, and the corresponding entries in the a3ComVlanGlobalMappingTable and the ifTable. In order for a set of this object to destroy(6) to succeed, all dependencies on this row must have been removed. These will include any stacking dependencies in the ifStackTable and any protocol specific tables dependencies.')
a3ComVlanIfModeType = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 10, 1, 14, 1, 2, 1, 7), A3ComVlanModeType()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: a3ComVlanIfModeType.setStatus('mandatory')
if mibBuilder.loadTexts: a3ComVlanIfModeType.setDescription(' The VLAN mode type for this interface. This object can be set to: usedefault(1) open(2) closed(3) UseDefault Vlans: uses the bridge Vlan Mode value. The bridge Vlan Mode Value can be set to : Open, Closed or Mixed. Open VLANs: have no requirements about relationship between the bridge port that a frame was received upon and the bridge port(s) that it is transmitted on. All open VLANs within the bridge will share the same address table. Closed VLANs: require that the bridge port that a frame is received on is the same VLAN interface as the bridge port(s) that a frame is transmitted on. Each closed VLAN within the bridge will have its own address table.')
a3ComIpVlanTable = MibTable((1, 3, 6, 1, 4, 1, 43, 10, 1, 14, 2, 1), )
if mibBuilder.loadTexts: a3ComIpVlanTable.setStatus('mandatory')
if mibBuilder.loadTexts: a3ComIpVlanTable.setDescription('A list of IP VLAN interface information entries. Entries in this table are related to entries in the a3ComVlanIfTable by using the same index.')
a3ComIpVlanEntry = MibTableRow((1, 3, 6, 1, 4, 1, 43, 10, 1, 14, 2, 1, 1), ).setIndexNames((0, "GENERIC-3COM-VLAN-MIB-1-0-7", "a3ComVlanIfIndex"))
if mibBuilder.loadTexts: a3ComIpVlanEntry.setStatus('mandatory')
if mibBuilder.loadTexts: a3ComIpVlanEntry.setDescription('A a3ComIpVlanEntry contains layer 3 information about a particular IP VLAN interface. Note entries in this table cannot be deleted until the entries in the ifStackTable that produce overlap are removed.')
a3ComIpVlanIpNetAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 10, 1, 14, 2, 1, 1, 1), IpAddress()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: a3ComIpVlanIpNetAddress.setStatus('mandatory')
if mibBuilder.loadTexts: a3ComIpVlanIpNetAddress.setDescription('The IP network number for the IP VLAN interface defined in the a3ComVlanIfTable identified with the same index. The IpNetAdress and the IpNetMask must be set and the the row creation process completed by a NMS before overlapping rows in the ifStackTable can be created. Sets to the ifStackTable that produce overlapping IP IP VLAN interfaces will fail if this object is not set.')
a3ComIpVlanIpNetMask = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 10, 1, 14, 2, 1, 1, 2), IpAddress()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: a3ComIpVlanIpNetMask.setStatus('mandatory')
if mibBuilder.loadTexts: a3ComIpVlanIpNetMask.setDescription('The IP network mask corresponding to the IP Network address defined by a3ComIpVlanIpNetAddress. The IpNetAdress and the IpNetMask must be set and the row creation process completed by a NMS before overlapping rows in the ifStackTable can be created. Sets to the ifStackTable that produce overlapping IP VLAN interfaces will fail if this object is not set.')
a3ComIpVlanStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 10, 1, 14, 2, 1, 1, 3), RowStatus()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: a3ComIpVlanStatus.setStatus('mandatory')
if mibBuilder.loadTexts: a3ComIpVlanStatus.setDescription('The status column for this IP VLAN entry. This object can be set to: active(1) createAndGo(4) createAndWait(5) destroy(6) The following values may be read: active(1) notInService(2) notReady(3). Setting this object to createAndGo(4) causes the agent to attempt to create and commit the row based on the contents of the objects in the row. If all necessary information is present in the row and the values are acceptible to the agent, the agent will change the status to active(1). If any of the necessary objects are not available, the agent will reject the row creation request. Setting this object to createAndWait(5) causes a row in in this table to be created. The agent sets the status to notInService(2) if all of the information is present in the row and the values are acceptible to the agent; otherwise, the agent sets the status to notReady(3). Setting this object to active(1) is only valid when the current status is active(1) or notInService(2). When the status changes to active(1), the agent applies the IP parmeters to the IP VLAN interface identified by the corresponding value of the a3ComIpVlanIndex object. Setting this object to destroy(6) will remove the IP parmeters from the IP VLAN interface and remove the entry from this table. Setting this object to destroy(6) will remove the layer 3 information from the IP VLAN interface and will remove the row from this table. Note that this action cannot be performed if there are ifStackTable entries that result in overlapping IP VLAN interfaces. Note that these dependencies must be removed first.')
a3ComVlanProtocolTable = MibTable((1, 3, 6, 1, 4, 1, 43, 10, 1, 14, 2, 2), )
if mibBuilder.loadTexts: a3ComVlanProtocolTable.setStatus('mandatory')
if mibBuilder.loadTexts: a3ComVlanProtocolTable.setDescription('This table lists the configured protocols per Vlan. A single entry exists in this list for each protocol configured on a VLAN interface. The a3ComVlanIfType object in a3ComVlanIfTable has to be set to vlanLayeredProtocols in order to use this table.')
a3ComVlanProtocolEntry = MibTableRow((1, 3, 6, 1, 4, 1, 43, 10, 1, 14, 2, 2, 1), ).setIndexNames((0, "GENERIC-3COM-VLAN-MIB-1-0-7", "a3ComVlanProtocolIfIndex"), (0, "GENERIC-3COM-VLAN-MIB-1-0-7", "a3ComVlanProtocolIndex"))
if mibBuilder.loadTexts: a3ComVlanProtocolEntry.setStatus('mandatory')
if mibBuilder.loadTexts: a3ComVlanProtocolEntry.setDescription('A a3ComVlanProtocolEntry contains a single VLAN to protocol entry.')
a3ComVlanProtocolIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 10, 1, 14, 2, 2, 1, 1), Integer32())
if mibBuilder.loadTexts: a3ComVlanProtocolIfIndex.setStatus('mandatory')
if mibBuilder.loadTexts: a3ComVlanProtocolIfIndex.setDescription("The first indice of this row and the vlan's ifIndex in the ifTable. The value of this object is the same as the corresponding a3ComVlanIfIndex in the a3ComVlanTable.")
a3ComVlanProtocolIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 10, 1, 14, 2, 2, 1, 2), A3ComVlanLayer3Type())
if mibBuilder.loadTexts: a3ComVlanProtocolIndex.setStatus('mandatory')
if mibBuilder.loadTexts: a3ComVlanProtocolIndex.setDescription('The second indice of this row, which identifies one of possible many protocols associated with the VLAN interface identified by this entries first indice. The values are based on the layer 3 protocols specified in A3ComVlanType')
a3ComVlanProtocolStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 10, 1, 14, 2, 2, 1, 3), RowStatus()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: a3ComVlanProtocolStatus.setStatus('mandatory')
if mibBuilder.loadTexts: a3ComVlanProtocolStatus.setDescription('The status column for this VLAN interface. This OBJECT can be set to: active(1) createAndGo(4) createAndWait(5) destroy(6) The following values may be read: active(1) notInService(2) notReady(3). Setting this object to createAndGo(4) causes the agent to attempt to create and commit the row based on the contents of the objects in the row. If all necessary information is present in the row and the values are acceptible to the agent, the agent will change the status to active(1). If any of the necessary objects are not available, the agent will reject the creation request. Setting this object to createAndWait(5) causes a row in this table to be created. The agent sets the status to notInService(2) if all of the information is present in the row and the values are acceptable to the agent; otherwise, the agent sets the status to notReady(3). Setting this object to active(1) is only valid when the current status is active(1) or notInService(2). Row creation to this table is only possible when a corresponding VLAN entry has been created in the a3ComVlanTable with an a3ComVlanType set to vlanLayeredProtocols(16). Setting this object to destroy(6) will remove the corresponding VLAN interface to protocol mapping.')
class A3ComVlanEncapsType(Integer32):
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3))
namedValues = NamedValues(("vlanEncaps3ComProprietaryVLT", 1), ("vlanEncaps8021q", 2), ("vlanEncapsPre8021qONcore", 3))
a3ComVlanEncapsIfTable = MibTable((1, 3, 6, 1, 4, 1, 43, 10, 1, 14, 4, 1), )
if mibBuilder.loadTexts: a3ComVlanEncapsIfTable.setStatus('mandatory')
if mibBuilder.loadTexts: a3ComVlanEncapsIfTable.setDescription('This table lists VLAN encapsulation interfaces that exist within a device. A single entry exists in this list for each VLAN encapsulation interface in the system. A VLAN encapsulation interface may be created or destroyed.')
a3ComVlanEncapsIfEntry = MibTableRow((1, 3, 6, 1, 4, 1, 43, 10, 1, 14, 4, 1, 1), ).setIndexNames((0, "GENERIC-3COM-VLAN-MIB-1-0-7", "a3ComVlanEncapsIfIndex"))
if mibBuilder.loadTexts: a3ComVlanEncapsIfEntry.setStatus('mandatory')
if mibBuilder.loadTexts: a3ComVlanEncapsIfEntry.setDescription('An individual VLAN encapsulation interface entry. When an NMS wishes to create a new entry in this table, it must obtain a non-zero index from the a3ComNextAvailableVirtIfIndex object. Row creation in this table will fail if the chosen index value does not match the current value returned from the a3ComNextAvailableVirtIfIndex object.')
a3ComVlanEncapsIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 10, 1, 14, 4, 1, 1, 1), Integer32())
if mibBuilder.loadTexts: a3ComVlanEncapsIfIndex.setStatus('mandatory')
if mibBuilder.loadTexts: a3ComVlanEncapsIfIndex.setDescription("The index value of this row and the encapsulation interface's ifIndex in the ifTable. The NMS obtains the index value used for creating a row in this table by reading the a3ComNextAvailableVirtIfIndex object.")
a3ComVlanEncapsIfType = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 10, 1, 14, 4, 1, 1, 2), A3ComVlanEncapsType()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: a3ComVlanEncapsIfType.setStatus('mandatory')
if mibBuilder.loadTexts: a3ComVlanEncapsIfType.setDescription('The encapsulation algorithm used when encapsulating packets transmitted, or de-encapsulating packets received through this interface.')
a3ComVlanEncapsIfTag = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 10, 1, 14, 4, 1, 1, 3), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: a3ComVlanEncapsIfTag.setStatus('mandatory')
if mibBuilder.loadTexts: a3ComVlanEncapsIfTag.setDescription('The tag used when encapsulating packets transmitted, or de-encapsulating packets received through this interface.')
a3ComVlanEncapsIfStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 10, 1, 14, 4, 1, 1, 4), RowStatus()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: a3ComVlanEncapsIfStatus.setStatus('mandatory')
if mibBuilder.loadTexts: a3ComVlanEncapsIfStatus.setDescription('The row status for this VLAN encapsulation interface. This OBJECT can be set to: active(1) createAndGo(4) createAndWait(5) destroy(6) The following values may be read: active(1) notReady(3). In order for a row to become active, the NMS must set a3ComVlanEncapsIfTagType and a3ComVlanEncapsIfTag to some valid and consistent values. Setting this object to createAndGo(4) causes the agent to attempt to create and commit the row based on the contents of the objects in the row. If all necessary information is present in the row, the agent will create the row and change the status to active(1). If any of the necessary objects are not available, or specify an invalid configuration, the row will not be created and the agent will return an appropriate error. Setting this object to createAndWait(5) causes a row in in this table to be created. If all necessary objects in the row have been assigned values and specify a valid configuration, the status of the row will be set to notInService(2); otherwise, the status will be set to notReady(3). This object may only be set to createAndGo(4) or createAndWait(5) if it does not exist. Setting this object to active(1) when the status is notInService(2) causes the agent to commit the row. Setting this object to active(1) when its value is already active(1) is a no-op. Setting this object to destroy(6) will remove the corresponding VLAN encapsulation interface, remote the entry in this table, and remove the corresponding entry in the ifTable. In order for a set of this object to destroy(6) to succeed, all dependencies on this row must have been removed. These will include any references to this interface in the ifStackTable.')
a3ComNextAvailableVirtIfIndex = MibScalar((1, 3, 6, 1, 4, 1, 43, 10, 1, 14, 3, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: a3ComNextAvailableVirtIfIndex.setStatus('mandatory')
if mibBuilder.loadTexts: a3ComNextAvailableVirtIfIndex.setDescription("The value of the next available virtual ifIndex. This object is used by an NMS to select an index value for row-creation in tables indexed by ifIndex. The current value of this object is changed to a new value when the current value is written to an agent's table, that is indexed by ifIndex. Row creation using the current value of this object, allocates a virtual ifIndex. Note the following: 1. A newly created row does not have to be active(1) for the agent to allocate the virtual ifIndex. 2. Race conditions between multiple NMS's end when a row is created. Rows are deemed created when a setRequest is successfully committed (i.e. the errorStats is noError(0)). 3. An agent that exhausts its supply of virual ifIndex values returns zero as the value of this object. This can be used by an NMS as an indication to deleted unused rows and reboot the device.")
mibBuilder.exportSymbols("GENERIC-3COM-VLAN-MIB-1-0-7", a3ComVlanEncapsIfStatus=a3ComVlanEncapsIfStatus, a3ComEncapsulationGroup=a3ComEncapsulationGroup, A3ComVlanLayer3Type=A3ComVlanLayer3Type, a3ComVlanIfTable=a3ComVlanIfTable, generic=generic, a3ComIpVlanTable=a3ComIpVlanTable, a3ComVlanIfModeType=a3ComVlanIfModeType, a3ComVlanProtocolTable=a3ComVlanProtocolTable, a3ComVirtualGroup=a3ComVirtualGroup, A3ComVlanType=A3ComVlanType, a3ComIpVlanIpNetMask=a3ComIpVlanIpNetMask, a3ComVlanGlobalMappingTable=a3ComVlanGlobalMappingTable, a3ComVlanEncapsIfIndex=a3ComVlanEncapsIfIndex, a3ComIpVlanIpNetAddress=a3ComIpVlanIpNetAddress, a3ComVlanProtocolIndex=a3ComVlanProtocolIndex, a3ComVlanGlobalMappingEntry=a3ComVlanGlobalMappingEntry, a3ComVlanEncapsIfTag=a3ComVlanEncapsIfTag, a3ComVlanIfIndex=a3ComVlanIfIndex, a3ComNextAvailableVirtIfIndex=a3ComNextAvailableVirtIfIndex, a3ComVlanIfDescr=a3ComVlanIfDescr, a3ComVlanIfStatus=a3ComVlanIfStatus, a3ComVlanGlobalMappingIfIndex=a3ComVlanGlobalMappingIfIndex, a3ComVlanEncapsIfEntry=a3ComVlanEncapsIfEntry, a3ComVlanEncapsIfTable=a3ComVlanEncapsIfTable, a3ComVlanIfGlobalIdentifier=a3ComVlanIfGlobalIdentifier, a3ComVlanIfInfo=a3ComVlanIfInfo, a3ComVlanProtocolIfIndex=a3ComVlanProtocolIfIndex, genVirtual=genVirtual, RowStatus=RowStatus, a3ComIpVlanEntry=a3ComIpVlanEntry, a3ComVlanIfEntry=a3ComVlanIfEntry, a3ComVlanProtocolEntry=a3ComVlanProtocolEntry, A3ComVlanModeType=A3ComVlanModeType, a3ComIpVlanStatus=a3ComIpVlanStatus, a3Com=a3Com, a3ComVlanGroup=a3ComVlanGroup, a3ComVlanEncapsIfType=a3ComVlanEncapsIfType, a3ComVlanProtocolStatus=a3ComVlanProtocolStatus, a3ComVlanIfType=a3ComVlanIfType, a3ComVlanProtocolsGroup=a3ComVlanProtocolsGroup, A3ComVlanEncapsType=A3ComVlanEncapsType, a3ComVlanGlobalMappingIdentifier=a3ComVlanGlobalMappingIdentifier, genExperimental=genExperimental)
| 200.691729 | 1,838 | 0.790536 | 3,630 | 26,692 | 5.812948 | 0.126171 | 0.034122 | 0.059713 | 0.007203 | 0.496138 | 0.397185 | 0.356618 | 0.34278 | 0.335813 | 0.326004 | 0 | 0.051909 | 0.120935 | 26,692 | 132 | 1,839 | 202.212121 | 0.847383 | 0.013038 | 0 | 0.016667 | 0 | 0.208333 | 0.560319 | 0.033036 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.05 | 0 | 0.175 | 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 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
620afd69fe7804f73854cad5c0dd48effc58af61 | 992 | py | Python | bib2web/mandatory_fields.py | Juvawa/bib2web | 8d6c2244e46eefee1a519f8b3b656a143aa8bd9e | [
"MIT"
] | null | null | null | bib2web/mandatory_fields.py | Juvawa/bib2web | 8d6c2244e46eefee1a519f8b3b656a143aa8bd9e | [
"MIT"
] | null | null | null | bib2web/mandatory_fields.py | Juvawa/bib2web | 8d6c2244e46eefee1a519f8b3b656a143aa8bd9e | [
"MIT"
] | null | null | null | mandatory = \
{
'article' : ['ENTRYTYPE', 'ID', 'author', 'title', 'journal', 'year', 'volume'],
'book' : ['ENTRYTYPE', 'ID', 'title', 'publisher', 'year'],
'booklet' : ['ENTRYTYPE', 'ID', 'title', 'year'],
'conference' : ['ENTRYTYPE', 'ID', 'author', 'title', 'booktitle', 'publisher', 'year'],
'inbook' : ['ENTRYTYPE', 'ID', 'title', 'publisher', 'year'],
'incollection' : ['ENTRYTYPE', 'ID', 'author', 'title', 'booktitle', 'publisher', 'year'],
'inproceedings' : ['ENTRYTYPE', 'ID', 'author', 'title', 'booktitle', 'year'],
'manual' : ['ENTRYTYPE', 'ID', 'title', 'year'],
'mastersthesis' : ['ENTRYTYPE', 'ID', 'author', 'title', 'school', 'year'],
'misc' : ['ENTRYTYPE', 'ID', 'title', 'year'],
'phdthesis' : ['ENTRYTYPE', 'ID', 'author', 'title', 'school', 'year'],
'proceedings' : ['ENTRYTYPE', 'ID', 'title', 'year'],
'techreport' : ['ENTRYTYPE', 'ID', 'author', 'title', 'institution', 'year'],
'unpublished' : ['ENTRYTYPE', 'ID', 'author', 'title', 'note']
} | 58.352941 | 91 | 0.563508 | 91 | 992 | 6.142857 | 0.296703 | 0.275492 | 0.243292 | 0.314848 | 0.431127 | 0.271914 | 0.157424 | 0 | 0 | 0 | 0 | 0 | 0.133065 | 992 | 17 | 92 | 58.352941 | 0.65 | 0 | 0 | 0 | 0 | 0 | 0.553877 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
6225f21abac38a02faf447c54384fc07ed6ded92 | 10,105 | py | Python | release/stubs.min/Autodesk/Revit/DB/Structure/__init___parts/AnalyticalModelStick.py | htlcnn/ironpython-stubs | 780d829e2104b2789d5f4d6f32b0ec9f2930ca03 | [
"MIT"
] | 182 | 2017-06-27T02:26:15.000Z | 2022-03-30T18:53:43.000Z | release/stubs.min/Autodesk/Revit/DB/Structure/__init___parts/AnalyticalModelStick.py | htlcnn/ironpython-stubs | 780d829e2104b2789d5f4d6f32b0ec9f2930ca03 | [
"MIT"
] | 28 | 2017-06-27T13:38:23.000Z | 2022-03-15T11:19:44.000Z | release/stubs.min/Autodesk/Revit/DB/Structure/__init___parts/AnalyticalModelStick.py | htlcnn/ironpython-stubs | 780d829e2104b2789d5f4d6f32b0ec9f2930ca03 | [
"MIT"
] | 67 | 2017-06-28T09:43:59.000Z | 2022-03-20T21:17:10.000Z | class AnalyticalModelStick(AnalyticalModel,IDisposable):
"""
An element that represents a stick in the structural analytical model.
Could be one of beam,brace or column type.
"""
def Dispose(self):
""" Dispose(self: Element,A_0: bool) """
pass
def GetAlignmentMethod(self,selector):
"""
GetAlignmentMethod(self: AnalyticalModelStick,selector: AnalyticalElementSelector) -> AnalyticalAlignmentMethod
Gets the alignment method for a given selector.
selector: End of the analytical model.
Returns: The alignment method at a given end.
"""
pass
def getBoundingBox(self,*args):
""" getBoundingBox(self: Element,view: View) -> BoundingBoxXYZ """
pass
def GetLocalCoordinateSystem(self,*__args):
"""
GetLocalCoordinateSystem(self: AnalyticalModelStick,point: XYZ) -> Transform
Gets the local coordinate system (LCS) reflects analytical model orientation at
the specified point.
point: The point on the analytical model stick element.
Returns: Transformation matrix.
x - longitudinal axis,y - transversal,section -
horizontal,strong axis,z - transversal,section - vertical,weak axis,origin
- base point of LCS.
GetLocalCoordinateSystem(self: AnalyticalModelStick,parameter: float) -> Transform
Gets the local coordinate system (LCS) reflects analytical model orientation at
the specified parameter value along a curve.
parameter: The parameter value along a curve that should be in the range [0,1],where 0
represents start and 1 represents end of the element.
Returns: Transformation matrix.
x - longitudinal axis,y - transversal,section -
horizontal,strong axis,z - transversal,section - vertical,weak axis,origin
- base point of LCS.
"""
pass
def GetMemberForces(self):
"""
GetMemberForces(self: AnalyticalModelStick) -> IList[MemberForces]
Gets the member forces associated with this element.
Returns: Returns a collection of Member Forces associated with this element. Empty
collection will be returned if element doesn't have any Member Forces.
To
find out with which end member forces are associated use
Autodesk::Revit::DB::Structure::MemberForces::Position
property to obtain a
position of Member Forces on element.
"""
pass
def GetProjectionPlaneY(self,selector):
"""
GetProjectionPlaneY(self: AnalyticalModelStick,selector: AnalyticalElementSelector) -> ElementId
Retrieves analytical model projection information for Y direction.
selector: End of the analytical model.
Returns: Plane on to which analytical model is projected,or invalidElementId if
not
projected to a Plane.
"""
pass
def GetProjectionPlaneZ(self,selector):
"""
GetProjectionPlaneZ(self: AnalyticalModelStick,selector: AnalyticalElementSelector) -> ElementId
Retrieves analytical model projection information for Z direction.
selector: End of the analytical model.
Returns: Plane on to which analytical model is projected,or invalidElementId if
not
projected to a Plane.
"""
pass
def GetProjectionY(self,selector):
"""
GetProjectionY(self: AnalyticalModelStick,selector: AnalyticalElementSelector) -> StickElementProjectionY
Retrieves analytical model projection information for Y direction.
selector: End of the analytical model.
Returns: Indicates if the projection is a preset value,or refers to a Plane.
"""
pass
def GetProjectionZ(self,selector):
"""
GetProjectionZ(self: AnalyticalModelStick,selector: AnalyticalElementSelector) -> StickElementProjectionZ
Retrieves analytical model projection information for Z direction.
selector: End of the analytical model.
Returns: Indicates if the projection is a preset value,or refers to a Plane.
"""
pass
def GetReleases(self,start,fx,fy,fz,mx,my,mz):
"""
GetReleases(self: AnalyticalModelStick,start: bool) -> (bool,bool,bool,bool,bool,bool)
Gets the releases of element.
start: The position on analytical model stick element. True for start,false for end.
"""
pass
def GetReleaseType(self,start):
"""
GetReleaseType(self: AnalyticalModelStick,start: bool) -> ReleaseType
Gets the release type.
start: The position on analytical model stick element. True for start,false for end.
Returns: The type of release.
"""
pass
def ReleaseUnmanagedResources(self,*args):
""" ReleaseUnmanagedResources(self: Element,disposing: bool) """
pass
def RemoveAllMemberForces(self):
"""
RemoveAllMemberForces(self: AnalyticalModelStick) -> bool
Removes all member forces associated with element.
Returns: True if any member forces were removed,false otherwise.
"""
pass
def RemoveMemberForces(self,start):
"""
RemoveMemberForces(self: AnalyticalModelStick,start: bool) -> bool
Removes member forces defined for given position.
start: Member Forces position on analytical model stick element. True for start,false
for end.
Returns: True if member forces for provided position were removed,false otherwise.
"""
pass
def SetAlignmentMethod(self,selector,method):
"""
SetAlignmentMethod(self: AnalyticalModelStick,selector: AnalyticalElementSelector,method: AnalyticalAlignmentMethod)
Sets the alignment method for a given selector.
selector: End of the analytical model.
method: The alignment method at a given end.
"""
pass
def setElementType(self,*args):
""" setElementType(self: Element,type: ElementType,incompatibleExceptionMessage: str) """
pass
def SetMemberForces(self,*__args):
"""
SetMemberForces(self: AnalyticalModelStick,start: bool,force: XYZ,moment: XYZ)
Adds Member Forces to element.
start: Member Forces position on analytical model stick element. True for start,false
for end.
force: The translational forces at specified position of the element.
The x value
of XYZ object represents force along x-axis of the analytical model coordinate
system,y along y-axis,z along z-axis respectively.
moment: The rotational forces at specified position of the element.
The x value of
XYZ object represents moment about x-axis of the analytical model coordinate
system,y about y-axis,z about z-axis respectively.
SetMemberForces(self: AnalyticalModelStick,memberForces: MemberForces)
Sets Member Forces to element.
memberForces: End to which member forces will be added is defined by setting
Autodesk::Revit::DB::Structure::MemberForces::Position
property in provided
Member Forces object.
"""
pass
def SetProjection(self,selector,*__args):
"""
SetProjection(self: AnalyticalModelStick,selector: AnalyticalElementSelector,planeIdY: ElementId,projectionZ: StickElementProjectionZ)
Sets the analytical model projection to a preset value.
selector: End of the analytical model.
planeIdY: Plane on to which analytical model may be projected in Y direction.
Plane
identifies a Level,a Grid,or a Ref Plane.
projectionZ: Preset value for Analytical Model Stick projection Z.
SetProjection(self: AnalyticalModelStick,selector: AnalyticalElementSelector,projectionY: StickElementProjectionY,projectionZ: StickElementProjectionZ)
Sets the analytical model projection to a preset value.
selector: End of the analytical model.
projectionY: Preset value for Analytical Model Stick projection Y.
projectionZ: Preset value for Analytical Model Stick projection Z.
SetProjection(self: AnalyticalModelStick,selector: AnalyticalElementSelector,planeIdY: ElementId,planeIdZ: ElementId)
Sets the analytical model projection to a preset value.
selector: End of the analytical model.
planeIdY: Plane on to which analytical model may be projected in Y direction.
Plane
identifies a Level,a Grid,or a Ref Plane.
planeIdZ: Plane on to which analytical model may be projected in Z direction.
Plane
identifies a Level,a Grid,or a Ref Plane.
SetProjection(self: AnalyticalModelStick,selector: AnalyticalElementSelector,projectionY: StickElementProjectionY,planeIdZ: ElementId)
Sets the analytical model projection to a preset value.
selector: End of the analytical model.
projectionY: Preset value for Analytical Model Stick projection Y.
planeIdZ: Plane on to which analytical model may be projected in Z direction.
Plane
identifies a Level,a Grid,or a Ref Plane.
"""
pass
def SetReleases(self,start,fx,fy,fz,mx,my,mz):
"""
SetReleases(self: AnalyticalModelStick,start: bool,fx: bool,fy: bool,fz: bool,mx: bool,my: bool,mz: bool)
Sets the releases of element.
start: The position on analytical model stick element. True for start,false for end.
"""
pass
def SetReleaseType(self,start,releaseType):
"""
SetReleaseType(self: AnalyticalModelStick,start: bool,releaseType: ReleaseType)
Sets the release type.
start: The position on analytical model stick element. True for start,false for end.
releaseType: The type of release.
"""
pass
def __enter__(self,*args):
""" __enter__(self: IDisposable) -> object """
pass
def __exit__(self,*args):
""" __exit__(self: IDisposable,exc_type: object,exc_value: object,exc_back: object) """
pass
def __init__(self,*args):
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
| 25.012376 | 215 | 0.705492 | 1,153 | 10,105 | 6.125759 | 0.170859 | 0.08495 | 0.043324 | 0.03398 | 0.611638 | 0.582755 | 0.55274 | 0.502761 | 0.496814 | 0.474727 | 0 | 0.000638 | 0.22474 | 10,105 | 403 | 216 | 25.074442 | 0.900945 | 0.795349 | 0 | 0.489362 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.489362 | false | 0.489362 | 0 | 0 | 0.510638 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 3 |
623654c971708305dfa901f1772fac7478631021 | 917 | py | Python | image_repo/migrations/0002_auto_20210505_1448.py | elena-kolomeets/Django-Repo | f326b058dc70562a6815248df1b7550c0b634a73 | [
"MIT"
] | null | null | null | image_repo/migrations/0002_auto_20210505_1448.py | elena-kolomeets/Django-Repo | f326b058dc70562a6815248df1b7550c0b634a73 | [
"MIT"
] | null | null | null | image_repo/migrations/0002_auto_20210505_1448.py | elena-kolomeets/Django-Repo | f326b058dc70562a6815248df1b7550c0b634a73 | [
"MIT"
] | null | null | null | # Generated by Django 3.2 on 2021-05-05 12:48
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('image_repo', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='image',
name='colors',
field=models.CharField(blank=True, default='', max_length=50),
),
migrations.AlterField(
model_name='image',
name='description',
field=models.CharField(blank=True, default='', max_length=200),
),
migrations.AlterField(
model_name='image',
name='result',
field=models.JSONField(blank=True, default=''),
),
migrations.AlterField(
model_name='image',
name='tags',
field=models.CharField(blank=True, default='', max_length=250),
),
]
| 26.970588 | 75 | 0.555071 | 88 | 917 | 5.681818 | 0.465909 | 0.16 | 0.2 | 0.232 | 0.574 | 0.574 | 0.27 | 0.27 | 0 | 0 | 0 | 0.041401 | 0.315158 | 917 | 33 | 76 | 27.787879 | 0.754777 | 0.046892 | 0 | 0.444444 | 1 | 0 | 0.079128 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.037037 | 0 | 0.148148 | 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 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
6258836d166a8d6c1882a706cc1e2bf3153eda25 | 55 | py | Python | src/evolvepy/integrations/__init__.py | EltonCN/evolvepy | 4489264d6c03ea4f3c23ea665fdf12fe4ead1ccc | [
"MIT"
] | 1 | 2022-01-13T21:11:53.000Z | 2022-01-13T21:11:53.000Z | src/evolvepy/integrations/__init__.py | EltonCN/evolvepy | 4489264d6c03ea4f3c23ea665fdf12fe4ead1ccc | [
"MIT"
] | null | null | null | src/evolvepy/integrations/__init__.py | EltonCN/evolvepy | 4489264d6c03ea4f3c23ea665fdf12fe4ead1ccc | [
"MIT"
] | null | null | null | '''
EvolvePy's integrations with other modules.
''' | 18.333333 | 47 | 0.672727 | 6 | 55 | 6.166667 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.181818 | 55 | 3 | 48 | 18.333333 | 0.822222 | 0.781818 | 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 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
625c8a42b10a793670359b3599bb4463084222aa | 154 | py | Python | 04_working_with_list/4_2_animals.py | simonhoch/python_basics | 4ecf12c074e641e3cdeb0a6690846eb9133f96af | [
"MIT"
] | null | null | null | 04_working_with_list/4_2_animals.py | simonhoch/python_basics | 4ecf12c074e641e3cdeb0a6690846eb9133f96af | [
"MIT"
] | null | null | null | 04_working_with_list/4_2_animals.py | simonhoch/python_basics | 4ecf12c074e641e3cdeb0a6690846eb9133f96af | [
"MIT"
] | null | null | null | animals = ['cat', 'dog', 'pig']
for animal in animals :
print (animal + 'would make a great pet.')
print ('All of those animals would makea great pet')
| 30.8 | 53 | 0.668831 | 24 | 154 | 4.291667 | 0.708333 | 0.15534 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.188312 | 154 | 4 | 54 | 38.5 | 0.824 | 0 | 0 | 0 | 0 | 0 | 0.487013 | 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 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 3 |
625d706044520dc3362905ca933c2db2e59ae151 | 145 | py | Python | backend/mytutorials/telegrambot/urls.py | mahmoodDehghan/MyTests | a67693e14eda2257490f295909d17b6f3f962543 | [
"MIT"
] | null | null | null | backend/mytutorials/telegrambot/urls.py | mahmoodDehghan/MyTests | a67693e14eda2257490f295909d17b6f3f962543 | [
"MIT"
] | null | null | null | backend/mytutorials/telegrambot/urls.py | mahmoodDehghan/MyTests | a67693e14eda2257490f295909d17b6f3f962543 | [
"MIT"
] | null | null | null | from django.urls import path
from .views import start_bot, end_bot
urlpatterns = [
path('startbot/', start_bot),
path('endbot/', end_bot),
] | 20.714286 | 37 | 0.717241 | 21 | 145 | 4.761905 | 0.571429 | 0.16 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.144828 | 145 | 7 | 38 | 20.714286 | 0.806452 | 0 | 0 | 0 | 0 | 0 | 0.109589 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 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 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
6551e1e19c5f8e4bf2d8b7c5b7b2115585ea7098 | 121 | py | Python | exercicios_fixacao/lista04/repet_lim_ex6.py | PauloVictorSS/unicamp-mc102 | 077ca3ea6d3df40ebe205c2e874d20a934ea5541 | [
"MIT"
] | null | null | null | exercicios_fixacao/lista04/repet_lim_ex6.py | PauloVictorSS/unicamp-mc102 | 077ca3ea6d3df40ebe205c2e874d20a934ea5541 | [
"MIT"
] | null | null | null | exercicios_fixacao/lista04/repet_lim_ex6.py | PauloVictorSS/unicamp-mc102 | 077ca3ea6d3df40ebe205c2e874d20a934ea5541 | [
"MIT"
] | null | null | null | number = int(input())
raiz = number/2
for i in range(1,20):
raiz = ((raiz ** 2) + number) / (2 * raiz)
print(raiz) | 15.125 | 46 | 0.561983 | 20 | 121 | 3.4 | 0.6 | 0.205882 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.064516 | 0.231405 | 121 | 8 | 47 | 15.125 | 0.666667 | 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 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
65689df9a53af776eb5d8ed7fadb2de295eee509 | 1,959 | py | Python | setup.py | AurelienLourot/lsankidb | 74479dd26e3a1ba7e40aca7740668998ff3ab944 | [
"Unlicense"
] | 26 | 2018-04-21T15:49:19.000Z | 2022-03-01T00:42:37.000Z | setup.py | AurelienLourot/lsankidb | 74479dd26e3a1ba7e40aca7740668998ff3ab944 | [
"Unlicense"
] | 2 | 2019-02-02T04:20:04.000Z | 2020-05-08T09:03:28.000Z | setup.py | AurelienLourot/lsankidb | 74479dd26e3a1ba7e40aca7740668998ff3ab944 | [
"Unlicense"
] | 1 | 2020-08-19T20:59:18.000Z | 2020-08-19T20:59:18.000Z | from setuptools import setup
import src
setup(name='lsankidb',
version=src.__version__,
install_requires=['AnkiTools'],
description='"ls" for your local Anki database.',
#FIXME this duplicates README.md
long_description="""
.. image:: https://cdn.jsdelivr.net/gh/AurelienLourot/lsankidb@c9735756451d135f94601b816469128e0cdadba2/thirdparty/logo.png
:height: 64px
:width: 64px
:align: right
lsankidb
========
``ls`` for your local `Anki <https://apps.ankiweb.net/>`__ database.
Dump all your Anki terms in order to save them, search them, ``grep`` them or ``diff`` them.
::
$ lsankidb
Listing /home/me/.local/share/Anki2/User 1/collection.anki2 ...
Default
French
['Hello', 'Bonjour']
['How are you?', 'Comment ça va ?']
German
['Hello', 'Hallo']
['How are you?', "Wie geht's?"]
`See on GitHub. <https://github.com/AurelienLourot/lsankidb>`__
""",
keywords=['anki',
'terminal',
'cli',
'dump',
'ls',],
author='Aurelien Lourot',
author_email='aurelien.lourot@gmail.com',
url='https://github.com/AurelienLourot/lsankidb',
download_url='https://github.com/AurelienLourot/lsankidb/tarball/'
+ src.__version__,
license='public domain',
classifiers=['Development Status :: 4 - Beta',
'Environment :: Console',
'Intended Audience :: Developers',
'License :: Public Domain',
'Natural Language :: English',
'Operating System :: POSIX :: Linux',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Topic :: Education',
'Topic :: Utilities'],
packages=['src'],
entry_points="""
[console_scripts]
lsankidb = src.lsankidb:main
""")
| 30.609375 | 123 | 0.566616 | 191 | 1,959 | 5.717277 | 0.65445 | 0.080586 | 0.038462 | 0.076923 | 0.137363 | 0.071429 | 0 | 0 | 0 | 0 | 0 | 0.029391 | 0.287902 | 1,959 | 63 | 124 | 31.095238 | 0.753405 | 0.015824 | 0 | 0 | 0 | 0.037736 | 0.64193 | 0.02958 | 0 | 0 | 0 | 0.015873 | 0 | 1 | 0 | true | 0 | 0.037736 | 0 | 0.037736 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
656a26c896dba737b3e9298b257c0fdd56db182e | 274 | py | Python | output/models/ibm_data/valid/s3_12/s3_12v06_xsd/__init__.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | 1 | 2021-08-14T17:59:21.000Z | 2021-08-14T17:59:21.000Z | output/models/ibm_data/valid/s3_12/s3_12v06_xsd/__init__.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | 4 | 2020-02-12T21:30:44.000Z | 2020-04-15T20:06:46.000Z | output/models/ibm_data/valid/s3_12/s3_12v06_xsd/__init__.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | null | null | null | from output.models.ibm_data.valid.s3_12.s3_12v06_xsd.s3_12v06 import (
ChildTypeBase,
ChildTypeDerived,
CtAlt1,
CtAlt2,
CtBase,
Root,
)
__all__ = [
"ChildTypeBase",
"ChildTypeDerived",
"CtAlt1",
"CtAlt2",
"CtBase",
"Root",
]
| 15.222222 | 70 | 0.616788 | 27 | 274 | 5.925926 | 0.666667 | 0.0875 | 0.4375 | 0.5125 | 0.6375 | 0.6375 | 0 | 0 | 0 | 0 | 0 | 0.083333 | 0.255474 | 274 | 17 | 71 | 16.117647 | 0.70098 | 0 | 0 | 0 | 0 | 0 | 0.186131 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.0625 | 0 | 0.0625 | 0 | 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 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
657cf1129b53d3a0b63a22aabb558fd5bc616640 | 179 | py | Python | pythonfiles/scoring.py | amrut-prabhu/loan-default-prediction | 2e0a91529a71c69e93d7b30decefc59f2627406f | [
"MIT"
] | 2 | 2020-05-06T15:11:56.000Z | 2020-05-24T13:51:55.000Z | pythonfiles/scoring.py | amrut-prabhu/loan-default-prediction | 2e0a91529a71c69e93d7b30decefc59f2627406f | [
"MIT"
] | null | null | null | pythonfiles/scoring.py | amrut-prabhu/loan-default-prediction | 2e0a91529a71c69e93d7b30decefc59f2627406f | [
"MIT"
] | 2 | 2018-09-23T07:09:51.000Z | 2021-12-16T17:58:14.000Z | import numpy as np
def import_accuracy(y_test, predictions):
errors = abs(predictions - y_test)
mape = 100 * (errors / y_test)
accuracy = 100 - np.mean(mape)
return accuracy
| 22.375 | 41 | 0.726257 | 27 | 179 | 4.666667 | 0.555556 | 0.119048 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.040541 | 0.173184 | 179 | 7 | 42 | 25.571429 | 0.810811 | 0 | 0 | 0 | 0 | 0 | 0 | 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 | 0 | 0 | 0 | 3 |
65a1c52735b77b5b062b18c86f7b8f8507e5e9d2 | 90 | py | Python | helper.py | b-nguyen/cs3240-labdemo | ee8da87092bc46d6a774fa5030283224819a4b87 | [
"MIT"
] | null | null | null | helper.py | b-nguyen/cs3240-labdemo | ee8da87092bc46d6a774fa5030283224819a4b87 | [
"MIT"
] | null | null | null | helper.py | b-nguyen/cs3240-labdemo | ee8da87092bc46d6a774fa5030283224819a4b87 | [
"MIT"
] | null | null | null | __author__ = 'Brian Nguyen'
def greeting(msg):
print("We would like to say: " + msg) | 18 | 41 | 0.655556 | 13 | 90 | 4.230769 | 0.923077 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.211111 | 90 | 5 | 41 | 18 | 0.774648 | 0 | 0 | 0 | 0 | 0 | 0.373626 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.333333 | false | 0 | 0 | 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 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
65a29ad725144c4d2dc24167982660ac5a79324c | 586 | py | Python | src/pktmapper/common.py | Sapunov/pktmapper | 9d72a42c5b756c10c7fb0debcfc6c20031626aa1 | [
"MIT"
] | null | null | null | src/pktmapper/common.py | Sapunov/pktmapper | 9d72a42c5b756c10c7fb0debcfc6c20031626aa1 | [
"MIT"
] | null | null | null | src/pktmapper/common.py | Sapunov/pktmapper | 9d72a42c5b756c10c7fb0debcfc6c20031626aa1 | [
"MIT"
] | null | null | null | """
Common functions
---
Package: PACKET-MAPPER
Author: Sapunov Nikita <kiton1994@gmail.com>
"""
import netaddr
import socket
def ip2str(address):
"""
Print out an IP address given a string
Args:
address (inet struct): inet network address
Returns:
str: Printable/readable IP address
"""
return socket.inet_ntop(socket.AF_INET, address)
def ip2long(ip):
"""
Convert an IP string to long.
Args:
ip: readable IP address
Returns:
long: IP address in long format
"""
return long(netaddr.IPAddress(ip))
| 16.742857 | 52 | 0.641638 | 73 | 586 | 5.123288 | 0.575342 | 0.096257 | 0.090909 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.013889 | 0.262799 | 586 | 34 | 53 | 17.235294 | 0.851852 | 0.581911 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.333333 | false | 0 | 0.333333 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 3 |
65e7b3e3e21dcd54310f063dfef34f4349a1bdff | 533 | py | Python | slixmpp/plugins/xep_0122/data_validation.py | anirudhrata/slixmpp | 1fcee0e80a212eeb274d2f560e69099d8a61bf7f | [
"BSD-3-Clause"
] | 86 | 2016-07-04T13:26:02.000Z | 2022-02-19T10:26:21.000Z | slixmpp/plugins/xep_0122/data_validation.py | anirudhrata/slixmpp | 1fcee0e80a212eeb274d2f560e69099d8a61bf7f | [
"BSD-3-Clause"
] | 10 | 2016-09-30T18:55:41.000Z | 2020-05-01T14:22:47.000Z | slixmpp/plugins/xep_0122/data_validation.py | anirudhrata/slixmpp | 1fcee0e80a212eeb274d2f560e69099d8a61bf7f | [
"BSD-3-Clause"
] | 45 | 2016-09-30T18:48:41.000Z | 2022-03-18T21:39:33.000Z | from slixmpp.xmlstream import register_stanza_plugin
from slixmpp.plugins import BasePlugin
from slixmpp.plugins.xep_0004 import stanza
from slixmpp.plugins.xep_0004.stanza import FormField
from slixmpp.plugins.xep_0122.stanza import FormValidation
class XEP_0122(BasePlugin):
"""
XEP-0122: Data Forms
"""
name = 'xep_0122'
description = 'XEP-0122: Data Forms Validation'
dependencies = {'xep_0004'}
stanza = stanza
def plugin_init(self):
register_stanza_plugin(FormField, FormValidation)
| 26.65 | 58 | 0.754221 | 66 | 533 | 5.924242 | 0.363636 | 0.140665 | 0.184143 | 0.161125 | 0.127877 | 0 | 0 | 0 | 0 | 0 | 0 | 0.072235 | 0.168856 | 533 | 19 | 59 | 28.052632 | 0.810384 | 0.037523 | 0 | 0 | 0 | 0 | 0.094567 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.083333 | false | 0 | 0.416667 | 0 | 0.916667 | 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 | 0 | 0 | 0 | 3 |
029137d82ad6128135f8644310a7387974e99f16 | 3,660 | py | Python | wikipediabase/persistentkv.py | fakedrake/WikipediaBase | ab5aa92786bddcd7942ad3e3f1f4e433575ba3fb | [
"Apache-2.0"
] | 1 | 2017-11-26T17:57:59.000Z | 2017-11-26T17:57:59.000Z | wikipediabase/persistentkv.py | fakedrake/WikipediaBase | ab5aa92786bddcd7942ad3e3f1f4e433575ba3fb | [
"Apache-2.0"
] | 34 | 2015-03-23T10:28:59.000Z | 2021-12-13T20:16:48.000Z | wikipediabase/persistentkv.py | fakedrake/WikipediaBase | ab5aa92786bddcd7942ad3e3f1f4e433575ba3fb | [
"Apache-2.0"
] | 2 | 2015-05-17T00:56:45.000Z | 2015-06-27T22:10:59.000Z | """
Some persistent maps (gdbm) require special encoding of keys
and/or values. This is an abstraction for these kinds of quirks.
"""
from itertools import imap
import collections
import gdbm as dbm
import json
from sqlitedict import SqliteDict
import os
class EncodedDict(collections.MutableMapping):
"""
Subclass this and provide any of the following (see
implementatiokn for signatures)
- db
- _init()
- _encode_key
- _decode_key.
"""
def __init__(self, wrapped=None):
self.db = wrapped if wrapped is not None else dict()
def _encode_key(self, key):
"""
Override to encode keys coming in.
"""
return key
def _decode_key(self, key):
"""
Override to encode keys going out.
"""
return key
def __del__(self):
del self.db
def __setitem__(self, key, val):
self.db[self._encode_key(key)] = val
def __getitem__(self, key):
return self.db[self._encode_key(key)]
def __contains__(self, key):
return self._encode_key(key) in self.keys()
def __delitem__(self, key):
del self.db[self._encode_key(key)]
def __iter__(self):
return imap(self._decode_key, self.db.keys())
def __len__(self):
return len(self.db)
def keys(self):
return list(self)
def values(self):
return self.db.values()
def items(self):
return [(self._decode_key(key), v) for key,v in self.db.iteritems()]
def to_json(self, filename):
json.dump([(k,v) for k,v in self.db.iteritems()],
open(filename, 'w'))
def from_json(self, filename):
for k,v in json.load(open(filename)):
self.db[k] = v
class DbmPersistentDict(EncodedDict):
"""
Persistent dict using dbm. Will open or create filename.
"""
def __init__(self, filename):
flag = 'w' if os.path.exists(filename) else 'n'
super(DbmPersistentDict, self).__init__(dbm.open(filename, flag))
def _encode_key(self, key):
# Asciify
if isinstance(key, unicode):
return key.encode('unicode_escape')
return str(key)
def _decode_key(self, key):
# Unicodify
return key.decode('unicode_escape')
class SqlitePersistentDict(EncodedDict):
def __init__(self, filename):
if not filename.endswith('.sqlite'):
filename += '.sqlite'
db = SqliteDict(filename)
super(SqlitePersistentDict, self).__init__(db)
def __del__(self):
self.db.close()
super(SqlitePersistentDict, self).__del__()
"""
Some info on performance:
>>> import timeit
>>> sqlkv = SqlitePersistentDict('/tmp/bench1.sqlite')
>>> timeit.timeit(lambda : benchmark_write(sqlkv), number=100)
10.847157955169678
>>> timeit.timeit(lambda : benchmark_read(sqlkv), number=100)
18.88098978996277
>>> dbmkv = DbmPersistentDict('/tmp/bench.dbm')
>>> timeit.timeit(lambda : benchmark_write(dbmkv), number=100)
0.18030309677124023
>>> timeit.timeit(lambda : benchmark_read(dbmkv), number=100)
0.14914202690124512
SqliteDict is a pretty thin wrapper around sqlite, I would probably
not have made it much thinner. Just use Dbm.
Keep this around in case anyone considers changing to sqlite.
XXX: see how gdbm does when data is larger than memory. Also check out
bsddb
"""
# PersistentDict = SqlitePersistentDict
PersistentDict = DbmPersistentDict
def benchmark_write(dic, times=100000):
for i in xrange(times):
dic['o' + str(i)] = str(i) * 1000
def benchmark_read(dic, times=100000):
for i in xrange(times):
dic['o' + str(i)]
| 24.72973 | 76 | 0.650546 | 469 | 3,660 | 4.882729 | 0.336887 | 0.031441 | 0.017467 | 0.027948 | 0.18952 | 0.10655 | 0.082096 | 0.034061 | 0.034061 | 0.034061 | 0 | 0.035063 | 0.236339 | 3,660 | 147 | 77 | 24.897959 | 0.784258 | 0.119672 | 0 | 0.184615 | 0 | 0 | 0.019756 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.338462 | false | 0 | 0.092308 | 0.123077 | 0.661538 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 3 |
02b1f2bbe7cd1537f8a13eba37e53d713c062a3c | 977 | py | Python | test/test_data.py | xoriath/py-cab | ab02faeaf69578bb9a0874632c610b27a9dd582f | [
"MIT"
] | null | null | null | test/test_data.py | xoriath/py-cab | ab02faeaf69578bb9a0874632c610b27a9dd582f | [
"MIT"
] | null | null | null | test/test_data.py | xoriath/py-cab | ab02faeaf69578bb9a0874632c610b27a9dd582f | [
"MIT"
] | null | null | null |
import os.path
CABEXTRACT_TEST_DIR = os.path.join(os.path.dirname(__file__), 'test-data', 'cabextract', 'cabs')
CABEXTRACT_BUGS_DIR = os.path.join(os.path.dirname(__file__), 'test-data', 'cabextract', 'bugs')
LIBMSPACK_TEST_DIR = os.path.join(os.path.dirname(__file__), 'test-data', 'libmspack')
def read_cabextract_cab(file_name):
return read_cab(CABEXTRACT_TEST_DIR, file_name)
def read_cabextract_bugs_cab(file_name):
return read_cab(CABEXTRACT_BUGS_DIR, file_name)
def read_libmspack_cab(file_name):
return read_cab(LIBMSPACK_TEST_DIR, file_name)
def read_cab(directory, file_name):
with open(os.path.join(directory, file_name), 'rb') as f:
return f.read()
def read_cabextract_cases(file_name, encoding='utf-8'):
with open(os.path.join(CABEXTRACT_TEST_DIR, file_name), 'r', encoding=encoding, errors='replace') as f:
return [line.rstrip('\n') for line in f.readlines() if not line.startswith('#') and line.strip()]
| 36.185185 | 107 | 0.732856 | 149 | 977 | 4.47651 | 0.281879 | 0.11994 | 0.074963 | 0.058471 | 0.535232 | 0.416792 | 0.314843 | 0.212894 | 0.212894 | 0.212894 | 0 | 0.001174 | 0.127943 | 977 | 26 | 108 | 37.576923 | 0.78169 | 0 | 0 | 0 | 0 | 0 | 0.084189 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.3125 | false | 0 | 0.0625 | 0.1875 | 0.6875 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 3 |
02b2af84d188c97a9d4469b8353aba7b18703383 | 141 | py | Python | utils/exception.py | Lolik-Bolik/Hashing_Algorithms | d3ba488cf575fc685d5ea603b1915de4d5fed713 | [
"MIT"
] | 2 | 2020-12-15T20:26:29.000Z | 2020-12-15T20:27:26.000Z | utils/exception.py | Lolik-Bolik/Hashing_Algorithms | d3ba488cf575fc685d5ea603b1915de4d5fed713 | [
"MIT"
] | null | null | null | utils/exception.py | Lolik-Bolik/Hashing_Algorithms | d3ba488cf575fc685d5ea603b1915de4d5fed713 | [
"MIT"
] | null | null | null | """
Exceptions module
"""
class CuckooHashMapFullException(Exception):
"""
Exception raised when filter is full.
"""
pass
| 11.75 | 44 | 0.64539 | 12 | 141 | 7.583333 | 0.916667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.241135 | 141 | 11 | 45 | 12.818182 | 0.850467 | 0.390071 | 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 | 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 | 3 |
02b57da73d7345d506383c6f3f8675776637aa80 | 3,808 | py | Python | negentropy/scriptparser.py | shewitt-au/negentropy | 40841e3f7d95f9124f4b59b0d591bf16e57ef312 | [
"MIT"
] | 4 | 2021-07-07T09:49:05.000Z | 2021-11-14T04:17:11.000Z | negentropy/scriptparser.py | shewitt-au/negentropy | 40841e3f7d95f9124f4b59b0d591bf16e57ef312 | [
"MIT"
] | null | null | null | negentropy/scriptparser.py | shewitt-au/negentropy | 40841e3f7d95f9124f4b59b0d591bf16e57ef312 | [
"MIT"
] | 1 | 2020-05-29T18:11:04.000Z | 2020-05-29T18:11:04.000Z | from inspect import cleandoc
from textwrap import indent
from lark import Lark, Transformer
from lark.exceptions import LarkError
from .interval import Interval
from . import errors
def parse(ctx, fname):
with open(fname, "r") as f:
t = f.read()
try:
l = Lark(open(ctx.implfile("script.lark")).read(), parser='lalr', debug=True)
t = l.parse(t)
ScriptTransformer(ctx).transform(t)
except LarkError as e:
etext = indent(str(e), " ")
raise errors.ParserException("Error parsing '{}:\n{}'".format(fname, etext))
class ScriptTransformer(Transformer):
def __init__(self, ctx):
self.ctx = ctx
def decent(self, t):
def handle(decsrc, decdst):
self.ctx.parse_decoderentry(decsrc, decdst)
handle(**dict(t))
def decsrc(self, t):
return ("decsrc", str(t[0]))
def decdst(self, t):
return ("decdst", str(t[0]))
def options(self, t):
self.ctx.parse_options(t[0][1])
def datasource(self, t):
self.ctx.parse_datasource(t[0][1])
def memmap(self, t):
def handle(self, range, mmdecoder, properties={}, mmdataaddr=None):
self.ctx.memtype.parse_add(range, self.ctx.decoder(mmdecoder), properties, mmdataaddr)
self.ctx.memtype.parse_begin()
for e in t[0]:
handle(self, **dict(e))
self.ctx.memtype.parse_end()
def mmbody(self, t):
return t
def mmentry(self, t):
return t
def mmdecoder(self, t):
return ("mmdecoder", str(t[0]))
def mmdataaddr(self, t):
return ("mmdataaddr", t[0])
def mmfromreset(selt, t):
return -1
def label(self, t):
def handle(self, range, lname, lflags=""):
self.ctx.syms.parse_add(self.ctx, range, lname, 'i' in lflags)
handle(self, **dict(t))
def lflags(self, t):
return ("lflags", str(t[0]))
def lname(self, t):
return ("lname", str(t[0]))
def directive(self, t):
def handle(daddress, dcommand, doaddress=None, dosymbol=None):
self.ctx.directives.parse_add(daddress, dcommand, doaddress, dosymbol)
handle(**dict(t))
def daddress(self, t):
return ("daddress", t[0])
def dcommand(self, t):
return ("dcommand", str(t[0]))
def doaddress(self, t):
return ("doaddress", t[0])
def dosymbol(self, t):
return ('dosymbol', str(t[0]))
def comment(self, t):
def handle(self, caddress, ctext, cpos="^"):
if not ctext:
ctext = "\n"
if cpos=='^':
self.ctx.cmts.add_before(caddress, ctext)
elif cpos=='v':
self.ctx.cmts.add_after(caddress, ctext)
elif cpos=='>':
self.ctx.cmts.add_inline(caddress, ctext)
handle(self, **dict(t))
def caddress(self, t):
return ("caddress", t[0])
def cpos(self, t):
return ("cpos", str(t[0]))
def ctext(self, t):
return ('ctext', str(t[0]))
def properties(self, t):
return ("properties", {str(i[0]) : i[1] for i in t})
def propentry(self, t):
return t
def hexnum(self, t):
return int(t[0][1:], 16)
def decimal(self, t):
return int(t[0])
def boolean(self, t):
return bool(t[0])
def list(self, t):
return list(t)
def name(self, t):
return str(t[0])
def quoted(self, t):
return t[0][1:-1]
def tquoted(self, t):
return cleandoc(t[0][3:-3])
def range(self, t):
ivl = Interval(int(t[0]), int(t[1])) if len(t)==2 else Interval(int(t[0]))
return ("range", ivl)
| 31.471074 | 99 | 0.541754 | 501 | 3,808 | 4.087824 | 0.225549 | 0.078125 | 0.128906 | 0.039063 | 0.120605 | 0.038086 | 0 | 0 | 0 | 0 | 0 | 0.014367 | 0.30541 | 3,808 | 120 | 100 | 31.733333 | 0.759924 | 0 | 0 | 0.066038 | 0 | 0 | 0.042299 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.377358 | false | 0 | 0.056604 | 0.235849 | 0.688679 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 3 |
02c7a6f45d41d451a3a0c3c43389880ddc7a1852 | 8,759 | py | Python | square/api/cards_api.py | codertjay/square-python-sdk | 1f5f34bc792e31991db0fb2756d92c717f2dcfa4 | [
"Apache-2.0"
] | 1 | 2022-02-28T13:18:30.000Z | 2022-02-28T13:18:30.000Z | square/api/cards_api.py | codertjay/square-python-sdk | 1f5f34bc792e31991db0fb2756d92c717f2dcfa4 | [
"Apache-2.0"
] | null | null | null | square/api/cards_api.py | codertjay/square-python-sdk | 1f5f34bc792e31991db0fb2756d92c717f2dcfa4 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from square.api_helper import APIHelper
from square.http.api_response import ApiResponse
from square.api.base_api import BaseApi
class CardsApi(BaseApi):
"""A Controller to access Endpoints in the square API."""
def __init__(self, config, auth_managers, call_back=None):
super(CardsApi, self).__init__(config, auth_managers, call_back)
def list_cards(self,
cursor=None,
customer_id=None,
include_disabled=False,
reference_id=None,
sort_order=None):
"""Does a GET request to /v2/cards.
Retrieves a list of cards owned by the account making the request.
A max of 25 cards will be returned.
Args:
cursor (string, optional): A pagination cursor returned by a
previous call to this endpoint. Provide this to retrieve the
next set of results for your original query. See
[Pagination](https://developer.squareup.com/docs/basics/api101/
pagination) for more information.
customer_id (string, optional): Limit results to cards associated
with the customer supplied. By default, all cards owned by the
merchant are returned.
include_disabled (bool, optional): Includes disabled cards. By
default, all enabled cards owned by the merchant are
returned.
reference_id (string, optional): Limit results to cards associated
with the reference_id supplied.
sort_order (SortOrder, optional): Sorts the returned list by when
the card was created with the specified order. This field
defaults to ASC.
Returns:
ApiResponse: An object with the response value as well as other
useful information such as status codes and headers. Success
Raises:
APIException: When an error occurs while fetching the data from
the remote API. This exception includes the HTTP Response
code, an error message, and the HTTP body that was received in
the request.
"""
# Prepare query URL
_url_path = '/v2/cards'
_query_builder = self.config.get_base_uri()
_query_builder += _url_path
_query_parameters = {
'cursor': cursor,
'customer_id': customer_id,
'include_disabled': include_disabled,
'reference_id': reference_id,
'sort_order': sort_order
}
_query_builder = APIHelper.append_url_with_query_parameters(
_query_builder,
_query_parameters
)
_query_url = APIHelper.clean_url(_query_builder)
# Prepare headers
_headers = {
'accept': 'application/json'
}
# Prepare and execute request
_request = self.config.http_client.get(_query_url, headers=_headers)
# Apply authentication scheme on request
self.apply_auth_schemes(_request, 'global')
_response = self.execute_request(_request)
decoded = APIHelper.json_deserialize(_response.text)
if type(decoded) is dict:
_errors = decoded.get('errors')
else:
_errors = None
_result = ApiResponse(_response, body=decoded, errors=_errors)
return _result
def create_card(self,
body):
"""Does a POST request to /v2/cards.
Adds a card on file to an existing merchant.
Args:
body (CreateCardRequest): An object containing the fields to POST
for the request. See the corresponding object definition for
field details.
Returns:
ApiResponse: An object with the response value as well as other
useful information such as status codes and headers. Success
Raises:
APIException: When an error occurs while fetching the data from
the remote API. This exception includes the HTTP Response
code, an error message, and the HTTP body that was received in
the request.
"""
# Prepare query URL
_url_path = '/v2/cards'
_query_builder = self.config.get_base_uri()
_query_builder += _url_path
_query_url = APIHelper.clean_url(_query_builder)
# Prepare headers
_headers = {
'accept': 'application/json',
'Content-Type': 'application/json'
}
# Prepare and execute request
_request = self.config.http_client.post(_query_url, headers=_headers, parameters=APIHelper.json_serialize(body))
# Apply authentication scheme on request
self.apply_auth_schemes(_request, 'global')
_response = self.execute_request(_request)
decoded = APIHelper.json_deserialize(_response.text)
if type(decoded) is dict:
_errors = decoded.get('errors')
else:
_errors = None
_result = ApiResponse(_response, body=decoded, errors=_errors)
return _result
def retrieve_card(self,
card_id):
"""Does a GET request to /v2/cards/{card_id}.
Retrieves details for a specific Card.
Args:
card_id (string): Unique ID for the desired Card.
Returns:
ApiResponse: An object with the response value as well as other
useful information such as status codes and headers. Success
Raises:
APIException: When an error occurs while fetching the data from
the remote API. This exception includes the HTTP Response
code, an error message, and the HTTP body that was received in
the request.
"""
# Prepare query URL
_url_path = '/v2/cards/{card_id}'
_url_path = APIHelper.append_url_with_template_parameters(_url_path, {
'card_id': {'value': card_id, 'encode': True}
})
_query_builder = self.config.get_base_uri()
_query_builder += _url_path
_query_url = APIHelper.clean_url(_query_builder)
# Prepare headers
_headers = {
'accept': 'application/json'
}
# Prepare and execute request
_request = self.config.http_client.get(_query_url, headers=_headers)
# Apply authentication scheme on request
self.apply_auth_schemes(_request, 'global')
_response = self.execute_request(_request)
decoded = APIHelper.json_deserialize(_response.text)
if type(decoded) is dict:
_errors = decoded.get('errors')
else:
_errors = None
_result = ApiResponse(_response, body=decoded, errors=_errors)
return _result
def disable_card(self,
card_id):
"""Does a POST request to /v2/cards/{card_id}/disable.
Disables the card, preventing any further updates or charges.
Disabling an already disabled card is allowed but has no effect.
Args:
card_id (string): Unique ID for the desired Card.
Returns:
ApiResponse: An object with the response value as well as other
useful information such as status codes and headers. Success
Raises:
APIException: When an error occurs while fetching the data from
the remote API. This exception includes the HTTP Response
code, an error message, and the HTTP body that was received in
the request.
"""
# Prepare query URL
_url_path = '/v2/cards/{card_id}/disable'
_url_path = APIHelper.append_url_with_template_parameters(_url_path, {
'card_id': {'value': card_id, 'encode': True}
})
_query_builder = self.config.get_base_uri()
_query_builder += _url_path
_query_url = APIHelper.clean_url(_query_builder)
# Prepare headers
_headers = {
'accept': 'application/json'
}
# Prepare and execute request
_request = self.config.http_client.post(_query_url, headers=_headers)
# Apply authentication scheme on request
self.apply_auth_schemes(_request, 'global')
_response = self.execute_request(_request)
decoded = APIHelper.json_deserialize(_response.text)
if type(decoded) is dict:
_errors = decoded.get('errors')
else:
_errors = None
_result = ApiResponse(_response, body=decoded, errors=_errors)
return _result
| 36.194215 | 120 | 0.612513 | 988 | 8,759 | 5.210526 | 0.200405 | 0.032634 | 0.032634 | 0.012432 | 0.726301 | 0.713481 | 0.705711 | 0.673465 | 0.673465 | 0.673465 | 0 | 0.002356 | 0.321612 | 8,759 | 241 | 121 | 36.344398 | 0.864019 | 0.420253 | 0 | 0.644231 | 0 | 0 | 0.071015 | 0.006011 | 0 | 0 | 0 | 0 | 0 | 1 | 0.048077 | false | 0 | 0.028846 | 0 | 0.125 | 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 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
02da14e11f8f22cf912a874caefb9a62ca916f39 | 1,693 | py | Python | test/pages/base_pages.py | gordonnguyen/10fastfingers-auto-type | 624a6667b67743904791929a36d12b0f12f50e05 | [
"MIT"
] | null | null | null | test/pages/base_pages.py | gordonnguyen/10fastfingers-auto-type | 624a6667b67743904791929a36d12b0f12f50e05 | [
"MIT"
] | 1 | 2021-03-16T13:31:33.000Z | 2021-03-16T13:31:33.000Z | test/pages/base_pages.py | gordonnguyen/10fastfingers-auto-type | 624a6667b67743904791929a36d12b0f12f50e05 | [
"MIT"
] | null | null | null | '''
Super classes for Page object
Serve as a base template for page
automating functions with selenium
'''
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from utils.best_buy.locators import Locators
from utils.best_buy import urls
class BasePage():
# Initialize browser
def __init__(self, driver):
self.driver = driver
# Wait for element to be clickable and click
def click(self, by_locator):
WebDriverWait(self.driver, 10).until(EC.element_to_be_clickable(by_locator)).click()
# Select element in webpage and fill text
def enter_text(self, by_locator, text):
WebDriverWait(self.driver, 10).until(EC.visibility_of_element_located(by_locator)).send_keys(text)
# Check if the current url is correct to use for this object
def is_correct_url(self, target_url):
if self.driver.current_url == target_url:
return True
else:
return False
class SignInPage(BasePage):
def __init__(self, email, password):
super().__init__()
self.url = urls.sign_in
self.email = email
self.password = password
def sign_in(self, driver):
# Fill email and password fields
self.enter_text(Locators.SignInPage.email_fld, self.email)
self.enter_text(Locators.SignInPage.password_fld, self.password)
# Submit / Signin button
driver.find_element_by_class_name(self.BB_signin_selector).click()
WebDriverWait(driver, 10).until(EC.url_changes(self.driver.current_url))
#WebDriverWait(driver, 10).until(EC.url_changes(current_signin_url)) | 34.55102 | 106 | 0.705848 | 226 | 1,693 | 5.070796 | 0.380531 | 0.061082 | 0.045375 | 0.052356 | 0.176265 | 0.122164 | 0.066318 | 0 | 0 | 0 | 0 | 0.005988 | 0.210868 | 1,693 | 49 | 107 | 34.55102 | 0.851796 | 0.225635 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.222222 | false | 0.111111 | 0.148148 | 0 | 0.518519 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 3 |
02dff69165c131d9f3101aa1c12186dc1957dfcb | 647 | py | Python | app/services/articles.py | StanislavRud/api-realword-app-test | 9a49f299b02cec26d237f3bc4b363c8b93520b7b | [
"MIT"
] | 1,875 | 2019-03-27T14:26:20.000Z | 2022-03-31T14:52:50.000Z | app/services/articles.py | StanislavRud/api-realword-app-test | 9a49f299b02cec26d237f3bc4b363c8b93520b7b | [
"MIT"
] | 232 | 2019-04-11T11:05:48.000Z | 2022-03-05T10:23:50.000Z | app/services/articles.py | StanislavRud/api-realword-app-test | 9a49f299b02cec26d237f3bc4b363c8b93520b7b | [
"MIT"
] | 433 | 2019-04-11T01:48:59.000Z | 2022-03-31T10:33:42.000Z | from slugify import slugify
from app.db.errors import EntityDoesNotExist
from app.db.repositories.articles import ArticlesRepository
from app.models.domain.articles import Article
from app.models.domain.users import User
async def check_article_exists(articles_repo: ArticlesRepository, slug: str) -> bool:
try:
await articles_repo.get_article_by_slug(slug=slug)
except EntityDoesNotExist:
return False
return True
def get_slug_for_article(title: str) -> str:
return slugify(title)
def check_user_can_modify_article(article: Article, user: User) -> bool:
return article.author.username == user.username
| 26.958333 | 85 | 0.775889 | 86 | 647 | 5.674419 | 0.430233 | 0.057377 | 0.036885 | 0.077869 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.153014 | 647 | 23 | 86 | 28.130435 | 0.890511 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.133333 | false | 0 | 0.333333 | 0.133333 | 0.733333 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 3 |
b82dae5c13359feb72d2a0825f3801687d516058 | 118 | py | Python | twodspec/extern/__init__.py | hypergravity/songcn | e2b071c932720d02e5f085884c83c46baba7802d | [
"MIT"
] | null | null | null | twodspec/extern/__init__.py | hypergravity/songcn | e2b071c932720d02e5f085884c83c46baba7802d | [
"MIT"
] | null | null | null | twodspec/extern/__init__.py | hypergravity/songcn | e2b071c932720d02e5f085884c83c46baba7802d | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
__all__ = ['interpolate', 'polynomial', 'SmoothSpline']
from .interpolate import SmoothSpline
| 29.5 | 55 | 0.70339 | 11 | 118 | 7.181818 | 0.818182 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.009615 | 0.118644 | 118 | 3 | 56 | 39.333333 | 0.75 | 0.177966 | 0 | 0 | 0 | 0 | 0.347368 | 0 | 0 | 0 | 0 | 0 | 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 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
b8317e86fff68e0107933de518fdf61bc7534d00 | 171 | py | Python | Configuration/ProcessModifiers/python/trackingMkFitTobTecStep_cff.py | Purva-Chaudhari/cmssw | 32e5cbfe54c4d809d60022586cf200b7c3020bcf | [
"Apache-2.0"
] | 852 | 2015-01-11T21:03:51.000Z | 2022-03-25T21:14:00.000Z | Configuration/ProcessModifiers/python/trackingMkFitTobTecStep_cff.py | Purva-Chaudhari/cmssw | 32e5cbfe54c4d809d60022586cf200b7c3020bcf | [
"Apache-2.0"
] | 30,371 | 2015-01-02T00:14:40.000Z | 2022-03-31T23:26:05.000Z | Configuration/ProcessModifiers/python/trackingMkFitTobTecStep_cff.py | Purva-Chaudhari/cmssw | 32e5cbfe54c4d809d60022586cf200b7c3020bcf | [
"Apache-2.0"
] | 3,240 | 2015-01-02T05:53:18.000Z | 2022-03-31T17:24:21.000Z | import FWCore.ParameterSet.Config as cms
# This modifier sets replaces the default pattern recognition with mkFit for tobTecStep
trackingMkFitTobTecStep = cms.Modifier()
| 34.2 | 87 | 0.836257 | 21 | 171 | 6.809524 | 0.904762 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.122807 | 171 | 4 | 88 | 42.75 | 0.953333 | 0.497076 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 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 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
b832db34004caeef160a328496546197b3b692d7 | 1,764 | py | Python | SurveyManager/survey/models.py | javiervar/SurveyManager | bbe2ed356654c32586c587f58c609c8ce014e96b | [
"MIT"
] | null | null | null | SurveyManager/survey/models.py | javiervar/SurveyManager | bbe2ed356654c32586c587f58c609c8ce014e96b | [
"MIT"
] | null | null | null | SurveyManager/survey/models.py | javiervar/SurveyManager | bbe2ed356654c32586c587f58c609c8ce014e96b | [
"MIT"
] | null | null | null | from django.db import models
# Create your models here.
class Encuesta(models.Model):
nombre=models.CharField(max_length=150)
descripcion=models.TextField()
estructura=models.TextField()
fecha = models.DateTimeField(auto_now_add=True)
def __str__(self):
return str(self.nombre)
class Pregunta(models.Model):
descripcion=models.CharField(max_length=150)
encuesta = models.ForeignKey('Encuesta', on_delete=models.CASCADE)
tipo=models.IntegerField(null=True)
numero=models.IntegerField(default=1)
json_id=models.CharField(max_length=50,null=True)
def __str__(self):
return str(self.descripcion)
class Respuesta(models.Model):
valor=models.CharField(max_length=150)
pregunta = models.ForeignKey('Pregunta', on_delete=models.CASCADE)
json_id=models.CharField(max_length=50,null=True)
def __str__(self):
return str(self.valor)
class Carrera(models.Model):
nombre=models.CharField(max_length=150)
generacion = models.ForeignKey('Generacion', on_delete=models.CASCADE,null=True,blank=True)
def __str__(self):
return "%s %s" % (self.nombre, self.generacion)
class Generacion(models.Model):
generacion=models.CharField(max_length=150,null=True,blank=True)
def __str__(self):
return str(self.generacion)
class Alumno(models.Model):
email=models.CharField(max_length=100)
nombre=models.CharField(max_length=100)
apellidos=models.CharField(max_length=100)
carrera = models.ForeignKey('Carrera', on_delete=models.CASCADE)
def __str__(self):
return str(self.nombre)
class RespuestaPregunta(models.Model):
respuesta = models.ForeignKey('Respuesta', on_delete=models.CASCADE)
pregunta = models.ForeignKey('Pregunta', on_delete=models.CASCADE)
alumno=models.ForeignKey('Alumno',on_delete=models.CASCADE,blank=True,null=True)
| 30.413793 | 92 | 0.786848 | 239 | 1,764 | 5.619247 | 0.225941 | 0.057334 | 0.134028 | 0.178704 | 0.471333 | 0.34624 | 0.34624 | 0.338049 | 0.09382 | 0.09382 | 0 | 0.017968 | 0.085034 | 1,764 | 57 | 93 | 30.947368 | 0.814126 | 0.013605 | 0 | 0.333333 | 0 | 0 | 0.035098 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.142857 | false | 0 | 0.02381 | 0.142857 | 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 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 3 |
b8431428845abd267d2447bb2c266f7ad3458a5b | 318 | py | Python | polrev/offices/admin/office_admin.py | polrev-github/polrev-django | 99108ace1a5307b14c3eccb424a9f9616e8c02ae | [
"MIT"
] | 1 | 2021-12-10T05:54:16.000Z | 2021-12-10T05:54:16.000Z | polrev/offices/admin/office_admin.py | polrev-github/polrev-django | 99108ace1a5307b14c3eccb424a9f9616e8c02ae | [
"MIT"
] | null | null | null | polrev/offices/admin/office_admin.py | polrev-github/polrev-django | 99108ace1a5307b14c3eccb424a9f9616e8c02ae | [
"MIT"
] | null | null | null | from django.contrib import admin
from offices.models import OfficeType, Office
class OfficeTypeAdmin(admin.ModelAdmin):
search_fields = ['title']
admin.site.register(OfficeType, OfficeTypeAdmin)
'''
class OfficeAdmin(admin.ModelAdmin):
search_fields = ['title']
admin.site.register(Office, OfficeAdmin)
''' | 22.714286 | 48 | 0.77044 | 35 | 318 | 6.942857 | 0.514286 | 0.123457 | 0.17284 | 0.222222 | 0.403292 | 0.403292 | 0.403292 | 0.403292 | 0 | 0 | 0 | 0 | 0.113208 | 318 | 14 | 49 | 22.714286 | 0.861702 | 0 | 0 | 0 | 0 | 0 | 0.024631 | 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 | 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 | 3 |
b8437331efb5465038081e91c134bce49f22a468 | 394 | py | Python | models/losses/MSE.py | johnrachwan123/SNIP-it | a578a0693318f261492331298b6602de225fe21f | [
"MIT"
] | null | null | null | models/losses/MSE.py | johnrachwan123/SNIP-it | a578a0693318f261492331298b6602de225fe21f | [
"MIT"
] | null | null | null | models/losses/MSE.py | johnrachwan123/SNIP-it | a578a0693318f261492331298b6602de225fe21f | [
"MIT"
] | 1 | 2021-11-08T16:34:45.000Z | 2021-11-08T16:34:45.000Z | import torch
from torch import nn
from models.GeneralModel import GeneralModel
class MSE(GeneralModel):
def __init__(self, device, l1_reg=0, lp_reg=0, **kwargs):
super(MSE, self).__init__(device, **kwargs)
self.loss = nn.MSELoss()
def forward(self, output=None, target=None, weight_generator=None, **kwargs):
return self.loss.forward(output, target.float()) | 28.142857 | 81 | 0.700508 | 53 | 394 | 5 | 0.528302 | 0.030189 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.009231 | 0.175127 | 394 | 14 | 82 | 28.142857 | 0.806154 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.222222 | false | 0 | 0.333333 | 0.111111 | 0.777778 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 3 |
b872257816f92142d8b69ab7304685ffe49c0d35 | 52 | py | Python | __init__.py | HarisNaveed17/aws-boxdetector | e71daebbebe9dc847bdad70d2ea2fe859fede587 | [
"Apache-2.0"
] | null | null | null | __init__.py | HarisNaveed17/aws-boxdetector | e71daebbebe9dc847bdad70d2ea2fe859fede587 | [
"Apache-2.0"
] | null | null | null | __init__.py | HarisNaveed17/aws-boxdetector | e71daebbebe9dc847bdad70d2ea2fe859fede587 | [
"Apache-2.0"
] | null | null | null | from pipeline import *
box_detection = BoxDetector() | 26 | 29 | 0.807692 | 6 | 52 | 6.833333 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.115385 | 52 | 2 | 29 | 26 | 0.891304 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 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 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
b87d4232f38a23242d6a6192e497347e1e6d8428 | 141 | py | Python | main/ftpServer.py | McUtty/FlowerPlan | b0998835356e8e10fe53cad447bc559df2ac7175 | [
"MIT"
] | null | null | null | main/ftpServer.py | McUtty/FlowerPlan | b0998835356e8e10fe53cad447bc559df2ac7175 | [
"MIT"
] | null | null | null | main/ftpServer.py | McUtty/FlowerPlan | b0998835356e8e10fe53cad447bc559df2ac7175 | [
"MIT"
] | null | null | null | import uftpd
uftpd.stop()
# uftpd.start([port = 21][, verbose = 1])
uftpd.restart()
# Version abfragen
# wenn neuer - Dateien downloaden
| 12.818182 | 41 | 0.687943 | 18 | 141 | 5.388889 | 0.833333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.025641 | 0.170213 | 141 | 10 | 42 | 14.1 | 0.803419 | 0.624113 | 0 | 0 | 0 | 0 | 0 | 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 | 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 | 3 |
b8876be3ac0b9f4743f3b55d348997ace9a6d95d | 1,451 | py | Python | EASTAR/main/migrations/0008_auto_20191005_0012.py | DightMerc/EASTAR | 04a3578932f8b4b842e0898513ef279c2f750f48 | [
"Apache-2.0"
] | 1 | 2020-09-21T16:46:19.000Z | 2020-09-21T16:46:19.000Z | EASTAR/main/migrations/0008_auto_20191005_0012.py | DightMerc/EASTAR | 04a3578932f8b4b842e0898513ef279c2f750f48 | [
"Apache-2.0"
] | null | null | null | EASTAR/main/migrations/0008_auto_20191005_0012.py | DightMerc/EASTAR | 04a3578932f8b4b842e0898513ef279c2f750f48 | [
"Apache-2.0"
] | null | null | null | # Generated by Django 2.2.6 on 2019-10-04 19:12
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('main', '0007_auto_20191005_0011'),
]
operations = [
migrations.AddField(
model_name='technologies',
name='textAddEN',
field=models.TextField(default=None, verbose_name='Дополнительный текст EN'),
preserve_default=False,
),
migrations.AddField(
model_name='technologies',
name='textAddRU',
field=models.TextField(default=None, verbose_name='Дополнительный текст RU'),
preserve_default=False,
),
migrations.AddField(
model_name='technologies',
name='textAddUZ',
field=models.TextField(default=None, verbose_name='Дополнительный текст UZ'),
preserve_default=False,
),
migrations.AlterField(
model_name='technologies',
name='textEN',
field=models.TextField(verbose_name='Описание EN'),
),
migrations.AlterField(
model_name='technologies',
name='textRU',
field=models.TextField(verbose_name='Описание RU'),
),
migrations.AlterField(
model_name='technologies',
name='textUZ',
field=models.TextField(verbose_name='Описание UZ'),
),
]
| 30.87234 | 89 | 0.583046 | 131 | 1,451 | 6.320611 | 0.374046 | 0.065217 | 0.152174 | 0.181159 | 0.729469 | 0.729469 | 0.373188 | 0.373188 | 0.373188 | 0 | 0 | 0.030876 | 0.308063 | 1,451 | 46 | 90 | 31.543478 | 0.793825 | 0.031013 | 0 | 0.525 | 1 | 0 | 0.175214 | 0.016382 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.025 | 0 | 0.1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 1 | 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 | 3 |
b887c62ca86e34d3408f8bf9208020ecb0064fd5 | 152 | py | Python | archived-stock-trading-bot-v1/utils/alerts.py | Allcallofduty10/stock-trading-bot | 54e608b3c0b95b87e7753b065307fc23a045e230 | [
"MIT"
] | 101 | 2020-05-20T02:17:45.000Z | 2022-03-31T12:22:09.000Z | archived-stock-trading-bot-v1/utils/alerts.py | Allcallofduty10/stock-trading-bot | 54e608b3c0b95b87e7753b065307fc23a045e230 | [
"MIT"
] | 10 | 2020-09-02T14:55:12.000Z | 2022-02-21T08:50:48.000Z | archived-stock-trading-bot-v1/utils/alerts.py | Allcallofduty10/stock-trading-bot | 54e608b3c0b95b87e7753b065307fc23a045e230 | [
"MIT"
] | 33 | 2021-02-13T15:38:51.000Z | 2022-03-21T10:39:15.000Z | import os
from sys import platform
def say_beep(n: int):
for i in range(0, n):
if platform == "darwin":
os.system("say beep")
| 16.888889 | 33 | 0.578947 | 24 | 152 | 3.625 | 0.75 | 0.16092 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.009434 | 0.302632 | 152 | 8 | 34 | 19 | 0.811321 | 0 | 0 | 0 | 0 | 0 | 0.092105 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.166667 | false | 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 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
b8a056a06ca2c0eb3d9388de7c316004827053f2 | 6,924 | py | Python | ls/joyous/tests/test_manythings.py | tjwalch/ls.joyous | 0ee50d3af71c066bddb2310948b02f74b52ee253 | [
"BSD-3-Clause"
] | 72 | 2018-03-16T16:35:08.000Z | 2022-03-23T08:09:33.000Z | polrev/ls/joyous/tests/test_manythings.py | polrev-github/polrev-django | 99108ace1a5307b14c3eccb424a9f9616e8c02ae | [
"MIT"
] | 41 | 2018-03-25T20:36:52.000Z | 2022-03-10T08:59:27.000Z | polrev/ls/joyous/tests/test_manythings.py | polrev-github/polrev-django | 99108ace1a5307b14c3eccb424a9f9616e8c02ae | [
"MIT"
] | 28 | 2018-08-13T22:36:09.000Z | 2022-03-17T12:24:15.000Z | # ------------------------------------------------------------------------------
# Test Many Things Utilities
# ------------------------------------------------------------------------------
import sys
import datetime as dt
import pytz
from django.test import TestCase
from django.utils import translation
from ls.joyous.utils.manythings import (toOrdinal, toTheOrdinal,
toDaysOffsetStr, hrJoin)
# ------------------------------------------------------------------------------
class Test(TestCase):
def testToOrdinal(self):
self.assertEqual(toOrdinal(-1), "last")
self.assertEqual(toOrdinal(-2), "penultimate")
self.assertEqual(toOrdinal(1), "first")
self.assertEqual(toOrdinal(2), "second")
self.assertEqual(toOrdinal(3), "third")
self.assertEqual(toOrdinal(4), "fourth")
self.assertEqual(toOrdinal(5), "fifth")
def testToOrdinalNum(self):
self.assertEqual(toOrdinal(6), "6th")
self.assertEqual(toOrdinal(11), "11th")
self.assertEqual(toOrdinal(12), "12th")
self.assertEqual(toOrdinal(13), "13th")
self.assertEqual(toOrdinal(21), "21st")
self.assertEqual(toOrdinal(102), "102nd")
self.assertEqual(toOrdinal(6543), "6543rd")
def testToTheOrdinal(self):
self.assertEqual(toTheOrdinal(-1), "The last")
self.assertEqual(toTheOrdinal(-2, False), "the penultimate")
self.assertEqual(toTheOrdinal(1), "The first")
self.assertEqual(toTheOrdinal(2), "The second")
self.assertEqual(toTheOrdinal(3), "The third")
self.assertEqual(toTheOrdinal(4), "The fourth")
self.assertEqual(toTheOrdinal(5), "The fifth")
def testToTheOrdinalNum(self):
self.assertEqual(toTheOrdinal(6), "The 6th")
self.assertEqual(toTheOrdinal(11), "The 11th")
self.assertEqual(toTheOrdinal(12), "The 12th")
self.assertEqual(toTheOrdinal(13), "The 13th")
self.assertEqual(toTheOrdinal(21), "The 21st")
self.assertEqual(toTheOrdinal(102), "The 102nd")
self.assertEqual(toTheOrdinal(6543), "The 6543rd")
def testToDaysOffsetStr(self):
self.assertEqual(toDaysOffsetStr(-3), "Three days before")
self.assertEqual(toDaysOffsetStr(-2), "Two days before")
self.assertEqual(toDaysOffsetStr(-1), "The day before")
self.assertEqual(toDaysOffsetStr(0), "")
self.assertEqual(toDaysOffsetStr(1), "The day after")
self.assertEqual(toDaysOffsetStr(2), "Two days after")
self.assertEqual(toDaysOffsetStr(3), "Three days after")
self.assertEqual(toDaysOffsetStr(25), "Twenty-five days after")
def testHumanReadableJoin(self):
self.assertEqual(hrJoin([""]), "")
self.assertEqual(hrJoin(["ice"]), "ice")
self.assertEqual(hrJoin(["ice", "fire"]), "ice and fire")
self.assertEqual(hrJoin(["wind", "ice", "fire"]),
"wind, ice and fire")
self.assertEqual(hrJoin(["dog", "cat", "hen", "yak", "ant"]),
"dog, cat, hen, yak and ant")
# ------------------------------------------------------------------------------
class TestFrançais(TestCase):
def setUp(self):
translation.activate('fr')
def tearDown(self):
translation.deactivate()
def testToOrdinal(self):
self.assertEqual(toOrdinal(-1), "dernier")
self.assertEqual(toOrdinal(-2), "avant-dernier")
self.assertEqual(toOrdinal (1), "premier")
self.assertEqual(toOrdinal (2), "deuxième")
self.assertEqual(toOrdinal (3), "troisième")
self.assertEqual(toOrdinal (4), "quatrième")
self.assertEqual(toOrdinal (5), "cinquième")
def testToOrdinalNum(self):
self.assertEqual(toOrdinal(6), "6me")
self.assertEqual(toOrdinal(11), "11me")
self.assertEqual(toOrdinal(12), "12me")
self.assertEqual(toOrdinal(13), "13me")
self.assertEqual(toOrdinal(21), "21me")
self.assertEqual(toOrdinal(102), "102me")
self.assertEqual(toOrdinal(6543), "6543me")
def testToTheOrdinal(self):
self.assertEqual(toTheOrdinal(-1), "Le dernier")
self.assertEqual(toTheOrdinal(-2, True), "L'avant-dernier")
self.assertEqual(toTheOrdinal(-2, False), "l'avant-dernier")
self.assertEqual(toTheOrdinal(1), "La premier")
self.assertEqual(toTheOrdinal(2, False), "la deuxième")
self.assertEqual(toTheOrdinal(3), "Le troisième")
self.assertEqual(toTheOrdinal(4), "Le quatrième")
self.assertEqual(toTheOrdinal(5), "Le cinquième")
def testToTheOrdinalNum(self):
self.assertEqual(toTheOrdinal(6), "La 6me")
self.assertEqual(toTheOrdinal(11), "La 11me")
self.assertEqual(toTheOrdinal(12), "La 12me")
self.assertEqual(toTheOrdinal(13), "La 13me")
self.assertEqual(toTheOrdinal(21), "La 21me")
self.assertEqual(toTheOrdinal(102), "La 102me")
self.assertEqual(toTheOrdinal(6543), "La 6543me")
def testToDaysOffsetStr(self):
self.assertEqual(toDaysOffsetStr(-3), "Trois jours avant")
self.assertEqual(toDaysOffsetStr(-2), "Deux jours avant")
self.assertEqual(toDaysOffsetStr(-1), "Le jour précédent")
self.assertEqual(toDaysOffsetStr(0), "")
self.assertEqual(toDaysOffsetStr(1), "Le jour après")
self.assertEqual(toDaysOffsetStr(2), "Deux jours après")
self.assertEqual(toDaysOffsetStr(3), "Trois jours après")
self.assertEqual(toDaysOffsetStr(25), "Vingt-cinq jours après")
def testHumanReadableJoin(self):
self.assertEqual(hrJoin([""]), "")
self.assertEqual(hrJoin (["glace"]), "glace")
self.assertEqual(hrJoin (["glace", "feu"]), "glace et feu")
self.assertEqual(hrJoin (["vent", "glace", "feu"]),
"vent, glace et feu")
self.assertEqual(hrJoin (["chien", "chat", "poule", "yak", "fourmi"]),
"chien, chat, poule, yak et fourmi")
# ------------------------------------------------------------------------------
class TestΕλληνικά(TestCase):
def setUp(self):
translation.activate('el')
def tearDown(self):
translation.deactivate()
def testToOrdinal(self):
self.assertEqual(toOrdinal(-1), "τελευταίος")
self.assertEqual(toOrdinal(-2), "προτελευταία")
self.assertEqual(toOrdinal (1), "τελευταίο")
self.assertEqual(toOrdinal (2), "προτελευταία")
self.assertEqual(toOrdinal (3), "πρώτη")
self.assertEqual(toOrdinal (4), "δεύτερη")
self.assertEqual(toOrdinal (5), "τρίτη")
# ------------------------------------------------------------------------------
# ------------------------------------------------------------------------------
# ------------------------------------------------------------------------------
| 45.254902 | 80 | 0.579434 | 646 | 6,924 | 6.210526 | 0.196594 | 0.336491 | 0.209372 | 0.037388 | 0.468594 | 0.408026 | 0.252493 | 0.13659 | 0.075274 | 0.040379 | 0 | 0.032681 | 0.195696 | 6,924 | 152 | 81 | 45.552632 | 0.687736 | 0.095032 | 0 | 0.184 | 0 | 0 | 0.150895 | 0 | 0 | 0 | 0 | 0 | 0.72 | 1 | 0.136 | false | 0 | 0.048 | 0 | 0.208 | 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 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
b8a2fb720f101a2bc0adde648afe4fb533a5d387 | 5,919 | py | Python | brew/migrations/0007_auto_20180307_1842.py | williamlagos/brauerei | 9ba1e22a45ea4f9cb4a58ee02a3149526318e523 | [
"MIT"
] | null | null | null | brew/migrations/0007_auto_20180307_1842.py | williamlagos/brauerei | 9ba1e22a45ea4f9cb4a58ee02a3149526318e523 | [
"MIT"
] | null | null | null | brew/migrations/0007_auto_20180307_1842.py | williamlagos/brauerei | 9ba1e22a45ea4f9cb4a58ee02a3149526318e523 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.5 on 2018-03-07 18:42
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('brew', '0006_auto_20180109_0535'),
]
operations = [
migrations.AlterModelOptions(
name='message',
options={'verbose_name': 'Mensagem', 'verbose_name_plural': 'Mensagens'},
),
migrations.AlterModelOptions(
name='product',
options={'verbose_name': 'Produto', 'verbose_name_plural': 'Produtos'},
),
migrations.AlterModelOptions(
name='profile',
options={'verbose_name': 'Perfil', 'verbose_name_plural': 'Perfis'},
),
migrations.AlterModelOptions(
name='request',
options={'verbose_name': 'Pedido', 'verbose_name_plural': 'Pedidos'},
),
migrations.AlterModelOptions(
name='stock',
options={'verbose_name': 'Estoque', 'verbose_name_plural': 'Estoques'},
),
migrations.AlterField(
model_name='message',
name='email',
field=models.EmailField(max_length=254, verbose_name=b'E-mail'),
),
migrations.AlterField(
model_name='message',
name='name',
field=models.CharField(max_length=128, verbose_name=b'Nome'),
),
migrations.AlterField(
model_name='message',
name='text',
field=models.TextField(verbose_name=b'Texto'),
),
migrations.AlterField(
model_name='product',
name='description',
field=models.TextField(verbose_name=b'Descritivo'),
),
migrations.AlterField(
model_name='product',
name='name',
field=models.CharField(max_length=128, verbose_name=b'Nome'),
),
migrations.AlterField(
model_name='product',
name='photo',
field=models.ImageField(upload_to=b'', verbose_name=b'Foto'),
),
migrations.AlterField(
model_name='product',
name='sku',
field=models.CharField(max_length=64, verbose_name=b'SKU'),
),
migrations.AlterField(
model_name='profile',
name='address',
field=models.TextField(default=b'', verbose_name=b'Logradouro'),
),
migrations.AlterField(
model_name='profile',
name='description',
field=models.TextField(default=b'', verbose_name=b'Descritivo'),
),
migrations.AlterField(
model_name='profile',
name='lat',
field=models.FloatField(default=0.0, verbose_name=b'Latitude'),
),
migrations.AlterField(
model_name='profile',
name='lon',
field=models.FloatField(default=0.0, verbose_name=b'Longitude'),
),
migrations.AlterField(
model_name='profile',
name='name',
field=models.CharField(default=b'', max_length=128, verbose_name=b'Nome'),
),
migrations.AlterField(
model_name='profile',
name='phone',
field=models.CharField(max_length=64, verbose_name=b'Telefone'),
),
migrations.AlterField(
model_name='profile',
name='photo',
field=models.ImageField(upload_to=b'', verbose_name=b'Foto'),
),
migrations.AlterField(
model_name='profile',
name='rank',
field=models.IntegerField(verbose_name=b'Grau'),
),
migrations.AlterField(
model_name='profile',
name='side',
field=models.IntegerField(verbose_name=b'Tipo'),
),
migrations.AlterField(
model_name='profile',
name='user',
field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name=b'Cliente'),
),
migrations.AlterField(
model_name='request',
name='client',
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='client', to='brew.Profile', verbose_name=b'Cliente'),
),
migrations.AlterField(
model_name='request',
name='estimated',
field=models.DateTimeField(verbose_name=b'Prazo'),
),
migrations.AlterField(
model_name='request',
name='products',
field=models.ManyToManyField(related_name='request_products', to='brew.Product', verbose_name=b'Produtos'),
),
migrations.AlterField(
model_name='request',
name='provider',
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='provider', to='brew.Profile', verbose_name=b'Fornecedor'),
),
migrations.AlterField(
model_name='stock',
name='key',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='brew.Product', verbose_name=b'Produto'),
),
migrations.AlterField(
model_name='stock',
name='provider',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name=b'Fornecedor'),
),
migrations.AlterField(
model_name='stock',
name='quantity',
field=models.IntegerField(verbose_name=b'Quantidade'),
),
migrations.AlterField(
model_name='stock',
name='value',
field=models.FloatField(verbose_name=b'Valor'),
),
]
| 36.312883 | 164 | 0.573746 | 565 | 5,919 | 5.844248 | 0.212389 | 0.116596 | 0.189279 | 0.219564 | 0.677771 | 0.658995 | 0.402181 | 0.402181 | 0.350697 | 0.299213 | 0 | 0.012737 | 0.29701 | 5,919 | 162 | 165 | 36.537037 | 0.780822 | 0.011488 | 0 | 0.632258 | 1 | 0 | 0.143468 | 0.003933 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.025806 | 0 | 0.045161 | 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 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
b8b7d48ab2b3078dad4877e762a40e5343a5d8aa | 96 | py | Python | animazya/apps.py | KenFon/kenfontaine.fr | 6b4055de791e3cc47b473c1890b2fcafab8a635d | [
"MIT"
] | null | null | null | animazya/apps.py | KenFon/kenfontaine.fr | 6b4055de791e3cc47b473c1890b2fcafab8a635d | [
"MIT"
] | null | null | null | animazya/apps.py | KenFon/kenfontaine.fr | 6b4055de791e3cc47b473c1890b2fcafab8a635d | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class AnimazyaConfig(AppConfig):
name = 'animazya'
| 16 | 34 | 0.71875 | 10 | 96 | 6.9 | 0.9 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.208333 | 96 | 5 | 35 | 19.2 | 0.907895 | 0 | 0 | 0 | 0 | 0 | 0.087912 | 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 | 0 | 0 | 0 | 3 |
b224af29a62a1d5910e33f4af9c4dfcede1d3b53 | 556 | py | Python | diagrams/alibabacloud/analytics.py | bry-c/diagrams | 4c377a073e0aa8fe41934195da7a0869f31c58eb | [
"MIT"
] | 17,037 | 2020-02-03T01:30:30.000Z | 2022-03-31T18:09:15.000Z | diagrams/alibabacloud/analytics.py | bry-c/diagrams | 4c377a073e0aa8fe41934195da7a0869f31c58eb | [
"MIT"
] | 529 | 2020-02-03T10:43:41.000Z | 2022-03-31T17:33:08.000Z | diagrams/alibabacloud/analytics.py | bry-c/diagrams | 4c377a073e0aa8fe41934195da7a0869f31c58eb | [
"MIT"
] | 1,068 | 2020-02-05T11:54:29.000Z | 2022-03-30T23:28:55.000Z | # This module is automatically generated by autogen.sh. DO NOT EDIT.
from . import _AlibabaCloud
class _Analytics(_AlibabaCloud):
_type = "analytics"
_icon_dir = "resources/alibabacloud/analytics"
class AnalyticDb(_Analytics):
_icon = "analytic-db.png"
class ClickHouse(_Analytics):
_icon = "click-house.png"
class DataLakeAnalytics(_Analytics):
_icon = "data-lake-analytics.png"
class ElaticMapReduce(_Analytics):
_icon = "elatic-map-reduce.png"
class OpenSearch(_Analytics):
_icon = "open-search.png"
# Aliases
| 17.375 | 68 | 0.726619 | 62 | 556 | 6.258065 | 0.612903 | 0.201031 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.167266 | 556 | 31 | 69 | 17.935484 | 0.838013 | 0.133094 | 0 | 0 | 1 | 0 | 0.271399 | 0.158664 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.071429 | 0 | 1 | 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 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 3 |
b22a61d2c3956ab8bd21246cdd7e1d90a774793b | 105 | py | Python | lamdata_baisal89/df_util.py | Baisal89/ds_8_lamdata | 67911b6f15ae6230a65c439a978303ac4b492075 | [
"MIT"
] | null | null | null | lamdata_baisal89/df_util.py | Baisal89/ds_8_lamdata | 67911b6f15ae6230a65c439a978303ac4b492075 | [
"MIT"
] | 1 | 2020-03-31T11:12:26.000Z | 2020-03-31T11:12:26.000Z | lamdata_baisal89/df_util.py | Baisal89/ds_8_lamdata | 67911b6f15ae6230a65c439a978303ac4b492075 | [
"MIT"
] | null | null | null | """
Utility functions for working with DataFrame
"""
import pandas
TEST_DF = pandas.DataFrame([1,2,3])
| 13.125 | 44 | 0.72381 | 15 | 105 | 5 | 0.866667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.033333 | 0.142857 | 105 | 7 | 45 | 15 | 0.8 | 0.419048 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 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 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
b22ba815e08036847020bc1f981a8232bfaa3cd2 | 567 | py | Python | board/gpio.py | JonathanItakpe/realtime-office-light-dashboard | a783152bfee3e099d039c574ca1ea5635f79900d | [
"MIT"
] | 1 | 2017-09-04T14:05:59.000Z | 2017-09-04T14:05:59.000Z | board/gpio.py | JonathanItakpe/realtime-office-light-dashboard | a783152bfee3e099d039c574ca1ea5635f79900d | [
"MIT"
] | null | null | null | board/gpio.py | JonathanItakpe/realtime-office-light-dashboard | a783152bfee3e099d039c574ca1ea5635f79900d | [
"MIT"
] | null | null | null | import RPi.GPIO as gpio
from pusher import Pusher
import time
pusher = Pusher(app_id=u'394325', key=u'cc900daae41222ea463e', secret=u'02ae96830fe03a094573', cluster=u'eu')
gpio.setmode(gpio.BCM)
gpio.setup(2, gpio.OUT)
# TODO: Map each gpio pin to a room eg 2: HNG Main
while True:
gpio.output(2, gpio.OUT)
passcode = raw_input('What is pi? ')
if passcode == 'Awesome':
gpio.output(2, gpio.HIGH)
pusher.trigger(u'statuses', u'new_status', {u'room': u'HNG Main', u'status': u'Off'})
time.sleep(4)
else:
gpio.output(2. gpio.LOW)
print 'Wrong Password'
| 27 | 109 | 0.708995 | 96 | 567 | 4.15625 | 0.583333 | 0.050125 | 0.082707 | 0.112782 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.077869 | 0.13933 | 567 | 20 | 110 | 28.35 | 0.739754 | 0.084656 | 0 | 0 | 0 | 0 | 0.232108 | 0 | 0 | 0 | 0 | 0.05 | 0 | 0 | null | null | 0.1875 | 0.1875 | null | null | 0.0625 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 3 |
b23021f02a20519683a1417ea552146f63c73f1a | 2,002 | py | Python | pava/implementation/natives/java/net/TwoStacksPlainSocketImpl.py | laffra/pava | 54d10cf7f8def2f96e254c0356623d08f221536f | [
"MIT"
] | 4 | 2017-03-30T16:51:16.000Z | 2020-10-05T12:25:47.000Z | pava/implementation/natives/java/net/TwoStacksPlainSocketImpl.py | laffra/pava | 54d10cf7f8def2f96e254c0356623d08f221536f | [
"MIT"
] | null | null | null | pava/implementation/natives/java/net/TwoStacksPlainSocketImpl.py | laffra/pava | 54d10cf7f8def2f96e254c0356623d08f221536f | [
"MIT"
] | null | null | null | def add_native_methods(clazz):
def initProto____():
raise NotImplementedError()
def socketCreate__boolean__(a0, a1):
raise NotImplementedError()
def socketConnect__java_net_InetAddress__int__int__(a0, a1, a2, a3):
raise NotImplementedError()
def socketBind__java_net_InetAddress__int__boolean__(a0, a1, a2, a3):
raise NotImplementedError()
def socketListen__int__(a0, a1):
raise NotImplementedError()
def socketAccept__java_net_SocketImpl__(a0, a1):
raise NotImplementedError()
def socketAvailable____(a0):
raise NotImplementedError()
def socketClose0__boolean__(a0, a1):
raise NotImplementedError()
def socketShutdown__int__(a0, a1):
raise NotImplementedError()
def socketNativeSetOption__int__boolean__java_lang_Object__(a0, a1, a2, a3):
raise NotImplementedError()
def socketGetOption__int__java_lang_Object__(a0, a1, a2):
raise NotImplementedError()
def socketSendUrgentData__int__(a0, a1):
raise NotImplementedError()
clazz.initProto____ = staticmethod(initProto____)
clazz.socketCreate__boolean__ = socketCreate__boolean__
clazz.socketConnect__java_net_InetAddress__int__int__ = socketConnect__java_net_InetAddress__int__int__
clazz.socketBind__java_net_InetAddress__int__boolean__ = socketBind__java_net_InetAddress__int__boolean__
clazz.socketListen__int__ = socketListen__int__
clazz.socketAccept__java_net_SocketImpl__ = socketAccept__java_net_SocketImpl__
clazz.socketAvailable____ = socketAvailable____
clazz.socketClose0__boolean__ = socketClose0__boolean__
clazz.socketShutdown__int__ = socketShutdown__int__
clazz.socketNativeSetOption__int__boolean__java_lang_Object__ = socketNativeSetOption__int__boolean__java_lang_Object__
clazz.socketGetOption__int__java_lang_Object__ = socketGetOption__int__java_lang_Object__
clazz.socketSendUrgentData__int__ = socketSendUrgentData__int__
| 39.254902 | 123 | 0.793207 | 199 | 2,002 | 6.884422 | 0.160804 | 0.210219 | 0.216788 | 0.122628 | 0.564234 | 0.459124 | 0.076642 | 0 | 0 | 0 | 0 | 0.0183 | 0.153846 | 2,002 | 50 | 124 | 40.04 | 0.790437 | 0 | 0 | 0.324324 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.351351 | false | 0 | 0 | 0 | 0.351351 | 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 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
b23410413a31fad8b057b8f858083b133ba2f903 | 7,438 | py | Python | construct/expr.py | DominicAntonacci/construct | abd48c4892ceddc60c11d25f4a955573e2c61111 | [
"MIT"
] | 57 | 2019-12-08T00:02:14.000Z | 2022-03-24T20:40:40.000Z | construct/expr.py | DominicAntonacci/construct | abd48c4892ceddc60c11d25f4a955573e2c61111 | [
"MIT"
] | 3 | 2020-01-26T03:38:31.000Z | 2020-06-21T13:42:46.000Z | construct/expr.py | DominicAntonacci/construct | abd48c4892ceddc60c11d25f4a955573e2c61111 | [
"MIT"
] | 8 | 2020-04-20T08:17:57.000Z | 2021-10-04T06:04:51.000Z | import operator
if not hasattr(operator, "div"):
operator.div = operator.truediv
opnames = {
operator.add : "+",
operator.sub : "-",
operator.mul : "*",
operator.div : "/",
operator.floordiv : "//",
operator.mod : "%",
operator.pow : "**",
operator.xor : "^",
operator.lshift : "<<",
operator.rshift : ">>",
operator.and_ : "and",
operator.or_ : "or",
operator.not_ : "not",
operator.neg : "-",
operator.pos : "+",
operator.contains : "in",
operator.gt : ">",
operator.ge : ">=",
operator.lt : "<",
operator.le : "<=",
operator.eq : "==",
operator.ne : "!=",
}
class ExprMixin(object):
def __add__(self, other):
return BinExpr(operator.add, self, other)
def __sub__(self, other):
return BinExpr(operator.sub, self, other)
def __mul__(self, other):
return BinExpr(operator.mul, self, other)
def __floordiv__(self, other):
return BinExpr(operator.floordiv, self, other)
def __truediv__(self, other):
return BinExpr(operator.div, self, other)
__div__ = __floordiv__
def __mod__(self, other):
return BinExpr(operator.mod, self, other)
def __pow__(self, other):
return BinExpr(operator.pow, self, other)
def __xor__(self, other):
return BinExpr(operator.xor, self, other)
def __rshift__(self, other):
return BinExpr(operator.rshift, self, other)
def __lshift__(self, other):
return BinExpr(operator.lshift, self, other)
def __and__(self, other):
return BinExpr(operator.and_, self, other)
def __or__(self, other):
return BinExpr(operator.or_, self, other)
def __radd__(self, other):
return BinExpr(operator.add, other, self)
def __rsub__(self, other):
return BinExpr(operator.sub, other, self)
def __rmul__(self, other):
return BinExpr(operator.mul, other, self)
def __rfloordiv__(self, other):
return BinExpr(operator.floordiv, other, self)
def __rtruediv__(self, other):
return BinExpr(operator.div, other, self)
__rdiv__ = __rfloordiv__
def __rmod__(self, other):
return BinExpr(operator.mod, other, self)
def __rpow__(self, other):
return BinExpr(operator.pow, other, self)
def __rxor__(self, other):
return BinExpr(operator.xor, other, self)
def __rrshift__(self, other):
return BinExpr(operator.rshift, other, self)
def __rlshift__(self, other):
return BinExpr(operator.lshift, other, self)
def __rand__(self, other):
return BinExpr(operator.and_, other, self)
def __ror__(self, other):
return BinExpr(operator.or_, other, self)
def __neg__(self):
return UniExpr(operator.neg, self)
def __pos__(self):
return UniExpr(operator.pos, self)
def __invert__(self):
return UniExpr(operator.not_, self)
__inv__ = __invert__
def __contains__(self, other):
return BinExpr(operator.contains, self, other)
def __gt__(self, other):
return BinExpr(operator.gt, self, other)
def __ge__(self, other):
return BinExpr(operator.ge, self, other)
def __lt__(self, other):
return BinExpr(operator.lt, self, other)
def __le__(self, other):
return BinExpr(operator.le, self, other)
def __eq__(self, other):
return BinExpr(operator.eq, self, other)
def __ne__(self, other):
return BinExpr(operator.ne, self, other)
def __getstate__(self):
attrs = {}
if hasattr(self, "__dict__"):
attrs.update(self.__dict__)
slots = []
c = self.__class__
while c is not None:
if hasattr(c, "__slots__"):
slots.extend(c.__slots__)
c = c.__base__
for name in slots:
if hasattr(self, name):
attrs[name] = getattr(self, name)
return attrs
def __setstate__(self, attrs):
for name, value in attrs.items():
setattr(self, name, value)
class UniExpr(ExprMixin):
def __init__(self, op, operand):
self.op = op
self.operand = operand
def __repr__(self):
return "%s %r" % (opnames[self.op], self.operand)
def __str__(self):
return "%s %s" % (opnames[self.op], self.operand)
def __call__(self, obj, *args):
operand = self.operand(obj) if callable(self.operand) else self.operand
return self.op(operand)
class BinExpr(ExprMixin):
def __init__(self, op, lhs, rhs):
self.op = op
self.lhs = lhs
self.rhs = rhs
def __repr__(self):
return "(%r %s %r)" % (self.lhs, opnames[self.op], self.rhs)
def __str__(self):
return "(%s %s %s)" % (self.lhs, opnames[self.op], self.rhs)
def __call__(self, obj, *args):
lhs = self.lhs(obj) if callable(self.lhs) else self.lhs
rhs = self.rhs(obj) if callable(self.rhs) else self.rhs
return self.op(lhs, rhs)
class Path(ExprMixin):
def __init__(self, name, field=None, parent=None):
self.__name = name
self.__field = field
self.__parent = parent
def __repr__(self):
if self.__parent is None:
return self.__name
else:
return "%r.%s" % (self.__parent, self.__field)
def __str__(self):
if self.__parent is None:
return self.__name
else:
return "%s[%r]" % (self.__parent, self.__field)
def __call__(self, obj, *args):
if self.__parent is None:
return obj
else:
return self.__parent(obj)[self.__field]
def __getfield__(self):
return self.__field
def __getattr__(self, name):
return Path(self.__name, name, self)
def __getitem__(self, name):
return Path(self.__name, name, self)
class Path2(ExprMixin):
def __init__(self, name, index=None, parent=None):
self.__name = name
self.__index = index
self.__parent = parent
def __repr__(self):
if self.__parent is None:
return self.__name
else:
return "%r[%r]" % (self.__parent, self.__index)
def __call__(self, *args):
if self.__parent is None:
return args[1]
else:
return self.__parent(*args)[self.__index]
def __getitem__(self, index):
return Path2(self.__name, index, self)
class FuncPath(ExprMixin):
def __init__(self, func, operand=None):
self.__func = func
self.__operand = operand
def __repr__(self):
if self.__operand is None:
return "%s_" % (self.__func.__name__)
else:
return "%s_(%r)" % (self.__func.__name__, self.__operand)
def __str__(self):
if self.__operand is None:
return "%s_" % (self.__func.__name__)
else:
return "%s_(%s)" % (self.__func.__name__, self.__operand)
def __call__(self, operand, *args):
if self.__operand is None:
return FuncPath(self.__func, operand) if callable(operand) else operand
else:
return self.__func(self.__operand(operand) if callable(self.__operand) else self.__operand)
this = Path("this")
obj_ = Path("obj_")
list_ = Path2("list_")
len_ = FuncPath(len)
sum_ = FuncPath(sum)
min_ = FuncPath(min)
max_ = FuncPath(max)
abs_ = FuncPath(abs)
| 28.941634 | 103 | 0.60285 | 886 | 7,438 | 4.599323 | 0.115124 | 0.110429 | 0.11411 | 0.167362 | 0.500368 | 0.402945 | 0.149202 | 0.103067 | 0.071656 | 0.071656 | 0 | 0.000739 | 0.272519 | 7,438 | 256 | 104 | 29.054688 | 0.752356 | 0 | 0 | 0.195238 | 0 | 0 | 0.018284 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.280952 | false | 0 | 0.004762 | 0.2 | 0.619048 | 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 | 0 | 0 | 0 | 3 |
b2410ae215724bbd3d52cfc6ac8fa233e41ad029 | 5,141 | py | Python | modules/password.py | MasterBurnt/ToolBurnt | 479a310b7ffff58d00d362ac0fa59d95750e3304 | [
"Apache-2.0"
] | 1 | 2021-10-18T09:03:21.000Z | 2021-10-18T09:03:21.000Z | modules/password.py | MasterBurnt/ToolBurnt | 479a310b7ffff58d00d362ac0fa59d95750e3304 | [
"Apache-2.0"
] | null | null | null | modules/password.py | MasterBurnt/ToolBurnt | 479a310b7ffff58d00d362ac0fa59d95750e3304 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding:utf-8 -*-
#
# @name : PassList
# @url : http://github.com/MasterBurnt
# @author : MasterBurnt
#Libraries
from concurrent.futures import ThreadPoolExecutor
import datetime,os,sys,random,time
from colorama import Fore,init,Style
#C&B&I
init()
c1 = Style.BRIGHT + Fore.LIGHTWHITE_EX
c2 = Style.BRIGHT + Fore.LIGHTGREEN_EX
c3 = Style.BRIGHT + Fore.LIGHTCYAN_EX
c4 = Style.BRIGHT + Fore.LIGHTRED_EX
c5 = Style.BRIGHT + Fore.LIGHTYELLOW_EX
c6 = Style.BRIGHT + Fore.LIGHTBLUE_EX
c7 = Fore.RESET
#Clear Console
clear = lambda: os.system('cls' if os.name in ('nt', 'dos') else 'clear')
list = []
out =[]
#Run
def __start__():
try:
#Banner
def banner():
clear()
a = c5+f"""
___ ____ ____ ____ _ _ ____ ___
|__] |__| [__ [__ | | [__ |
| | | ___] ___] |___ | ___] | {c1}Maker\n"""
for x in a:
print(x,end = "")
sys.stdout.flush()
time.sleep(0.007)
def banner1():
print(f"""
{c3}{"*" * 41}{c7}
@name : PassList
@url : http://github.com/MasterBurnt
@author : MasterBurnt
{c3}{"*" * 41}
""")
banner();banner1()
print(c2+f"""
[*] {c1}Enter words, characters, target color, date of birth, etc..
{c2}[*] {c1}To pass (Press Enter...)\n""")
#Entries
for x in range(1,101):
i = input(c2+f"{c1}words #~{c7} ")
list.append(i)
#B
if i == "":
banner();banner1()
#File Name
file = input(c2+f'\n[?] {c1}Select The File Name To Save :{c7} ')
if file == "":
file = "passlist"
else:
pass
break
else:
continue
#X+Y
def task():
for i in range(1,50):
out1 = random.choice(list)
out2 = random.choice(list)
out3 = random.choice(list)
out4 = random.choice(list)
out5 = random.choice(list)
a = str(out1)+str(out2)
b = str(out1)+str(out2)+str(out3)
c = str(out1)+str(out2)+str(out3)+str(out4)
d = str(out1)+str(out2)+str(out3)+str(out4)+str(out5)
if a not in out and len(a) >= 4:
out.append(a)
elif b not in out and len(b) >= 4:
out.append(b)
elif c not in out and len(c) >= 4:
out.append(c)
elif d not in out and len(d) >= 4:
out.append(d)
else:
pass
def main():
with ThreadPoolExecutor(max_workers=30) as executor:
future = executor.submit(task)
future = executor.submit(task)
future = executor.submit(task)
future = executor.submit(task)
future = executor.submit(task)
future = executor.submit(task)
future = executor.submit(task)
future = executor.submit(task)
future = executor.submit(task)
future = executor.submit(task)
future = executor.submit(task)
future = executor.submit(task)
future = executor.submit(task)
future = executor.submit(task)
future = executor.submit(task)
future = executor.submit(task)
future = executor.submit(task)
future = executor.submit(task)
future = executor.submit(task)
future = executor.submit(task)
future = executor.submit(task)
future = executor.submit(task)
future = executor.submit(task)
future = executor.submit(task)
future = executor.submit(task)
future = executor.submit(task)
future = executor.submit(task)
future = executor.submit(task)
future = executor.submit(task)
future = executor.submit(task)
banner()
print(f"""
{c3}{"*" * 41}
{c2}[*] {c1}Output : {c7}{file}.txt
{c2}[*] {c1}started at : {c7}{datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')}
{c3}{"*" * 41}
\n{c1}R{c2}E{c3}V{c4}I{c5}E{c6}W\n{c3}p{c4}l{c5}e{c6}a{c7}s{c1}e {c2}w{c3}a{c4}i{c5}t{c6}{c7}{c1}. {c2}.{c3}.\n""")
main()
#Mkdir Folder
try:
os.mkdir('Pass-History')
except:
pass
#cd Pass-History
os.chdir('Pass-History')
#Open output file
f = open(f'{file}.txt', 'a')
#Output
for hit in out:
f.write(hit+'\n')
#File Size
size = f.seek(0, 2)
#Close output file
f.close()
print(c2+f"[s] {c1}Password number : {len(out)}\n{c2}[s] {c1}Saved to file : Pass-History \n{c2}[s] {c1}File Name : {file}.txt\n{c2}[s] {c1}File Size : {size // 1000 / 1000}")
except (KeyboardInterrupt,EOFError, Exception):
clear()
sys.exit()
| 30.064327 | 183 | 0.491928 | 606 | 5,141 | 4.079208 | 0.275578 | 0.169903 | 0.242718 | 0.291262 | 0.398463 | 0.367718 | 0.359223 | 0.359223 | 0.33657 | 0.291262 | 0 | 0.035802 | 0.364326 | 5,141 | 170 | 184 | 30.241176 | 0.720624 | 0.049407 | 0 | 0.373016 | 0 | 0.02381 | 0.185779 | 0.029593 | 0 | 0 | 0 | 0 | 0 | 1 | 0.039683 | false | 0.071429 | 0.02381 | 0 | 0.063492 | 0.039683 | 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 | 1 | 0 | 0 | 0 | 0 | 0 | 3 |
b24d5ff4a2324937255e18e0f636457956239a07 | 1,749 | py | Python | plugins/okta/komand_okta/actions/reset_password/schema.py | lukaszlaszuk/insightconnect-plugins | 8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892 | [
"MIT"
] | 46 | 2019-06-05T20:47:58.000Z | 2022-03-29T10:18:01.000Z | plugins/okta/komand_okta/actions/reset_password/schema.py | lukaszlaszuk/insightconnect-plugins | 8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892 | [
"MIT"
] | 386 | 2019-06-07T20:20:39.000Z | 2022-03-30T17:35:01.000Z | plugins/okta/komand_okta/actions/reset_password/schema.py | lukaszlaszuk/insightconnect-plugins | 8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892 | [
"MIT"
] | 43 | 2019-07-09T14:13:58.000Z | 2022-03-28T12:04:46.000Z | # GENERATED BY KOMAND SDK - DO NOT EDIT
import komand
import json
class Component:
DESCRIPTION = "This action resets password for Okta user and transitions user status to PASSWORD_EXPIRED, so that the user is required to change their password at their next login"
class Input:
TEMP_PASSWORD = "temp_password"
USER_ID = "user_id"
class Output:
SUCCESS = "success"
TEMP_PASSWORD = "temp_password"
class ResetPasswordInput(komand.Input):
schema = json.loads("""
{
"type": "object",
"title": "Variables",
"properties": {
"temp_password": {
"type": "boolean",
"title": "Okta User Temporary Password",
"description": "If set to true, sets the user's password to a temporary password and returns it",
"default": false,
"order": 2
},
"user_id": {
"type": "string",
"title": "Okta User ID",
"description": "User ID whose password will be reset",
"order": 1
}
},
"required": [
"user_id"
]
}
""")
def __init__(self):
super(self.__class__, self).__init__(self.schema)
class ResetPasswordOutput(komand.Output):
schema = json.loads("""
{
"type": "object",
"title": "Variables",
"properties": {
"success": {
"type": "boolean",
"title": "Success",
"description": "Whether the reset was successful",
"order": 1
},
"temp_password": {
"type": "string",
"title": "Okta User Temporary Password",
"description": "The temporary password of the Okta user, if true was set in Temporary Password input",
"order": 2
}
},
"required": [
"success"
]
}
""")
def __init__(self):
super(self.__class__, self).__init__(self.schema)
| 22.714286 | 184 | 0.606632 | 197 | 1,749 | 5.208122 | 0.390863 | 0.070175 | 0.038012 | 0.046784 | 0.291423 | 0.259259 | 0.179337 | 0.179337 | 0.083821 | 0.083821 | 0 | 0.003079 | 0.25729 | 1,749 | 76 | 185 | 23.013158 | 0.786759 | 0.021155 | 0 | 0.47619 | 1 | 0.047619 | 0.706433 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.031746 | false | 0.190476 | 0.031746 | 0 | 0.253968 | 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 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 3 |
b26837a3549f4fc5b6bc64ba12abe7c4d44f56e0 | 267 | py | Python | gitprivacy/dateredacter/__init__.py | fapdash/git-privacy | 357a2952d8feb9e193373e18284e57a26d14b96c | [
"BSD-2-Clause"
] | 7 | 2019-10-15T08:30:02.000Z | 2021-12-26T20:37:18.000Z | gitprivacy/dateredacter/__init__.py | fapdash/git-privacy | 357a2952d8feb9e193373e18284e57a26d14b96c | [
"BSD-2-Clause"
] | 30 | 2019-04-22T15:08:34.000Z | 2022-02-16T20:39:28.000Z | gitprivacy/dateredacter/__init__.py | cburkert/pyGitPrivacy | d522e62f85446e7554f6b66b5287f9c3a6aa33c2 | [
"BSD-2-Clause"
] | 2 | 2021-06-22T18:17:01.000Z | 2021-12-21T09:48:33.000Z | import abc
from datetime import datetime
class DateRedacter(abc.ABC):
"""Abstract timestamp redater."""
@abc.abstractmethod
def redact(self, timestamp: datetime) -> datetime:
"""Redact timestamp."""
from .reduce import ResolutionDateRedacter
| 19.071429 | 54 | 0.71161 | 27 | 267 | 7.037037 | 0.555556 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.183521 | 267 | 13 | 55 | 20.538462 | 0.87156 | 0.168539 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.166667 | false | 0 | 0.5 | 0 | 0.833333 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 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 | 3 |
b26b274e30196d87e8ffb7a61d1cdb928d240314 | 1,101 | py | Python | src/biopsykit/sleep/sleep_wake_detection/algorithms/_base.py | Zwitscherle/BioPsyKit | 7200c5f1be75c20f53e1eb4c991aca1c89e3dd88 | [
"MIT"
] | 10 | 2020-11-05T13:34:55.000Z | 2022-03-11T16:20:10.000Z | src/biopsykit/sleep/sleep_wake_detection/algorithms/_base.py | Zwitscherle/BioPsyKit | 7200c5f1be75c20f53e1eb4c991aca1c89e3dd88 | [
"MIT"
] | 14 | 2021-03-11T14:43:52.000Z | 2022-03-10T19:44:57.000Z | src/biopsykit/sleep/sleep_wake_detection/algorithms/_base.py | Zwitscherle/BioPsyKit | 7200c5f1be75c20f53e1eb4c991aca1c89e3dd88 | [
"MIT"
] | 3 | 2021-09-13T13:14:38.000Z | 2022-02-19T09:13:25.000Z | """Module for sleep/wake detection base class."""
from biopsykit.utils._types import arr_t
from biopsykit.utils.datatype_helper import SleepWakeDataFrame
class _SleepWakeBase:
"""Base class for sleep/wake detection algorithms."""
def __init__(self, **kwargs):
pass
def fit(self, data: arr_t, **kwargs):
"""Fit sleep/wake detection algorithm to input data.
.. note::
Algorithms that do not have to (re)fit a ML model before sleep/wake prediction, such as rule-based
algorithms, will internally bypass this method as the ``fit`` step is not needed.
Parameters
----------
data : array_like
input data
"""
raise NotImplementedError("Needs to be implemented by child class.")
def predict(self, data: arr_t, **kwargs) -> SleepWakeDataFrame:
"""Apply sleep/wake prediction algorithm on input data.
Parameters
----------
data : array_like
input data
"""
raise NotImplementedError("Needs to be implemented by child class.")
| 29.756757 | 110 | 0.62852 | 129 | 1,101 | 5.271318 | 0.511628 | 0.066176 | 0.079412 | 0.061765 | 0.311765 | 0.258824 | 0.258824 | 0.258824 | 0.258824 | 0.258824 | 0 | 0 | 0.273388 | 1,101 | 36 | 111 | 30.583333 | 0.85 | 0.459582 | 0 | 0.222222 | 0 | 0 | 0.167382 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.333333 | false | 0.111111 | 0.222222 | 0 | 0.666667 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 3 |
b27aa21ef3977e3a19e7a6820a49fc999d5453c5 | 1,347 | py | Python | test/test_http.py | tylerlong/ringcentral-python | 518a6b2b493360a40f2ee0eaa8ae3f12e01d4f52 | [
"MIT"
] | 3 | 2017-01-26T01:58:50.000Z | 2018-12-26T09:06:21.000Z | test/test_http.py | tylerlong/ringcentral-python | 518a6b2b493360a40f2ee0eaa8ae3f12e01d4f52 | [
"MIT"
] | 3 | 2017-03-25T21:50:04.000Z | 2018-09-05T23:35:26.000Z | test/test_http.py | tylerlong/ringcentral-python | 518a6b2b493360a40f2ee0eaa8ae3f12e01d4f52 | [
"MIT"
] | 1 | 2017-02-14T22:27:16.000Z | 2017-02-14T22:27:16.000Z | from .test_base import BaseTestCase
class HttpTestCase(BaseTestCase):
def test_get(self):
r = self.rc.get('/restapi/v1.0/account/~/extension/~')
self.assertEqual(200, r.status_code)
def test_post(self):
r = self.rc.post('/restapi/v1.0/account/~/extension/~/sms', {
'to': [{'phoneNumber': self.receiver}],
'from': {'phoneNumber': self.username},
'text': 'Hello world'
})
self.assertEqual(200, r.status_code)
def test_put(self):
r = self.rc.get('/restapi/v1.0/account/~/extension/~/message-store', { 'direction': 'Outbound' })
message_id = r.json()['records'][0]['id']
r = self.rc.put('/restapi/v1.0/account/~/extension/~/message-store/{message_id}'.format(message_id = message_id),
{ 'readStatus': 'Read' })
self.assertEqual(200, r.status_code)
def test_delete(self):
r = self.rc.post('/restapi/v1.0/account/~/extension/~/sms', {
'to': [{ 'phoneNumber': self.receiver }],
'from': { 'phoneNumber': self.username },
'text': 'Hello world'})
message_id = r.json()['id']
r = self.rc.delete('/restapi/v1.0/account/~/extension/~/message-store/{message_id}'.format(message_id = message_id), { 'purge': False })
self.assertEqual(204, r.status_code)
| 43.451613 | 144 | 0.589458 | 164 | 1,347 | 4.737805 | 0.27439 | 0.092664 | 0.054054 | 0.131274 | 0.723295 | 0.723295 | 0.723295 | 0.707851 | 0.568855 | 0.568855 | 0 | 0.023764 | 0.219005 | 1,347 | 30 | 145 | 44.9 | 0.714829 | 0 | 0 | 0.346154 | 0 | 0 | 0.311062 | 0.212324 | 0 | 0 | 0 | 0 | 0.153846 | 1 | 0.153846 | false | 0 | 0.038462 | 0 | 0.230769 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 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 | 3 |
b28b3da62fcf1d7ad1f84230a298ab9d0ed79266 | 700 | py | Python | twitcaspy/auth/app.py | Alma-field/twitcaspy | 25f3e850f2d5aab8a864bd6b7003468587fa3ea7 | [
"MIT"
] | null | null | null | twitcaspy/auth/app.py | Alma-field/twitcaspy | 25f3e850f2d5aab8a864bd6b7003468587fa3ea7 | [
"MIT"
] | 18 | 2021-10-01T13:40:01.000Z | 2021-10-18T12:34:57.000Z | twitcaspy/auth/app.py | Alma-field/twitcaspy | 25f3e850f2d5aab8a864bd6b7003468587fa3ea7 | [
"MIT"
] | null | null | null | # Twitcaspy
# Copyright 2021 Alma-field
# See LICENSE for details.
#
# based on tweepy(https://github.com/tweepy/tweepy)
# Copyright (c) 2009-2021 Joshua Roesslein
from .auth import AuthHandler
from .oauth import OAuth2Basic
class AppAuthHandler(AuthHandler):
"""
Application-only authentication handler
Parameters
----------
client_id: :class:`str`
|client_id|
client_secret: :class:`str`
|client_secret|
References
----------
https://apiv2-doc.twitcasting.tv/#access-token
"""
def __init__(self, client_id, client_secret):
super().__init__(client_id, client_secret)
self.auth = OAuth2Basic(client_id, client_secret)
| 22.580645 | 57 | 0.671429 | 79 | 700 | 5.721519 | 0.594937 | 0.088496 | 0.123894 | 0.176991 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.026786 | 0.2 | 700 | 30 | 58 | 23.333333 | 0.780357 | 0.532857 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.166667 | false | 0 | 0.333333 | 0 | 0.666667 | 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 | 0 | 1 | 0 | 1 | 0 | 0 | 3 |
b2920a5b35fa8d9589396ec223bdc4d33e30fd7a | 350 | py | Python | src/django_powerdns_api/urls.py | andrzej-jankowski/django-powerdns-api | c7bc793022ba9fde2dd0e3564c3c63398611540b | [
"Apache-2.0"
] | null | null | null | src/django_powerdns_api/urls.py | andrzej-jankowski/django-powerdns-api | c7bc793022ba9fde2dd0e3564c3c63398611540b | [
"Apache-2.0"
] | null | null | null | src/django_powerdns_api/urls.py | andrzej-jankowski/django-powerdns-api | c7bc793022ba9fde2dd0e3564c3c63398611540b | [
"Apache-2.0"
] | null | null | null | # -*- encoding: utf-8 -*-
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from django.conf.urls import patterns, include, url
from django_powerdns_api.routers import router
urlpatterns = patterns(
'',
url(r'^', include(router.urls)),
)
| 20.588235 | 51 | 0.768571 | 44 | 350 | 5.636364 | 0.545455 | 0.16129 | 0.258065 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.003344 | 0.145714 | 350 | 16 | 52 | 21.875 | 0.826087 | 0.065714 | 0 | 0 | 0 | 0 | 0.003077 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.6 | 0 | 0.6 | 0.1 | 0 | 0 | 0 | null | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 3 |
b2977674be0d43e625cea5afb3180e9f200426a4 | 996 | py | Python | qa327/frontend/exceptions.py | rickyzhangca/CISC-327 | e419caafa6ae3fe77aa411228b6b58b237fe6a61 | [
"MIT"
] | null | null | null | qa327/frontend/exceptions.py | rickyzhangca/CISC-327 | e419caafa6ae3fe77aa411228b6b58b237fe6a61 | [
"MIT"
] | 39 | 2020-10-11T02:31:14.000Z | 2020-12-15T20:18:56.000Z | qa327/frontend/exceptions.py | rickyzhangca/CISC-327 | e419caafa6ae3fe77aa411228b6b58b237fe6a61 | [
"MIT"
] | 1 | 2020-10-17T02:44:43.000Z | 2020-10-17T02:44:43.000Z | '''
This is the exceptions module:
'''
'''
Exception of when user do not have the access to certain pages.
'''
class CannotAccessPageException(Exception):
pass
'''
Exception of the first password and the second password does not match during registration.
'''
class PasswordsNotMatchingException(Exception):
pass
'''
Exception of when the user input format is wrong.
'''
class WrongFormatException(Exception):
def __init__(self, message=''):
super().__init__('{}, format is incorrect.'.format(message))
'''
Exception of when the ticket name is wrong.
'''
class WrongTicketNameException(Exception):
pass
'''
Exception of when the ticket quantity is wrong.
'''
class WrongTicketQuantityException(Exception):
pass
'''
Exception of when the ticket quantity is wrong.
'''
class WrongTicketPriceException(Exception):
pass
'''
Exception of when the email already exists in user data (already registered).
'''
class EmailAlreadyExistsException(Exception):
pass | 21.191489 | 91 | 0.736948 | 114 | 996 | 6.368421 | 0.447368 | 0.106061 | 0.123967 | 0.165289 | 0.275482 | 0.242424 | 0.157025 | 0.157025 | 0.157025 | 0.157025 | 0 | 0 | 0.162651 | 996 | 47 | 92 | 21.191489 | 0.870504 | 0.03012 | 0 | 0.4 | 0 | 0 | 0.049383 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.066667 | false | 0.466667 | 0 | 0 | 0.533333 | 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 | 0 | 0 | 1 | 0 | 0 | 3 |
b29d27c7cb2d0e54f4f91d86ff0c6d726cd311a6 | 733 | py | Python | release/stubs.min/System/Net/__init___parts/TransportContext.py | htlcnn/ironpython-stubs | 780d829e2104b2789d5f4d6f32b0ec9f2930ca03 | [
"MIT"
] | 182 | 2017-06-27T02:26:15.000Z | 2022-03-30T18:53:43.000Z | release/stubs.min/System/Net/__init___parts/TransportContext.py | htlcnn/ironpython-stubs | 780d829e2104b2789d5f4d6f32b0ec9f2930ca03 | [
"MIT"
] | 28 | 2017-06-27T13:38:23.000Z | 2022-03-15T11:19:44.000Z | release/stubs.min/System/Net/__init___parts/TransportContext.py | htlcnn/ironpython-stubs | 780d829e2104b2789d5f4d6f32b0ec9f2930ca03 | [
"MIT"
] | 67 | 2017-06-28T09:43:59.000Z | 2022-03-20T21:17:10.000Z | class TransportContext(object):
""" The System.Net.TransportContext class provides additional context about the underlying transport layer. """
def GetChannelBinding(self,kind):
"""
GetChannelBinding(self: TransportContext,kind: ChannelBindingKind) -> ChannelBinding
Retrieves the requested channel binding.
kind: The type of channel binding to retrieve.
Returns: The requested System.Security.Authentication.ExtendedProtection.ChannelBinding,or null if the
channel binding is not supported by the current transport or by the operating system.
"""
pass
def GetTlsTokenBindings(self):
""" GetTlsTokenBindings(self: TransportContext) -> IEnumerable[TokenBinding] """
pass
| 31.869565 | 113 | 0.746248 | 75 | 733 | 7.293333 | 0.586667 | 0.076782 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.178718 | 733 | 22 | 114 | 33.318182 | 0.908638 | 0.754434 | 0 | 0.4 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.4 | false | 0.4 | 0 | 0 | 0.6 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 3 |
a278b6850520063ea039b2fa761bcc89b24ae7fc | 1,009 | py | Python | timo/exception.py | Minsoo-web/TIMO | 79051cdce4539bc62d01b19e98b4fce6a3f02fae | [
"MIT"
] | null | null | null | timo/exception.py | Minsoo-web/TIMO | 79051cdce4539bc62d01b19e98b4fce6a3f02fae | [
"MIT"
] | null | null | null | timo/exception.py | Minsoo-web/TIMO | 79051cdce4539bc62d01b19e98b4fce6a3f02fae | [
"MIT"
] | 2 | 2020-07-13T00:55:52.000Z | 2020-07-27T04:23:41.000Z | from typing import AnyStr
from typing import NoReturn
class Error(Exception):
"""
This is the basis of all errors.\n
Basically the same as Exception.
"""
def __init__(self, msg: AnyStr) -> NoReturn:
self.msg: str = msg
def __str__(self) -> str:
return self.msg
class FileExtensionError(Error):
"""This error occurs when the file extension does not meet the requirements."""
def __str__(self) -> str:
return '파일 확장명이 올바르지 않습니다.'
class UnknownTestTestToolError(Error):
"""This error is caused when an invalid test tool is entered."""
def __str__(self) -> str:
return '현재 지원하지 않거나 잘못된 테스트 도구입니다.'
class UnknownDataError(Error):
"""This error occurs when data cannot be found."""
def __str__(self) -> str:
return '찾을 수 없거나 잘못된 데이터입니다.'
class UnknownDatabaseError(Error):
"""This error occurs when the database cannot be found."""
def __str__(self) -> str:
return '찾을 수 없거나 존재하지 않는 데이터베이스입니다.'
| 22.931818 | 83 | 0.654113 | 134 | 1,009 | 4.746269 | 0.485075 | 0.04717 | 0.078616 | 0.102201 | 0.331761 | 0.204403 | 0.119497 | 0.119497 | 0.119497 | 0.119497 | 0 | 0 | 0.246779 | 1,009 | 43 | 84 | 23.465116 | 0.836842 | 0.294351 | 0 | 0.263158 | 0 | 0 | 0.135618 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.315789 | false | 0 | 0.105263 | 0.263158 | 0.947368 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 3 |
a28631f9170fbf0128fb181d7e9585c79cf0e573 | 241 | py | Python | pythonProject/02al28pass_elipsis_placeholders/exercicio_num_int.py | D-Wolter/PycharmProjects | c8d6144efa30261bff72a3e0414a0d80f6730f9b | [
"MIT"
] | null | null | null | pythonProject/02al28pass_elipsis_placeholders/exercicio_num_int.py | D-Wolter/PycharmProjects | c8d6144efa30261bff72a3e0414a0d80f6730f9b | [
"MIT"
] | null | null | null | pythonProject/02al28pass_elipsis_placeholders/exercicio_num_int.py | D-Wolter/PycharmProjects | c8d6144efa30261bff72a3e0414a0d80f6730f9b | [
"MIT"
] | null | null | null | numero_int = input('Digite um numero inteiro')
if numero_int.isdigit():
numero_int = int(numero_int)
if numero_int % 2 == 0:
print('o numero e par')
elif numero_int % 1 == 0:
print('o numero e impar')
else:
| 21.909091 | 46 | 0.605809 | 37 | 241 | 3.783784 | 0.486486 | 0.385714 | 0.157143 | 0.185714 | 0.2 | 0 | 0 | 0 | 0 | 0 | 0 | 0.022857 | 0.273859 | 241 | 11 | 47 | 21.909091 | 0.777143 | 0 | 0 | 0 | 0 | 0 | 0.223141 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0 | null | null | 0.25 | 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 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
a28f7b4918b94b07856ae26b2413470f943cc99a | 123 | py | Python | remove_punctuations.py | sparemeyoursoliloquy/Python-Exercises | 18f2075327dec0dbc55edd4f50fa3f71258777e1 | [
"MIT"
] | 3 | 2020-07-28T03:31:27.000Z | 2020-07-28T03:31:32.000Z | remove_punctuations.py | sparemeyoursoliloquy/Python-Exercises | 18f2075327dec0dbc55edd4f50fa3f71258777e1 | [
"MIT"
] | null | null | null | remove_punctuations.py | sparemeyoursoliloquy/Python-Exercises | 18f2075327dec0dbc55edd4f50fa3f71258777e1 | [
"MIT"
] | null | null | null | text = input()
punc_remove = [",", ".", "!", "?"]
for i in punc_remove:
text = text.replace(i, "")
print(text.lower()) | 20.5 | 34 | 0.544715 | 16 | 123 | 4.0625 | 0.625 | 0.307692 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.178862 | 123 | 6 | 35 | 20.5 | 0.643564 | 0 | 0 | 0 | 0 | 0 | 0.032258 | 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 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
a29207dc0a5cb4e063b1e7adbc8c0acc0f001bf3 | 475 | py | Python | 7_testing/autotest/student.py | ProGabe/teals | 7ebf0b6e6f81d8a4c44baa7b5d3a9d95267ec1e3 | [
"MIT"
] | null | null | null | 7_testing/autotest/student.py | ProGabe/teals | 7ebf0b6e6f81d8a4c44baa7b5d3a9d95267ec1e3 | [
"MIT"
] | 9 | 2019-11-21T13:12:47.000Z | 2021-02-02T14:52:52.000Z | 7_testing/autotest/student.py | ProGabe/teals | 7ebf0b6e6f81d8a4c44baa7b5d3a9d95267ec1e3 | [
"MIT"
] | 2 | 2021-01-25T03:38:30.000Z | 2021-03-07T23:54:53.000Z | '''
Student: Dan Grecoe
Assignment: Homework 1
Submission of the first homework assignment. The assignment
was to create a python file with 2 functions
multiply - Takes two parameters x and y and returns the product
of the values provided.
noop - Takes 0 parameters and returns None
'''
def multiply(x, y):
return x * y
def noop():
#raise Exception("Bad things happened")
print("Dumb student program")
return None
| 22.619048 | 67 | 0.669474 | 65 | 475 | 4.892308 | 0.661538 | 0.031447 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.008646 | 0.269474 | 475 | 20 | 68 | 23.75 | 0.907781 | 0.698947 | 0 | 0 | 0 | 0 | 0.186916 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.4 | false | 0 | 0 | 0.2 | 0.8 | 0.2 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 3 |
a2b0a81878fe2e8c89e23970f4f8db084dca00c6 | 598 | py | Python | delira/models/backends/chainer/__init__.py | gedoensmax/delira | 545e2ccbe56ed382d300cf3d00317e9a0e3ab5f6 | [
"BSD-2-Clause"
] | 1 | 2019-10-03T21:00:20.000Z | 2019-10-03T21:00:20.000Z | delira/models/backends/chainer/__init__.py | gedoensmax/delira | 545e2ccbe56ed382d300cf3d00317e9a0e3ab5f6 | [
"BSD-2-Clause"
] | null | null | null | delira/models/backends/chainer/__init__.py | gedoensmax/delira | 545e2ccbe56ed382d300cf3d00317e9a0e3ab5f6 | [
"BSD-2-Clause"
] | null | null | null | from delira import get_backends as _get_backends
if "CHAINER" in _get_backends():
from delira.models.backends.chainer.abstract_network import \
AbstractChainerNetwork
from delira.models.backends.chainer.data_parallel import \
DataParallelChainerNetwork
from delira.models.backends.chainer.data_parallel import \
DataParallelChainerOptimizer
from delira.models.backends.chainer.data_parallel import \
ParallelOptimizerUpdateModelParameters
from delira.models.backends.chainer.data_parallel import \
ParallelOptimizerCumulateGradientsHook
| 42.714286 | 65 | 0.789298 | 58 | 598 | 7.965517 | 0.327586 | 0.12987 | 0.17316 | 0.25974 | 0.491342 | 0.424242 | 0.424242 | 0.424242 | 0 | 0 | 0 | 0 | 0.160535 | 598 | 13 | 66 | 46 | 0.920319 | 0 | 0 | 0.333333 | 0 | 0 | 0.011706 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.5 | 0 | 0.5 | 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 | 0 | 0 | 0 | 3 |
a2ee6d19098aed822e580f589bbcc0c4df0bf0c1 | 320 | py | Python | tests/urls.py | skioo/django-datatrans | c2159b08935cd0c70355ca6e8ff92bbe86d372cd | [
"MIT"
] | 9 | 2017-09-12T12:45:30.000Z | 2022-03-30T13:53:57.000Z | tests/urls.py | skioo/django-datatrans | c2159b08935cd0c70355ca6e8ff92bbe86d372cd | [
"MIT"
] | null | null | null | tests/urls.py | skioo/django-datatrans | c2159b08935cd0c70355ca6e8ff92bbe86d372cd | [
"MIT"
] | 1 | 2021-11-08T10:21:01.000Z | 2021-11-08T10:21:01.000Z | from django.urls import include, path
from datatrans.views import example
urlpatterns = [
path(r'^datatrans/', include('datatrans.urls')),
path(r'^example/register-credit-card$', example.register_credit_card, name='example_register_credit_card'),
path(r'^example/pay$', example.pay, name='example_pay'),
]
| 32 | 111 | 0.7375 | 42 | 320 | 5.47619 | 0.380952 | 0.065217 | 0.273913 | 0.326087 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.109375 | 320 | 9 | 112 | 35.555556 | 0.807018 | 0 | 0 | 0 | 0 | 0 | 0.334375 | 0.18125 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.285714 | 0 | 0.285714 | 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 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
a2f56add77b1581d6619a3c899c2460cc7dc3102 | 137 | py | Python | cisco_support/__version__.py | rothdennis/cisco_support | c20b955794400eb565fa5c178749c2ee6ef7dc0f | [
"MIT"
] | 4 | 2021-09-09T07:24:13.000Z | 2022-03-04T19:51:01.000Z | cisco_support/__version__.py | rothdennis/cisco_support | c20b955794400eb565fa5c178749c2ee6ef7dc0f | [
"MIT"
] | null | null | null | cisco_support/__version__.py | rothdennis/cisco_support | c20b955794400eb565fa5c178749c2ee6ef7dc0f | [
"MIT"
] | null | null | null | __title__ = 'cisco_support'
__description__ = 'Cisco Support APIs'
__version__ = '0.1.0'
__author__ = 'Dennis Roth'
__license__ = 'MIT'
| 19.571429 | 38 | 0.737226 | 16 | 137 | 5 | 0.8125 | 0.3 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.025424 | 0.138686 | 137 | 6 | 39 | 22.833333 | 0.652542 | 0 | 0 | 0 | 0 | 0 | 0.367647 | 0 | 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 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
0c0a4769116e4e6ba1cffb9d2ccffc9442014420 | 895 | py | Python | Middle/Que33.py | HuangZengPei/LeetCode | d2b8a1dfe986d71d02d2568b55bad6e5b1c81492 | [
"MIT"
] | 2 | 2019-11-20T14:05:27.000Z | 2019-11-20T14:05:28.000Z | Middle/Que33.py | HuangZengPei/LeetCode | d2b8a1dfe986d71d02d2568b55bad6e5b1c81492 | [
"MIT"
] | null | null | null | Middle/Que33.py | HuangZengPei/LeetCode | d2b8a1dfe986d71d02d2568b55bad6e5b1c81492 | [
"MIT"
] | null | null | null | class Solution(object):
def search(self, nums, target):
"""
:type nums: List[int]
:type target: int
:rtype: int
"""
return binarySearch(nums,target,0,len(nums)-1)
def binarySearch(nums, target, low, high):
if (low > high):
return -1
middle = low + (high - low)/2
if nums[middle] == target:
return middle
if nums[low] <= nums[middle]:
if nums[low] < target and target < nums[middle]: # 在左边
return binarySearch(nums,target,low,middle-1)
else:
return binarySearch(nums,target,middle+1,high)
else:
if nums[middle] < target and target < nums[high]:
return binarySearch(nums,target,middle+1,high)
else:
return binarySearch(nums,target,low,middle-1)
| 34.423077 | 69 | 0.521788 | 100 | 895 | 4.67 | 0.25 | 0.149893 | 0.282655 | 0.299786 | 0.35546 | 0.346895 | 0.346895 | 0.184154 | 0 | 0 | 0 | 0.014085 | 0.365363 | 895 | 26 | 70 | 34.423077 | 0.808099 | 0.06257 | 0 | 0.368421 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.105263 | false | 0 | 0 | 0 | 0.526316 | 0 | 0 | 0 | 0 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 3 |
0c20b7c255ec391f7dad36b9c36ded1071de5e8b | 222 | py | Python | tests/sample_app/urls.py | dreipol/meta-tagger | c1a2f1f8b0c051018a5bb75d4e579d27bd2c27b2 | [
"BSD-3-Clause"
] | 3 | 2016-05-30T07:48:54.000Z | 2017-02-08T21:16:03.000Z | tests/sample_app/urls.py | dreipol/meta-tagger | c1a2f1f8b0c051018a5bb75d4e579d27bd2c27b2 | [
"BSD-3-Clause"
] | null | null | null | tests/sample_app/urls.py | dreipol/meta-tagger | c1a2f1f8b0c051018a5bb75d4e579d27bd2c27b2 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from django.conf.urls import url
from tests.sample_app.views import NewsArticleDetailView
urlpatterns = [
url(r'^(?P<pk>\d+)/$', NewsArticleDetailView.as_view(), name='news-article-detail'),
]
| 27.75 | 88 | 0.702703 | 29 | 222 | 5.310345 | 0.862069 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.005076 | 0.112613 | 222 | 7 | 89 | 31.714286 | 0.77665 | 0.094595 | 0 | 0 | 0 | 0 | 0.165829 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.4 | 0 | 0.4 | 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 | 0 | 0 | 0 | 3 |
0c2115fcd6d26f9ce3cdf5ced126fdd61f06356a | 105 | py | Python | RCNN/config_RCNN.py | andrew-miao/ECE657A_Project-text-classification | 5ad77ea6d6c685eecfe3dc189d9ea41f5b3ac1d1 | [
"MIT"
] | 4 | 2020-08-11T18:31:55.000Z | 2020-08-25T15:30:53.000Z | RCNN/config_RCNN.py | andrew-miao/ECE657A_Project-text-classification | 5ad77ea6d6c685eecfe3dc189d9ea41f5b3ac1d1 | [
"MIT"
] | null | null | null | RCNN/config_RCNN.py | andrew-miao/ECE657A_Project-text-classification | 5ad77ea6d6c685eecfe3dc189d9ea41f5b3ac1d1 | [
"MIT"
] | null | null | null | class Config(object):
embedding_size = 300
n_layers = 1
hidden_size = 128
drop_prob = 0.2 | 21 | 24 | 0.647619 | 16 | 105 | 4 | 0.9375 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.118421 | 0.27619 | 105 | 5 | 25 | 21 | 0.723684 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 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 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 3 |
0c3529b1f848cd4aef129f241e7149c8c46fd8c6 | 3,155 | py | Python | tests/test_transducer.py | dandersonw/myouji-kenchi | 6a373d8626995bf5d4383dcac4fc8e6372135640 | [
"MIT"
] | 7 | 2019-10-22T10:09:12.000Z | 2022-01-31T07:49:07.000Z | tests/test_transducer.py | dandersonw/myouji-kenchi | 6a373d8626995bf5d4383dcac4fc8e6372135640 | [
"MIT"
] | null | null | null | tests/test_transducer.py | dandersonw/myouji-kenchi | 6a373d8626995bf5d4383dcac4fc8e6372135640 | [
"MIT"
] | 1 | 2021-07-09T18:10:17.000Z | 2021-07-09T18:10:17.000Z | import myouji_kenchi
# Given that the output depends on what goes into the attested myouji file I'm
# hesitant to write too many tests in the blast radius of changes to that file
class TestTransducer():
nbt = myouji_kenchi.MyoujiBackTransliteration()
def assert_transliteration(self, romaji, *expected_results):
results = self.nbt.back_transliterate(romaji)
strings = set(r[0] for r in results)
assert strings == set(expected_results)
def test_assorted(self):
self.assert_transliteration('sa', 'サ')
self.assert_transliteration('SA', 'サ')
self.assert_transliteration('se', 'セ')
self.assert_transliteration('shō', 'ショウ') # composed
self.assert_transliteration('shō', 'ショウ') # decomposed
self.assert_transliteration('sho', 'ショウ')
self.assert_transliteration('syo', 'ショウ')
self.assert_transliteration('ho', 'ホ', 'ホウ', 'ホオ')
self.assert_transliteration('teppou', 'テッポウ')
self.assert_transliteration('shibukawa', 'シブカワ')
self.assert_transliteration('watamura', 'ワタムラ')
self.assert_transliteration('Matsumoto', 'マツモト')
self.assert_transliteration('Matumoto', 'マツモト')
self.assert_transliteration('Tusima', 'ツシマ')
self.assert_transliteration('IMAZU', 'イマヅ', 'イマズ')
self.assert_transliteration('SATO', 'サトウ', 'サトオ', 'サト')
self.assert_transliteration('Uchino', 'ウチノ', 'ウチノウ')
self.assert_transliteration('Utino', 'ウチノ', 'ウチノウ')
self.assert_transliteration('Chano', 'チャノ')
self.assert_transliteration('Tyano', 'チャノ')
self.assert_transliteration('Kojima', 'コジマ', 'コヂマ', 'コウジマ')
self.assert_transliteration('Kozima', 'コジマ', 'コヂマ', 'コウジマ')
self.assert_transliteration('Inuduka', 'イヌヅカ')
self.assert_transliteration('Inuzuka', 'イヌヅカ', 'イヌズカ')
self.assert_transliteration('Inudzuka', 'イヌヅカ')
self.assert_transliteration('Betchaku', 'ベッチャク')
self.assert_transliteration('Becchaku', 'ベッチャク')
self.assert_transliteration('Uwozaki', 'ウヲザキ')
self.assert_transliteration('Uozaki', 'ウヲザキ', 'ウオザキ')
self.assert_transliteration('Nyoya', 'ニョウヤ')
self.assert_transliteration('Nitta', 'ニッタ')
def test_oh(self):
self.assert_transliteration('Ohnishi', 'オオニシ', 'オウニシ')
def test_leading_m(self):
self.assert_transliteration('Sampei', 'サンペイ')
self.assert_transliteration('Sanpei', 'サンペイ')
def test_glottal_stop(self):
self.assert_transliteration('Shinyagaito', 'シンヤガイト')
self.assert_transliteration('Sinyagaito', 'シンヤガイト')
self.assert_transliteration('Shin\'yagaito', 'シンヤガイト')
self.assert_transliteration('Shin-yagaito', 'シンヤガイト')
def test_double_i(self):
self.assert_transliteration('Ishii', 'イシイ')
# To be clear, 'Ishî' is almost certainly a wrong transliteration
# Nevertheless, the below is the expected behavior
self.assert_transliteration('Ishî', 'イシイ')
self.assert_transliteration('Isî', 'イシイ')
def test_bad_characters(self):
self.assert_transliteration('@')
| 44.43662 | 78 | 0.66878 | 336 | 3,155 | 6.107143 | 0.41369 | 0.440058 | 0.511696 | 0.084795 | 0.17885 | 0.117446 | 0.083333 | 0.039474 | 0 | 0 | 0 | 0.000393 | 0.193027 | 3,155 | 70 | 79 | 45.071429 | 0.805577 | 0.09065 | 0 | 0 | 0 | 0 | 0.149196 | 0 | 0 | 0 | 0 | 0 | 0.8 | 1 | 0.127273 | false | 0 | 0.018182 | 0 | 0.181818 | 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 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
0c48b673acc0ea7efa42fafb3fba6d032e5deab7 | 196 | py | Python | src/brouwers/online_users/urls.py | modelbrouwers/modelbrouwers | e0ba4819bf726d6144c0a648fdd4731cdc098a52 | [
"MIT"
] | 6 | 2015-03-03T13:23:07.000Z | 2021-12-19T18:12:41.000Z | src/brouwers/online_users/urls.py | modelbrouwers/modelbrouwers | e0ba4819bf726d6144c0a648fdd4731cdc098a52 | [
"MIT"
] | 95 | 2015-02-07T00:55:39.000Z | 2022-02-08T20:22:05.000Z | src/brouwers/online_users/urls.py | modelbrouwers/modelbrouwers | e0ba4819bf726d6144c0a648fdd4731cdc098a52 | [
"MIT"
] | 2 | 2016-03-22T16:53:26.000Z | 2019-02-09T22:46:04.000Z | from django.conf.urls import url
from .views import get_online_users, set_online
app_name = 'online_users'
urlpatterns = [
url(r'^so/$', set_online),
url(r'^ous/$', get_online_users),
]
| 19.6 | 47 | 0.704082 | 30 | 196 | 4.333333 | 0.566667 | 0.253846 | 0.215385 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.153061 | 196 | 9 | 48 | 21.777778 | 0.783133 | 0 | 0 | 0 | 0 | 0 | 0.117347 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.285714 | 0 | 0.285714 | 0 | 0 | 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 | 3 |
0c6180591c4611e118c4ac0d8c026f5d2d7c99fa | 305 | py | Python | oct2py/compat.py | sdvillal/oct2py | f7aa89b909cbb5959ddedf3ab3e743898eac3d45 | [
"MIT"
] | 8 | 2015-10-16T23:28:16.000Z | 2020-06-19T18:49:18.000Z | oct2py/compat.py | sdvillal/oct2py | f7aa89b909cbb5959ddedf3ab3e743898eac3d45 | [
"MIT"
] | 8 | 2015-06-25T20:57:56.000Z | 2020-04-03T22:33:16.000Z | oct2py/compat.py | sdvillal/oct2py | f7aa89b909cbb5959ddedf3ab3e743898eac3d45 | [
"MIT"
] | 6 | 2015-04-21T12:23:44.000Z | 2021-10-01T00:08:47.000Z | # -*- coding: utf-8 -*-
import sys
PY2 = sys.version[0] == '2'
PY3 = sys.version[0] == '3'
if PY2:
unicode = unicode
long = long
from StringIO import StringIO
import Queue as queue
else: # pragma : no cover
unicode = str
long = int
from io import StringIO
import queue
| 16.944444 | 33 | 0.606557 | 43 | 305 | 4.302326 | 0.581395 | 0.227027 | 0.118919 | 0.27027 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.036697 | 0.285246 | 305 | 17 | 34 | 17.941176 | 0.811927 | 0.127869 | 0 | 0 | 0 | 0 | 0.007605 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.384615 | 0 | 0.384615 | 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 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
a75611852715e07033587bffa7d94fdf7b98243d | 548 | py | Python | setup.py | ducandu/aiopening | 214d8d6dfc928ab4f8db634018092dc43eaf0e3c | [
"MIT"
] | null | null | null | setup.py | ducandu/aiopening | 214d8d6dfc928ab4f8db634018092dc43eaf0e3c | [
"MIT"
] | null | null | null | setup.py | ducandu/aiopening | 214d8d6dfc928ab4f8db634018092dc43eaf0e3c | [
"MIT"
] | null | null | null | """
-------------------------------------------------------------------------
shine -
setup
!!TODO: add file description here!!
created: 2017/06/04 in PyCharm
(c) 2017 Sven - ducandu GmbH
-------------------------------------------------------------------------
"""
from setuptools import setup
setup(name='aiopening', version='1.0', description='AI (but even opener)', url='http://github.com/sven1977/aiopening', author='Sven Mika',
author_email='sven.mika@ducandu.com', license='MIT', packages=['aiopening'], zip_safe=False) | 34.25 | 138 | 0.501825 | 55 | 548 | 4.963636 | 0.781818 | 0.058608 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.036885 | 0.109489 | 548 | 16 | 139 | 34.25 | 0.522541 | 0.478102 | 0 | 0 | 0 | 0 | 0.407407 | 0.077778 | 0 | 0 | 0 | 0.0625 | 0 | 1 | 0 | true | 0 | 0.333333 | 0 | 0.333333 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
a7574f04a38567a940cb678fc874747f83a2b6d9 | 223 | py | Python | quran/domain/edition.py | octabytes/quran | 974d351cf5e6a12a28a5ac9f29c8d2753ae6dd86 | [
"Apache-2.0"
] | null | null | null | quran/domain/edition.py | octabytes/quran | 974d351cf5e6a12a28a5ac9f29c8d2753ae6dd86 | [
"Apache-2.0"
] | null | null | null | quran/domain/edition.py | octabytes/quran | 974d351cf5e6a12a28a5ac9f29c8d2753ae6dd86 | [
"Apache-2.0"
] | null | null | null | from dataclasses import dataclass
from quran.domain.entity import Entity
@dataclass
class Edition(Entity):
id: str
language: str
name: str
translator: str
type: str
format: str
direction: str
| 14.866667 | 38 | 0.690583 | 28 | 223 | 5.5 | 0.607143 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.251121 | 223 | 14 | 39 | 15.928571 | 0.922156 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.181818 | 0 | 0.909091 | 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 | 0 | 0 | 0 | 1 | 0 | 0 | 3 |
a75aa0bd60c43a11405b09d22589cf2d9c586cc5 | 3,469 | py | Python | mud/migrations/0001_initial.py | lambda-mud-cs18/backend | 060c5c1a317d8b6557e778cd539e75f24eff05dd | [
"MIT"
] | 1 | 2022-01-12T17:44:26.000Z | 2022-01-12T17:44:26.000Z | mud/migrations/0001_initial.py | lambda-mud-cs18/backend | 060c5c1a317d8b6557e778cd539e75f24eff05dd | [
"MIT"
] | 8 | 2020-02-12T01:12:46.000Z | 2022-02-10T10:17:28.000Z | mud/migrations/0001_initial.py | lambda-mud-cs18/backend | 060c5c1a317d8b6557e778cd539e75f24eff05dd | [
"MIT"
] | 2 | 2022-01-12T17:44:29.000Z | 2022-01-12T17:44:29.000Z | # Generated by Django 2.2.3 on 2019-07-31 17:10
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Item',
fields=[
('id', models.AutoField(primary_key=True, serialize=False)),
('name', models.CharField(max_length=200)),
('description', models.CharField(max_length=200)),
('weight', models.IntegerField()),
('itemtype', models.CharField(max_length=200)),
('level', models.IntegerField()),
('exp', models.IntegerField()),
('attributes', models.CharField(max_length=200)),
],
),
migrations.CreateModel(
name='Map',
fields=[
('id', models.AutoField(primary_key=True, serialize=False)),
],
),
migrations.CreateModel(
name='Player',
fields=[
('id', models.AutoField(primary_key=True, serialize=False)),
('playername', models.CharField(max_length=200)),
('name', models.CharField(max_length=200)),
('password', models.CharField(max_length=200)),
('team_id', models.IntegerField()),
('current_room', models.IntegerField()),
('cooldown', models.FloatField()),
('encumbrance', models.IntegerField()),
('strength', models.IntegerField()),
('speed', models.IntegerField()),
('gold', models.IntegerField()),
('inventory', models.CharField(max_length=1000)),
('status', models.CharField(max_length=1000)),
('errors', models.CharField(max_length=1000)),
('messages', models.CharField(max_length=1000)),
('token', models.CharField(max_length=1000)),
],
),
migrations.CreateModel(
name='PlayerInventory',
fields=[
('id', models.AutoField(primary_key=True, serialize=False)),
('player_id', models.IntegerField()),
('item_id', models.IntegerField()),
('quantity', models.IntegerField()),
],
),
migrations.CreateModel(
name='Room',
fields=[
('map_id', models.IntegerField()),
('room_id', models.IntegerField(primary_key=True, serialize=False)),
('title', models.CharField(max_length=200)),
('description', models.CharField(max_length=200)),
('coordinates', models.CharField(max_length=200)),
('elevation', models.IntegerField()),
('terrain', models.CharField(max_length=200)),
('north', models.CharField(max_length=200)),
('south', models.CharField(max_length=200)),
('east', models.CharField(max_length=200)),
('west', models.CharField(max_length=200)),
],
),
migrations.CreateModel(
name='Team',
fields=[
('id', models.AutoField(primary_key=True, serialize=False)),
('name', models.CharField(max_length=200)),
('map_id', models.IntegerField()),
],
),
]
| 39.420455 | 84 | 0.51254 | 285 | 3,469 | 6.119298 | 0.252632 | 0.180619 | 0.216743 | 0.288991 | 0.538417 | 0.318234 | 0.300459 | 0.300459 | 0.240826 | 0.153096 | 0 | 0.036166 | 0.338426 | 3,469 | 87 | 85 | 39.873563 | 0.723747 | 0.012972 | 0 | 0.45 | 1 | 0 | 0.091175 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0.0125 | 0.0125 | 0 | 0.0625 | 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 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
a75c1979034dbafe33e7945478e87745ce9ce8e5 | 918 | py | Python | scripts/quest/q22504s.py | G00dBye/YYMS | 1de816fc842b6598d5b4b7896b6ab0ee8f7cdcfb | [
"MIT"
] | 54 | 2019-04-16T23:24:48.000Z | 2021-12-18T11:41:50.000Z | scripts/quest/q22504s.py | G00dBye/YYMS | 1de816fc842b6598d5b4b7896b6ab0ee8f7cdcfb | [
"MIT"
] | 3 | 2019-05-19T15:19:41.000Z | 2020-04-27T16:29:16.000Z | scripts/quest/q22504s.py | G00dBye/YYMS | 1de816fc842b6598d5b4b7896b6ab0ee8f7cdcfb | [
"MIT"
] | 49 | 2020-11-25T23:29:16.000Z | 2022-03-26T16:20:24.000Z | sm.setSpeakerID(1013000)
sm.sendNext("Ugh. This isn't going to work. I need something else. No plants. No meat. What, you have no idea? But you're the master, and you're older than me, too. You must know what'd be good for me!")
sm.setPlayerAsSpeaker()
sm.sendSay("#bBut I don't. It's not like age has anything to do with this...")
sm.setSpeakerID(1013000)
if sm.sendAskAccept("Since you're older, you must be more experienced in the world, too. Makes sense that you'd know more than me. Oh, fine. I'll ask someone who's even older than you, master!"):
if not sm.hasQuest(parentID):
sm.startQuest(parentID)
sm.setPlayerAsSpeaker()
sm.sendSayOkay("#b#b(You already asked Dad once, but you don't have any better ideas. Time to ask him again!)")
else:
sm.sendNext("No use trying to find an answer to this on my own. I'd better look for #bsomeone older and wiser than master#k!")
sm.dispose() | 61.2 | 203 | 0.721133 | 167 | 918 | 3.964072 | 0.568862 | 0.022659 | 0.063444 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.01847 | 0.174292 | 918 | 15 | 204 | 61.2 | 0.854881 | 0 | 0 | 0.307692 | 0 | 0.307692 | 0.682263 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
a7758434e025289995bc94bace734e2f383e3e76 | 818 | py | Python | test/test_global_customer_api.py | ezmaxinc/eZmax-SDK-python | 6794b8001abfb7d9ae18a3b87aba164839b925a0 | [
"MIT"
] | null | null | null | test/test_global_customer_api.py | ezmaxinc/eZmax-SDK-python | 6794b8001abfb7d9ae18a3b87aba164839b925a0 | [
"MIT"
] | null | null | null | test/test_global_customer_api.py | ezmaxinc/eZmax-SDK-python | 6794b8001abfb7d9ae18a3b87aba164839b925a0 | [
"MIT"
] | null | null | null | """
eZmax API Definition (Full)
This API expose all the functionnalities for the eZmax and eZsign applications. # noqa: E501
The version of the OpenAPI document: 1.1.7
Contact: support-api@ezmax.ca
Generated by: https://openapi-generator.tech
"""
import unittest
import eZmaxApi
from eZmaxApi.api.global_customer_api import GlobalCustomerApi # noqa: E501
class TestGlobalCustomerApi(unittest.TestCase):
"""GlobalCustomerApi unit test stubs"""
def setUp(self):
self.api = GlobalCustomerApi() # noqa: E501
def tearDown(self):
pass
def test_global_customer_get_endpoint_v1(self):
"""Test case for global_customer_get_endpoint_v1
Get customer endpoint # noqa: E501
"""
pass
if __name__ == '__main__':
unittest.main()
| 22.108108 | 97 | 0.689487 | 99 | 818 | 5.505051 | 0.545455 | 0.058716 | 0.091743 | 0.091743 | 0.099083 | 0 | 0 | 0 | 0 | 0 | 0 | 0.026856 | 0.226161 | 818 | 36 | 98 | 22.722222 | 0.834123 | 0.46577 | 0 | 0.166667 | 0 | 0 | 0.020997 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.25 | false | 0.166667 | 0.25 | 0 | 0.583333 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 3 |
a788aafcac15ec56bc56e7dbc0349b85a1880056 | 1,496 | py | Python | geesedb/interpreter/metadata.py | informagi/GeeseDB | b502830cafbcba8676e7e779d13d5bc14ba842f9 | [
"MIT"
] | 12 | 2021-07-05T12:33:20.000Z | 2021-10-11T20:44:12.000Z | geesedb/interpreter/metadata.py | informagi/GeeseDB | b502830cafbcba8676e7e779d13d5bc14ba842f9 | [
"MIT"
] | 7 | 2021-07-28T20:40:36.000Z | 2021-10-12T12:31:51.000Z | geesedb/interpreter/metadata.py | informagi/GeeseDB | b502830cafbcba8676e7e779d13d5bc14ba842f9 | [
"MIT"
] | null | null | null | import json
from ..connection import get_connection
class Metadata:
def __init__(self, database):
self.connection = get_connection(database).connection
# first list is default if nothing is specified (should be extended)
# list is ordered as [edge_name, node1_id, edge_node1_id, edge_node2_id, node2_id2
def get_metadata(self):
self.connection.execute("SELECT metadata FROM _meta")
metadata = json.loads(self.connection.fetchone()[0])
return metadata
def update_metadata(self, data):
self.connection.execute(f"UPDATE _meta SET metadata='{json.dumps(data)}'")
def get_default_join_info(self, node1, node2):
return self.get_metadata()[node1][node2][0]
def get_all_join_info(self, node1, node2):
return self.get_metadata()[node1][node2]
# {
# 'term_dict': {
# 'docs': [['term_doc', 'term_id', 'term_id', 'doc_id', 'doc_id']]
# },
# 'docs': {
# 'term_dict': [['term_doc', 'doc_id', 'doc_id', 'term_id', 'term_id']],
# 'entities': [['entity_doc', 'collection_id', 'doc_id', 'entity', 'entity']],
# 'authors': [['doc_author', 'collection_id', 'doc', 'author', 'author']]
# },
# 'entities': {
# 'docs': [['entity_doc', 'entity', 'entity', 'doc_id', 'collection_id']]
# },
# 'authors': {
# 'docs': [['doc_author', 'author', 'author', 'doc', 'collection_id']]
# }
# }
| 34.790698 | 90 | 0.584225 | 173 | 1,496 | 4.780347 | 0.306358 | 0.036276 | 0.033857 | 0.041112 | 0.128174 | 0.128174 | 0.128174 | 0.128174 | 0.128174 | 0.128174 | 0 | 0.01331 | 0.246658 | 1,496 | 42 | 91 | 35.619048 | 0.720497 | 0.481283 | 0 | 0 | 0 | 0 | 0.095112 | 0.038309 | 0 | 0 | 0 | 0 | 0 | 1 | 0.333333 | false | 0 | 0.133333 | 0.133333 | 0.733333 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 3 |
a7c2682f5396348598753e892a05447ab558cc24 | 419 | py | Python | nyan/utils/io.py | TWRogers/nyan | c224279467475c9ce81e4709dd357897e0e5c963 | [
"Apache-2.0"
] | 2 | 2019-10-11T16:41:16.000Z | 2019-10-11T16:42:08.000Z | nyan/utils/io.py | TWRogers/nyan | c224279467475c9ce81e4709dd357897e0e5c963 | [
"Apache-2.0"
] | null | null | null | nyan/utils/io.py | TWRogers/nyan | c224279467475c9ce81e4709dd357897e0e5c963 | [
"Apache-2.0"
] | null | null | null | import cv2
from PIL import Image
import os
import numpy as np
IMAGE_BE = os.environ.get('NYAN_IMAGE_BE', 'PIL')
if IMAGE_BE == 'PIL':
def IMREAD_FN(x):
return np.array(Image.open(x).convert('RGB')).astype(np.uint8)
elif IMAGE_BE == 'cv2':
def IMREAD_FN(x):
return cv2.imread(x).astype(np.uint8)[:, :, ::-1]
else:
raise NotImplementedError('IMAGE_BE {} not implemented'.format(IMAGE_BE))
| 23.277778 | 77 | 0.668258 | 66 | 419 | 4.106061 | 0.5 | 0.154982 | 0.073801 | 0.088561 | 0.132841 | 0 | 0 | 0 | 0 | 0 | 0 | 0.017291 | 0.171838 | 419 | 17 | 78 | 24.647059 | 0.763689 | 0 | 0 | 0.153846 | 0 | 0 | 0.124105 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.153846 | false | 0 | 0.307692 | 0.153846 | 0.615385 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 3 |
38ec28f788cf955ae54138334251cf48eba69a0b | 855 | py | Python | app/auth/forms.py | PhysicsUofRAUI/lifeLongLearning | 36e098d4319d3500509861454fa3e27a67416802 | [
"MIT"
] | null | null | null | app/auth/forms.py | PhysicsUofRAUI/lifeLongLearning | 36e098d4319d3500509861454fa3e27a67416802 | [
"MIT"
] | 38 | 2020-06-09T00:07:09.000Z | 2021-02-06T17:18:20.000Z | app/auth/forms.py | PhysicsUofRAUI/lifeLongLearning | 36e098d4319d3500509861454fa3e27a67416802 | [
"MIT"
] | null | null | null | from flask_wtf import FlaskForm
from wtforms import PasswordField, StringField, SubmitField
from wtforms.validators import DataRequired
#
# Purpose: This from will be used to collect the information for the user logging
# and logging out.
#
# Fields:
# Password: The password to validate the user
# Username: This contains the name that a user has chosen to represent them
# Submit: This is the field that the user uses to signal that everything has been
# filled out.
#
# Returns:
# All the material that the user filled out (bassically all the fields but filled
# out).
#
class LoginForm(FlaskForm):
"""
Form for users to login
"""
username = StringField('Username', validators=[DataRequired()])
password = PasswordField('Password', validators=[DataRequired()])
submit = SubmitField('Login')
| 32.884615 | 85 | 0.71462 | 108 | 855 | 5.648148 | 0.509259 | 0.045902 | 0.036066 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.210526 | 855 | 25 | 86 | 34.2 | 0.903704 | 0.549708 | 0 | 0 | 0 | 0 | 0.058989 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0.285714 | 0.428571 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 1 | 0 | 0 | 3 |
ac119758f2d8245405f37028d9f047dacd5dfbff | 1,678 | py | Python | polls/views.py | agustinsuana/mysite | 03e196470520d5b93f60d6be40358332490f349e | [
"MIT"
] | null | null | null | polls/views.py | agustinsuana/mysite | 03e196470520d5b93f60d6be40358332490f349e | [
"MIT"
] | null | null | null | polls/views.py | agustinsuana/mysite | 03e196470520d5b93f60d6be40358332490f349e | [
"MIT"
] | null | null | null | from django.shortcuts import render, get_object_or_404
from django.http import HttpResponse
from django.template import loader
from .models import Question
from django.http import Http404
def index(request):
#last_questions_list = Question.objects.order_by('-pub_date')[:5]
#template = loader.get_template("polls/index.html")
#context = {
# 'last_question_list' : last_questions_list,
#}
#output = ', '.join([q.question_text for q in last_questions_list])
#return HttpResponse(template.render(context, request))
last_questions_list = Question.objects.order_by("-pub_date")[:5]
context = {"last_questions_list" : last_questions_list}
return render(request, 'polls/index.html', context)
def edit(request):
return HttpResponse("Hola mundo, esta es el edit de Polls.")
def delete(request):
return HttpResponse("Hola mundo, esta es el delete de Polls.")
#def detail(request, question_id):
# return HttpResponse("Estas viendo el detalle de %s." % question_id)
#def detail(request, question_id):
# try:
# question = Question.objects.get(pk = question_id)
# except Question.DoesNotExist:
# raise Http404("La pagina no existe")
# return render(request, 'polls/detail.html', {"question" : question})
def detail(request, question_id):
question = get_object_or_404(Question, pk = question_id)
return render(request, 'polls/detail.html', {'question' : question})
def results(request, question_id):
response = "Estas buscando los resultados de %s."
return HttpResponse(response % question_id)
def vote(request, question_id):
return HttpResponse("Tu has votado por %s" % question_id)
| 34.958333 | 73 | 0.722288 | 220 | 1,678 | 5.345455 | 0.322727 | 0.085034 | 0.086735 | 0.061224 | 0.362245 | 0.253401 | 0.253401 | 0.253401 | 0.181973 | 0.091837 | 0 | 0.009957 | 0.162098 | 1,678 | 47 | 74 | 35.702128 | 0.826458 | 0.384386 | 0 | 0 | 0 | 0 | 0.197446 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.285714 | false | 0 | 0.238095 | 0.142857 | 0.809524 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 3 |
ac20aa316bc8bb6155930c3ea46cc8a431427a33 | 382 | py | Python | Python_OO/DelegarAcessoAtributos.py | Madara701/Python_OO | 8d67569a8c4771dd82f5259c2ed5e782cd4e4036 | [
"Apache-2.0"
] | null | null | null | Python_OO/DelegarAcessoAtributos.py | Madara701/Python_OO | 8d67569a8c4771dd82f5259c2ed5e782cd4e4036 | [
"Apache-2.0"
] | null | null | null | Python_OO/DelegarAcessoAtributos.py | Madara701/Python_OO | 8d67569a8c4771dd82f5259c2ed5e782cd4e4036 | [
"Apache-2.0"
] | null | null | null | class A:
def fazer_algo(self):
print("Palmeiras")
def outro(self):
print("campeão")
class B:
def __init__(self):
self.a = A()
def fazer_algo(self):
#delega para self.a
return self.a.fazer_algo()
def outro(self):
#delegando novamente
return self.a.outro()
b = B()
print(b.fazer_algo())
print(b.outro())
| 17.363636 | 34 | 0.565445 | 52 | 382 | 4 | 0.326923 | 0.173077 | 0.086538 | 0.125 | 0.163462 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.295812 | 382 | 21 | 35 | 18.190476 | 0.773234 | 0.096859 | 0 | 0.266667 | 0 | 0 | 0.046784 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.333333 | false | 0 | 0 | 0.133333 | 0.6 | 0.266667 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 3 |
ac681a8ffae94d52efd701e9160788c29c5b6e8c | 72 | py | Python | app.py | ManarAbdelkarim/-hr-managmentSystem | 22d2ea340824c9533576c3e7c96296f443d7bf50 | [
"MIT"
] | null | null | null | app.py | ManarAbdelkarim/-hr-managmentSystem | 22d2ea340824c9533576c3e7c96296f443d7bf50 | [
"MIT"
] | null | null | null | app.py | ManarAbdelkarim/-hr-managmentSystem | 22d2ea340824c9533576c3e7c96296f443d7bf50 | [
"MIT"
] | null | null | null | from flask import Flask
app = Flask(__name__,static_folder='../static') | 36 | 47 | 0.763889 | 10 | 72 | 5 | 0.7 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.097222 | 72 | 2 | 47 | 36 | 0.769231 | 0 | 0 | 0 | 0 | 0 | 0.123288 | 0 | 0 | 0 | 0 | 0 | 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 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
ac70a851d5c96469acf3749c8c769ab79086f7dc | 226 | py | Python | tests/test_logger.py | sp-95/python-template | 3d4fab175314fe2b200e77c7c71c464e897749b9 | [
"MIT"
] | null | null | null | tests/test_logger.py | sp-95/python-template | 3d4fab175314fe2b200e77c7c71c464e897749b9 | [
"MIT"
] | null | null | null | tests/test_logger.py | sp-95/python-template | 3d4fab175314fe2b200e77c7c71c464e897749b9 | [
"MIT"
] | null | null | null | from _pytest.logging import LogCaptureFixture
from loguru import logger
def test_log_configuration(caplog: LogCaptureFixture) -> None:
message = "Test message"
logger.info(message)
assert message in caplog.text
| 22.6 | 62 | 0.774336 | 27 | 226 | 6.37037 | 0.666667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.163717 | 226 | 9 | 63 | 25.111111 | 0.910053 | 0 | 0 | 0 | 0 | 0 | 0.053097 | 0 | 0 | 0 | 0 | 0 | 0.166667 | 1 | 0.166667 | false | 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 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
ac714ac75d2b71ae4b1604d302d1232df43b166e | 142 | py | Python | Semana 09/fase.py | heltonricardo/grupo-estudos-maratonas-programacao | 0c07d84a900858616647d07574ec56b0533cddfb | [
"MIT"
] | null | null | null | Semana 09/fase.py | heltonricardo/grupo-estudos-maratonas-programacao | 0c07d84a900858616647d07574ec56b0533cddfb | [
"MIT"
] | null | null | null | Semana 09/fase.py | heltonricardo/grupo-estudos-maratonas-programacao | 0c07d84a900858616647d07574ec56b0533cddfb | [
"MIT"
] | null | null | null | n, k, v = int(input()), int(input()), []
for i in range(n): v.append(int(input()))
v = sorted(v, reverse=True)
print(k + v[k:].count(v[k-1]))
| 28.4 | 41 | 0.570423 | 29 | 142 | 2.793103 | 0.551724 | 0.296296 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.00813 | 0.133803 | 142 | 4 | 42 | 35.5 | 0.650407 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0.25 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
3bbaf9656983dcec4f85d013784da058e74250a8 | 160 | py | Python | actions/sleep.py | bhaveshAn/Lucy | 9ea97184c725a10a041af64cad0ef4b533be42ad | [
"MIT"
] | 1 | 2018-04-13T08:26:27.000Z | 2018-04-13T08:26:27.000Z | actions/sleep.py | bhaveshAn/Lucy | 9ea97184c725a10a041af64cad0ef4b533be42ad | [
"MIT"
] | null | null | null | actions/sleep.py | bhaveshAn/Lucy | 9ea97184c725a10a041af64cad0ef4b533be42ad | [
"MIT"
] | null | null | null | import random
def go_to_sleep(text):
replies = ['See you later!', 'Just call my name and I\'ll be there!']
return (random.choice(replies))
quit()
| 20 | 73 | 0.65 | 25 | 160 | 4.08 | 0.92 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.2125 | 160 | 7 | 74 | 22.857143 | 0.809524 | 0 | 0 | 0 | 0 | 0 | 0.2375 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.2 | false | 0 | 0.2 | 0 | 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 | 0 | 1 | 0 | 0 | 3 |
3bc52fc59dc21473a03e193fd04c98996f1d2a1e | 2,083 | py | Python | DataAnalysis.py | andairka/Simple-default-Backpropagation-ANN | 995de1471e2b132af721b2babbec034f29228640 | [
"MIT"
] | null | null | null | DataAnalysis.py | andairka/Simple-default-Backpropagation-ANN | 995de1471e2b132af721b2babbec034f29228640 | [
"MIT"
] | null | null | null | DataAnalysis.py | andairka/Simple-default-Backpropagation-ANN | 995de1471e2b132af721b2babbec034f29228640 | [
"MIT"
] | null | null | null | import ImportTitanicData
import DataPreparation
# analiza danych przed preparacją danych
class DataAnaliysisBefore():
def showTrain(self):
importData = ImportTitanicData.DataImport()
train = importData.importTrain()
return train
def shapeTrain(self):
return self.showTrain().shape
def dtypesTrain(self):
return self.showTrain().dtypes
def showTest(self):
importData = ImportTitanicData.DataImport()
test = importData.importTest()
return test
def shapeTest(self):
return self.showTest().shape
def dtypesTest(self):
return self.showTest().dtypes
# analiza danych po preparacji danych
class DataAnaliysisAfter():
def showTrain(self):
dataPreparation = DataPreparation.DataPreparation()
train = dataPreparation.prepareTrainData()
return train
def shapeTrain(self):
return self.showTrain().shape
def dtypesTrain(self):
return self.showTrain().dtypes
def showTest(self):
dataPreparation = DataPreparation.DataPreparation()
test = dataPreparation.prepareTestData()
return test
def shapeTest(self):
return self.showTest().shape
def dtypesTest(self):
return self.showTest().dtypes
#
#
# def showTest(self):
# test = ImportTitanicData.DataImport.importTest()
# return test.head()
# def showTest ()
# dataAnaysis = DataAnaliysisBefore()
dataAnaysis = DataAnaliysisAfter()
# print('czesio')
# print('Analiza danych przed wypełnieniem NaN')
# print('Tabela Train\n', dataAnaysis.showTrain())
# print('\n\nshape Train\n', dataAnaysis.shapeTrain())
# print('\n\ndtypes Train\n', dataAnaysis.dtypesTrain())
print('Analiza danych po wypełnieniem NaN i preparacji danych')
print('Tabela Train\n', dataAnaysis.showTrain())
print('\n\nshape Train\n', dataAnaysis.shapeTrain())
print('\n\ndtypes Train\n', dataAnaysis.dtypesTrain())
# dataPreparation = DataPreparation.DataPreparation()
# print(dataPreparation.prepareTrainData().to_string())
| 26.367089 | 63 | 0.68987 | 199 | 2,083 | 7.21608 | 0.221106 | 0.05571 | 0.077994 | 0.064067 | 0.441504 | 0.441504 | 0.441504 | 0.441504 | 0.441504 | 0.441504 | 0 | 0 | 0.201152 | 2,083 | 78 | 64 | 26.705128 | 0.862981 | 0.263082 | 0 | 0.682927 | 0 | 0 | 0.067897 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.292683 | false | 0 | 0.146341 | 0.195122 | 0.780488 | 0.097561 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 3 |
3bc6222a69419d7c3721ce7c39a656221c86ab89 | 1,105 | py | Python | src/main/python/storytext/lib/storytext/javageftoolkit/__init__.py | emilybache/texttest-runner | 2d5c42b8d37699a2cbcb8f19af7c271d6ad1024a | [
"MIT"
] | null | null | null | src/main/python/storytext/lib/storytext/javageftoolkit/__init__.py | emilybache/texttest-runner | 2d5c42b8d37699a2cbcb8f19af7c271d6ad1024a | [
"MIT"
] | null | null | null | src/main/python/storytext/lib/storytext/javageftoolkit/__init__.py | emilybache/texttest-runner | 2d5c42b8d37699a2cbcb8f19af7c271d6ad1024a | [
"MIT"
] | null | null | null |
""" Don't load any Eclipse stuff at global scope, needs to be importable previous to Eclipse starting """
from storytext import javarcptoolkit
import sys
class ScriptEngine(javarcptoolkit.ScriptEngine):
def createReplayer(self, universalLogging=False, **kw):
return UseCaseReplayer(self.uiMap, universalLogging, self.recorder, **kw)
def getDefaultTestscriptPluginName(self):
return "org.eclipse.swtbot.gef.testscript"
class UseCaseReplayer(javarcptoolkit.UseCaseReplayer):
def getDescriberPackage(self):
return javarcptoolkit.UseCaseReplayer.__module__
def getTestRunnerClass(self):
return TestRunner
class TestRunner(javarcptoolkit.TestRunner):
def initEclipsePackages(self):
javarcptoolkit.TestRunner.initEclipsePackages(self)
from org.eclipse.swtbot.eclipse.gef.finder import SWTGefBot
from org.eclipse.swtbot.eclipse.gef.finder.widgets import SWTBotGefViewer
from org.eclipse.draw2d import FigureCanvas
from org.eclipse.draw2d.geometry import Rectangle
from org.eclipse.gef import EditPart
| 38.103448 | 105 | 0.761086 | 115 | 1,105 | 7.278261 | 0.443478 | 0.071685 | 0.083632 | 0.04779 | 0.086022 | 0.086022 | 0.086022 | 0 | 0 | 0 | 0 | 0.002174 | 0.167421 | 1,105 | 28 | 106 | 39.464286 | 0.907609 | 0.087783 | 0 | 0 | 0 | 0 | 0.033033 | 0.033033 | 0 | 0 | 0 | 0 | 0 | 1 | 0.25 | false | 0 | 0.35 | 0.2 | 0.95 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 3 |
3bf45f24ab2dd0e2ee1d2a8a4c89e7d8442c50d9 | 1,203 | py | Python | skmine/tests/test_base.py | remiadon/scikit-mine | 769d7d5ea0dda5d4adea33236733f4ce1ea0c815 | [
"BSD-3-Clause"
] | null | null | null | skmine/tests/test_base.py | remiadon/scikit-mine | 769d7d5ea0dda5d4adea33236733f4ce1ea0c815 | [
"BSD-3-Clause"
] | null | null | null | skmine/tests/test_base.py | remiadon/scikit-mine | 769d7d5ea0dda5d4adea33236733f4ce1ea0c815 | [
"BSD-3-Clause"
] | null | null | null | import pandas as pd
import pytest
from ..base import BaseMiner, MDLOptimizer
def test_inst_params():
class MyMiner(BaseMiner):
def __init__(self, eps=3):
self.eps = eps
self._a = 2
def fit(self, D):
self._a = 12
kwargs = dict(eps=4)
miner = MyMiner(**kwargs)
assert miner.get_params() == kwargs
kwargs.update(eps=10)
miner.set_params(**kwargs)
assert miner.get_params() == kwargs
assert miner.set_params().get_params() == kwargs # stay untouched
with pytest.raises(ValueError):
miner.set_params(random_key=2)
def test_inst_params_no_init():
class MyMiner(BaseMiner):
def fit(self, D, y=None):
return self
miner = MyMiner()
assert miner.get_params() == dict()
def test_mdl_repr():
class A(MDLOptimizer):
def __init__(self):
self.codetable_ = {1: [0, 1], 2: [1]}
def fit(self):
return self
def evaluate(self):
return True
def generate_candidates(self):
return list()
a = A()
assert isinstance(a._repr_html_(), str)
assert isinstance(a.fit()._repr_html_(), str)
| 20.741379 | 70 | 0.591022 | 152 | 1,203 | 4.453947 | 0.375 | 0.064993 | 0.044313 | 0.088626 | 0.094535 | 0.094535 | 0 | 0 | 0 | 0 | 0 | 0.015258 | 0.291771 | 1,203 | 57 | 71 | 21.105263 | 0.779343 | 0.011638 | 0 | 0.157895 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.157895 | 1 | 0.263158 | false | 0 | 0.078947 | 0.105263 | 0.526316 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 3 |
ce17307a9a0665319fcd15ea71bb54693784de3c | 135 | py | Python | ch10/myproject_virtualenv/src/django-myproject/myproject/settings/production.py | PacktPublishing/Django-3-Web-Development-Cookbook | 6ffe6e0add93a43a9abaff62e0147dc1f4f5351a | [
"MIT"
] | 159 | 2019-11-13T14:11:39.000Z | 2022-03-24T05:47:10.000Z | ch10/myproject_virtualenv/src/django-myproject/myproject/settings/production.py | PacktPublishing/Django-3-Web-Development-Cookbook | 6ffe6e0add93a43a9abaff62e0147dc1f4f5351a | [
"MIT"
] | 34 | 2019-11-06T08:32:48.000Z | 2022-01-14T11:31:29.000Z | ch10/myproject_virtualenv/src/django-myproject/myproject/settings/production.py | PacktPublishing/Django-3-Web-Development-Cookbook | 6ffe6e0add93a43a9abaff62e0147dc1f4f5351a | [
"MIT"
] | 103 | 2019-08-15T21:35:26.000Z | 2022-03-20T05:29:11.000Z | from ._base import *
DEBUG = False
WEBSITE_URL = "https://example.com" # without trailing slash
MEDIA_URL = f"{WEBSITE_URL}/media/"
| 19.285714 | 61 | 0.718519 | 19 | 135 | 4.894737 | 0.789474 | 0.215054 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.148148 | 135 | 6 | 62 | 22.5 | 0.808696 | 0.162963 | 0 | 0 | 0 | 0 | 0.351351 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.25 | 0 | 0.25 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
ce1a78c4b8b64234867f3d62b124351c7a4de964 | 195 | py | Python | cla_backend/apps/core/validators.py | uk-gov-mirror/ministryofjustice.cla_backend | 4d524c10e7bd31f085d9c5f7bf6e08a6bb39c0a6 | [
"MIT"
] | 3 | 2019-10-02T15:31:03.000Z | 2022-01-13T10:15:53.000Z | cla_backend/apps/core/validators.py | uk-gov-mirror/ministryofjustice.cla_backend | 4d524c10e7bd31f085d9c5f7bf6e08a6bb39c0a6 | [
"MIT"
] | 206 | 2015-01-02T16:50:11.000Z | 2022-02-16T20:16:05.000Z | cla_backend/apps/core/validators.py | uk-gov-mirror/ministryofjustice.cla_backend | 4d524c10e7bd31f085d9c5f7bf6e08a6bb39c0a6 | [
"MIT"
] | 6 | 2015-03-23T23:08:42.000Z | 2022-02-15T17:04:44.000Z | from django.core.exceptions import ValidationError
def validate_first_of_month(value):
if value.day != 1:
raise ValidationError("%s should only be first day of the month." % value)
| 27.857143 | 82 | 0.733333 | 28 | 195 | 5 | 0.75 | 0.142857 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.006289 | 0.184615 | 195 | 6 | 83 | 32.5 | 0.874214 | 0 | 0 | 0 | 0 | 0 | 0.210256 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.25 | false | 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 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
ce21d57f1cc21cb2e5990bffc69d3403f42d2835 | 519 | py | Python | Taller_estruturas_de_control_secuenciales/Python_yere/Ejercicio_17.py | Matieljimenez/Algoritmos_y_programacion | cdc381478581e6842c6672d4840dd948833c4ec7 | [
"MIT"
] | null | null | null | Taller_estruturas_de_control_secuenciales/Python_yere/Ejercicio_17.py | Matieljimenez/Algoritmos_y_programacion | cdc381478581e6842c6672d4840dd948833c4ec7 | [
"MIT"
] | null | null | null | Taller_estruturas_de_control_secuenciales/Python_yere/Ejercicio_17.py | Matieljimenez/Algoritmos_y_programacion | cdc381478581e6842c6672d4840dd948833c4ec7 | [
"MIT"
] | null | null | null | """
Entradas
monto de dinero presupuestal-->float-->a
Salidas
dinero correspondiente para ginecologia-->float-->b
dinero correspondiente para traumatologia-->float-->c
dinero correspondiente para pediatria-->float-->d
"""
a=float(input("Presupuesto anual al Hospital rural "))
b=a*0.40
c=a*0.30
d=a*0.30
print("El presupuesto del hospital rural para ginecología es: "+str(b))
print("El presupuesto del hospital rural para traumatología es: "+str(c))
print("El presupuesto del hospital rural para pediatría es: "+str(d)) | 34.6 | 73 | 0.759152 | 79 | 519 | 4.987342 | 0.417722 | 0.13198 | 0.190355 | 0.159898 | 0.28934 | 0.28934 | 0.28934 | 0 | 0 | 0 | 0 | 0.019397 | 0.105973 | 519 | 15 | 74 | 34.6 | 0.829741 | 0.410405 | 0 | 0 | 0 | 0 | 0.672241 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0.428571 | 0 | 0 | 0 | null | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 3 |
ce35f5d501c181ecbb1339e8615379517cb18794 | 159 | py | Python | billing/tests/views.py | hkhanna/django-stripe-billing | 75a53c183ff86b1c7edf741683ffe3330e733d87 | [
"MIT"
] | 1 | 2022-03-29T20:16:34.000Z | 2022-03-29T20:16:34.000Z | billing/tests/views.py | hkhanna/django-stripe-billing | 75a53c183ff86b1c7edf741683ffe3330e733d87 | [
"MIT"
] | 2 | 2022-02-21T17:38:22.000Z | 2022-02-22T20:56:39.000Z | billing/tests/views.py | hkhanna/django-stripe-billing | 75a53c183ff86b1c7edf741683ffe3330e733d87 | [
"MIT"
] | null | null | null | from django.views.generic import TemplateView
from .. import mixins
class ProfileView(mixins.BillingMixin, TemplateView):
template_name = "profile.html"
| 22.714286 | 53 | 0.792453 | 18 | 159 | 6.944444 | 0.777778 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.125786 | 159 | 6 | 54 | 26.5 | 0.899281 | 0 | 0 | 0 | 0 | 0 | 0.075472 | 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 | 0 | 0 | 0 | 3 |
ce3bab3735a9a905747cfb1ff78c996de02c146a | 223 | py | Python | core/templatetags/my_custom_tags.py | SubhanRzayev/E-commerce-Tmart | 239218397f4ee55ab6ae4ef1798fbc83bc7d1159 | [
"MIT"
] | 2 | 2021-08-13T14:23:34.000Z | 2021-09-18T08:48:29.000Z | core/templatetags/my_custom_tags.py | SubhanRzayev/E-commerce-Tmart | 239218397f4ee55ab6ae4ef1798fbc83bc7d1159 | [
"MIT"
] | null | null | null | core/templatetags/my_custom_tags.py | SubhanRzayev/E-commerce-Tmart | 239218397f4ee55ab6ae4ef1798fbc83bc7d1159 | [
"MIT"
] | null | null | null | from blog.models import Category
from django.template import Library
from core.models import *
register = Library()
@register.filter
def main_catagory(self):
if self.category == None:
return self.category
| 14.866667 | 35 | 0.735426 | 29 | 223 | 5.62069 | 0.62069 | 0.147239 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.188341 | 223 | 14 | 36 | 15.928571 | 0.900552 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.125 | false | 0 | 0.375 | 0 | 0.625 | 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 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 3 |
cbefd7cba52260caad3d20e4693a2870bae5c60c | 708 | py | Python | app/models.py | owen-rpx/RainGod | ba20023c1191519edec7f12fb488c942a2e05627 | [
"MIT"
] | 7 | 2019-04-11T09:45:37.000Z | 2019-04-19T01:40:03.000Z | app/models.py | Owenzh/RainGod | ba20023c1191519edec7f12fb488c942a2e05627 | [
"MIT"
] | 5 | 2021-03-18T23:43:45.000Z | 2022-03-11T23:44:29.000Z | app/models.py | owen-rpx/RainGod | ba20023c1191519edec7f12fb488c942a2e05627 | [
"MIT"
] | 2 | 2019-04-11T09:45:39.000Z | 2019-04-19T01:39:02.000Z | #-*- coding:utf-8 -*-
from .apps import db
class User(db.Model):
__tablename__ = 'user'
user_id = db.Column(db.Integer, primary_key=True)
user_count = db.Column(db.String(100), unique=True)
user_name = db.Column(db.String(100), unique=True)
user_sex = db.Column(db.String(100))
user_pwd = db.Column(db.String(100))
user_mail = db.Column(db.String(100))
user_phone = db.Column(db.String(100))
user_addtime = db.Column(db.DateTime, index=True)
user_photo = db.Column(db.String(100))
user_ispass = db.Column(db.Integer)
def check_pwd(self,pwd):
from werkzeug.security import check_password_hash
return check_password_hash(self.user_pwd,pwd)
| 29.5 | 57 | 0.686441 | 109 | 708 | 4.266055 | 0.357798 | 0.172043 | 0.215054 | 0.24086 | 0.389247 | 0.389247 | 0.141935 | 0.141935 | 0 | 0 | 0 | 0.037671 | 0.175141 | 708 | 23 | 58 | 30.782609 | 0.758562 | 0.028249 | 0 | 0 | 0 | 0 | 0.005839 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.0625 | false | 0.1875 | 0.125 | 0 | 1 | 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 | 1 | 0 | 0 | 0 | 0 | 0 | 3 |
021a272ec30f97420b7269bd3ee1d988857ff0cb | 123 | py | Python | returns-the- value-to-the-variable.py | fatihwin-yt/a-Python-Tutorial-of-2021 | 7d2110f80efdfa79437bf64f8edcd08ec3d61926 | [
"MIT"
] | 1 | 2021-03-29T02:29:58.000Z | 2021-03-29T02:29:58.000Z | returns-the- value-to-the-variable.py | fatihwin-yt/a-Python-Tutorial-of-2021 | 7d2110f80efdfa79437bf64f8edcd08ec3d61926 | [
"MIT"
] | null | null | null | returns-the- value-to-the-variable.py | fatihwin-yt/a-Python-Tutorial-of-2021 | 7d2110f80efdfa79437bf64f8edcd08ec3d61926 | [
"MIT"
] | 1 | 2021-03-27T15:00:06.000Z | 2021-03-27T15:00:06.000Z | #returns the value to the variable #
x = 900
print(x)
#print will take the argument x as the value in the variable #
| 20.5 | 63 | 0.699187 | 22 | 123 | 3.909091 | 0.590909 | 0.186047 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.032258 | 0.243902 | 123 | 5 | 64 | 24.6 | 0.892473 | 0.756098 | 0 | 0 | 0 | 0 | 0 | 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 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 3 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.