index
int64
repo_name
string
branch_name
string
path
string
content
string
import_graph
string
14,789
martinambition/tianchi-lung-2019
refs/heads/master
/train_classification.py
from keras.callbacks import TensorBoard, ModelCheckpoint, EarlyStopping from config import * from resnet import Resnet from vgg import SimpleVgg from data_generator import DataGenerator import time from glob import glob import random import os import numpy as np # def flow(mode='train',name="lung", batch_size=TRAIN_BA...
{"/train_classification.py": ["/config.py", "/resnet.py", "/vgg.py", "/data_generator.py"], "/predict.py": ["/config.py", "/unet.py", "/resnet.py"], "/unet.py": ["/config.py"], "/test.py": ["/preprocess.py"], "/train_segmentation.py": ["/config.py", "/unet.py", "/data_generator.py"], "/data_generator.py": ["/config.py"...
14,790
martinambition/tianchi-lung-2019
refs/heads/master
/predict.py
from config import * from unet import UNet from resnet import Resnet from skimage import morphology, measure, segmentation,filters import scipy.ndimage import glob import os import pickle import h5py import numpy as np import pandas as pd from config import * from tqdm import tqdm import SimpleITK as sitk def find_all...
{"/train_classification.py": ["/config.py", "/resnet.py", "/vgg.py", "/data_generator.py"], "/predict.py": ["/config.py", "/unet.py", "/resnet.py"], "/unet.py": ["/config.py"], "/test.py": ["/preprocess.py"], "/train_segmentation.py": ["/config.py", "/unet.py", "/data_generator.py"], "/data_generator.py": ["/config.py"...
14,791
martinambition/tianchi-lung-2019
refs/heads/master
/visual_utils.py
# import matplotlib # matplotlib.use('Agg') import matplotlib.pyplot as plt import matplotlib.patches as patches from mpl_toolkits.mplot3d import Axes3D from mpl_toolkits.mplot3d.art3d import Poly3DCollection import numpy as np PLOT_NUM = 16 class VisualUtil(): @staticmethod def plot_all_slices(img, title...
{"/train_classification.py": ["/config.py", "/resnet.py", "/vgg.py", "/data_generator.py"], "/predict.py": ["/config.py", "/unet.py", "/resnet.py"], "/unet.py": ["/config.py"], "/test.py": ["/preprocess.py"], "/train_segmentation.py": ["/config.py", "/unet.py", "/data_generator.py"], "/data_generator.py": ["/config.py"...
14,792
martinambition/tianchi-lung-2019
refs/heads/master
/config.py
#肺窗 LUNG_MIN_BOUND = -1000.0 LUNG_MAX_BOUND = 400.0 #纵膈窗 CHEST_MIN_BOUND = 40-350/2 CHEST_MAX_BOUND = 40+350/2 BINARY_THRESHOLD = -550 TRAIN_SEG_LEARNING_RATE = 1e-4 INPUT_WIDTH, INPUT_HEIGHT, INPUT_DEPTH, INPUT_CHANNEL, OUTPUT_CHANNEL = 64, 64, 64, 1, 1 #4个疾病+1个unknow CLASSIFY_INPUT_WIDTH, CLASSIFY_INPUT_HEIGHT, C...
{"/train_classification.py": ["/config.py", "/resnet.py", "/vgg.py", "/data_generator.py"], "/predict.py": ["/config.py", "/unet.py", "/resnet.py"], "/unet.py": ["/config.py"], "/test.py": ["/preprocess.py"], "/train_segmentation.py": ["/config.py", "/unet.py", "/data_generator.py"], "/data_generator.py": ["/config.py"...
14,793
martinambition/tianchi-lung-2019
refs/heads/master
/unet.py
from keras.models import Model from keras.layers import Input, Conv3D, MaxPooling3D, UpSampling3D, concatenate, Dropout,BatchNormalization from keras.callbacks import Callback from keras.optimizers import Adam from keras import backend as K from config import * from skimage import morphology, measure, segmentation fro...
{"/train_classification.py": ["/config.py", "/resnet.py", "/vgg.py", "/data_generator.py"], "/predict.py": ["/config.py", "/unet.py", "/resnet.py"], "/unet.py": ["/config.py"], "/test.py": ["/preprocess.py"], "/train_segmentation.py": ["/config.py", "/unet.py", "/data_generator.py"], "/data_generator.py": ["/config.py"...
14,794
martinambition/tianchi-lung-2019
refs/heads/master
/test.py
#matplotlib.use('Agg') import matplotlib.pyplot as plt from preprocess import Preprocess if __name__ =="__main__" : p = Preprocess() p.han
{"/train_classification.py": ["/config.py", "/resnet.py", "/vgg.py", "/data_generator.py"], "/predict.py": ["/config.py", "/unet.py", "/resnet.py"], "/unet.py": ["/config.py"], "/test.py": ["/preprocess.py"], "/train_segmentation.py": ["/config.py", "/unet.py", "/data_generator.py"], "/data_generator.py": ["/config.py"...
14,795
martinambition/tianchi-lung-2019
refs/heads/master
/train_segmentation.py
from keras.callbacks import TensorBoard, ModelCheckpoint, EarlyStopping from config import * from unet import UNet from data_generator import DataGenerator import time from glob import glob import random import os import numpy as np # def flow(mode='train',name="lung", batch_size=TRAIN_BATCH_SIZE): # PAHT= PREPRO...
{"/train_classification.py": ["/config.py", "/resnet.py", "/vgg.py", "/data_generator.py"], "/predict.py": ["/config.py", "/unet.py", "/resnet.py"], "/unet.py": ["/config.py"], "/test.py": ["/preprocess.py"], "/train_segmentation.py": ["/config.py", "/unet.py", "/data_generator.py"], "/data_generator.py": ["/config.py"...
14,796
martinambition/tianchi-lung-2019
refs/heads/master
/data_generator.py
import pandas as pd import os import pickle import numpy as np import random import h5py from glob import glob from config import * class DataGenerator(object): def __init__(self,name="lung"): self.name = name self.h5path = PREPROCESS_PATH_LUNG if name == "lung" else PREPROCESS_PATH_MEIASTINAL ...
{"/train_classification.py": ["/config.py", "/resnet.py", "/vgg.py", "/data_generator.py"], "/predict.py": ["/config.py", "/unet.py", "/resnet.py"], "/unet.py": ["/config.py"], "/test.py": ["/preprocess.py"], "/train_segmentation.py": ["/config.py", "/unet.py", "/data_generator.py"], "/data_generator.py": ["/config.py"...
14,797
martinambition/tianchi-lung-2019
refs/heads/master
/vgg.py
from keras.optimizers import Adam, SGD, RMSprop from keras.layers import Input, Conv3D, MaxPooling3D, Dense, GlobalMaxPooling3D, Dropout, BatchNormalization from keras.models import Model from keras.metrics import categorical_accuracy from config import * class SimpleVgg(): def __init__(self): self.use_batc...
{"/train_classification.py": ["/config.py", "/resnet.py", "/vgg.py", "/data_generator.py"], "/predict.py": ["/config.py", "/unet.py", "/resnet.py"], "/unet.py": ["/config.py"], "/test.py": ["/preprocess.py"], "/train_segmentation.py": ["/config.py", "/unet.py", "/data_generator.py"], "/data_generator.py": ["/config.py"...
14,798
martinambition/tianchi-lung-2019
refs/heads/master
/preprocess.py
from config import * import numpy as np import SimpleITK as sitk from skimage import morphology, measure, segmentation from skimage.filters import roberts, sobel from scipy import ndimage as ndi from glob import glob import h5py import scipy import os import pickle import pandas as pd from tqdm import tqdm class Prepro...
{"/train_classification.py": ["/config.py", "/resnet.py", "/vgg.py", "/data_generator.py"], "/predict.py": ["/config.py", "/unet.py", "/resnet.py"], "/unet.py": ["/config.py"], "/test.py": ["/preprocess.py"], "/train_segmentation.py": ["/config.py", "/unet.py", "/data_generator.py"], "/data_generator.py": ["/config.py"...
14,799
martinambition/tianchi-lung-2019
refs/heads/master
/resnet.py
from resnet_helper import Resnet3DBuilder from keras.optimizers import Adam from keras.layers import Input, Conv3D, Dense, BatchNormalization, Add, Flatten, Concatenate, AveragePooling3D, GlobalMaxPooling3D, Activation from keras.models import Model from keras.metrics import categorical_accuracy from config import * c...
{"/train_classification.py": ["/config.py", "/resnet.py", "/vgg.py", "/data_generator.py"], "/predict.py": ["/config.py", "/unet.py", "/resnet.py"], "/unet.py": ["/config.py"], "/test.py": ["/preprocess.py"], "/train_segmentation.py": ["/config.py", "/unet.py", "/data_generator.py"], "/data_generator.py": ["/config.py"...
14,800
amore1302/ext_instagrm
refs/heads/master
/load_image.py
import requests def load_image_from_url_to_file(url_internet, full_file_name): response = requests.get(url_internet , verify=False) response.raise_for_status() with open(full_file_name, 'wb') as file: file.write(response.content)
{"/fetch_spacex.py": ["/load_image.py"], "/fetch_hubble.py": ["/load_image.py"], "/main.py": ["/fetch_spacex.py", "/fetch_hubble.py"]}
14,801
amore1302/ext_instagrm
refs/heads/master
/fetch_spacex.py
import requests from load_image import load_image_from_url_to_file import os def fetch_spacex_last_launch(): directory = os.path.join("images", "") payload = { "latest": "", "launch_date_utc": "2019-08-06T22:52:00.000Z" } url_image = "https://api.spacexdata.com/v3/launches" respon...
{"/fetch_spacex.py": ["/load_image.py"], "/fetch_hubble.py": ["/load_image.py"], "/main.py": ["/fetch_spacex.py", "/fetch_hubble.py"]}
14,802
amore1302/ext_instagrm
refs/heads/master
/fetch_hubble.py
import requests from load_image import load_image_from_url_to_file import os def get_last_image_from_Hubble(id_image): url_image = "http://hubblesite.org/api/v3/image/{0}".format(id_image) response = requests.get(url_image) if not response.ok: raise requests.exceptions.HTTPError(response=respo...
{"/fetch_spacex.py": ["/load_image.py"], "/fetch_hubble.py": ["/load_image.py"], "/main.py": ["/fetch_spacex.py", "/fetch_hubble.py"]}
14,803
amore1302/ext_instagrm
refs/heads/master
/main.py
from PIL import Image from instabot import Bot import time from dotenv import load_dotenv from fetch_spacex import fetch_spacex_last_launch from fetch_hubble import get_colection_from_Hubble import os, errno from os import listdir from os.path import isfile from os.path import join as joinpath def create_dir_ima...
{"/fetch_spacex.py": ["/load_image.py"], "/fetch_hubble.py": ["/load_image.py"], "/main.py": ["/fetch_spacex.py", "/fetch_hubble.py"]}
14,825
christippett/timepro-timesheet
refs/heads/master
/src/timepro_timesheet/cli.py
import argparse import json import sys from datetime import date from dateutil.parser import parse as dateparser from dateutil.relativedelta import relativedelta, MO, FR from .api import TimesheetAPI from .timesheet import Timesheet TODAY = date.today() class TimesheetCLI: def __init__(self): parser = ...
{"/src/timepro_timesheet/cli.py": ["/src/timepro_timesheet/api.py", "/src/timepro_timesheet/timesheet.py"], "/src/timepro_timesheet/timesheet.py": ["/src/timepro_timesheet/utils.py"], "/src/timepro_timesheet/api.py": ["/src/timepro_timesheet/timesheet.py"]}
14,826
christippett/timepro-timesheet
refs/heads/master
/src/timepro_timesheet/utils.py
from datetime import timedelta, date, datetime from dateutil.parser import parse as dateparser def generate_date_series(start_date, end_date): """ Generate series of dates from start to end date """ days_diff = (end_date - start_date).days return [start_date + timedelta(days=x) for x in range(0, ...
{"/src/timepro_timesheet/cli.py": ["/src/timepro_timesheet/api.py", "/src/timepro_timesheet/timesheet.py"], "/src/timepro_timesheet/timesheet.py": ["/src/timepro_timesheet/utils.py"], "/src/timepro_timesheet/api.py": ["/src/timepro_timesheet/timesheet.py"]}
14,827
christippett/timepro-timesheet
refs/heads/master
/tests/test_timesheet.py
from timepro_timesheet.utils import convert_time_string_and_minutes_to_hours def test_convert_time_string_and_minutes_to_hours(): assert convert_time_string_and_minutes_to_hours("13") == 13.0 assert convert_time_string_and_minutes_to_hours("13:00") == 13.0 assert convert_time_string_and_minutes_to_hours("...
{"/src/timepro_timesheet/cli.py": ["/src/timepro_timesheet/api.py", "/src/timepro_timesheet/timesheet.py"], "/src/timepro_timesheet/timesheet.py": ["/src/timepro_timesheet/utils.py"], "/src/timepro_timesheet/api.py": ["/src/timepro_timesheet/timesheet.py"]}
14,828
christippett/timepro-timesheet
refs/heads/master
/src/timepro_timesheet/version.py
from pkg_resources import get_distribution, DistributionNotFound try: __version__ = get_distribution("timepro-timesheet").version except DistributionNotFound: __version__ = "unknown" # package not installed
{"/src/timepro_timesheet/cli.py": ["/src/timepro_timesheet/api.py", "/src/timepro_timesheet/timesheet.py"], "/src/timepro_timesheet/timesheet.py": ["/src/timepro_timesheet/utils.py"], "/src/timepro_timesheet/api.py": ["/src/timepro_timesheet/timesheet.py"]}
14,829
christippett/timepro-timesheet
refs/heads/master
/src/timepro_timesheet/timesheet.py
import itertools import json import re from dateutil.parser import parse as dateparser from .utils import ( generate_date_series, convert_keys_to_dates, convert_time_string_and_minutes_to_hours, ) class Timesheet: FORM_XPATH_INPUT_ROWS = '//input[@name="InputRows"]' FORM_XPATH_START_DATE = '//in...
{"/src/timepro_timesheet/cli.py": ["/src/timepro_timesheet/api.py", "/src/timepro_timesheet/timesheet.py"], "/src/timepro_timesheet/timesheet.py": ["/src/timepro_timesheet/utils.py"], "/src/timepro_timesheet/api.py": ["/src/timepro_timesheet/timesheet.py"]}
14,830
christippett/timepro-timesheet
refs/heads/master
/setup.py
from setuptools import setup, find_packages LONG_DESCRIPTION = open("README.md").read() INSTALL_REQUIRES = ["requests", "requests-html", "python-dateutil"] setup( name="timepro-timesheet", use_scm_version=True, setup_requires=["setuptools_scm"], description="Utility for programmatically getting and ...
{"/src/timepro_timesheet/cli.py": ["/src/timepro_timesheet/api.py", "/src/timepro_timesheet/timesheet.py"], "/src/timepro_timesheet/timesheet.py": ["/src/timepro_timesheet/utils.py"], "/src/timepro_timesheet/api.py": ["/src/timepro_timesheet/timesheet.py"]}
14,831
christippett/timepro-timesheet
refs/heads/master
/src/timepro_timesheet/api.py
import re from datetime import date from dateutil.relativedelta import relativedelta, MO, FR from requests_html import HTMLSession from .timesheet import Timesheet TODAY = date.today() class LoginError(Exception): pass class WebsiteError(Exception): pass class TimesheetAPI: LOGIN_URL = "https://www...
{"/src/timepro_timesheet/cli.py": ["/src/timepro_timesheet/api.py", "/src/timepro_timesheet/timesheet.py"], "/src/timepro_timesheet/timesheet.py": ["/src/timepro_timesheet/utils.py"], "/src/timepro_timesheet/api.py": ["/src/timepro_timesheet/timesheet.py"]}
14,835
Mvegala/logs_analyzer
refs/heads/master
/analyzer.py
import pandas as pd def load_logs(path): # where data will be stored ips = [] timestamps = [] commands = [] http_codes = [] response_bytes = [] # load file with open(path, 'r') as f: # analyze each line of file for line in f: # split by space li...
{"/main.py": ["/analyzer.py"]}
14,836
Mvegala/logs_analyzer
refs/heads/master
/main.py
import os from analyzer import ( load_logs, analyze_logs ) # --------------------------------------------------- PROJECT_DIR = os.path.dirname(os.path.abspath(__file__)) DATA_DIR = os.path.join(PROJECT_DIR, 'data') LOGS_PATH = os.path.join(DATA_DIR, 'log_small.txt') # ----------------------------------------...
{"/main.py": ["/analyzer.py"]}
14,839
plone/plone.multilingualbehavior
refs/heads/master
/plone/multilingualbehavior/form.py
# -*- coding: utf-8 -*- from zope.interface import implements from z3c.form.interfaces import NO_VALUE from z3c.form.interfaces import IValue from Products.CMFCore.utils import getToolByName from Acquisition import aq_base from interfaces import ILanguageIndependentField from plone.multilingual.manager import Trans...
{"/plone/multilingualbehavior/subscriber.py": ["/plone/multilingualbehavior/interfaces.py"], "/plone/multilingualbehavior/tests/schemata.py": ["/plone/multilingualbehavior/__init__.py", "/plone/multilingualbehavior/interfaces.py"], "/plone/multilingualbehavior/meta.py": ["/plone/multilingualbehavior/interfaces.py", "/p...
14,840
plone/plone.multilingualbehavior
refs/heads/master
/plone/multilingualbehavior/subscriber.py
# -*- coding: utf-8 -*- from AccessControl import getSecurityManager from AccessControl.SecurityManagement import newSecurityManager from AccessControl.SecurityManagement import setSecurityManager from AccessControl.User import UnrestrictedUser from Products.CMFCore.utils import getToolByName from plone.app.multilingu...
{"/plone/multilingualbehavior/subscriber.py": ["/plone/multilingualbehavior/interfaces.py"], "/plone/multilingualbehavior/tests/schemata.py": ["/plone/multilingualbehavior/__init__.py", "/plone/multilingualbehavior/interfaces.py"], "/plone/multilingualbehavior/meta.py": ["/plone/multilingualbehavior/interfaces.py", "/p...
14,841
plone/plone.multilingualbehavior
refs/heads/master
/plone/multilingualbehavior/cloner.py
# -*- coding: utf-8 -*- from zope import interface from plone.multilingual.interfaces import ITranslationCloner from plone.multilingual.interfaces import ILanguageIndependentFieldsManager class Cloner(object): interface.implements(ITranslationCloner) def __init__(self, context): self.context = cont...
{"/plone/multilingualbehavior/subscriber.py": ["/plone/multilingualbehavior/interfaces.py"], "/plone/multilingualbehavior/tests/schemata.py": ["/plone/multilingualbehavior/__init__.py", "/plone/multilingualbehavior/interfaces.py"], "/plone/multilingualbehavior/meta.py": ["/plone/multilingualbehavior/interfaces.py", "/p...
14,842
plone/plone.multilingualbehavior
refs/heads/master
/setup.py
from setuptools import setup, find_packages version = '1.2.4.dev0' setup(name='plone.multilingualbehavior', version=version, description="Dexterity behavior for enabling multilingual extensions", long_description=open("README.rst").read() + "\n" + open("CHANGES.rst").read(), ...
{"/plone/multilingualbehavior/subscriber.py": ["/plone/multilingualbehavior/interfaces.py"], "/plone/multilingualbehavior/tests/schemata.py": ["/plone/multilingualbehavior/__init__.py", "/plone/multilingualbehavior/interfaces.py"], "/plone/multilingualbehavior/meta.py": ["/plone/multilingualbehavior/interfaces.py", "/p...
14,843
plone/plone.multilingualbehavior
refs/heads/master
/plone/multilingualbehavior/tests/schemata.py
from zope import schema from zope.interface import Interface from zope.interface import alsoProvides from plone.directives import form from plone.multilingualbehavior import directives from plone.multilingualbehavior.interfaces import ILanguageIndependentField from z3c.relationfield.schema import RelationChoice, Rel...
{"/plone/multilingualbehavior/subscriber.py": ["/plone/multilingualbehavior/interfaces.py"], "/plone/multilingualbehavior/tests/schemata.py": ["/plone/multilingualbehavior/__init__.py", "/plone/multilingualbehavior/interfaces.py"], "/plone/multilingualbehavior/meta.py": ["/plone/multilingualbehavior/interfaces.py", "/p...
14,844
plone/plone.multilingualbehavior
refs/heads/master
/plone/multilingualbehavior/upgrades/upgrades.py
# -*- coding: utf-8 -*- from Products.GenericSetup.utils import _resolveDottedName from zope.component.hooks import getSite from zope.component.interfaces import IComponentRegistry import logging log = logging.getLogger(__name__) def enable_ieditfinishedevent(context): """ Replaces handler registration f...
{"/plone/multilingualbehavior/subscriber.py": ["/plone/multilingualbehavior/interfaces.py"], "/plone/multilingualbehavior/tests/schemata.py": ["/plone/multilingualbehavior/__init__.py", "/plone/multilingualbehavior/interfaces.py"], "/plone/multilingualbehavior/meta.py": ["/plone/multilingualbehavior/interfaces.py", "/p...
14,845
plone/plone.multilingualbehavior
refs/heads/master
/plone/multilingualbehavior/interfaces.py
# -*- coding: utf-8 -*- # vim: set ts=4 sw=4: from plone.multilingual.interfaces import ( ITranslatable, ) from directives import languageindependent from zope.interface import Interface MULTILINGUAL_KEY = languageindependent.dotted_name() class IDexterityTranslatable(ITranslatable): """ special marker for ...
{"/plone/multilingualbehavior/subscriber.py": ["/plone/multilingualbehavior/interfaces.py"], "/plone/multilingualbehavior/tests/schemata.py": ["/plone/multilingualbehavior/__init__.py", "/plone/multilingualbehavior/interfaces.py"], "/plone/multilingualbehavior/meta.py": ["/plone/multilingualbehavior/interfaces.py", "/p...
14,846
plone/plone.multilingualbehavior
refs/heads/master
/plone/multilingualbehavior/Extensions/install.py
# -*- coding: utf-8 -*- """Legacy install/uninstall-methods to guard from re-installing/uninstalling""" from Products.CMFCore.utils import getToolByName def uninstall(context, reinstall=False): if not reinstall: setup_tool = getToolByName(context, 'portal_setup') setup_tool.runAllImportStepsFromPr...
{"/plone/multilingualbehavior/subscriber.py": ["/plone/multilingualbehavior/interfaces.py"], "/plone/multilingualbehavior/tests/schemata.py": ["/plone/multilingualbehavior/__init__.py", "/plone/multilingualbehavior/interfaces.py"], "/plone/multilingualbehavior/meta.py": ["/plone/multilingualbehavior/interfaces.py", "/p...
14,847
plone/plone.multilingualbehavior
refs/heads/master
/plone/multilingualbehavior/meta.py
import martian from martian.error import GrokImportError from zope.interface import alsoProvides from plone.multilingualbehavior.interfaces import ILanguageIndependentField from plone.multilingualbehavior.directives import languageindependent from plone.directives.form import Schema class MultilingualGrokker(martia...
{"/plone/multilingualbehavior/subscriber.py": ["/plone/multilingualbehavior/interfaces.py"], "/plone/multilingualbehavior/tests/schemata.py": ["/plone/multilingualbehavior/__init__.py", "/plone/multilingualbehavior/interfaces.py"], "/plone/multilingualbehavior/meta.py": ["/plone/multilingualbehavior/interfaces.py", "/p...
14,848
plone/plone.multilingualbehavior
refs/heads/master
/plone/multilingualbehavior/tests/tests.py
import unittest2 as unittest import doctest from plone.testing import layered from plone.multilingualbehavior.testing import PLONEMULTILINGUALBEHAVIOR_INTEGRATION_TESTING from plone.multilingualbehavior.testing import PLONEMULTILINGUALBEHAVIOR_FUNCTIONAL_TESTING from plone.multilingualbehavior.testing import optionflag...
{"/plone/multilingualbehavior/subscriber.py": ["/plone/multilingualbehavior/interfaces.py"], "/plone/multilingualbehavior/tests/schemata.py": ["/plone/multilingualbehavior/__init__.py", "/plone/multilingualbehavior/interfaces.py"], "/plone/multilingualbehavior/meta.py": ["/plone/multilingualbehavior/interfaces.py", "/p...
14,849
plone/plone.multilingualbehavior
refs/heads/master
/plone/multilingualbehavior/testing.py
# -*- coding: utf-8 -*- from plone.app.testing import PLONE_FIXTURE from plone.app.testing import PloneSandboxLayer from plone.app.testing import applyProfile from plone.app.testing import setRoles from plone.app.testing import TEST_USER_ID from plone.app.testing import IntegrationTesting from plone.app.testing import ...
{"/plone/multilingualbehavior/subscriber.py": ["/plone/multilingualbehavior/interfaces.py"], "/plone/multilingualbehavior/tests/schemata.py": ["/plone/multilingualbehavior/__init__.py", "/plone/multilingualbehavior/interfaces.py"], "/plone/multilingualbehavior/meta.py": ["/plone/multilingualbehavior/interfaces.py", "/p...
14,850
plone/plone.multilingualbehavior
refs/heads/master
/plone/multilingualbehavior/supermodel.py
try: from plone.supermodel.interfaces import IFieldMetadataHandler HAVE_SUPERMODEL = True except ImportError: HAVE_SUPERMODEL = False if HAVE_SUPERMODEL: from zope.interface import implements, alsoProvides from plone.supermodel.utils import ns from plone.multilingualbehavior.interfaces import ...
{"/plone/multilingualbehavior/subscriber.py": ["/plone/multilingualbehavior/interfaces.py"], "/plone/multilingualbehavior/tests/schemata.py": ["/plone/multilingualbehavior/__init__.py", "/plone/multilingualbehavior/interfaces.py"], "/plone/multilingualbehavior/meta.py": ["/plone/multilingualbehavior/interfaces.py", "/p...
14,851
plone/plone.multilingualbehavior
refs/heads/master
/plone/multilingualbehavior/schemaeditor.py
try: from plone.schemaeditor.interfaces import IFieldEditorExtender HAVE_EDITOREXTENDER = True except ImportError: HAVE_EDITOREXTENDER = False if HAVE_EDITOREXTENDER: from zope.interface import implements, Interface, alsoProvides, \ noLongerProvides from zope import schema from zope.sc...
{"/plone/multilingualbehavior/subscriber.py": ["/plone/multilingualbehavior/interfaces.py"], "/plone/multilingualbehavior/tests/schemata.py": ["/plone/multilingualbehavior/__init__.py", "/plone/multilingualbehavior/interfaces.py"], "/plone/multilingualbehavior/meta.py": ["/plone/multilingualbehavior/interfaces.py", "/p...
14,852
plone/plone.multilingualbehavior
refs/heads/master
/plone/multilingualbehavior/__init__.py
# # Convenience API # import zope.deferredimport import schemaeditor zope.deferredimport.defineFrom('plone.multilingualbehavior.schema', 'languageindependent', )
{"/plone/multilingualbehavior/subscriber.py": ["/plone/multilingualbehavior/interfaces.py"], "/plone/multilingualbehavior/tests/schemata.py": ["/plone/multilingualbehavior/__init__.py", "/plone/multilingualbehavior/interfaces.py"], "/plone/multilingualbehavior/meta.py": ["/plone/multilingualbehavior/interfaces.py", "/p...
14,853
plone/plone.multilingualbehavior
refs/heads/master
/plone/multilingualbehavior/language.py
from zope import interface from plone.multilingual.interfaces import LANGUAGE_INDEPENDENT from plone.multilingual.interfaces import ILanguage from plone.app.dexterity.behaviors.metadata import ICategorization # Patch for hiding 'language' field from the edit form ICategorization['language'].readonly = True class L...
{"/plone/multilingualbehavior/subscriber.py": ["/plone/multilingualbehavior/interfaces.py"], "/plone/multilingualbehavior/tests/schemata.py": ["/plone/multilingualbehavior/__init__.py", "/plone/multilingualbehavior/interfaces.py"], "/plone/multilingualbehavior/meta.py": ["/plone/multilingualbehavior/interfaces.py", "/p...
14,854
plone/plone.multilingualbehavior
refs/heads/master
/plone/multilingualbehavior/setuphandlers.py
# -*- coding: utf-8 -*- from Products.GenericSetup.utils import _resolveDottedName from zope.component.hooks import getSite from zope.component.interfaces import IComponentRegistry from zope.component import getGlobalSiteManager import transaction import logging from Products.CMFCore.utils import getToolByName log = lo...
{"/plone/multilingualbehavior/subscriber.py": ["/plone/multilingualbehavior/interfaces.py"], "/plone/multilingualbehavior/tests/schemata.py": ["/plone/multilingualbehavior/__init__.py", "/plone/multilingualbehavior/interfaces.py"], "/plone/multilingualbehavior/meta.py": ["/plone/multilingualbehavior/interfaces.py", "/p...
14,855
plone/plone.multilingualbehavior
refs/heads/master
/plone/multilingualbehavior/directives.py
import martian from zope.interface.interface import TAGGED_DATA TEMP_KEY = '__form_directive_values__' # Storages class LanguageIndependentStorage(object): """Stores the primary() directive value in a schema tagged value. """ def set(self, locals_, directive, value): tags = locals_.setdefault(T...
{"/plone/multilingualbehavior/subscriber.py": ["/plone/multilingualbehavior/interfaces.py"], "/plone/multilingualbehavior/tests/schemata.py": ["/plone/multilingualbehavior/__init__.py", "/plone/multilingualbehavior/interfaces.py"], "/plone/multilingualbehavior/meta.py": ["/plone/multilingualbehavior/interfaces.py", "/p...
14,856
plone/plone.multilingualbehavior
refs/heads/master
/plone/multilingualbehavior/utils.py
# -*- coding: utf-8 -*- from zope import interface from zope.component import getUtility from plone.dexterity import utils from plone.dexterity.interfaces import IDexterityFTI from plone.multilingual.interfaces import ILanguageIndependentFieldsManager from plone.multilingualbehavior.interfaces import ILanguageIndepe...
{"/plone/multilingualbehavior/subscriber.py": ["/plone/multilingualbehavior/interfaces.py"], "/plone/multilingualbehavior/tests/schemata.py": ["/plone/multilingualbehavior/__init__.py", "/plone/multilingualbehavior/interfaces.py"], "/plone/multilingualbehavior/meta.py": ["/plone/multilingualbehavior/interfaces.py", "/p...
14,888
ebmdatalab/cusum-for-opioids-notebook
refs/heads/master
/lib/cusum.py
import numpy as np import pandas as pd def most_change_against_window(percentiles, window=12): """Use CUSUM algorithm to detect cumulative change from a reference mean averaged over the previous `window` months. Returns a list of dicts of `measure`, `from`, and `to` """ improvements = [] dec...
{"/notebooks/diffable_python/cusum.py": ["/lib/cusum.py"]}
14,889
ebmdatalab/cusum-for-opioids-notebook
refs/heads/master
/notebooks/diffable_python/cusum.py
# --- # jupyter: # jupytext: # cell_metadata_filter: all # notebook_metadata_filter: all,-language_info # text_representation: # extension: .py # format_name: light # format_version: '1.5' # jupytext_version: 1.3.2 # kernelspec: # display_name: Python 3 # language: python...
{"/notebooks/diffable_python/cusum.py": ["/lib/cusum.py"]}
14,896
Alex1um/Reworked-bot
refs/heads/master
/commands/translate.py
import pickle def dothis(message): """ Function to translate text :param message: :return: translated text """ def replace(lst1, lst2, text, a=True): """ function to replace symbols :param lst1: keys :param lst2: values :param text: sentence :pa...
{"/commands/settings.py": ["/Core/core.py"], "/commands/stupidAI/parser.py": ["/commands/stupidAI/tools.py"], "/commands/solve_chemical.py": ["/Core/core.py", "/commands/stupidAI/tools.py"], "/commands/rand.py": ["/Core/core.py"], "/commands/permissions.py": ["/Core/core.py"], "/commands/stupid_ai.py": ["/Core/core.py"...
14,897
Alex1um/Reworked-bot
refs/heads/master
/commands/settings.py
from Core.core import * def dothis(message): """ Function to allow commands to use settings :param message: :return: current setting with answer options """ system: ChatSystem = message.cls.main_system session = message.get_session() status = message.get_setting(session, 'active') ...
{"/commands/settings.py": ["/Core/core.py"], "/commands/stupidAI/parser.py": ["/commands/stupidAI/tools.py"], "/commands/solve_chemical.py": ["/Core/core.py", "/commands/stupidAI/tools.py"], "/commands/rand.py": ["/Core/core.py"], "/commands/permissions.py": ["/Core/core.py"], "/commands/stupid_ai.py": ["/Core/core.py"...
14,898
Alex1um/Reworked-bot
refs/heads/master
/commands/stupidAI/parser.py
from pymorphy2.analyzer import MorphAnalyzer # from .tools import Equations as Eq from commands.stupidAI.tools import Equations as Eq from commands.stupidAI.tools import ChemicalEquations as Ce import wikipedia from string import ascii_lowercase import random import re analyzer = MorphAnalyzer() signs = re.compile(r'[...
{"/commands/settings.py": ["/Core/core.py"], "/commands/stupidAI/parser.py": ["/commands/stupidAI/tools.py"], "/commands/solve_chemical.py": ["/Core/core.py", "/commands/stupidAI/tools.py"], "/commands/rand.py": ["/Core/core.py"], "/commands/permissions.py": ["/Core/core.py"], "/commands/stupid_ai.py": ["/Core/core.py"...
14,899
Alex1um/Reworked-bot
refs/heads/master
/commands/solve_chemical.py
from Core.core import * from commands.stupidAI.tools import ChemicalEquations as Ce from bs4 import BeautifulSoup as bs import requests import tempfile from PIL import Image import io def dothis(msg: Message): """ Solve chemical equation - make full equation :param msg: :return: full equation """ ...
{"/commands/settings.py": ["/Core/core.py"], "/commands/stupidAI/parser.py": ["/commands/stupidAI/tools.py"], "/commands/solve_chemical.py": ["/Core/core.py", "/commands/stupidAI/tools.py"], "/commands/rand.py": ["/Core/core.py"], "/commands/permissions.py": ["/Core/core.py"], "/commands/stupid_ai.py": ["/Core/core.py"...
14,900
Alex1um/Reworked-bot
refs/heads/master
/commands/rand.py
from Core.core import ChatSystem import random def dothis(message): """ Some random functions :param message: :return: random function return """ array_calls = ('ar', 'array', 'shuffle') situations = { 'int': lambda x, y: random.randint(x, y), 'i': lambda x, y: random.randi...
{"/commands/settings.py": ["/Core/core.py"], "/commands/stupidAI/parser.py": ["/commands/stupidAI/tools.py"], "/commands/solve_chemical.py": ["/Core/core.py", "/commands/stupidAI/tools.py"], "/commands/rand.py": ["/Core/core.py"], "/commands/permissions.py": ["/Core/core.py"], "/commands/stupid_ai.py": ["/Core/core.py"...
14,901
Alex1um/Reworked-bot
refs/heads/master
/commands/permissions.py
from Core.core import ChatSystem def permissions(params, system: ChatSystem, message): ''' Add permission control :param params: param[0] - other id; param[1](option) - level :param system: ChatSystem obj :param message: Message obj :return: ''' if params: otherid = int( ...
{"/commands/settings.py": ["/Core/core.py"], "/commands/stupidAI/parser.py": ["/commands/stupidAI/tools.py"], "/commands/solve_chemical.py": ["/Core/core.py", "/commands/stupidAI/tools.py"], "/commands/rand.py": ["/Core/core.py"], "/commands/permissions.py": ["/Core/core.py"], "/commands/stupid_ai.py": ["/Core/core.py"...
14,902
Alex1um/Reworked-bot
refs/heads/master
/commands/stupid_ai.py
from Core.core import * from commands.stupidAI import parser def sett(params, system: ChatSystem, message): """ Control work :param params: :param system: :param message: :return: """ param = message.params[-1] print(param) if param: session = system.db_session.create_s...
{"/commands/settings.py": ["/Core/core.py"], "/commands/stupidAI/parser.py": ["/commands/stupidAI/tools.py"], "/commands/solve_chemical.py": ["/Core/core.py", "/commands/stupidAI/tools.py"], "/commands/rand.py": ["/Core/core.py"], "/commands/permissions.py": ["/Core/core.py"], "/commands/stupid_ai.py": ["/Core/core.py"...
14,903
Alex1um/Reworked-bot
refs/heads/master
/commands/news.py
from Core.core import * import schedule from commands.site_parsers.news import * from ast import literal_eval # init # getting news from yandex and triberkomo def update_news(system: ChatSystem): """ Function to update news with schedule :param system: :return: """ def update(system): ...
{"/commands/settings.py": ["/Core/core.py"], "/commands/stupidAI/parser.py": ["/commands/stupidAI/tools.py"], "/commands/solve_chemical.py": ["/Core/core.py", "/commands/stupidAI/tools.py"], "/commands/rand.py": ["/Core/core.py"], "/commands/permissions.py": ["/Core/core.py"], "/commands/stupid_ai.py": ["/Core/core.py"...
14,904
Alex1um/Reworked-bot
refs/heads/master
/Core/core.py
import glob import os from threading import Thread from .models import db_session from typing import * import re import schedule import time def nothing(*chat, **kwargs): pass def fix_paths(paths: List[str]) -> List[str]: """ Making path for linux and windows :param paths: List of paths :return:...
{"/commands/settings.py": ["/Core/core.py"], "/commands/stupidAI/parser.py": ["/commands/stupidAI/tools.py"], "/commands/solve_chemical.py": ["/Core/core.py", "/commands/stupidAI/tools.py"], "/commands/rand.py": ["/Core/core.py"], "/commands/permissions.py": ["/Core/core.py"], "/commands/stupid_ai.py": ["/Core/core.py"...
14,905
Alex1um/Reworked-bot
refs/heads/master
/system_start.py
import argparse import sys import json from Core.core import ChatSystem from chats import vk_chat, command_promt chat_classes = {'VK': vk_chat.VK, 'command_promt': command_promt.SimpleChat} parser = argparse.ArgumentParser() parser.add_argument('runed_file', type=str) parser.add_argument('json_file', type=str) parser...
{"/commands/settings.py": ["/Core/core.py"], "/commands/stupidAI/parser.py": ["/commands/stupidAI/tools.py"], "/commands/solve_chemical.py": ["/Core/core.py", "/commands/stupidAI/tools.py"], "/commands/rand.py": ["/Core/core.py"], "/commands/permissions.py": ["/Core/core.py"], "/commands/stupid_ai.py": ["/Core/core.py"...
14,906
Alex1um/Reworked-bot
refs/heads/master
/chats/vk_chat.py
from Core.core import Chat, Message, ChatSystem import vk import requests from types import * from typing import * import json class VK(Chat): name = 'vk' LPS = 'server' vk_api = 'api' group_id = 123 api_version = 0. msg_id = 0 vk_api_user = 'api' def input(self, res, id): """...
{"/commands/settings.py": ["/Core/core.py"], "/commands/stupidAI/parser.py": ["/commands/stupidAI/tools.py"], "/commands/solve_chemical.py": ["/Core/core.py", "/commands/stupidAI/tools.py"], "/commands/rand.py": ["/Core/core.py"], "/commands/permissions.py": ["/Core/core.py"], "/commands/stupid_ai.py": ["/Core/core.py"...
14,907
Alex1um/Reworked-bot
refs/heads/master
/commands/random_talks.py
from Core.core import ChatSystem, fix_paths import glob import random import pickle import re from functools import partial import gtts import time import os def table_file(params, system: ChatSystem, message): """ Setting to control random_talks file :param params: not setting params :param system: ...
{"/commands/settings.py": ["/Core/core.py"], "/commands/stupidAI/parser.py": ["/commands/stupidAI/tools.py"], "/commands/solve_chemical.py": ["/Core/core.py", "/commands/stupidAI/tools.py"], "/commands/rand.py": ["/Core/core.py"], "/commands/permissions.py": ["/Core/core.py"], "/commands/stupid_ai.py": ["/Core/core.py"...
14,908
Alex1um/Reworked-bot
refs/heads/master
/commands/sound_name.py
import os import re import time import urllib.request from Core.core import * from acrcloud.recognizer import ACRCloudRecognizer config = { 'host': 'identify-eu-west-1.acrcloud.com', 'access_key': 'd21cbdca7a7047fcf3480ba1260933c7', 'access_secret': 'u7fjeQU...
{"/commands/settings.py": ["/Core/core.py"], "/commands/stupidAI/parser.py": ["/commands/stupidAI/tools.py"], "/commands/solve_chemical.py": ["/Core/core.py", "/commands/stupidAI/tools.py"], "/commands/rand.py": ["/Core/core.py"], "/commands/permissions.py": ["/Core/core.py"], "/commands/stupid_ai.py": ["/Core/core.py"...
14,909
Alex1um/Reworked-bot
refs/heads/master
/commands/site_parsers/news.py
from bs4 import BeautifulSoup import requests def parse_triberkomo() -> set: """ Parsing site triberkomo :return: set of news """ res = requests.get(r'http://triberkomo.ru/') res.encoding = 'utf-8' titles = BeautifulSoup(res.content, 'html.parser').findAll('div', { 'class': 'stroka...
{"/commands/settings.py": ["/Core/core.py"], "/commands/stupidAI/parser.py": ["/commands/stupidAI/tools.py"], "/commands/solve_chemical.py": ["/Core/core.py", "/commands/stupidAI/tools.py"], "/commands/rand.py": ["/Core/core.py"], "/commands/permissions.py": ["/Core/core.py"], "/commands/stupid_ai.py": ["/Core/core.py"...
14,910
Alex1um/Reworked-bot
refs/heads/master
/chats/command_promt.py
from Core.core import Chat, Message, ChatSystem import datetime class SimpleChat(Chat): """ Chat from input """ def __init__(self, main_system=ChatSystem): super().__init__(main_system) def run(self): """ Just make message from input() :return: """ ...
{"/commands/settings.py": ["/Core/core.py"], "/commands/stupidAI/parser.py": ["/commands/stupidAI/tools.py"], "/commands/solve_chemical.py": ["/Core/core.py", "/commands/stupidAI/tools.py"], "/commands/rand.py": ["/Core/core.py"], "/commands/permissions.py": ["/Core/core.py"], "/commands/stupid_ai.py": ["/Core/core.py"...
14,911
Alex1um/Reworked-bot
refs/heads/master
/commands/stupidAI/tools.py
import math import re from string import ascii_lowercase from typing import * # import numpy as np # from scipy.optimize import fsolve from bs4 import BeautifulSoup as bs import requests names = {i for i in dir(math) if i[:2] != '__'} names |= set(ascii_lowercase) def make_fun_stable(f: Callable, default=None) -> Ca...
{"/commands/settings.py": ["/Core/core.py"], "/commands/stupidAI/parser.py": ["/commands/stupidAI/tools.py"], "/commands/solve_chemical.py": ["/Core/core.py", "/commands/stupidAI/tools.py"], "/commands/rand.py": ["/Core/core.py"], "/commands/permissions.py": ["/Core/core.py"], "/commands/stupid_ai.py": ["/Core/core.py"...
14,912
Alex1um/Reworked-bot
refs/heads/master
/Core/models/db_session.py
import sqlalchemy import sqlalchemy.orm as orm from sqlalchemy.orm import Session import sqlalchemy.ext.declarative as dec class DataBaseSession: __factory = None def __init__(self, db_file: str): """ Connecting with sql database. Creating session owned classes to avoid global vars ...
{"/commands/settings.py": ["/Core/core.py"], "/commands/stupidAI/parser.py": ["/commands/stupidAI/tools.py"], "/commands/solve_chemical.py": ["/Core/core.py", "/commands/stupidAI/tools.py"], "/commands/rand.py": ["/Core/core.py"], "/commands/permissions.py": ["/Core/core.py"], "/commands/stupid_ai.py": ["/Core/core.py"...
14,913
Alex1um/Reworked-bot
refs/heads/master
/commands/stt.py
import time import urllib import subprocess from Core.core import * from speech_recognition import AudioFile, Recognizer langs = {'ru': 'ru-RUS', 'en': 'en-EN'} witkey = 'GQ2ITHTRXYD2WVOPYOZ3AEY3NRBLNIS3' def dothis(message): """ From speech to text :param message: :return: text """ session =...
{"/commands/settings.py": ["/Core/core.py"], "/commands/stupidAI/parser.py": ["/commands/stupidAI/tools.py"], "/commands/solve_chemical.py": ["/Core/core.py", "/commands/stupidAI/tools.py"], "/commands/rand.py": ["/Core/core.py"], "/commands/permissions.py": ["/Core/core.py"], "/commands/stupid_ai.py": ["/Core/core.py"...
14,914
Alex1um/Reworked-bot
refs/heads/master
/commands/test.py
import time import pymorphy2 morph = pymorphy2.MorphAnalyzer() def asd(message): """ Testing generators - count Pallas's cats :param message: :return: count and Pallas's caat """ if message.params[0] != 'test': for i in range(int(message.params[0])): yield str(i) + ' ' + mo...
{"/commands/settings.py": ["/Core/core.py"], "/commands/stupidAI/parser.py": ["/commands/stupidAI/tools.py"], "/commands/solve_chemical.py": ["/Core/core.py", "/commands/stupidAI/tools.py"], "/commands/rand.py": ["/Core/core.py"], "/commands/permissions.py": ["/Core/core.py"], "/commands/stupid_ai.py": ["/Core/core.py"...
14,915
Alex1um/Reworked-bot
refs/heads/master
/commands/help.py
from Core.core import ChatSystem def dothis(message): """ Help function :param message: Message type :return: command help or list of commands with short help making query to sql to get all commands """ system: ChatSystem = message.cls.main_system session = system.db_session.create_ses...
{"/commands/settings.py": ["/Core/core.py"], "/commands/stupidAI/parser.py": ["/commands/stupidAI/tools.py"], "/commands/solve_chemical.py": ["/Core/core.py", "/commands/stupidAI/tools.py"], "/commands/rand.py": ["/Core/core.py"], "/commands/permissions.py": ["/Core/core.py"], "/commands/stupid_ai.py": ["/Core/core.py"...
14,916
Alex1um/Reworked-bot
refs/heads/master
/commands/salades.py
from random import sample, randint, shuffle from pickle import load from Core.core import * from ast import literal_eval import os def salades_max(params, system: ChatSystem, message): """ Control max length :param params: :param system: :param message: :return: """ session = system.db...
{"/commands/settings.py": ["/Core/core.py"], "/commands/stupidAI/parser.py": ["/commands/stupidAI/tools.py"], "/commands/solve_chemical.py": ["/Core/core.py", "/commands/stupidAI/tools.py"], "/commands/rand.py": ["/Core/core.py"], "/commands/permissions.py": ["/Core/core.py"], "/commands/stupid_ai.py": ["/Core/core.py"...
14,942
davidgaleano/gevent-fastcgi
refs/heads/master
/gevent_fastcgi.py
# Copyright (c) 2011-2012, Alexander Kulakov # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publ...
{"/tests/test_fastcgi.py": ["/gevent_fastcgi.py"]}
14,943
davidgaleano/gevent-fastcgi
refs/heads/master
/tests/test_fastcgi.py
# Copyright (c) 2011 Alexander Kulakov <a.kulakov@mail.ru> # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this l...
{"/tests/test_fastcgi.py": ["/gevent_fastcgi.py"]}
14,944
davidgaleano/gevent-fastcgi
refs/heads/master
/adapters/django/management/commands/run_gevent_fastcgi.py
import os import re from optparse import make_option from django.core.management import BaseCommand, CommandError __all__ = ['GeventFastCGI'] class Command(BaseCommand): args='<host:port>' help='Start gevent-fastcgi server' option_list = BaseCommand.option_list + ( make_option('--maxconns', type='...
{"/tests/test_fastcgi.py": ["/gevent_fastcgi.py"]}
14,945
davidgaleano/gevent-fastcgi
refs/heads/master
/setup.py
from setuptools import setup, find_packages import re __version__ = re.search(r'__version__\s*=\s*\'(.*)\'', file('gevent_fastcgi.py').read()).group(1) setup(name='gevent-fastcgi', version=__version__, description="FastCGI/WSGI server implementation based on gevent library", long_description='''Fast...
{"/tests/test_fastcgi.py": ["/gevent_fastcgi.py"]}
14,949
Astoulo/master-package-astoulosock
refs/heads/main
/setup.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from setuptools import setup, find_packages # notez qu'on import la lib import master_package_astousock # Ceci n'est qu'un appel de fonction. Mais il est trèèèèèèèèèèès long # et il comporte beaucoup de paramètres setup( # le nom de votre bibliothèque, ...
{"/build/lib/master_package_astousock/__init__.py": ["/build/lib/master_package_astousock/annee_bissextile.py"]}
14,950
Astoulo/master-package-astoulosock
refs/heads/main
/build/lib/master_package_astousock/annee_bissextile.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Implémentation de l'année à verifier. Usage: >>> from .annee_bissextile import annee_bissextile >>> annee_bissextile() """ __all__ = ['annee_bissextile'] def annee_bissextile(): annee = int(input("Entrez l'année à verifier:")) ...
{"/build/lib/master_package_astousock/__init__.py": ["/build/lib/master_package_astousock/annee_bissextile.py"]}
14,951
Astoulo/master-package-astoulosock
refs/heads/main
/master_package_astousock/table_multiplication.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Implémentation de la table de multiplication de la valeur saisie Usage: >>> from .table_multiplication import multiplication >>> multiplication() """ __all__ = ['multiplication'] def multiplication(): valeur = int(input("Entrez ...
{"/build/lib/master_package_astousock/__init__.py": ["/build/lib/master_package_astousock/annee_bissextile.py"]}
14,952
Astoulo/master-package-astoulosock
refs/heads/main
/build/lib/master_package_astousock/__init__.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Il existe 2 modules dans ce package: ---- annee_bissextile pour retourner si la valeur saisie est bissextile ou pas -----table_multiplication pour retourner la table de multiplication de la valeur saisie. """ __version__ = "0.0.1" from .a...
{"/build/lib/master_package_astousock/__init__.py": ["/build/lib/master_package_astousock/annee_bissextile.py"]}
14,953
roypel/BaMMI
refs/heads/master
/BaMMI/saver/Saver.py
from ..utils.DBWrapper import DBWrapper from ..utils.PubSuber import PubSuber from ..utils.UtilFunctions import extract_json_from_raw_data class Saver: def __init__(self, db_url): self.db_con = DBWrapper(db_url) self.known_fields = ['pose', 'feelings', 'color_image', 'depth_image'] def save(...
{"/BaMMI/saver/Saver.py": ["/BaMMI/utils/DBWrapper.py", "/BaMMI/utils/PubSuber.py", "/BaMMI/utils/UtilFunctions.py"], "/BaMMI/parsers/__init__.py": ["/BaMMI/parsers/ParserHandler.py"], "/BaMMI/api/__main__.py": ["/BaMMI/api/API.py", "/BaMMI/utils/CLITemplate.py", "/BaMMI/utils/Constants.py"], "/BaMMI/server/__main__.py...
14,954
roypel/BaMMI
refs/heads/master
/BaMMI/parsers/all_parsers/DepthImage.py
import matplotlib.pyplot as plt import numpy as np def parse_depth_image(context, snapshot): if 'depth_image' not in snapshot: raise KeyError("Snapshot is missing the Depth Image data") save_path = context.generate_path('depth_image.jpg') depth_image = np.fromfile(snapshot['depth_image']['data'], ...
{"/BaMMI/saver/Saver.py": ["/BaMMI/utils/DBWrapper.py", "/BaMMI/utils/PubSuber.py", "/BaMMI/utils/UtilFunctions.py"], "/BaMMI/parsers/__init__.py": ["/BaMMI/parsers/ParserHandler.py"], "/BaMMI/api/__main__.py": ["/BaMMI/api/API.py", "/BaMMI/utils/CLITemplate.py", "/BaMMI/utils/Constants.py"], "/BaMMI/server/__main__.py...
14,955
roypel/BaMMI
refs/heads/master
/BaMMI/utils/APIServer.py
from flask import Flask class EndpointAction: def __init__(self, action): self.action = action def __call__(self, *args, **kwargs): return self.action(*args, **kwargs) class FlaskWrapper: app = None def __init__(self, name=__name__): self.app = Flask(name) def run(self...
{"/BaMMI/saver/Saver.py": ["/BaMMI/utils/DBWrapper.py", "/BaMMI/utils/PubSuber.py", "/BaMMI/utils/UtilFunctions.py"], "/BaMMI/parsers/__init__.py": ["/BaMMI/parsers/ParserHandler.py"], "/BaMMI/api/__main__.py": ["/BaMMI/api/API.py", "/BaMMI/utils/CLITemplate.py", "/BaMMI/utils/Constants.py"], "/BaMMI/server/__main__.py...
14,956
roypel/BaMMI
refs/heads/master
/BaMMI/parsers/all_parsers/ColorImage.py
from PIL import Image as PILIm def parse_color_image(context, snapshot): if 'color_image' not in snapshot: raise KeyError("Snapshot is missing the Color Image data") save_path = context.generate_path('color_image.jpg') size = snapshot['color_image']['width'], snapshot['color_image']['height'] ...
{"/BaMMI/saver/Saver.py": ["/BaMMI/utils/DBWrapper.py", "/BaMMI/utils/PubSuber.py", "/BaMMI/utils/UtilFunctions.py"], "/BaMMI/parsers/__init__.py": ["/BaMMI/parsers/ParserHandler.py"], "/BaMMI/api/__main__.py": ["/BaMMI/api/API.py", "/BaMMI/utils/CLITemplate.py", "/BaMMI/utils/Constants.py"], "/BaMMI/server/__main__.py...
14,957
roypel/BaMMI
refs/heads/master
/BaMMI/parsers/__init__.py
from .ParserHandler import run_parser
{"/BaMMI/saver/Saver.py": ["/BaMMI/utils/DBWrapper.py", "/BaMMI/utils/PubSuber.py", "/BaMMI/utils/UtilFunctions.py"], "/BaMMI/parsers/__init__.py": ["/BaMMI/parsers/ParserHandler.py"], "/BaMMI/api/__main__.py": ["/BaMMI/api/API.py", "/BaMMI/utils/CLITemplate.py", "/BaMMI/utils/Constants.py"], "/BaMMI/server/__main__.py...
14,958
roypel/BaMMI
refs/heads/master
/BaMMI/utils/UtilFunctions.py
import json import os from urllib.parse import urlparse def ensure_dir(dir_path): full_path = os.path.expanduser(dir_path) if not os.path.isdir(full_path): os.makedirs(os.path.dirname(full_path), exist_ok=True) def save_data_to_file(data, file_path, data_type=''): ensure_dir(file_path) with ...
{"/BaMMI/saver/Saver.py": ["/BaMMI/utils/DBWrapper.py", "/BaMMI/utils/PubSuber.py", "/BaMMI/utils/UtilFunctions.py"], "/BaMMI/parsers/__init__.py": ["/BaMMI/parsers/ParserHandler.py"], "/BaMMI/api/__main__.py": ["/BaMMI/api/API.py", "/BaMMI/utils/CLITemplate.py", "/BaMMI/utils/Constants.py"], "/BaMMI/server/__main__.py...
14,959
roypel/BaMMI
refs/heads/master
/BaMMI/api/__main__.py
import sys import click from .API import run_api_server from ..utils.CLITemplate import log, main from ..utils.Constants import mongodb_url @main.command('run-server') @click.option('-h', '--host', default='127.0.0.1', type=str) @click.option('-p', '--port', default=5000, type=int) @click.option('-d', '--database', d...
{"/BaMMI/saver/Saver.py": ["/BaMMI/utils/DBWrapper.py", "/BaMMI/utils/PubSuber.py", "/BaMMI/utils/UtilFunctions.py"], "/BaMMI/parsers/__init__.py": ["/BaMMI/parsers/ParserHandler.py"], "/BaMMI/api/__main__.py": ["/BaMMI/api/API.py", "/BaMMI/utils/CLITemplate.py", "/BaMMI/utils/Constants.py"], "/BaMMI/server/__main__.py...
14,960
roypel/BaMMI
refs/heads/master
/BaMMI/server/__main__.py
import sys import click from .Receiver import publish_to_message_queue from .Server import run_server from ..utils.CLITemplate import log, main from ..utils.Constants import rabbit_mq_url @main.command('run-server') @click.argument('url', default=rabbit_mq_url, type=str) @click.option('-h', '--host', default='127.0.0...
{"/BaMMI/saver/Saver.py": ["/BaMMI/utils/DBWrapper.py", "/BaMMI/utils/PubSuber.py", "/BaMMI/utils/UtilFunctions.py"], "/BaMMI/parsers/__init__.py": ["/BaMMI/parsers/ParserHandler.py"], "/BaMMI/api/__main__.py": ["/BaMMI/api/API.py", "/BaMMI/utils/CLITemplate.py", "/BaMMI/utils/Constants.py"], "/BaMMI/server/__main__.py...
14,961
roypel/BaMMI
refs/heads/master
/BaMMI/utils/drivers/mq_drivers/__init__.py
from .RabbitDriver import RabbitDriver mq_drivers = { 'rabbitmq': RabbitDriver, }
{"/BaMMI/saver/Saver.py": ["/BaMMI/utils/DBWrapper.py", "/BaMMI/utils/PubSuber.py", "/BaMMI/utils/UtilFunctions.py"], "/BaMMI/parsers/__init__.py": ["/BaMMI/parsers/ParserHandler.py"], "/BaMMI/api/__main__.py": ["/BaMMI/api/API.py", "/BaMMI/utils/CLITemplate.py", "/BaMMI/utils/Constants.py"], "/BaMMI/server/__main__.py...
14,962
roypel/BaMMI
refs/heads/master
/BaMMI/parsers/all_parsers/Pose.py
def parse_pose(context, snapshot): if 'pose' not in snapshot: raise KeyError("Snapshot is missing the Pose data") pose_data = snapshot['pose'] if 'translation' not in pose_data: raise KeyError("Snapshot is missing the Translation data") if 'rotation' not in pose_data: raise Key...
{"/BaMMI/saver/Saver.py": ["/BaMMI/utils/DBWrapper.py", "/BaMMI/utils/PubSuber.py", "/BaMMI/utils/UtilFunctions.py"], "/BaMMI/parsers/__init__.py": ["/BaMMI/parsers/ParserHandler.py"], "/BaMMI/api/__main__.py": ["/BaMMI/api/API.py", "/BaMMI/utils/CLITemplate.py", "/BaMMI/utils/Constants.py"], "/BaMMI/server/__main__.py...
14,963
roypel/BaMMI
refs/heads/master
/BaMMI/parsers/Context.py
import os from ..utils import UtilFunctions class Context: def __init__(self, base_path, user_data, snapshot_data): self.base_path = base_path self.user_id = user_data['user_id'] self.snapshot_timestamp = snapshot_data['datetime'] def generate_path(self, file_name): of_the_je...
{"/BaMMI/saver/Saver.py": ["/BaMMI/utils/DBWrapper.py", "/BaMMI/utils/PubSuber.py", "/BaMMI/utils/UtilFunctions.py"], "/BaMMI/parsers/__init__.py": ["/BaMMI/parsers/ParserHandler.py"], "/BaMMI/api/__main__.py": ["/BaMMI/api/API.py", "/BaMMI/utils/CLITemplate.py", "/BaMMI/utils/Constants.py"], "/BaMMI/server/__main__.py...
14,964
roypel/BaMMI
refs/heads/master
/tests/test_listener.py
# TODO: Update tests! They're old and not relevant # import socket # import time # # import pytest # # # _PORT = 1234 # _HOST = '127.0.0.1' # _BACKLOG = 5000 # _REUSEADDR = True # # # @pytest.fixture # def listener(): # pass # # return Listener(_PORT, host=_HOST, backlog=_BACKLOG, reuseaddr=_REUSEADDR) # # # ...
{"/BaMMI/saver/Saver.py": ["/BaMMI/utils/DBWrapper.py", "/BaMMI/utils/PubSuber.py", "/BaMMI/utils/UtilFunctions.py"], "/BaMMI/parsers/__init__.py": ["/BaMMI/parsers/ParserHandler.py"], "/BaMMI/api/__main__.py": ["/BaMMI/api/API.py", "/BaMMI/utils/CLITemplate.py", "/BaMMI/utils/Constants.py"], "/BaMMI/server/__main__.py...
14,965
roypel/BaMMI
refs/heads/master
/BaMMI/utils/CLITemplate.py
import os import sys import traceback import click class Log: def __init__(self): self.quiet = False self.traceback = False def __call__(self, message): if self.quiet: return if self.traceback and sys.exc_info(): # there's an active exception message ...
{"/BaMMI/saver/Saver.py": ["/BaMMI/utils/DBWrapper.py", "/BaMMI/utils/PubSuber.py", "/BaMMI/utils/UtilFunctions.py"], "/BaMMI/parsers/__init__.py": ["/BaMMI/parsers/ParserHandler.py"], "/BaMMI/api/__main__.py": ["/BaMMI/api/API.py", "/BaMMI/utils/CLITemplate.py", "/BaMMI/utils/Constants.py"], "/BaMMI/server/__main__.py...
14,966
roypel/BaMMI
refs/heads/master
/BaMMI/utils/drivers/mq_drivers/RabbitDriver.py
from urllib.parse import urlparse import pika available_exchanges = ['direct', 'topic', 'fanout', 'headers'] class RabbitDriver: def __init__(self, url): parsed_url = urlparse(url) self.connection = pika.BlockingConnection( pika.ConnectionParameters(host=parsed_url.hostname, port=pa...
{"/BaMMI/saver/Saver.py": ["/BaMMI/utils/DBWrapper.py", "/BaMMI/utils/PubSuber.py", "/BaMMI/utils/UtilFunctions.py"], "/BaMMI/parsers/__init__.py": ["/BaMMI/parsers/ParserHandler.py"], "/BaMMI/api/__main__.py": ["/BaMMI/api/API.py", "/BaMMI/utils/CLITemplate.py", "/BaMMI/utils/Constants.py"], "/BaMMI/server/__main__.py...
14,967
roypel/BaMMI
refs/heads/master
/BaMMI/parsers/ParserHandler.py
import importlib import inspect import json import pathlib import sys from .Context import Context from ..utils.PubSuber import PubSuber from ..utils.UtilFunctions import extract_json_from_raw_data, get_true_relative_path class ParserHandler: def __init__(self, parsers_folder=get_true_relative_path(__file__, 'al...
{"/BaMMI/saver/Saver.py": ["/BaMMI/utils/DBWrapper.py", "/BaMMI/utils/PubSuber.py", "/BaMMI/utils/UtilFunctions.py"], "/BaMMI/parsers/__init__.py": ["/BaMMI/parsers/ParserHandler.py"], "/BaMMI/api/__main__.py": ["/BaMMI/api/API.py", "/BaMMI/utils/CLITemplate.py", "/BaMMI/utils/Constants.py"], "/BaMMI/server/__main__.py...
14,968
roypel/BaMMI
refs/heads/master
/BaMMI/utils/PubSuber.py
from .drivers.mq_drivers import mq_drivers from ..utils.UtilFunctions import find_driver """ At first, I thought about separating the modules to Publisher and Subscriber, however, since we'll use the same message queue for both anyway (even if it's not RMQ), and there are some actions they do the same, I decided to ma...
{"/BaMMI/saver/Saver.py": ["/BaMMI/utils/DBWrapper.py", "/BaMMI/utils/PubSuber.py", "/BaMMI/utils/UtilFunctions.py"], "/BaMMI/parsers/__init__.py": ["/BaMMI/parsers/ParserHandler.py"], "/BaMMI/api/__main__.py": ["/BaMMI/api/API.py", "/BaMMI/utils/CLITemplate.py", "/BaMMI/utils/Constants.py"], "/BaMMI/server/__main__.py...
14,969
roypel/BaMMI
refs/heads/master
/tests/test_mq.py
import pika import pytest # Not a real test, used only to check docker-compose finished loading RMQ which takes most of the time def test_mq_up(): params = pika.ConnectionParameters('localhost') connection = pika.BlockingConnection(params) connection.channel()
{"/BaMMI/saver/Saver.py": ["/BaMMI/utils/DBWrapper.py", "/BaMMI/utils/PubSuber.py", "/BaMMI/utils/UtilFunctions.py"], "/BaMMI/parsers/__init__.py": ["/BaMMI/parsers/ParserHandler.py"], "/BaMMI/api/__main__.py": ["/BaMMI/api/API.py", "/BaMMI/utils/CLITemplate.py", "/BaMMI/utils/Constants.py"], "/BaMMI/server/__main__.py...
14,970
roypel/BaMMI
refs/heads/master
/BaMMI/utils/__init__.py
from .Connection import get_from_url, post_from_url
{"/BaMMI/saver/Saver.py": ["/BaMMI/utils/DBWrapper.py", "/BaMMI/utils/PubSuber.py", "/BaMMI/utils/UtilFunctions.py"], "/BaMMI/parsers/__init__.py": ["/BaMMI/parsers/ParserHandler.py"], "/BaMMI/api/__main__.py": ["/BaMMI/api/API.py", "/BaMMI/utils/CLITemplate.py", "/BaMMI/utils/Constants.py"], "/BaMMI/server/__main__.py...
14,971
roypel/BaMMI
refs/heads/master
/tests/test_thought.py
# TODO: Update tests! They're old and not relevant # import datetime as dt # import struct # # import pytest # # user_id = 1 # datetime = dt.datetime(2000, 1, 1, 10, 0) # thought = "I'm hungry" # serialized = b"\x01\x00\x00\x00\x00\x00\x00\x00 \xd0m8\x00\x00\x00\x00\n\x00\x00\x00I'm hungry" # # # @pytest.fixture # de...
{"/BaMMI/saver/Saver.py": ["/BaMMI/utils/DBWrapper.py", "/BaMMI/utils/PubSuber.py", "/BaMMI/utils/UtilFunctions.py"], "/BaMMI/parsers/__init__.py": ["/BaMMI/parsers/ParserHandler.py"], "/BaMMI/api/__main__.py": ["/BaMMI/api/API.py", "/BaMMI/utils/CLITemplate.py", "/BaMMI/utils/Constants.py"], "/BaMMI/server/__main__.py...
14,972
roypel/BaMMI
refs/heads/master
/BaMMI/parsers/all_parsers/Feelings.py
def parse_feelings(context, snapshot): if 'feelings' not in snapshot: raise KeyError("Snapshot is missing the Feelings data") return context.format_returned_data('feelings', snapshot['feelings']) parse_feelings.field = 'feelings'
{"/BaMMI/saver/Saver.py": ["/BaMMI/utils/DBWrapper.py", "/BaMMI/utils/PubSuber.py", "/BaMMI/utils/UtilFunctions.py"], "/BaMMI/parsers/__init__.py": ["/BaMMI/parsers/ParserHandler.py"], "/BaMMI/api/__main__.py": ["/BaMMI/api/API.py", "/BaMMI/utils/CLITemplate.py", "/BaMMI/utils/Constants.py"], "/BaMMI/server/__main__.py...
14,973
roypel/BaMMI
refs/heads/master
/BaMMI/api/API.py
from flask import Blueprint, jsonify, send_from_directory from ..utils.APIServer import FlaskWrapper from ..utils.Constants import storage_folder, mongodb_url from ..utils.DBWrapper import DBWrapper from ..utils.UtilFunctions import build_path_for_files_from_data bp = Blueprint('serve_data', __name__, url_prefix='/us...
{"/BaMMI/saver/Saver.py": ["/BaMMI/utils/DBWrapper.py", "/BaMMI/utils/PubSuber.py", "/BaMMI/utils/UtilFunctions.py"], "/BaMMI/parsers/__init__.py": ["/BaMMI/parsers/ParserHandler.py"], "/BaMMI/api/__main__.py": ["/BaMMI/api/API.py", "/BaMMI/utils/CLITemplate.py", "/BaMMI/utils/Constants.py"], "/BaMMI/server/__main__.py...
14,974
roypel/BaMMI
refs/heads/master
/BaMMI/client/Reader.py
from .ProtoDriver import ProtoDriver class Reader: def __init__(self, file_path): self.reader_driver = find_reader_driver(file_path) def close(self): self.reader_driver.close() def get_user_data(self): return self.reader_driver.get_user_data() def get_user_data_ready_to_sen...
{"/BaMMI/saver/Saver.py": ["/BaMMI/utils/DBWrapper.py", "/BaMMI/utils/PubSuber.py", "/BaMMI/utils/UtilFunctions.py"], "/BaMMI/parsers/__init__.py": ["/BaMMI/parsers/ParserHandler.py"], "/BaMMI/api/__main__.py": ["/BaMMI/api/API.py", "/BaMMI/utils/CLITemplate.py", "/BaMMI/utils/Constants.py"], "/BaMMI/server/__main__.py...
14,975
roypel/BaMMI
refs/heads/master
/BaMMI/utils/DBWrapper.py
from .drivers.db_drivers import db_drivers from .UtilFunctions import find_driver class DBWrapper: def __init__(self, url): self.db_driver = find_db_driver(url) def insert_single_data_unit(self, data): self.db_driver.insert_single_data_unit(data) def insert_many_data_units(self, data_li...
{"/BaMMI/saver/Saver.py": ["/BaMMI/utils/DBWrapper.py", "/BaMMI/utils/PubSuber.py", "/BaMMI/utils/UtilFunctions.py"], "/BaMMI/parsers/__init__.py": ["/BaMMI/parsers/ParserHandler.py"], "/BaMMI/api/__main__.py": ["/BaMMI/api/API.py", "/BaMMI/utils/CLITemplate.py", "/BaMMI/utils/Constants.py"], "/BaMMI/server/__main__.py...
14,976
roypel/BaMMI
refs/heads/master
/BaMMI/__init__.py
from BaMMI.server.Server import run_server as run_server from BaMMI.client.Reader import Reader
{"/BaMMI/saver/Saver.py": ["/BaMMI/utils/DBWrapper.py", "/BaMMI/utils/PubSuber.py", "/BaMMI/utils/UtilFunctions.py"], "/BaMMI/parsers/__init__.py": ["/BaMMI/parsers/ParserHandler.py"], "/BaMMI/api/__main__.py": ["/BaMMI/api/API.py", "/BaMMI/utils/CLITemplate.py", "/BaMMI/utils/Constants.py"], "/BaMMI/server/__main__.py...
14,977
roypel/BaMMI
refs/heads/master
/BaMMI/utils/Connection.py
import requests def handle_request(request): try: request.raise_for_status() return request except requests.exceptions.HTTPError as e: print(f"HTTP error: {e}") except requests.exceptions.ConnectionError as e: print(f"Connection error: {e}") except requests.exceptions.T...
{"/BaMMI/saver/Saver.py": ["/BaMMI/utils/DBWrapper.py", "/BaMMI/utils/PubSuber.py", "/BaMMI/utils/UtilFunctions.py"], "/BaMMI/parsers/__init__.py": ["/BaMMI/parsers/ParserHandler.py"], "/BaMMI/api/__main__.py": ["/BaMMI/api/API.py", "/BaMMI/utils/CLITemplate.py", "/BaMMI/utils/Constants.py"], "/BaMMI/server/__main__.py...
14,978
roypel/BaMMI
refs/heads/master
/BaMMI/utils/drivers/db_drivers/__init__.py
from .MongoDriver import MongoDriver db_drivers = { 'mongodb': MongoDriver, }
{"/BaMMI/saver/Saver.py": ["/BaMMI/utils/DBWrapper.py", "/BaMMI/utils/PubSuber.py", "/BaMMI/utils/UtilFunctions.py"], "/BaMMI/parsers/__init__.py": ["/BaMMI/parsers/ParserHandler.py"], "/BaMMI/api/__main__.py": ["/BaMMI/api/API.py", "/BaMMI/utils/CLITemplate.py", "/BaMMI/utils/Constants.py"], "/BaMMI/server/__main__.py...
14,979
roypel/BaMMI
refs/heads/master
/BaMMI/client/client.py
from .Reader import Reader from ..utils.Connection import get_from_url, post_from_url def upload_sample(host: str, port: int, path: str): url = '/'.join((f'http://{":".join((host, str(port)))}', 'uploads')) reader = Reader(path) server_accepted_fields = get_server_fields('/'.join((url, 'config'))) sen...
{"/BaMMI/saver/Saver.py": ["/BaMMI/utils/DBWrapper.py", "/BaMMI/utils/PubSuber.py", "/BaMMI/utils/UtilFunctions.py"], "/BaMMI/parsers/__init__.py": ["/BaMMI/parsers/ParserHandler.py"], "/BaMMI/api/__main__.py": ["/BaMMI/api/API.py", "/BaMMI/utils/CLITemplate.py", "/BaMMI/utils/Constants.py"], "/BaMMI/server/__main__.py...