hexsha stringlengths 40 40 | size int64 6 1.04M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 247 | max_stars_repo_name stringlengths 4 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 368k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 247 | max_issues_repo_name stringlengths 4 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 247 | max_forks_repo_name stringlengths 4 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.04M | avg_line_length float64 1.53 618k | max_line_length int64 1 1.02M | alphanum_fraction float64 0 1 | original_content stringlengths 6 1.04M | filtered:remove_non_ascii int64 0 538k | filtered:remove_decorators int64 0 917k | filtered:remove_async int64 0 722k | filtered:remove_classes int64 -45 1M | filtered:remove_generators int64 0 814k | filtered:remove_function_no_docstring int64 -102 850k | filtered:remove_class_no_docstring int64 -3 5.46k | filtered:remove_unused_imports int64 -1,350 52.4k | filtered:remove_delete_markers int64 0 59.6k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
cfdc93d32114242e90d406587520d510b22c1d61 | 4,233 | py | Python | utils/annotations.py | shreyas/swalpa | 200c23a04e0a6a63b805705c9af15cec708b895a | [
"MIT"
] | null | null | null | utils/annotations.py | shreyas/swalpa | 200c23a04e0a6a63b805705c9af15cec708b895a | [
"MIT"
] | null | null | null | utils/annotations.py | shreyas/swalpa | 200c23a04e0a6a63b805705c9af15cec708b895a | [
"MIT"
] | null | null | null | # Copyright (c) 2016 Shreyas Kulkarni (shyran@gmail.com)
#
# 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... | 34.137097 | 136 | 0.66832 | # Copyright (c) 2016 Shreyas Kulkarni (shyran@gmail.com)
#
# 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... | 0 | 0 | 0 | 19 | 0 | 1,536 | 0 | 0 | 46 |
49ca7bef342b854c92a4d3754db9fd9cf2d93994 | 3,366 | py | Python | packages/mcni/tests/mcni/pyre_components/MultiMonitors/MultiMonitors_TestCase.py | mcvine/mcvine | 42232534b0c6af729628009bed165cd7d833789d | [
"BSD-3-Clause"
] | 5 | 2017-01-16T03:59:47.000Z | 2020-06-23T02:54:19.000Z | packages/mcni/tests/mcni/pyre_components/MultiMonitors/MultiMonitors_TestCase.py | mcvine/mcvine | 42232534b0c6af729628009bed165cd7d833789d | [
"BSD-3-Clause"
] | 293 | 2015-10-29T17:45:52.000Z | 2022-01-07T16:31:09.000Z | packages/mcni/tests/mcni/pyre_components/MultiMonitors/MultiMonitors_TestCase.py | mcvine/mcvine | 42232534b0c6af729628009bed165cd7d833789d | [
"BSD-3-Clause"
] | 1 | 2019-05-25T00:53:31.000Z | 2019-05-25T00:53:31.000Z | #!/usr/bin/env python
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Jiao Lin
# California Institute of Technology
# (C) 2007-2010 All Rights Reserved
#
# {LicenseText}
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~... | 24.933333 | 80 | 0.550802 | #!/usr/bin/env python
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Jiao Lin
# California Institute of Technology
# (C) 2007-2010 All Rights Reserved
#
# {LicenseText}
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~... | 0 | 0 | 0 | 2,389 | 0 | 353 | 0 | -3 | 137 |
d0ec58c52a34c87210e6e568252fff52654825a1 | 1,440 | py | Python | matches/migrations/0001_initial.py | Shirhussain/Find-my-match | f11f64ebb0f2145d8cd9a352bd2c29bf30c85088 | [
"MIT"
] | null | null | null | matches/migrations/0001_initial.py | Shirhussain/Find-my-match | f11f64ebb0f2145d8cd9a352bd2c29bf30c85088 | [
"MIT"
] | null | null | null | matches/migrations/0001_initial.py | Shirhussain/Find-my-match | f11f64ebb0f2145d8cd9a352bd2c29bf30c85088 | [
"MIT"
] | null | null | null | # Generated by Django 3.1.5 on 2021-01-10 09:04
| 42.352941 | 172 | 0.645139 | # Generated by Django 3.1.5 on 2021-01-10 09:04
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
ope... | 0 | 0 | 0 | 1,260 | 0 | 0 | 0 | 41 | 90 |
199619e24bbb6139123e8ecf26c949a0982121a0 | 3,885 | py | Python | tests/test_alarm.py | gocept/alphaflow | 4b797cb12fb52254b1884159fd9a8b899c739f7c | [
"ZPL-2.1",
"ZPL-2.0"
] | null | null | null | tests/test_alarm.py | gocept/alphaflow | 4b797cb12fb52254b1884159fd9a8b899c739f7c | [
"ZPL-2.1",
"ZPL-2.0"
] | null | null | null | tests/test_alarm.py | gocept/alphaflow | 4b797cb12fb52254b1884159fd9a8b899c739f7c | [
"ZPL-2.1",
"ZPL-2.0"
] | 1 | 2021-11-01T07:58:18.000Z | 2021-11-01T07:58:18.000Z | # Copyright (c) 2004-2006 gocept gmbh & co. kg
# See also LICENSE.txt
# $Id$
| 33.491379 | 83 | 0.655341 | # Copyright (c) 2004-2006 gocept gmbh & co. kg
# See also LICENSE.txt
# $Id$
import unittest
from DateTime import DateTime
from Products.CMFCore.utils import getToolByName
from Products.AlphaFlow.tests.AlphaFlowTestCase import AlphaFlowTestCase
from Products.AlphaFlow.activities.interfaces import \
IAlarmWorkI... | 0 | 0 | 0 | 3,262 | 0 | 95 | 0 | 245 | 204 |
396f2526831ee7c3989200e800e342954bc4f9dc | 9,047 | py | Python | CS4420_final_project/simulator.py | peytonhowell/eva | edd2cb441e49cb1759eb11fcac63bc0e826080e9 | [
"Apache-2.0"
] | null | null | null | CS4420_final_project/simulator.py | peytonhowell/eva | edd2cb441e49cb1759eb11fcac63bc0e826080e9 | [
"Apache-2.0"
] | null | null | null | CS4420_final_project/simulator.py | peytonhowell/eva | edd2cb441e49cb1759eb11fcac63bc0e826080e9 | [
"Apache-2.0"
] | 1 | 2021-12-06T01:09:35.000Z | 2021-12-06T01:09:35.000Z | import matplotlib.pyplot as plt
if __name__ == "__main__":
# raise Exception
hit_rate = []
for file in ["ftrace_combined.csv"]:
for p in [TwoQ, RR, FIFO, LRU, LFU]:
hit_rate = []
for i in range(6, 400):
try:
... | 31.304498 | 145 | 0.489112 | import queue
from collections import Counter, OrderedDict
import random
import matplotlib.pyplot as plt
class Simulator:
def __init__(self, filename):
self.filename = filename
itemList = []
with open(filename, "r") as fp:
lines = fp.readlines()
for l in lines:
... | 0 | 0 | 0 | 7,792 | 0 | 0 | 0 | 6 | 310 |
c4412a67585d962973827f0a73ba480b0ec1a3d9 | 562 | py | Python | res_users_clear_access_rights/__manifest__.py | marionumza/it-projects-llc-access-addons | 421fb60b25bfea67ccf0309f3cf7385dafafc350 | [
"MIT"
] | null | null | null | res_users_clear_access_rights/__manifest__.py | marionumza/it-projects-llc-access-addons | 421fb60b25bfea67ccf0309f3cf7385dafafc350 | [
"MIT"
] | null | null | null | res_users_clear_access_rights/__manifest__.py | marionumza/it-projects-llc-access-addons | 421fb60b25bfea67ccf0309f3cf7385dafafc350 | [
"MIT"
] | 1 | 2021-02-15T03:14:52.000Z | 2021-02-15T03:14:52.000Z | {
"name": "Clear User Access rights",
"summary": """Useful tool to reset user rights""",
"version": "12.0.1.1.0",
"author": "IT-Projects LLC, Ivan Yelizariev",
"license": "Other OSI approved licence", # MIT
"support": "apps@itpp.dev",
"website": "https://it-projects.info",
"category": "... | 31.222222 | 55 | 0.576512 | {
"name": "Clear User Access rights",
"summary": """Useful tool to reset user rights""",
"version": "12.0.1.1.0",
"author": "IT-Projects LLC, Ivan Yelizariev",
"license": "Other OSI approved licence", # MIT
"support": "apps@itpp.dev",
"website": "https://it-projects.info",
"category": "... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
bfdc3954b8f13c5db07d0acdaf7b15ded19dcb8f | 1,146 | py | Python | RobotCode/GUI/main.py | rpellumbi/ECE-3400-Team15 | a693957c154af7e31f6af82592a670d2f9d6bcc9 | [
"MIT"
] | null | null | null | RobotCode/GUI/main.py | rpellumbi/ECE-3400-Team15 | a693957c154af7e31f6af82592a670d2f9d6bcc9 | [
"MIT"
] | null | null | null | RobotCode/GUI/main.py | rpellumbi/ECE-3400-Team15 | a693957c154af7e31f6af82592a670d2f9d6bcc9 | [
"MIT"
] | null | null | null | import serial, argparse
from gui.controller import Controller
if __name__ == '__main__':
parser = argparse.ArgumentParser()
# Arduino connecton configuration
parser.add_argument('port', type=str, default='', help='Where to find the Arduino.')
parser.add_argument('--baudrate', type=int, default=9600, help='Baud... | 42.444444 | 103 | 0.696335 | import serial, argparse
from gui.controller import Controller
if __name__ == '__main__':
parser = argparse.ArgumentParser()
# Arduino connecton configuration
parser.add_argument('port', type=str, default='', help='Where to find the Arduino.')
parser.add_argument('--baudrate', type=int, default=9600, help='Baud... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
1a58fb1dda24fcd5cb4bb49896853e34617cc8cf | 787 | py | Python | src/fuckbot/eightball.py | Zer0-One/fuckbot | 02f5a112988e25a9f04a9a941a55f11cf51c3d8f | [
"BSD-2-Clause"
] | null | null | null | src/fuckbot/eightball.py | Zer0-One/fuckbot | 02f5a112988e25a9f04a9a941a55f11cf51c3d8f | [
"BSD-2-Clause"
] | null | null | null | src/fuckbot/eightball.py | Zer0-One/fuckbot | 02f5a112988e25a9f04a9a941a55f11cf51c3d8f | [
"BSD-2-Clause"
] | 1 | 2022-01-24T21:20:43.000Z | 2022-01-24T21:20:43.000Z |
ANSWERS = [
"of course not you idiot",
"sure, why not",
"do i look like an oracle to you?",
"yes, obviously",
"no",
"yes",
"literally kys",
"absolutely haram",
"idk, probably",
"is grass green? is the sky blue? is taiwan numbah wan?"
]
| 21.27027 | 60 | 0.550191 | import random
ANSWERS = [
"of course not you idiot",
"sure, why not",
"do i look like an oracle to you?",
"yes, obviously",
"no",
"yes",
"literally kys",
"absolutely haram",
"idk, probably",
"is grass green? is the sky blue? is taiwan numbah wan?"
]
def is_question(msg):
m ... | 0 | 0 | 0 | 0 | 0 | 450 | 0 | -8 | 68 |
132f3bc069a5a17eb3737ecc921bd6e99c559c42 | 15,775 | py | Python | roles/validate-tempest/files/tempestmail/tests/test_tempestmail.py | IgorBMSTU/tripleo-quickstart-extras | 485f2a398b972ea8d91c99eb9c3c7f7a2b9abb14 | [
"Apache-2.0"
] | 3 | 2018-09-05T08:34:05.000Z | 2019-09-26T19:01:11.000Z | roles/validate-tempest/files/tempestmail/tests/test_tempestmail.py | IgorBMSTU/tripleo-quickstart-extras | 485f2a398b972ea8d91c99eb9c3c7f7a2b9abb14 | [
"Apache-2.0"
] | 15 | 2018-10-10T17:53:42.000Z | 2021-03-31T07:55:08.000Z | roles/validate-tempest/files/tempestmail/tests/test_tempestmail.py | IgorBMSTU/tripleo-quickstart-extras | 485f2a398b972ea8d91c99eb9c3c7f7a2b9abb14 | [
"Apache-2.0"
] | 4 | 2019-01-03T21:34:34.000Z | 2019-10-04T15:20:49.000Z | # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the... | 44.43662 | 123 | 0.581933 | # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the... | 0 | 3,896 | 0 | 10,860 | 0 | 0 | 0 | -7 | 223 |
708da950522d98ebe82a8527d2ea39185351f89c | 473 | py | Python | src/utils/scripts/setRelay.py | wooWoow/koa2-mysql-framework | 0a63843576b0307ccdb5f5ed64a88f7cb9e32291 | [
"MIT"
] | null | null | null | src/utils/scripts/setRelay.py | wooWoow/koa2-mysql-framework | 0a63843576b0307ccdb5f5ed64a88f7cb9e32291 | [
"MIT"
] | null | null | null | src/utils/scripts/setRelay.py | wooWoow/koa2-mysql-framework | 0a63843576b0307ccdb5f5ed64a88f7cb9e32291 | [
"MIT"
] | null | null | null | # coding=utf-8
import RPi.GPIO as GPIO #RPi.GPIOGPIO
import sys
GPIO.setmode(GPIO.BOARD) #GPIO
print(len(sys.argv))
if (len(sys.argv) == 3):
param1 = 1 if sys.argv[1].lower() == 'false' else 0
param2 = 1 if sys.argv[2].lower() == 'false' else 0
GPIO.setup(31, GPIO.OUT) #GPIO
GPIO.setup(33, GPIO.OUT) #G... | 27.823529 | 59 | 0.668076 | # coding=utf-8
import RPi.GPIO as GPIO #引入RPi.GPIO模块,并实例化为GPIO,简化后面的模块调用
import time #引入time模块
import sys
GPIO.setmode(GPIO.BOARD) #定义GPIO编码方式
print(len(sys.argv))
if (len(sys.argv) == 3):
param1 = 1 if sys.argv[1].lower() == 'false' else 0
param2 = 1 if sys.argv[2].lower() == 'false' else 0
GP... | 150 | 0 | 0 | 0 | 0 | 0 | 0 | -10 | 43 |
9692dc8ae7941f96d6737b187a6177dca31f2a9d | 1,981 | py | Python | preprocessings.py | diningphilosophers5/Attendance-System-II | a26f5556e16376ad0c40d02fb4864bdede313bad | [
"MIT"
] | null | null | null | preprocessings.py | diningphilosophers5/Attendance-System-II | a26f5556e16376ad0c40d02fb4864bdede313bad | [
"MIT"
] | null | null | null | preprocessings.py | diningphilosophers5/Attendance-System-II | a26f5556e16376ad0c40d02fb4864bdede313bad | [
"MIT"
] | null | null | null | import os
import openface
fileDir = os.path.dirname(os.path.realpath(__file__))
modelDir = os.path.join(fileDir, '.', 'models')
dlibModelDir = os.path.join(modelDir, 'dlib')
openfaceModelDir = os.path.join(modelDir, 'openface')
| 30.476923 | 99 | 0.654215 | import argparse
import cv2
import numpy as np
import os
import random
import shutil
import openface
import openface.helper
from openface.data import iterImgs
fileDir = os.path.dirname(os.path.realpath(__file__))
modelDir = os.path.join(fileDir, '.', 'models')
dlibModelDir = os.path.join(modelDir, 'dlib')
openfaceModel... | 0 | 0 | 0 | 0 | 0 | 1,549 | 0 | -22 | 223 |
e04c45c0ce61a4e19d0552a4783620f7e54a2967 | 1,154 | py | Python | lambdata_phatdeluxe/df_utils.py | Phatdeluxe/lambdata_unit3 | 1e95e8500556787622448ac7ca24ab968db98ae9 | [
"MIT"
] | null | null | null | lambdata_phatdeluxe/df_utils.py | Phatdeluxe/lambdata_unit3 | 1e95e8500556787622448ac7ca24ab968db98ae9 | [
"MIT"
] | 3 | 2020-03-31T09:22:59.000Z | 2021-06-02T00:50:59.000Z | lambdata_phatdeluxe/df_utils.py | Phatdeluxe/lambdata_unit3 | 1e95e8500556787622448ac7ca24ab968db98ae9 | [
"MIT"
] | null | null | null | """
utility functions for working with DataFrames
"""
import pandas as pd
def add_to_df(to_series, name, df):
"""
Takes a list and adds it to a dataframe as a new columns
"""
new_col = pd.Series(to_series)
df[name] = new_col
| 26.837209 | 79 | 0.601386 | """
utility functions for working with DataFrames
"""
import pandas as pd
from sklearn.model_selection import train_test_split
class Data:
"""
For use with dataframes and the many things you want to do to them
"""
def __init__(self, df):
self.df = df
def check_null(self):
"""
... | 0 | 0 | 0 | 829 | 0 | 0 | 0 | 31 | 45 |
5da0193f9398e22f438f85011b08e4509d8a7d9d | 17,665 | py | Python | pelicun/auto.py | kuanshi/pelicun | fd89bb13a337faba61247f7ba1346baa25c33d96 | [
"BSD-3-Clause"
] | 20 | 2019-03-01T21:51:15.000Z | 2022-02-25T11:51:13.000Z | pelicun/auto.py | kuanshi/pelicun | fd89bb13a337faba61247f7ba1346baa25c33d96 | [
"BSD-3-Clause"
] | 7 | 2018-12-04T18:55:39.000Z | 2021-09-26T00:20:34.000Z | pelicun/auto.py | kuanshi/pelicun | fd89bb13a337faba61247f7ba1346baa25c33d96 | [
"BSD-3-Clause"
] | 14 | 2018-10-26T21:48:44.000Z | 2022-02-28T01:53:40.000Z | # -*- coding: utf-8 -*-
#
# Copyright (c) 2018 Leland Stanford Junior University
# Copyright (c) 2018 The Regents of the University of California
#
# This file is part of pelicun.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions ... | 34.300971 | 105 | 0.441891 | # -*- coding: utf-8 -*-
#
# Copyright (c) 2018 Leland Stanford Junior University
# Copyright (c) 2018 The Regents of the University of California
#
# This file is part of pelicun.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions ... | 2 | 0 | 0 | 0 | 0 | 1,357 | 0 | -2 | 46 |
7c9f99c50114d97b564e8565ee1149e9919f9ee9 | 748 | py | Python | test/db.py | zsffq999/helloworld | aba6b4bcbae496766bf371681fe126d11051d40b | [
"Apache-2.0"
] | null | null | null | test/db.py | zsffq999/helloworld | aba6b4bcbae496766bf371681fe126d11051d40b | [
"Apache-2.0"
] | null | null | null | test/db.py | zsffq999/helloworld | aba6b4bcbae496766bf371681fe126d11051d40b | [
"Apache-2.0"
] | null | null | null | # -*- coding:utf-8 -*-
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
Base = declarative_base()
engine = create_engine('mysql+pymysql://macd:macd@localhost/test')
User.metadata.create_all(engine)
Session = session... | 22.666667 | 74 | 0.677807 | # -*- coding:utf-8 -*-
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy import Column, Integer, String, ForeignKey, create_engine
from sqlalchemy.orm import sessionmaker
Base = declarative_base()
class User(Base):
__tablename__ = 'user'
def __init__(self, name):
... | 0 | 0 | 0 | 230 | 0 | 0 | 0 | 37 | 25 |
1c5e8a4827bffafcc15a78439f8ca216f768e5de | 844 | py | Python | facts.d/get_extensions_details.py | akondasif/ZendServerPuppet | e165ebe23c70641334c58d46d899f059a99b252e | [
"Apache-2.0"
] | 6 | 2015-03-18T11:19:43.000Z | 2020-03-24T05:31:30.000Z | facts.d/get_extensions_details.py | akondasif/ZendServerPuppet | e165ebe23c70641334c58d46d899f059a99b252e | [
"Apache-2.0"
] | 56 | 2015-02-23T07:03:59.000Z | 2022-03-22T22:00:33.000Z | facts.d/get_extensions_details.py | akondasif/ZendServerPuppet | e165ebe23c70641334c58d46d899f059a99b252e | [
"Apache-2.0"
] | 18 | 2015-02-19T20:06:24.000Z | 2022-02-22T08:08:18.000Z | #!/usr/bin/python
import json
import os.path
import re
import subprocess
zs_api_config_file = '/.zsapi.ini'
zs_api_target = 'localadmin'
if os.path.isfile("/usr/local/zend/bin/zs-client.sh"):
extensions_details = subprocess.check_output(["/usr/local/zend/bin/zs-client.sh", "configurationExtensionsList", "--target... | 31.259259 | 162 | 0.701422 | #!/usr/bin/python
import json
import os.path
import re
import subprocess
zs_api_config_file = '/.zsapi.ini'
zs_api_target = 'localadmin'
if os.path.isfile("/usr/local/zend/bin/zs-client.sh"):
extensions_details = subprocess.check_output(["/usr/local/zend/bin/zs-client.sh", "configurationExtensionsList", "--target... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
22355443f41286a7404b51bd88925041c91ec650 | 3,378 | py | Python | tensorflow/python/tpu/tests/tpu_embedding_v2_hd_invalid_input_test.py | Stevanus-Christian/tensorflow | d44afcf5ca16c5d704c66f891b99eac804e7cd14 | [
"Apache-2.0"
] | 3 | 2022-03-09T01:39:56.000Z | 2022-03-30T23:17:58.000Z | tensorflow/python/tpu/tests/tpu_embedding_v2_hd_invalid_input_test.py | Stevanus-Christian/tensorflow | d44afcf5ca16c5d704c66f891b99eac804e7cd14 | [
"Apache-2.0"
] | 1 | 2020-08-01T05:40:12.000Z | 2020-08-01T05:40:12.000Z | tensorflow/python/tpu/tests/tpu_embedding_v2_hd_invalid_input_test.py | Stevanus-Christian/tensorflow | d44afcf5ca16c5d704c66f891b99eac804e7cd14 | [
"Apache-2.0"
] | 1 | 2022-03-22T00:45:15.000Z | 2022-03-22T00:45:15.000Z | # Copyright 2020 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 40.214286 | 80 | 0.721433 | # Copyright 2020 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 0 | 174 | 0 | 2,036 | 0 | 0 | 0 | 146 | 111 |
a6799c79a8ee7856f473650d48d520d46381fe53 | 1,211 | py | Python | utils/errors.py | thatoneolib/senko | 686d768f8bc0c69a874dba180abb85049ff473b9 | [
"MIT"
] | null | null | null | utils/errors.py | thatoneolib/senko | 686d768f8bc0c69a874dba180abb85049ff473b9 | [
"MIT"
] | null | null | null | utils/errors.py | thatoneolib/senko | 686d768f8bc0c69a874dba180abb85049ff473b9 | [
"MIT"
] | null | null | null | __all__ = ("QuietExit", "EmbedExit")
| 25.229167 | 81 | 0.642444 | __all__ = ("QuietExit", "EmbedExit")
class QuietExit(Exception):
"""
An exception that is silently ignored by its error handler added
in :ref:`cogs_error_handlers`.
The primary purpose of this class is to allow a command to be exited
from within a nested call without having to propagate return va... | 0 | 0 | 0 | 1,126 | 0 | 0 | 0 | 0 | 46 |
255158596cc8b558d83ff8ae233bca9480a6d9b2 | 1,012 | py | Python | test2/test_phb_ecn.py | sambhu025/Gihub_Actions_and_pyTest | 0eb076cf88b87567fad1b95d064564fc25179eda | [
"MIT"
] | null | null | null | test2/test_phb_ecn.py | sambhu025/Gihub_Actions_and_pyTest | 0eb076cf88b87567fad1b95d064564fc25179eda | [
"MIT"
] | null | null | null | test2/test_phb_ecn.py | sambhu025/Gihub_Actions_and_pyTest | 0eb076cf88b87567fad1b95d064564fc25179eda | [
"MIT"
] | null | null | null | import pytest
from abstract_open_traffic_generator.config import Config
def test_phb_ecn(serializer, api, tx_port, rx_port):
"""
This will test that phb and ecn are set on an ipv4 header
"""
port_endpoint = PortTxRx(tx_port_name=tx_port.name,
rx_port_name=rx_port.name)
... | 37.481481 | 72 | 0.6917 | import pytest
from abstract_open_traffic_generator.flow import *
from abstract_open_traffic_generator.flow_ipv4 import *
from abstract_open_traffic_generator.config import Config
from abstract_open_traffic_generator.control import *
def test_phb_ecn(serializer, api, tx_port, rx_port):
"""
This will test that ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 95 | 66 |
0897abad274eed1af347739ba694289f0926177f | 366 | py | Python | tests/index.py | ankingcodes/CP-CLI | 909cc1c2a0f651d0ed9bd0cff13b70e9b213ebd3 | [
"MIT"
] | 30 | 2020-07-03T15:59:17.000Z | 2021-08-30T05:51:17.000Z | tests/index.py | ankingcodes/CP-CLI | 909cc1c2a0f651d0ed9bd0cff13b70e9b213ebd3 | [
"MIT"
] | 83 | 2020-01-29T17:20:44.000Z | 2021-09-15T12:49:01.000Z | tests/index.py | ankingcodes/CP-CLI | 909cc1c2a0f651d0ed9bd0cff13b70e9b213ebd3 | [
"MIT"
] | 30 | 2020-11-26T07:52:57.000Z | 2021-09-19T06:32:53.000Z | import codemoninitdir
if __name__ == "__main__":
success, failed = 0, 0
# test 1
print("Running test 'Codemon init dir':")
if codemoninitdir.codemoninitdir() == 0: success += 1
else: failed += 1
# print test results
print("***** Test results *****")
print("Total: ", success + failed)
print("Succe... | 22.875 | 55 | 0.625683 | import codemoninitdir
if __name__ == "__main__":
success, failed = 0, 0
# test 1
print("Running test 'Codemon init dir':")
if codemoninitdir.codemoninitdir() == 0: success += 1
else: failed += 1
# print test results
print("***** Test results *****")
print("Total: ", success + failed)
print("Succe... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
708084b1ee1685f67a0b6c5fade84fa298134490 | 2,439 | py | Python | eval.py | CryptoSalamander/DeepFake-Detection | f3b1c95ce1955a4c203a9f3d1279c5fbade66684 | [
"MIT"
] | null | null | null | eval.py | CryptoSalamander/DeepFake-Detection | f3b1c95ce1955a4c203a9f3d1279c5fbade66684 | [
"MIT"
] | null | null | null | eval.py | CryptoSalamander/DeepFake-Detection | f3b1c95ce1955a4c203a9f3d1279c5fbade66684 | [
"MIT"
] | null | null | null | import argparse
import json
import os
import csv
from glob import glob
from pathlib import Path
from sklearn.metrics import log_loss
total = 0
correct = 0
true_positive = 0
true_negative = 0
false_positive = 0
false_negative = 0
if __name__=="__main__":
parser = argparse.ArgumentParser("Evaluate Models")
arg ... | 38.109375 | 93 | 0.551866 | import argparse
import json
import os
import csv
import math
import numpy as np
from glob import glob
from pathlib import Path
from sklearn.metrics import log_loss
total = 0
correct = 0
true_positive = 0
true_negative = 0
false_positive = 0
false_negative = 0
if __name__=="__main__":
parser = argparse.ArgumentPar... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -13 | 44 |
fe09f275fc79fd3b33936f581aa4966b6dace6f3 | 781 | py | Python | scripts/anime_heads_data.py | cwza/deep_t2i | 22877fdd28ad407984ddc3bc4d57109c54c22fc0 | [
"Apache-2.0"
] | null | null | null | scripts/anime_heads_data.py | cwza/deep_t2i | 22877fdd28ad407984ddc3bc4d57109c54c22fc0 | [
"Apache-2.0"
] | null | null | null | scripts/anime_heads_data.py | cwza/deep_t2i | 22877fdd28ad407984ddc3bc4d57109c54c22fc0 | [
"Apache-2.0"
] | 1 | 2020-11-30T06:11:02.000Z | 2020-11-30T06:11:02.000Z | import os
import argparse
from pathlib import Path
parser = argparse.ArgumentParser(description='')
ori_data_dir = '../data/full_data'
'''
data_dir -
tmp -
imgs
tags.csv
'''
if __name__ == "__main__":
parser.add_argument('--data_dir', dest='data_dir', help='Please specify an empty fold... | 30.038462 | 137 | 0.65557 | import os
import argparse
from pathlib import Path
parser = argparse.ArgumentParser(description='')
ori_data_dir = '../data/full_data'
'''
data_dir -
tmp -
imgs
tags.csv
'''
if __name__ == "__main__":
parser.add_argument('--data_dir', dest='data_dir', help='Please specify an empty fold... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
30908500369f1530b583b67f3ffd12579e77fe00 | 697 | py | Python | setup.py | lalisalala/Music | 8a04bab596ca1853650952b4772eb4a8ccd17c5a | [
"MIT"
] | 1 | 2022-02-07T06:39:02.000Z | 2022-02-07T06:39:02.000Z | setup.py | lalisalala/Music | 8a04bab596ca1853650952b4772eb4a8ccd17c5a | [
"MIT"
] | null | null | null | setup.py | lalisalala/Music | 8a04bab596ca1853650952b4772eb4a8ccd17c5a | [
"MIT"
] | null | null | null | import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name="lisenta",
version="0.0.1",
author="Lisa-Yao Gan",
author_email="ga27bil@mytum.de",
description="A fun little program that lets you transcribe and generate piano music",
long_descriptio... | 31.681818 | 89 | 0.66858 | import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name="lisenta",
version="0.0.1",
author="Lisa-Yao Gan",
author_email="ga27bil@mytum.de",
description="A fun little program that lets you transcribe and generate piano music",
long_descriptio... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
80b1941ce1329fbf78c9da892dd397aabb31c149 | 8,121 | py | Python | debias/make_data.py | fengtony686/heckman_debias_model | 298b32e8c1bfe5fb22216861c6901309465c7b35 | [
"MIT"
] | null | null | null | debias/make_data.py | fengtony686/heckman_debias_model | 298b32e8c1bfe5fb22216861c6901309465c7b35 | [
"MIT"
] | null | null | null | debias/make_data.py | fengtony686/heckman_debias_model | 298b32e8c1bfe5fb22216861c6901309465c7b35 | [
"MIT"
] | null | null | null | import io
import os
import random
import numpy as np
import pandas as pd
from keras_preprocessing.sequence import pad_sequences
from keras_preprocessing.text import Tokenizer
from scipy.sparse import coo_matrix
from sklearn import preprocessing
from sklearn.preprocessing import scale
#################################... | 38.306604 | 104 | 0.6562 | import io
import os
import re
import keras
import random
import numpy as np
import pandas as pd
from keras_preprocessing.sequence import pad_sequences
from keras_preprocessing.text import Tokenizer
from scipy.sparse import coo_matrix
from sklearn import preprocessing
from sklearn.preprocessing import scale
##########... | 0 | 0 | 0 | 0 | 0 | 106 | 0 | -21 | 67 |
b560bec3a92f50570551226c592eaf431c50d9ec | 129 | py | Python | scitbx/linalg/ext.py | rimmartin/cctbx_project | 644090f9432d9afc22cfb542fc3ab78ca8e15e5d | [
"BSD-3-Clause-LBNL"
] | null | null | null | scitbx/linalg/ext.py | rimmartin/cctbx_project | 644090f9432d9afc22cfb542fc3ab78ca8e15e5d | [
"BSD-3-Clause-LBNL"
] | null | null | null | scitbx/linalg/ext.py | rimmartin/cctbx_project | 644090f9432d9afc22cfb542fc3ab78ca8e15e5d | [
"BSD-3-Clause-LBNL"
] | null | null | null | from __future__ import division
import boost.python
boost.python.import_ext("scitbx_linalg_ext")
| 25.8 | 44 | 0.852713 | from __future__ import division
import boost.python
boost.python.import_ext("scitbx_linalg_ext")
from scitbx_linalg_ext import *
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 22 |
22fde268235b9c592bd1cda429f564e9783b91e2 | 5,809 | py | Python | algos/ddpg/ddpg.py | DensoITLab/spinningup_in_pytorch | 612d8c4c6593c8c5ecb5a939bf43085daac9e552 | [
"MIT"
] | 11 | 2018-12-19T14:44:35.000Z | 2020-10-02T05:39:41.000Z | algos/ddpg/ddpg.py | DensoITLab/spinningup_in_pytorch | 612d8c4c6593c8c5ecb5a939bf43085daac9e552 | [
"MIT"
] | null | null | null | algos/ddpg/ddpg.py | DensoITLab/spinningup_in_pytorch | 612d8c4c6593c8c5ecb5a939bf43085daac9e552 | [
"MIT"
] | 1 | 2018-12-30T08:37:51.000Z | 2018-12-30T08:37:51.000Z | import torch.nn as nn
import torch.optim as optim
from core import actor_critic as ac
if __name__ == '__main__':
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('--env', type=str, default='Pendulum-v0')
parser.add_argument('--hid', type=int, default=300)
parser.add_argument(... | 37 | 110 | 0.620072 | import torch
import torch.nn as nn
import torch.optim as optim
import torch.nn.functional as F
import gym, time
import numpy as np
from spinup.utils.logx import EpochLogger
from core import actor_critic as ac
class ReplayBuffer:
def __init__(self, size):
self.size, self.max_size = 0, size
self.ob... | 0 | 0 | 0 | 1,196 | 0 | 3,533 | 0 | 13 | 158 |
8c6f1c937eb970444aa15d0a570cc030109ae981 | 713 | py | Python | test/test_k3mime.py | WRY-learning/k3mime | ce75632ce0454b563aad505f2474b8f2c42b74ec | [
"MIT"
] | 1 | 2021-09-09T06:43:59.000Z | 2021-09-09T06:43:59.000Z | test/test_k3mime.py | WRY-learning/k3mime | ce75632ce0454b563aad505f2474b8f2c42b74ec | [
"MIT"
] | 3 | 2021-09-01T14:26:15.000Z | 2022-03-23T07:00:07.000Z | test/test_k3mime.py | WRY-learning/k3mime | ce75632ce0454b563aad505f2474b8f2c42b74ec | [
"MIT"
] | 3 | 2021-08-24T03:17:53.000Z | 2021-08-31T12:17:18.000Z | import k3ut
dd = k3ut.dd
| 24.586207 | 73 | 0.565217 | import unittest
import k3mime
import k3ut
dd = k3ut.dd
class TestMime(unittest.TestCase):
def test_get_by_filename(self):
cases = (
('', 'application/octet-stream'),
('123', 'application/octet-stream'),
('file.123', 'application/vnd.lotus-1-2-3'),
('file.... | 0 | 0 | 0 | 631 | 0 | 0 | 0 | -14 | 68 |
99a6cff4201c5443d058ff9feb61047d8cb14fcf | 45 | py | Python | PythonSolutions/PythonEvaluation.py | MohamedMetwalli5/HackerRank_solutions | be13ba740214a966d41e6be1d643297c75499e24 | [
"Apache-2.0"
] | 37 | 2021-04-04T20:08:00.000Z | 2022-01-05T19:42:42.000Z | PythonSolutions/PythonEvaluation.py | ahmedsaleh1998/HackerRank_solutions | be13ba740214a966d41e6be1d643297c75499e24 | [
"Apache-2.0"
] | null | null | null | PythonSolutions/PythonEvaluation.py | ahmedsaleh1998/HackerRank_solutions | be13ba740214a966d41e6be1d643297c75499e24 | [
"Apache-2.0"
] | 15 | 2021-04-04T20:12:47.000Z | 2022-01-08T23:34:16.000Z | s = input().split("print")[1]
print(eval(s))
| 15 | 29 | 0.6 | s = input().split("print")[1]
print(eval(s))
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
8bec13719d03783afc53a55d900ffcaa42bcfe7e | 3,169 | py | Python | kuku/tests/test_values.py | xarg/kuku | bbd906347929b768753d88ec26cf579ec17f2e0a | [
"Apache-2.0"
] | 42 | 2018-09-27T23:11:27.000Z | 2022-02-27T19:23:16.000Z | kuku/tests/test_values.py | xarg/kuku | bbd906347929b768753d88ec26cf579ec17f2e0a | [
"Apache-2.0"
] | 3 | 2018-10-12T00:56:27.000Z | 2020-01-08T00:40:58.000Z | kuku/tests/test_values.py | xarg/kuku | bbd906347929b768753d88ec26cf579ec17f2e0a | [
"Apache-2.0"
] | 8 | 2018-09-27T23:44:22.000Z | 2021-04-20T04:06:57.000Z | import os
HERE = os.path.abspath(os.path.dirname(__file__))
VALUES_STAGING_FILE = os.path.join(HERE, "fixtures/values/values-staging.yaml")
VALUES_PRODUCTION_FILE = os.path.join(HERE, "fixtures/values/values-production.yaml")
| 29.342593 | 85 | 0.580309 | import os
import pytest
import yaml
from kuku.types import Context
from kuku.values import resolve
HERE = os.path.abspath(os.path.dirname(__file__))
VALUES_STAGING_FILE = os.path.join(HERE, "fixtures/values/values-staging.yaml")
VALUES_PRODUCTION_FILE = os.path.join(HERE, "fixtures/values/values-production.yaml")
... | 0 | 1,073 | 0 | 0 | 0 | 1,586 | 0 | 1 | 274 |
e1b75e2806d583dd24cf0e084c6039d73059ce55 | 720 | py | Python | cronmap/__init__.py | zbuc/cronmap | 01960e1101138d719294dedceecab6b05db00390 | [
"MIT"
] | null | null | null | cronmap/__init__.py | zbuc/cronmap | 01960e1101138d719294dedceecab6b05db00390 | [
"MIT"
] | 15 | 2016-02-20T04:26:20.000Z | 2016-02-21T19:00:20.000Z | cronmap/__init__.py | zbuc/cronmap | 01960e1101138d719294dedceecab6b05db00390 | [
"MIT"
] | null | null | null | from __future__ import absolute_import
| 27.692308 | 76 | 0.576389 | from __future__ import absolute_import
import sys
import time
import datetime
import subprocess
class Cronmap(object):
def __init__(self, options):
# self.ips = args.ips
# if args.nmap_args:
# self.nmap_args = [a[0] for a in args.nmap_args]
# else:
# self.nmap_args... | 0 | 0 | 0 | 599 | 0 | 0 | 0 | -31 | 112 |
ebdcd4d34a28490c58f969c001cf7eb536f960b7 | 774 | py | Python | Minor Projects/live_stream.py | chandthash/nppy | 228116d4efa6d28a9cdab245c6c8045844e96211 | [
"MIT"
] | null | null | null | Minor Projects/live_stream.py | chandthash/nppy | 228116d4efa6d28a9cdab245c6c8045844e96211 | [
"MIT"
] | null | null | null | Minor Projects/live_stream.py | chandthash/nppy | 228116d4efa6d28a9cdab245c6c8045844e96211 | [
"MIT"
] | null | null | null | try:
import cv2
except (NameError, ImportError, ModuleNotFoundError):
print('cv2 package installed not found')
def live_stream():
'''Stream your live video'''
cam = cv2.VideoCapture(cv2.CAP_DSHOW)
while True:
ret, frame = cam.read() # Getting frame
frame = cv2.fli... | 25.8 | 70 | 0.614987 | try:
import cv2
except (NameError, ImportError, ModuleNotFoundError):
print('cv2 package installed not found')
def live_stream():
'''Stream your live video'''
cam = cv2.VideoCapture(cv2.CAP_DSHOW)
while True:
ret, frame = cam.read() # Getting frame
frame = cv2.fli... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
a03d3bb0f01e5d09c37a1f3391b77f3bc777d551 | 325 | py | Python | georiviere/river/migrations/0010_remove_stream_width.py | georiviere/Georiviere-admin | 4ac532f84a7a8fef3e01384fad63e8e288d397c0 | [
"BSD-2-Clause"
] | 7 | 2021-11-05T14:52:25.000Z | 2022-03-24T21:18:02.000Z | georiviere/river/migrations/0010_remove_stream_width.py | georiviere/Georiviere-admin | 4ac532f84a7a8fef3e01384fad63e8e288d397c0 | [
"BSD-2-Clause"
] | 57 | 2021-11-02T10:27:34.000Z | 2022-03-31T14:08:32.000Z | georiviere/river/migrations/0010_remove_stream_width.py | georiviere/Georiviere-admin | 4ac532f84a7a8fef3e01384fad63e8e288d397c0 | [
"BSD-2-Clause"
] | 1 | 2021-12-05T14:55:42.000Z | 2021-12-05T14:55:42.000Z | # Generated by Django 3.1.6 on 2021-09-01 10:43
| 18.055556 | 47 | 0.587692 | # Generated by Django 3.1.6 on 2021-09-01 10:43
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('river', '0009_auto_20210421_1407'),
]
operations = [
migrations.RemoveField(
model_name='stream',
name='width',
),
... | 0 | 0 | 0 | 219 | 0 | 0 | 0 | 11 | 46 |
21ae507ab3e37b53d6b415a10fdf586676908328 | 1,016 | py | Python | scripts/Analysis/OMIT/g0_calculation.py | sourav-majumder/qtlab | 96b2a127b1df7b45622c90229bd5ef8a4083614e | [
"MIT"
] | null | null | null | scripts/Analysis/OMIT/g0_calculation.py | sourav-majumder/qtlab | 96b2a127b1df7b45622c90229bd5ef8a4083614e | [
"MIT"
] | null | null | null | scripts/Analysis/OMIT/g0_calculation.py | sourav-majumder/qtlab | 96b2a127b1df7b45622c90229bd5ef8a4083614e | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
import numpy as np
from scipy.constants import pi
#plt.style.use('presentation.mplstyle')
attenuation = 52 #dB
k = 2*pi*513e3
ke = 0.7*k
w0 = 2*pi*6.310792e9
#######################
w = w0 - (2*pi*5.2656*1e6)
pth = 'D:\\data\\2018-09-08\\12-06-01_omit_pump_pw_sw_mode1\\... | 24.190476 | 71 | 0.634843 | import matplotlib.pyplot as plt
import numpy as np
from scipy.constants import hbar, pi
from lmfit import Model, fit_report
#plt.style.use('presentation.mplstyle')
def photon(power):
p = 1e-3*10**(power/10.)
return (p*ke)/(hbar*w*((k/2)**2+(w-w0)**2))
def line(x, m, c):
return m*x + c
attenuation =... | 0 | 0 | 0 | 0 | 0 | 84 | 0 | 20 | 73 |
5faf0ea368494a182a4b6eb92a03ae4ee6a7d15a | 2,797 | py | Python | src/gimme_secrets/azure/decrypt_encrypt.py | tomarv2/gimme-secrets | ba8255671afcc0e6b684386b52b64f3986c42ef1 | [
"Apache-2.0"
] | null | null | null | src/gimme_secrets/azure/decrypt_encrypt.py | tomarv2/gimme-secrets | ba8255671afcc0e6b684386b52b64f3986c42ef1 | [
"Apache-2.0"
] | null | null | null | src/gimme_secrets/azure/decrypt_encrypt.py | tomarv2/gimme-secrets | ba8255671afcc0e6b684386b52b64f3986c42ef1 | [
"Apache-2.0"
] | null | null | null | import logging
logger = logging.getLogger(__name__)
get_secret = DecryptEncrypt()
| 46.616667 | 118 | 0.688237 | import logging
from azure.identity import DefaultAzureCredential
from azure.keyvault.keys import KeyClient
from azure.keyvault.keys.crypto import CryptographyClient, EncryptionAlgorithm
logger = logging.getLogger(__name__)
class DecryptEncrypt:
def __init__(self):
pass
def encrypt_secret(self, secret... | 0 | 0 | 0 | 2,518 | 0 | 0 | 0 | 105 | 89 |
0a216e03788bec536004842a6203d8d5c5839110 | 4,872 | py | Python | tsflex/features/logger.py | predict-idlab/tsflex | 73aae174ec292da7c1117f94a08b5ee14a57a17e | [
"MIT"
] | 138 | 2021-06-29T15:51:16.000Z | 2022-03-29T07:05:47.000Z | tsflex/features/logger.py | matdemeue/tsflex | 919c25c28ddbbb055425434852be0018329d5531 | [
"MIT"
] | 60 | 2021-06-24T16:28:50.000Z | 2022-03-28T14:52:24.000Z | tsflex/features/logger.py | matdemeue/tsflex | 919c25c28ddbbb055425434852be0018329d5531 | [
"MIT"
] | 11 | 2021-11-13T09:54:34.000Z | 2022-03-02T15:16:39.000Z | """Contains the used variables and functions to provide logging functionality.
See Also
--------
FeatureCollection: its `logging_file_path` of the `calculate` method.
"""
__author__ = "Jeroen Van Der Donckt"
import logging
import pandas as pd
import re
from ..utils.logging import logging_file_to_df, remove_inner_b... | 32.48 | 87 | 0.663793 | """Contains the used variables and functions to provide logging functionality.
See Also
--------
FeatureCollection: its `logging_file_path` of the `calculate` method.
"""
__author__ = "Jeroen Van Der Donckt"
import logging
import pandas as pd
import re
from ..utils.logging import logging_file_to_df, remove_inner_b... | 0 | 0 | 0 | 0 | 0 | 152 | 0 | 0 | 27 |
8ba917b5faeec47368ea3dc38ac2533f2c67148e | 4,317 | py | Python | src/mcookbook/exchanges/abc.py | s0undt3ch/mommas-cookbook | ccca526eee9241f12674cad8c1e1da1a900cef82 | [
"Apache-2.0"
] | 2 | 2022-01-02T23:47:32.000Z | 2022-01-07T11:14:15.000Z | src/mcookbook/exchanges/abc.py | UfSoft/mommas-cookbook | ccca526eee9241f12674cad8c1e1da1a900cef82 | [
"Apache-2.0"
] | 1 | 2022-01-17T12:47:37.000Z | 2022-01-17T12:47:37.000Z | src/mcookbook/exchanges/abc.py | s0undt3ch/mommas-cookbook | ccca526eee9241f12674cad8c1e1da1a900cef82 | [
"Apache-2.0"
] | 1 | 2022-01-10T18:49:36.000Z | 2022-01-10T18:49:36.000Z | """
Base exchange class implementation.
"""
from __future__ import annotations
import logging
log = logging.getLogger(__name__)
| 35.097561 | 100 | 0.624276 | """
Base exchange class implementation.
"""
from __future__ import annotations
import logging
import pprint
from typing import Any
import ccxt
from ccxt.async_support import Exchange as CCXTExchange
from pydantic import BaseModel
from pydantic import PrivateAttr
from mcookbook.config.live import LiveConfig
from mcoo... | 0 | 2,946 | 241 | 604 | 0 | 0 | 0 | 150 | 245 |
f1d06f11dfa6ba4ce17841c8e24ef727e4beae28 | 381 | py | Python | src/sailing_robot/src/sailing_robot/taskbase.py | sjdsm/sailing-robot | 15789066bb6dead147fc24d763ea384454588cb0 | [
"MIT"
] | 87 | 2016-02-04T08:44:00.000Z | 2022-03-19T19:53:48.000Z | src/sailing_robot/src/sailing_robot/taskbase.py | LaurieChen/sailing-robot | 840fb10d18026ea0f2ea546691c9bf958b8842d3 | [
"MIT"
] | 269 | 2016-01-29T08:19:59.000Z | 2020-02-13T12:33:26.000Z | src/sailing_robot/src/sailing_robot/taskbase.py | LaurieChen/sailing-robot | 840fb10d18026ea0f2ea546691c9bf958b8842d3 | [
"MIT"
] | 45 | 2016-02-11T22:59:53.000Z | 2020-12-10T02:58:50.000Z | """Base class for task classes.
This has almost no implementation; the debugging methods are injected by
tasks_ros. This allows us to test task classes outside ROS.
"""
| 21.166667 | 72 | 0.656168 | """Base class for task classes.
This has almost no implementation; the debugging methods are injected by
tasks_ros. This allows us to test task classes outside ROS.
"""
class TaskBase(object):
debug_topics = []
def debug_pub(self, topic, value):
pass
def log(self, level, msg, *values):
... | 0 | 0 | 0 | 188 | 0 | 0 | 0 | 0 | 23 |
13b2a9e16032f8c90217d064f8d76e49405125f7 | 8,150 | py | Python | src/backend/UserManager.py | PNBenfica/Tipsters | 499f1e32448353f59908c36df552a657217c946d | [
"Apache-2.0"
] | 2 | 2020-06-17T11:57:09.000Z | 2020-12-08T02:56:28.000Z | src/backend/UserManager.py | PNBenfica/Tipsters | 499f1e32448353f59908c36df552a657217c946d | [
"Apache-2.0"
] | null | null | null | src/backend/UserManager.py | PNBenfica/Tipsters | 499f1e32448353f59908c36df552a657217c946d | [
"Apache-2.0"
] | null | null | null | from __future__ import division
# user is an user object
| 34.978541 | 217 | 0.711043 | from __future__ import division
import endpoints
from google.appengine.api import taskqueue
from Crypto.Hash import SHA256
from google.appengine.ext import ndb
from domain import Bet, PostStatus
from models import User, UserForm, UserMiniForm, TrendsMessage, TrendUserMessage, RankingsMessage, UserRankingProfileMe... | 0 | 0 | 0 | 0 | 0 | 6,651 | 0 | 218 | 1,210 |
3de0a3de5d6dc93e7301e5fba2c9a67513c680f6 | 1,787 | py | Python | lib/surface/compute/groups/describe.py | bopopescu/SDK | e6d9aaee2456f706d1d86e8ec2a41d146e33550d | [
"Apache-2.0"
] | null | null | null | lib/surface/compute/groups/describe.py | bopopescu/SDK | e6d9aaee2456f706d1d86e8ec2a41d146e33550d | [
"Apache-2.0"
] | null | null | null | lib/surface/compute/groups/describe.py | bopopescu/SDK | e6d9aaee2456f706d1d86e8ec2a41d146e33550d | [
"Apache-2.0"
] | 1 | 2020-07-25T12:23:41.000Z | 2020-07-25T12:23:41.000Z | # Copyright 2015 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | 26.279412 | 74 | 0.706771 | # Copyright 2015 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | 0 | 298 | 0 | 643 | 0 | 0 | 0 | 34 | 45 |
96b76c01022d8b35cf13d18eef78a5f20afc3be9 | 1,398 | py | Python | adiumsh/utils.py | shichao-an/adium-sh | fc0fc20e12a4d787f21d40cba7c730755f1e17f3 | [
"BSD-2-Clause"
] | 1 | 2016-06-08T22:48:56.000Z | 2016-06-08T22:48:56.000Z | adiumsh/utils.py | shichao-an/adium-sh | fc0fc20e12a4d787f21d40cba7c730755f1e17f3 | [
"BSD-2-Clause"
] | null | null | null | adiumsh/utils.py | shichao-an/adium-sh | fc0fc20e12a4d787f21d40cba7c730755f1e17f3 | [
"BSD-2-Clause"
] | 1 | 2018-03-05T01:24:59.000Z | 2018-03-05T01:24:59.000Z | import os
try:
import configparser
except ImportError:
def get_old_entries(dirpath, at_least=5):
"""
Get a list of n least recently modified entries of dirpath except the most
recently modified entry if any
:param at_least: `dirpath` must contain at least `at_least` entries,
or retur... | 24.526316 | 78 | 0.674535 | import os
import psutil
try:
import configparser
except ImportError:
import ConfigParser as configparser
from xml.sax import saxutils
def is_process_running(process_name):
names = [proc.name() for proc in psutil.process_iter()]
return process_name in names
def get_process(process_name):
for proc... | 0 | 0 | 0 | 0 | 0 | 684 | 0 | 13 | 208 |
a4acd99a15bb009121ad4d4bc9c0d2c0cf480de4 | 1,288 | py | Python | backend/app/main.py | CyberDAS-Dev/VK_marketplace | 3272bcb45c88d8c43e96a4e727600f7f1d4c86a4 | [
"MIT"
] | null | null | null | backend/app/main.py | CyberDAS-Dev/VK_marketplace | 3272bcb45c88d8c43e96a4e727600f7f1d4c86a4 | [
"MIT"
] | 11 | 2021-10-10T16:30:22.000Z | 2022-01-21T07:59:36.000Z | backend/app/main.py | CyberDAS-Dev/VK_marketplace | 3272bcb45c88d8c43e96a4e727600f7f1d4c86a4 | [
"MIT"
] | null | null | null | import os
import uvicorn
from fastapi import FastAPI
from fastapi.staticfiles import StaticFiles
from starlette.middleware.cors import CORSMiddleware
from app.api.router import api_router
from app.core.config import settings
from app.core.logging import setup_logging
from app.middleware.logger import LoggerMiddleware... | 28 | 87 | 0.744565 | import os
import uvicorn
from fastapi import FastAPI
from fastapi.staticfiles import StaticFiles
from starlette.middleware.cors import CORSMiddleware
from app.api.router import api_router
from app.core.config import settings
from app.core.logging import setup_logging
from app.middleware.logger import LoggerMiddleware... | 62 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
04bb87d99a73200f29b0aff7955f8776acf369a8 | 902 | py | Python | day7.py | davidfpc/AoC2021 | b526e606dbf1cc59de4951a321aa9b98d04fde4c | [
"MIT"
] | null | null | null | day7.py | davidfpc/AoC2021 | b526e606dbf1cc59de4951a321aa9b98d04fde4c | [
"MIT"
] | null | null | null | day7.py | davidfpc/AoC2021 | b526e606dbf1cc59de4951a321aa9b98d04fde4c | [
"MIT"
] | null | null | null |
if __name__ == "__main__":
puzzle_input = read_input("day7.txt")
print(f"Part 1: {part1(puzzle_input)}")
print(f"Part 2: {part2(puzzle_input)}")
| 27.333333 | 54 | 0.568736 | def read_input(file_name: str) -> [int]:
with open("inputFiles/" + file_name, "r") as file:
lines = file.read().splitlines()[0].split(",")
return [int(i) for i in lines]
def part1(input_value: [int]):
min_fuel = -1
for i in range(max(input_value)):
fuel = 0
for fish in inpu... | 0 | 0 | 0 | 0 | 0 | 673 | 0 | 0 | 68 |
7175deae72a393a35d05f31b6a72f9c439d6637a | 823 | py | Python | setup.py | janushendersonassetallocation/loman | fc7cc939f92ad69d7b68aff35d70b8e9807911f4 | [
"BSD-3-Clause"
] | 48 | 2018-10-31T20:09:15.000Z | 2022-02-14T20:38:53.000Z | setup.py | janushendersonassetallocation/loman | fc7cc939f92ad69d7b68aff35d70b8e9807911f4 | [
"BSD-3-Clause"
] | 21 | 2017-04-07T02:41:28.000Z | 2018-01-24T15:59:51.000Z | setup.py | janushendersonassetallocation/loman | fc7cc939f92ad69d7b68aff35d70b8e9807911f4 | [
"BSD-3-Clause"
] | 3 | 2018-10-17T01:37:17.000Z | 2019-12-05T11:51:50.000Z | from setuptools import setup
setup(
name='loman',
version='0.3.0',
packages=['loman'],
url='https://github.com/janusassetallocation/loman',
license='BSD',
author='Ed Parcell',
author_email='edparcell@gmail.com',
description='Loman tracks state of computations, and the dependencies betwe... | 35.782609 | 131 | 0.634265 | from setuptools import setup
setup(
name='loman',
version='0.3.0',
packages=['loman'],
url='https://github.com/janusassetallocation/loman',
license='BSD',
author='Ed Parcell',
author_email='edparcell@gmail.com',
description='Loman tracks state of computations, and the dependencies betwe... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
793adde358f7abce99b0e2b29705fcb9b693e34e | 32,795 | py | Python | texar/modules/decoders/transformer_decoders.py | lunayach/texar-pytorch | ac3e334e491f524dd01654b07af030fa20c88b34 | [
"Apache-2.0"
] | null | null | null | texar/modules/decoders/transformer_decoders.py | lunayach/texar-pytorch | ac3e334e491f524dd01654b07af030fa20c88b34 | [
"Apache-2.0"
] | null | null | null | texar/modules/decoders/transformer_decoders.py | lunayach/texar-pytorch | ac3e334e491f524dd01654b07af030fa20c88b34 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 The Texar Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | 44.079301 | 80 | 0.596493 | # Copyright 2019 The Texar Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | 0 | 3,827 | 0 | 27,431 | 0 | 0 | 0 | 472 | 357 |
653819d97357ad6ffcdcd23f5c56d527b36ece6e | 142 | py | Python | shop/products/urls.py | ahmadreza-smdi/ms-shop | 65ba3f3061e2ac5c63115b08dadfe7d67f645fb6 | [
"MIT"
] | 6 | 2019-11-23T17:16:17.000Z | 2021-09-20T13:12:55.000Z | shop/products/urls.py | abdulkarimFallatah/ms-shop | 65ba3f3061e2ac5c63115b08dadfe7d67f645fb6 | [
"MIT"
] | 5 | 2021-04-08T22:00:07.000Z | 2022-02-10T12:38:25.000Z | shop/products/urls.py | abdulkarimFallatah/ms-shop | 65ba3f3061e2ac5c63115b08dadfe7d67f645fb6 | [
"MIT"
] | 2 | 2019-11-24T20:33:16.000Z | 2021-09-09T00:29:52.000Z | from django.conf.urls import url
from . import views
urlpatterns = [
url(r'buy.',views.buy_product),
url(r'',views.show_product),
]
| 15.777778 | 35 | 0.683099 | from django.conf.urls import url
from . import views
urlpatterns = [
url(r'buy.',views.buy_product),
url(r'',views.show_product),
]
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
76db92b5107a972a570bf69f2353586b52f75b43 | 24,883 | py | Python | desktop/libs/notebook/src/notebook/models.py | jubrad/hue | 51535fa06923d6c2fbe8ada47bf33793d938155e | [
"Apache-2.0"
] | null | null | null | desktop/libs/notebook/src/notebook/models.py | jubrad/hue | 51535fa06923d6c2fbe8ada47bf33793d938155e | [
"Apache-2.0"
] | null | null | null | desktop/libs/notebook/src/notebook/models.py | jubrad/hue | 51535fa06923d6c2fbe8ada47bf33793d938155e | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# Licensed to Cloudera, Inc. under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. Cloudera, Inc. licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you ma... | 32.740789 | 138 | 0.669252 | #!/usr/bin/env python
# Licensed to Cloudera, Inc. under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. Cloudera, Inc. licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you ma... | 0 | 4,838 | 0 | 830 | 0 | 11,644 | 0 | 234 | 753 |
90acaa027c2e9c18792577ff8f691e83a9427cb9 | 1,216 | py | Python | web/transiq/utils/migrations/0016_auto_20180428_1842.py | manibhushan05/transiq | 763fafb271ce07d13ac8ce575f2fee653cf39343 | [
"Apache-2.0"
] | null | null | null | web/transiq/utils/migrations/0016_auto_20180428_1842.py | manibhushan05/transiq | 763fafb271ce07d13ac8ce575f2fee653cf39343 | [
"Apache-2.0"
] | 14 | 2020-06-05T23:06:45.000Z | 2022-03-12T00:00:18.000Z | web/transiq/utils/migrations/0016_auto_20180428_1842.py | manibhushan05/transiq | 763fafb271ce07d13ac8ce575f2fee653cf39343 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.4 on 2018-04-28 18:42
from __future__ import unicode_literals
| 33.777778 | 142 | 0.619243 | # -*- coding: utf-8 -*-
# Generated by Django 1.11.4 on 2018-04-28 18:42
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('utils', '0015_auto_20180417_1922'),
]
operations = [
migrations.AddField(
... | 0 | 0 | 0 | 1,037 | 0 | 0 | 0 | 19 | 46 |
0cac4234f0d7957259cb72e1f74e4a810ff9766f | 13,001 | py | Python | tests/controller_mocking/test_node_group.py | Cray-HPE/cray-crus | 6643aa3eb3debe5cbe0088f6a30b7e56ca1b1f17 | [
"MIT"
] | null | null | null | tests/controller_mocking/test_node_group.py | Cray-HPE/cray-crus | 6643aa3eb3debe5cbe0088f6a30b7e56ca1b1f17 | [
"MIT"
] | 1 | 2022-03-02T21:06:21.000Z | 2022-03-04T17:32:14.000Z | tests/controller_mocking/test_node_group.py | Cray-HPE/cray-crus | 6643aa3eb3debe5cbe0088f6a30b7e56ca1b1f17 | [
"MIT"
] | null | null | null | #
# MIT License
#
# (C) Copyright 2019, 2021-2022 Hewlett Packard Enterprise Development LP
#
# 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... | 37.90379 | 78 | 0.683332 | #
# MIT License
#
# (C) Copyright 2019, 2021-2022 Hewlett Packard Enterprise Development LP
#
# 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... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
de99225d25d779b72e99d154c6f9d546ee0a3037 | 242 | py | Python | src/kvhelper/urls.py | The-New-Fork/api-juicychain | 9bee78a1ab5de53dc3a4284fa0f57c4edc746650 | [
"Apache-2.0"
] | null | null | null | src/kvhelper/urls.py | The-New-Fork/api-juicychain | 9bee78a1ab5de53dc3a4284fa0f57c4edc746650 | [
"Apache-2.0"
] | null | null | null | src/kvhelper/urls.py | The-New-Fork/api-juicychain | 9bee78a1ab5de53dc3a4284fa0f57c4edc746650 | [
"Apache-2.0"
] | null | null | null | from django.urls import path
from . import views
# from rest_framework import routers
# router = routers.DefaultRouter()
# router.register('getinfo', views.getinfo)
urlpatterns = [
path('kvupdate1', views.kvupdate1, name='kvupdate1')
]
| 22 | 56 | 0.743802 | from django.urls import path
from . import views
# from rest_framework import routers
# router = routers.DefaultRouter()
# router.register('getinfo', views.getinfo)
urlpatterns = [
path('kvupdate1', views.kvupdate1, name='kvupdate1')
]
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d0e982280a38a4e3f4d7f1da23db03fcff439104 | 1,181 | py | Python | cluster/scripts/n2v/predict.py | juglab/VoidSeg_cluster | 71339f9bdd6df9feb26fa197d5dfc390c371910c | [
"BSD-2-Clause"
] | 1 | 2020-03-12T14:00:15.000Z | 2020-03-12T14:00:15.000Z | cluster/scripts/n2v/predict.py | juglab/VoidSeg_cluster | 71339f9bdd6df9feb26fa197d5dfc390c371910c | [
"BSD-2-Clause"
] | null | null | null | cluster/scripts/n2v/predict.py | juglab/VoidSeg_cluster | 71339f9bdd6df9feb26fa197d5dfc390c371910c | [
"BSD-2-Clause"
] | null | null | null | #Imports
from n2v.models import CARE
import numpy as np
import json
from os.path import join
from skimage import io
with open('experiment.json', 'r') as f:
exp_params = json.load(f)
#Read training images and GT from StarVoid/dataset/...
test_files = np.load(exp_params["test_path"])
X = test_files['X_test']
tr... | 24.604167 | 100 | 0.711262 | #Imports
from n2v.models import Config, CARE
import numpy as np
from n2v.utils import plot_some, plot_history
from n2v.utils.n2v_utils import manipulate_val_data
import urllib
import os
import zipfile
import json
from os.path import join
from skimage import io
def normalize(img, mean, std):
zero_mean = img - mea... | 0 | 0 | 0 | 0 | 0 | 94 | 0 | 35 | 157 |
c6a42659ffbd81eeb22f230e66d6f72c1dd4db73 | 725 | py | Python | services/users/app/app.py | yuuta1999/microservice-with-flask | 6ad64341edb42c7f145aabc1e38e2619df75d444 | [
"MIT"
] | 1 | 2019-07-12T07:38:16.000Z | 2019-07-12T07:38:16.000Z | services/users/app/app.py | yuuta1999/microservice-with-flask | 6ad64341edb42c7f145aabc1e38e2619df75d444 | [
"MIT"
] | 4 | 2021-03-09T09:19:49.000Z | 2022-02-26T12:14:12.000Z | services/users/app/app.py | yuuta1999/microservice-with-flask | 6ad64341edb42c7f145aabc1e38e2619df75d444 | [
"MIT"
] | 1 | 2020-03-31T17:36:11.000Z | 2020-03-31T17:36:11.000Z | # users/app/app.py
import os
from flask import Flask
from app.api.utils.extensions import (db, bcrypt, jwt, cors)
from app.api.utils.func import JSONEncoder
def create_app(app_info=None):
"""Create Flask application in factory pattern
"""
app = Flask(__name__)
app.config.from_object(os.environ.get(... | 21.323529 | 89 | 0.692414 | # users/app/app.py
import os
from flask import Flask
from app.api.utils.extensions import (
db, bcrypt, jwt, cors
)
from app.api.utils.func import JSONEncoder
def create_app(app_info=None):
"""Create Flask application in factory pattern
"""
app = Flask(__name__)
app.config.from_object(os.enviro... | 0 | 41 | 0 | 0 | 0 | 0 | 0 | 6 | 27 |
b9c0d1a87ab9ddf08f4e9867aa6cbedacb169489 | 38,077 | py | Python | feasibgs/catalogs.py | changhoonhahn/feasiBGS | b5f535f12cf64babc9e25bcec75edd45d8668f74 | [
"MIT"
] | 1 | 2021-02-24T15:02:34.000Z | 2021-02-24T15:02:34.000Z | feasibgs/catalogs.py | michaelJwilson/feasiBGS | 63975b1e60f6f93f3b5020ee51ca565f325b918d | [
"MIT"
] | 7 | 2020-10-23T16:02:01.000Z | 2020-11-04T18:53:20.000Z | feasibgs/catalogs.py | michaelJwilson/feasiBGS | 63975b1e60f6f93f3b5020ee51ca565f325b918d | [
"MIT"
] | 1 | 2020-11-12T00:19:41.000Z | 2020-11-12T00:19:41.000Z | '''
submodules to handle Catalogs used in the project
'''
import h5py
# -- local --
def _GamaLegacy_TractorAPFLUX():
''' Retroactively add apflux columns from the tractor catalogs
to the GamaLegacy catalog constructed and saved to file. This is a
hack.
'''
gleg = GamaLegacy()
# ope... | 45.601198 | 131 | 0.565118 | '''
submodules to handle Catalogs used in the project
'''
import os
import numpy as np
import h5py
from astropy.io import fits
from astropy.table import Table as aTable
from astropy.cosmology import FlatLambdaCDM
# -- local --
from . import util as UT
class Catalog(object):
''' parent object for the objects... | 0 | 0 | 0 | 36,691 | 0 | 0 | 0 | 36 | 226 |
cefda1f1bb598fc270505fb669b6c7f27ea76a85 | 604 | py | Python | Chapter09/combining/switch_latest.py | PacktPublishing/Hands-On-Reactive-Programming-with-Python | d9da4f3f070695508bb36ef9d97f1212ecaf6fab | [
"MIT"
] | 56 | 2018-06-28T05:04:36.000Z | 2022-02-06T18:36:29.000Z | Chapter09/combining/switch_latest.py | azataiot/Hands-On-Reactive-Programming-with-Python | d9da4f3f070695508bb36ef9d97f1212ecaf6fab | [
"MIT"
] | 2 | 2019-08-19T03:51:49.000Z | 2019-09-25T09:00:57.000Z | Chapter09/combining/switch_latest.py | azataiot/Hands-On-Reactive-Programming-with-Python | d9da4f3f070695508bb36ef9d97f1212ecaf6fab | [
"MIT"
] | 18 | 2018-09-16T05:50:13.000Z | 2022-01-02T19:59:04.000Z | import rx.operators as ops
from rx.subject import Subject
obs1 = Subject()
obs2 = Subject()
obs3 = Subject()
higher_order = Subject()
higher_order.pipe(ops.switch_latest()).subscribe(
on_next=lambda i: print("on_next {}".format(i)),
on_error=lambda e: print("on_error: {}".format(e)),
on_completed=lambda: ... | 22.37037 | 55 | 0.703642 | import rx
import rx.operators as ops
from rx.subject import Subject
obs1 = Subject()
obs2 = Subject()
obs3 = Subject()
higher_order = Subject()
higher_order.pipe(ops.switch_latest()).subscribe(
on_next=lambda i: print("on_next {}".format(i)),
on_error=lambda e: print("on_error: {}".format(e)),
on_complete... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -12 | 22 |
4fdc4c51c9361762ea204928f6dd37955fd5ddb7 | 730 | py | Python | relocatable.py | xyzz/rop-rpc | 8772172cc1d796233e8f069f65749519f8f07813 | [
"MIT"
] | 88 | 2017-12-31T16:19:38.000Z | 2020-05-30T03:54:48.000Z | relocatable.py | xyzz/rop-rpc | 8772172cc1d796233e8f069f65749519f8f07813 | [
"MIT"
] | 1 | 2018-01-02T17:51:17.000Z | 2018-01-02T17:51:17.000Z | relocatable.py | xyzz/rop-rpc | 8772172cc1d796233e8f069f65749519f8f07813 | [
"MIT"
] | 9 | 2018-01-01T04:29:12.000Z | 2021-10-30T12:19:41.000Z |
data_base = Relocatable(Relocatable.data, 0)
main_base = Relocatable(Relocatable.main, 0)
wk_base = Relocatable(Relocatable.wk, 0)
| 24.333333 | 73 | 0.608219 | from util import isint
class Relocatable():
data = 1
main = 2
wk = 3
def __init__(self, tag, imm):
self.tag = tag
self.imm = imm
def __add__(self, x):
if not isint(x):
raise RuntimeError("cannot __add__ a {}".format(x))
return Relocatable(self.tag, se... | 0 | 0 | 0 | 551 | 0 | 0 | 0 | 1 | 45 |
f5d1ede32658260aefabba71fbd975e01fbb4f23 | 1,674 | py | Python | server/api/resources/user.py | nwfsc-fram/Warehouse | c1a06ab7bacd6c15ab5fe2bb6076e3ea3c95757d | [
"BSD-3-Clause"
] | 5 | 2019-02-27T03:06:02.000Z | 2021-11-15T20:12:50.000Z | server/api/resources/user.py | nwfsc-fram/Warehouse | c1a06ab7bacd6c15ab5fe2bb6076e3ea3c95757d | [
"BSD-3-Clause"
] | 48 | 2019-02-14T21:15:18.000Z | 2021-10-02T01:18:49.000Z | server/api/resources/user.py | nwfsc-fram/Warehouse | c1a06ab7bacd6c15ab5fe2bb6076e3ea3c95757d | [
"BSD-3-Clause"
] | 1 | 2021-03-22T23:47:54.000Z | 2021-03-22T23:47:54.000Z | """
Module defining a Falcon resource to provide login session info
Copyright (C) 2016 ERT Inc.
"""
import api.json as json
route = "user"
def get_user(user_id=None):
"""
Return object representing the logged in user
Keyword Parameters:
user_id -- String, identifier representing the logged in user... | 29.892857 | 72 | 0.643967 | """
Module defining a Falcon resource to provide login session info
Copyright (C) 2016 ERT Inc.
"""
import falcon
import api.json as json
from api.auth import auth
route = "user"
class User():
"""
Falcon resource object providing API login session info
"""
def on_get(self, request, resp):
"... | 0 | 0 | 0 | 389 | 0 | 0 | 0 | -4 | 67 |
e732e1d19ad6c4523e954b94bb4b809dbdca8ac0 | 840 | py | Python | capp/data/models/talk.py | Thornycrackers-Forks/capp | b2493676cb4645a82955f56faa990776d73d00a2 | [
"MIT"
] | 1 | 2019-10-08T00:49:18.000Z | 2019-10-08T00:49:18.000Z | capp/data/models/talk.py | Thornycrackers-Forks/capp | b2493676cb4645a82955f56faa990776d73d00a2 | [
"MIT"
] | 14 | 2019-10-08T02:24:07.000Z | 2022-02-26T18:40:20.000Z | capp/data/models/talk.py | Thornycrackers-Forks/capp | b2493676cb4645a82955f56faa990776d73d00a2 | [
"MIT"
] | 1 | 2019-11-01T00:38:39.000Z | 2019-11-01T00:38:39.000Z | """Talk model."""
| 26.25 | 67 | 0.644048 | """Talk model."""
from typing import Any
from django.db import models
from django.utils.translation import gettext_lazy as _
from domain import utils
class Talk(models.Model):
"""Talk submission."""
name = models.CharField(_("name"), max_length=255, unique=True)
slug = models.SlugField(unique=True, bl... | 0 | 0 | 0 | 663 | 0 | 0 | 0 | 44 | 114 |
483309e08191fc64cd88b33fb408c72552b1938c | 2,319 | py | Python | code/NonLinearRegression/HowNNWorks.py | Knowledge-Precipitation-Tribe/Neural-network | eac2e66cdde85b34ddf9313ce4d2b123cc1b8be8 | [
"MIT"
] | 3 | 2021-05-25T10:18:23.000Z | 2022-02-09T08:55:14.000Z | code/NonLinearRegression/HowNNWorks.py | Knowledge-Precipitation-Tribe/Neural-network | eac2e66cdde85b34ddf9313ce4d2b123cc1b8be8 | [
"MIT"
] | null | null | null | code/NonLinearRegression/HowNNWorks.py | Knowledge-Precipitation-Tribe/Neural-network | eac2e66cdde85b34ddf9313ce4d2b123cc1b8be8 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-#
'''
# Name: HowNNWorks
# Description:
# Author: super
# Date: 2020/5/24
'''
train_data_name = "../data/ch08.train.npz"
test_data_name = "../data/ch08.test.npz"
if __name__ == '__main__':
dataReader = DataReader_2_0(train_data_name, test_data_name)
dataReader.... | 28.280488 | 107 | 0.547219 | # -*- coding: utf-8 -*-#
'''
# Name: HowNNWorks
# Description:
# Author: super
# Date: 2020/5/24
'''
import numpy as np
import matplotlib.pyplot as plt
from HelperClass2.NeuralNet_2_0 import *
train_data_name = "../data/ch08.train.npz"
test_data_name = "../data/ch08.test.npz"
def ShowResult... | 0 | 0 | 0 | 0 | 0 | 1,260 | 0 | 26 | 91 |
b45346844e46c21d15018781842514318bb9828d | 9,912 | py | Python | python/sparkdl/transformers/named_image.py | happyapple668/spark-deep-learning | aeff9c9e2c24ed09c093414a7b51ec9bd42f1e86 | [
"Apache-2.0"
] | 1 | 2019-02-25T15:02:19.000Z | 2019-02-25T15:02:19.000Z | python/sparkdl/transformers/named_image.py | happyapple668/spark-deep-learning | aeff9c9e2c24ed09c093414a7b51ec9bd42f1e86 | [
"Apache-2.0"
] | null | null | null | python/sparkdl/transformers/named_image.py | happyapple668/spark-deep-learning | aeff9c9e2c24ed09c093414a7b51ec9bd42f1e86 | [
"Apache-2.0"
] | 2 | 2020-02-08T06:51:36.000Z | 2020-06-18T05:38:09.000Z | # Copyright 2017 Databricks, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writin... | 41.472803 | 115 | 0.675444 | # Copyright 2017 Databricks, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writin... | 0 | 2,025 | 0 | 5,927 | 0 | 0 | 0 | 320 | 268 |
5d9fade7dd98fcb1e00b8c04b11501292daaf28d | 557 | py | Python | xcauth.py | gibberfishinc/xmpp-cloud-auth | 9e5856f49ba1fb98fd0d5ac34d75b5ca8f9a5e2a | [
"MIT"
] | null | null | null | xcauth.py | gibberfishinc/xmpp-cloud-auth | 9e5856f49ba1fb98fd0d5ac34d75b5ca8f9a5e2a | [
"MIT"
] | null | null | null | xcauth.py | gibberfishinc/xmpp-cloud-auth | 9e5856f49ba1fb98fd0d5ac34d75b5ca8f9a5e2a | [
"MIT"
] | null | null | null | #!/usr/bin/python3 -tt
from xclib.configuration import get_args
from xclib.authops import perform
DEFAULT_LOG_DIR = '/var/log/xcauth'
DESC = '''XMPP server authentication against JSXC>=3.2.0 on Nextcloud.
See https://jsxc.org or https://github.com/jsxc/xmpp-cloud-auth.'''
EPILOG = '''-I, -R, and -A take precedenc... | 32.764706 | 76 | 0.698384 | #!/usr/bin/python3 -tt
from xclib.configuration import get_args
from xclib.authops import perform
DEFAULT_LOG_DIR = '/var/log/xcauth'
DESC = '''XMPP server authentication against JSXC>=3.2.0 on Nextcloud.
See https://jsxc.org or https://github.com/jsxc/xmpp-cloud-auth.'''
EPILOG = '''-I, -R, and -A take precedenc... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
3a7b330cc1ccf3eade6fc19ff7af43126efa5055 | 326 | py | Python | app/__init__.py | stanfordmlgroup/blm | 38c53f10078a1851c91db8f286d5b7c9cdcaa95c | [
"MIT"
] | 40 | 2020-07-23T22:32:04.000Z | 2022-02-07T23:51:10.000Z | app/__init__.py | stanfordmlgroup/blm | 38c53f10078a1851c91db8f286d5b7c9cdcaa95c | [
"MIT"
] | 2 | 2020-07-24T12:35:36.000Z | 2021-01-24T19:00:36.000Z | app/__init__.py | stanfordmlgroup/blm | 38c53f10078a1851c91db8f286d5b7c9cdcaa95c | [
"MIT"
] | 6 | 2020-07-25T05:40:06.000Z | 2021-07-31T03:39:03.000Z | from flask import Flask
import os
#from model import LSCCNN
basedir = os.path.abspath(os.path.dirname(__file__))
app = Flask(__name__)
app.config.from_object(__name__)
# Load model
#checkpoint_path = path_to_gcp_bucket
#model = LSCCNN(checkpoint_path=checkpoint_path)
#model.eval()
#model.cuda() ??
| 18.111111 | 52 | 0.776074 | from flask import Flask
import os
#from model import LSCCNN
basedir = os.path.abspath(os.path.dirname(__file__))
app = Flask(__name__)
app.config.from_object(__name__)
# Load model
#checkpoint_path = path_to_gcp_bucket
#model = LSCCNN(checkpoint_path=checkpoint_path)
#model.eval()
#model.cuda() ??
from app import ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 23 |
3e8f52f918e1bed7695935c473bdf3b3406b9430 | 801 | py | Python | Teacher/DigitalHistory/Assignments_To_Be_Graded/123456789/Week_Two/Now_Try_This/4.py | ShayanRiyaz/BitUGrading | ecc069de292d371cf6805df70be94408d5c7894b | [
"MIT"
] | null | null | null | Teacher/DigitalHistory/Assignments_To_Be_Graded/123456789/Week_Two/Now_Try_This/4.py | ShayanRiyaz/BitUGrading | ecc069de292d371cf6805df70be94408d5c7894b | [
"MIT"
] | null | null | null | Teacher/DigitalHistory/Assignments_To_Be_Graded/123456789/Week_Two/Now_Try_This/4.py | ShayanRiyaz/BitUGrading | ecc069de292d371cf6805df70be94408d5c7894b | [
"MIT"
] | null | null | null | # Please note that if you uncomment and press multiple times, the program will keep appending to the file.
d = {'simple_key':'hello'}
answer1 = d['simple_key']
print(answer1)# Please note that if you uncomment and press multiple times, the program will keep appending to the file.
d = {'k1':{'k2':'hello'}}
answer2 =... | 38.142857 | 120 | 0.677903 | # Please note that if you uncomment and press multiple times, the program will keep appending to the file.
d = {'simple_key':'hello'}
answer1 = d['simple_key']
print(answer1)# Please note that if you uncomment and press multiple times, the program will keep appending to the file.
d = {'k1':{'k2':'hello'}}
answer2 =... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
27392dd2348e088769e3781375c34d4651b959c6 | 428 | py | Python | test/tests.py | JReese1212/SoftwareEngineering | 2fba90e4851911f7113578ddb8a158c1f260b353 | [
"MIT"
] | 5 | 2021-02-04T00:04:25.000Z | 2022-03-07T04:43:59.000Z | test/tests.py | JReese1212/SoftwareEngineering | 2fba90e4851911f7113578ddb8a158c1f260b353 | [
"MIT"
] | 119 | 2021-02-11T01:28:18.000Z | 2021-05-03T23:14:39.000Z | test/tests.py | JReese1212/SoftwareEngineering | 2fba90e4851911f7113578ddb8a158c1f260b353 | [
"MIT"
] | null | null | null | import sys
sys.path.append('./test/tests')
from driver import driver, Keys
driver.get("http://www.python.org")
assert "Python" in driver.title
elem = driver.find_element_by_name("q")
elem.clear()
elem.send_keys("pycon")
elem.send_keys(Keys.RETURN)
assert "No results found." not in driver.page_source
#import test_exam... | 22.526316 | 52 | 0.787383 | import sys
sys.path.append('./test/tests')
from driver import driver, Keys
driver.get("http://www.python.org")
assert "Python" in driver.title
elem = driver.find_element_by_name("q")
elem.clear()
elem.send_keys("pycon")
elem.send_keys(Keys.RETURN)
assert "No results found." not in driver.page_source
#import test_exam... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -1 | 22 |
93e8a0133186a9ed504c690d0c5523bb68f053ed | 534 | py | Python | test/test_add_contact.py | agnieszkazm/python_for_tests | 13514181f40e0f948030f0c1189bf7337b479015 | [
"Apache-2.0"
] | null | null | null | test/test_add_contact.py | agnieszkazm/python_for_tests | 13514181f40e0f948030f0c1189bf7337b479015 | [
"Apache-2.0"
] | null | null | null | test/test_add_contact.py | agnieszkazm/python_for_tests | 13514181f40e0f948030f0c1189bf7337b479015 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*- | 48.545455 | 125 | 0.71161 | # -*- coding: utf-8 -*-
from model.contact import Contact
def test_add_contact(app):
old_contacts = app.contact.get_contacts_list()
contact = Contact("Testname", "Testname2", "Testlastname", "test", "555", "666", "777", "888", "test", "www.example.com")
app.contact.create(contact)
new_contacts = app.co... | 0 | 0 | 0 | 0 | 0 | 454 | 0 | 12 | 45 |
18817bea520ab9e0f9a7b98680e50e6f2e1ba6fb | 2,843 | py | Python | Currency-Converter/Curreny-Converter.py | maayon2521/Python-Projects | 31225d56b6a600c40be5c7e92c1792071959a32f | [
"MIT"
] | null | null | null | Currency-Converter/Curreny-Converter.py | maayon2521/Python-Projects | 31225d56b6a600c40be5c7e92c1792071959a32f | [
"MIT"
] | null | null | null | Currency-Converter/Curreny-Converter.py | maayon2521/Python-Projects | 31225d56b6a600c40be5c7e92c1792071959a32f | [
"MIT"
] | 1 | 2020-10-25T14:52:32.000Z | 2020-10-25T14:52:32.000Z | # This is an python GUI program which is used to conver the current vlue for different conutries.
# importing the modules
# creating a class called CurrencyConverter
CurrencyConverter()
| 40.614286 | 133 | 0.633837 | # This is an python GUI program which is used to conver the current vlue for different conutries.
# importing the modules
from tkinter import *
# creating a class called CurrencyConverter
class CurrencyConverter():
# definfing a init function for the class TipCal
def __init__(self):
... | 0 | 0 | 0 | 2,592 | 0 | 0 | 0 | 0 | 45 |
d8d2b3f0bd77b8bc17ba513edbfa9199a11e625d | 708 | py | Python | demo/logging_demo.py | doppleware/vCenterShell_test | c91870169c5780e5c561b2ae682991af20257c4f | [
"Apache-2.0"
] | null | null | null | demo/logging_demo.py | doppleware/vCenterShell_test | c91870169c5780e5c561b2ae682991af20257c4f | [
"Apache-2.0"
] | null | null | null | demo/logging_demo.py | doppleware/vCenterShell_test | c91870169c5780e5c561b2ae682991af20257c4f | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Pretty much trivial logging demo
Default log file - './logs/vCenter.log'
"""
from common.logger import getLogger
from common.logger import configure_loglevel
_logger = getLogger(__name__) # Default logger is using
# _logger = getLogger("vCenterShell") # for Shell App itself
... | 30.782609 | 65 | 0.686441 | # -*- coding: utf-8 -*-
"""
Pretty much trivial logging demo
Default log file - './logs/vCenter.log'
"""
from common.logger import getLogger
from common.logger import configure_loglevel
_logger = getLogger(__name__) # Default logger is using
# _logger = getLogger("vCenterShell") # for Shell App itself
... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
745c8a3b47a11f802f9fea02b2407bc6909332df | 3,671 | py | Python | StudyWatch_SDK_healthwearableApp/Source/sdk/inc/m2m2/master_definitions/ps_application_interface.py | analogdevicesinc/ApplicationsWaveTool | 0c1f236dd0745caa3187841ee1a882f209ac3ebe | [
"Apache-2.0"
] | 2 | 2019-03-11T15:24:51.000Z | 2022-03-07T09:42:05.000Z | M4_Eval_SDK/Source/inc/m2m2/master_definitions/ps_application_interface.py | analogdevicesinc/ApplicationsWaveTool | 0c1f236dd0745caa3187841ee1a882f209ac3ebe | [
"Apache-2.0"
] | null | null | null | M4_Eval_SDK/Source/inc/m2m2/master_definitions/ps_application_interface.py | analogdevicesinc/ApplicationsWaveTool | 0c1f236dd0745caa3187841ee1a882f209ac3ebe | [
"Apache-2.0"
] | 1 | 2021-03-16T08:26:05.000Z | 2021-03-16T08:26:05.000Z | #!/usr/bin/env python3
import m2m2_core
import common_application_interface
M2M2_PS_SYS_PWR_STATE_ENUM_t = {
"type":c_uint8,
"enum_values": [
("M2M2_PS_SYS_PWR_STATE_ACTIVE",0x0),
("M2M2_PS_SYS_PWR_STATE_FLEXI",0x1),
("M2M2_PS_SYS_PWR_STATE_HIBERNATE",0x2),
("M2M2_PS_SYS_PWR_STATE_SHUTDOWN",0x3),... | 24.311258 | 64 | 0.672569 | #!/usr/bin/env python3
from ctypes import *
import m2m2_core
import common_application_interface
M2M2_PS_SYS_PWR_STATE_ENUM_t = {
"type":c_uint8,
"enum_values": [
("M2M2_PS_SYS_PWR_STATE_ACTIVE",0x0),
("M2M2_PS_SYS_PWR_STATE_FLEXI",0x1),
("M2M2_PS_SYS_PWR_STATE_HIBERNATE",0x2),
("M2M2_PS_SYS_PWR... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -1 | 23 |
352512b56666643c75d66e8d77ef4c77c1f177d0 | 445 | py | Python | pymtl3/passes/BasePass.py | kevinyuan/pymtl3 | 5949e6a4acc625c0ccbbb25be3af1d0db683df3c | [
"BSD-3-Clause"
] | 152 | 2020-06-03T02:34:11.000Z | 2022-03-30T04:16:45.000Z | pymtl3/passes/BasePass.py | kevinyuan/pymtl3 | 5949e6a4acc625c0ccbbb25be3af1d0db683df3c | [
"BSD-3-Clause"
] | 139 | 2019-05-29T00:37:09.000Z | 2020-05-17T16:49:26.000Z | pymtl3/passes/BasePass.py | kevinyuan/pymtl3 | 5949e6a4acc625c0ccbbb25be3af1d0db683df3c | [
"BSD-3-Clause"
] | 22 | 2020-05-18T13:42:05.000Z | 2022-03-11T08:37:51.000Z | """
========================================================================
BasePass.py
========================================================================
An "abstract" base class for all passes.
Author : Shunning Jiang
Date : Dec 17, 2017
"""
| 23.421053 | 72 | 0.460674 | """
========================================================================
BasePass.py
========================================================================
An "abstract" base class for all passes.
Author : Shunning Jiang
Date : Dec 17, 2017
"""
class PassMetadata:
pass
class BasePass:
def __init__( self, ... | 0 | 0 | 0 | 146 | 0 | 0 | 0 | 0 | 45 |
a149b74c4b946b172b4c1ca45d12053631b1a421 | 253 | py | Python | faker/providers/ssn/__init__.py | bdclauser/Faker | b676668214f5f4cf2849eea16d50c835ffba5be9 | [
"MIT"
] | 1 | 2021-01-21T03:44:59.000Z | 2021-01-21T03:44:59.000Z | faker/providers/ssn/__init__.py | bdclauser/Faker | b676668214f5f4cf2849eea16d50c835ffba5be9 | [
"MIT"
] | null | null | null | faker/providers/ssn/__init__.py | bdclauser/Faker | b676668214f5f4cf2849eea16d50c835ffba5be9 | [
"MIT"
] | null | null | null | # coding=utf-8
from __future__ import unicode_literals
from .. import BaseProvider
localized = True | 23 | 66 | 0.699605 | # coding=utf-8
from __future__ import unicode_literals
from .. import BaseProvider
localized = True
class Provider(BaseProvider):
ssn_formats = ("###-##-####",)
def ssn(self):
return self.bothify(self.random_element(self.ssn_formats)) | 0 | 0 | 0 | 130 | 0 | 0 | 0 | 0 | 23 |
4c54bda14fbe0222d564445d5656d479e06b4a66 | 2,794 | py | Python | wikidict/lang/it/__init__.py | chopinesque/ebook-reader-dict | 1c69657fd36b339d2fe436e456c1b7891b2d2f9e | [
"MIT"
] | null | null | null | wikidict/lang/it/__init__.py | chopinesque/ebook-reader-dict | 1c69657fd36b339d2fe436e456c1b7891b2d2f9e | [
"MIT"
] | null | null | null | wikidict/lang/it/__init__.py | chopinesque/ebook-reader-dict | 1c69657fd36b339d2fe436e456c1b7891b2d2f9e | [
"MIT"
] | null | null | null | """Italian language."""
from typing import Dict, Tuple
# Regex to find the pronunciation
pronunciation = r"{IPA\|/([^/]+)/"
# Regex to find the gender
gender = r"{{Pn\|?w?}} ''([fm])[singvol ]*''"
# Float number separator
float_separator = ","
# Thousands separator
thousands_separator = " "
# Markers for sections ... | 27.392157 | 136 | 0.584109 | """Italian language."""
from typing import Dict, Tuple
# Regex to find the pronunciation
pronunciation = r"{IPA\|/([^/]+)/"
# Regex to find the gender
gender = r"{{Pn\|?w?}} ''([fm])[singvol ]*''"
# Float number separator
float_separator = ","
# Thousands separator
thousands_separator = " "
# Markers for sections ... | 8 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
ba485ba642b2ca3df6676659e8a5ba9769a6e7e3 | 1,473 | py | Python | summit_xl_localization/scripts/test.py | summitx/summit_xl_common | d95c42889b11616802eb767d10a036937e72d716 | [
"BSD-2-Clause"
] | 44 | 2018-01-05T11:18:05.000Z | 2022-03-24T13:15:28.000Z | summit_xl_localization/scripts/test.py | summitx/summit_xl_common | d95c42889b11616802eb767d10a036937e72d716 | [
"BSD-2-Clause"
] | 14 | 2015-08-26T13:09:12.000Z | 2021-08-25T07:56:40.000Z | summit_xl_localization/scripts/test.py | summitx/summit_xl_common | d95c42889b11616802eb767d10a036937e72d716 | [
"BSD-2-Clause"
] | 42 | 2016-06-13T12:12:02.000Z | 2022-03-18T05:31:12.000Z | #!/usr/bin/env python
if __name__ == '__main__':
listener()
| 31.340426 | 130 | 0.642227 | #!/usr/bin/env python
import rospy
from std_msgs.msg import String
from sensor_msgs.msg import MagneticField
from math import atan2, sin, cos, sqrt
def callback(data):
#rospy.loginfo(rospy.get_caller_id() + "mx: %s", data.magnetic_field.x)
xmag = data.magnetic_field.x
ymag = data.magnetic_field.y
zmag ... | 0 | 0 | 0 | 0 | 0 | 1,228 | 0 | 38 | 142 |
30569b5f7f56c0bfdba6e8d976b4ec88d291b3c8 | 7,458 | py | Python | tests/test_functional.py | NarrativeScience/delver | 876480848eff2dec695b3a24ac869433d861ef6c | [
"BSD-3-Clause"
] | 2 | 2020-06-16T08:49:48.000Z | 2020-08-17T06:56:26.000Z | tests/test_functional.py | NarrativeScience/delver | 876480848eff2dec695b3a24ac869433d861ef6c | [
"BSD-3-Clause"
] | 1 | 2020-02-18T00:37:36.000Z | 2020-02-18T19:00:26.000Z | tests/test_functional.py | NarrativeScience/delver | 876480848eff2dec695b3a24ac869433d861ef6c | [
"BSD-3-Clause"
] | null | null | null | """Module containing tests for the delver tool"""
import unittest
if __name__ == "__main__":
unittest.main()
| 37.104478 | 87 | 0.359748 | """Module containing tests for the delver tool"""
import unittest
from unittest import mock
from context import core as mod_ut
class TestDelveFunctional(unittest.TestCase):
"""Functional tests for the delver tool"""
def setUp(self):
"""Initialize frequently used test objects"""
self.test_obj... | 0 | 0 | 0 | 7,257 | 0 | 0 | 0 | 17 | 68 |
1bc1f57102613b47319741afba9c2a3168ef3600 | 2,330 | py | Python | conventional_commits/scripts/commit.py | NoFussComputing/gitlab-ci | 3548312a9f17eb056006aeaa57af00897c9585d8 | [
"MIT"
] | null | null | null | conventional_commits/scripts/commit.py | NoFussComputing/gitlab-ci | 3548312a9f17eb056006aeaa57af00897c9585d8 | [
"MIT"
] | null | null | null | conventional_commits/scripts/commit.py | NoFussComputing/gitlab-ci | 3548312a9f17eb056006aeaa57af00897c9585d8 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
#-*- coding: utf-8 -*-
#import gitlab
import os
import sys
import getopt
import requests
get_mr_title = False
project_id = ''
try:
opts, args = getopt.getopt(sys.argv[1:],"hi:t:ti:p:b",["token=", "title", "project=", "branch="])
except getopt.GetoptError:
print('test.py [-c | --commit]... | 23.069307 | 128 | 0.645923 | #!/usr/bin/env python3
#-*- coding: utf-8 -*-
#import gitlab
import os
import sys
import getopt
import json
import requests
get_mr_title = False
project_id = ''
try:
opts, args = getopt.getopt(sys.argv[1:],"hi:t:ti:p:b",["token=", "title", "project=", "branch="])
except getopt.GetoptError:
print('test.py [-c... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -10 | 22 |
0a1d41cfd4c4e5858b93d46432a787506b86a575 | 229 | py | Python | lib/google/sheets/utils.py | goztrk/django-htk | c56bf112e5d627780d2f4288460eae5cce80fa9e | [
"MIT"
] | 206 | 2015-10-15T07:05:08.000Z | 2021-02-19T11:48:36.000Z | lib/google/sheets/utils.py | goztrk/django-htk | c56bf112e5d627780d2f4288460eae5cce80fa9e | [
"MIT"
] | 8 | 2017-10-16T10:18:31.000Z | 2022-03-09T14:24:27.000Z | lib/google/sheets/utils.py | goztrk/django-htk | c56bf112e5d627780d2f4288460eae5cce80fa9e | [
"MIT"
] | 61 | 2015-10-15T08:12:44.000Z | 2022-03-10T12:25:06.000Z | # Third Party (PyPI) Imports
| 20.818182 | 57 | 0.668122 | # Third Party (PyPI) Imports
import requests
def append_to_sheet(spreadsheet_id, table_range, values):
base_url =
url = base_url % {
'spreadsheet_id' : spreadsheet_id,
'table_range' : table_range,
}
| 0 | 0 | 0 | 0 | 0 | 160 | 0 | -6 | 45 |
c262914ebaed89e6046a1a4e7ccde75b1f4044cf | 1,385 | py | Python | multiple_page_news_scraper.py | RahulRj09/Ndtv-news-live-data-scraper | c18a2e29968845a0aa0ee2ed31eee074686a70c8 | [
"MIT"
] | 7 | 2019-02-19T20:39:46.000Z | 2019-03-03T06:12:30.000Z | multiple_page_news_scraper.py | RahulRj09/Ndtv-news-live-data-scraper | c18a2e29968845a0aa0ee2ed31eee074686a70c8 | [
"MIT"
] | null | null | null | multiple_page_news_scraper.py | RahulRj09/Ndtv-news-live-data-scraper | c18a2e29968845a0aa0ee2ed31eee074686a70c8 | [
"MIT"
] | null | null | null | import time
import requests
from bs4 import BeautifulSoup as bs
url= []
for page in range(1,9):
time.sleep(5)
source = 'https://www.ndtv.com/latest/page-{}'.format(page)
source = requests.get(source).text
soup = bs(source,'html5lib')
soup = soup.find('div',{'class': 'new_storylising'})
for i in ... | 29.468085 | 108 | 0.572563 | import time
import requests
from bs4 import BeautifulSoup as bs
url= []
for page in range(1,9):
time.sleep(5)
source = 'https://www.ndtv.com/latest/page-{}'.format(page)
source = requests.get(source).text
soup = bs(source,'html5lib')
soup = soup.find('div',{'class': 'new_storylising'})
for i in ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
ae27961b297b59c073ccea7eb2808d2a9091e72a | 1,057 | py | Python | app/repositories/queries/blob_queries.py | solarized-penguin/pylocker | 9117e342d6fd33800eaa0dd0ce82e53adafe6a84 | [
"MIT"
] | null | null | null | app/repositories/queries/blob_queries.py | solarized-penguin/pylocker | 9117e342d6fd33800eaa0dd0ce82e53adafe6a84 | [
"MIT"
] | null | null | null | app/repositories/queries/blob_queries.py | solarized-penguin/pylocker | 9117e342d6fd33800eaa0dd0ce82e53adafe6a84 | [
"MIT"
] | null | null | null | create_empty_blob = "SELECT lo_creat(-1)"
write_data_to_blob = "SELECT lo_put(CAST(:loid AS OID), :offset, :data)"
read_data_from_blob = "SELECT lo_get(CAST(:loid AS OID), :offset, :length)"
delete_blob = "SELECT lo_unlink(CAST(:loid AS OID))"
get_size_of_blob_function = """
CREATE OR REPLACE FUNCTION pg_temp.get_l... | 27.815789 | 82 | 0.710501 | create_empty_blob = "SELECT lo_creat(-1)"
write_data_to_blob = "SELECT lo_put(CAST(:loid AS OID), :offset, :data)"
read_data_from_blob = "SELECT lo_get(CAST(:loid AS OID), :offset, :length)"
delete_blob = "SELECT lo_unlink(CAST(:loid AS OID))"
get_size_of_blob_function = """
CREATE OR REPLACE FUNCTION pg_temp.get_l... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
8611171a15ab73ea43db6eaa20037584f3ce6198 | 3,684 | py | Python | harvest_bigram.py | Ezhil-Language-Foundation/uliveeran | 619b37a158129ff15aa342e662506cd6d23a0e5c | [
"MIT"
] | null | null | null | harvest_bigram.py | Ezhil-Language-Foundation/uliveeran | 619b37a158129ff15aa342e662506cd6d23a0e5c | [
"MIT"
] | null | null | null | harvest_bigram.py | Ezhil-Language-Foundation/uliveeran | 619b37a158129ff15aa342e662506cd6d23a0e5c | [
"MIT"
] | 1 | 2021-11-12T13:35:36.000Z | 2021-11-12T13:35:36.000Z | # -*- coding: utf-8 -*-
# (C) 2016-2021 Muthiah Annamalai
#
# This file is part of 'open-tamil' package
# We generate unigram and bi-gram statistics for Tamil texts
#
if __name__ == "__main__":
run('plain_text','pm_bigram_sorted_042521.txt')
| 29.709677 | 84 | 0.610749 | # -*- coding: utf-8 -*-
# (C) 2016-2021 Muthiah Annamalai
#
# This file is part of 'open-tamil' package
# We generate unigram and bi-gram statistics for Tamil texts
#
import tamil
from ngram.LetterModels import Unigram
import codecs
import pprint
import copy
import operator
from functools import cmp_to_key
import sys
i... | 0 | 0 | 0 | 852 | 0 | 2,227 | 0 | -46 | 404 |
d2121a6d2806b8194ac9ecd7d03b1ed5d7880e12 | 144 | py | Python | automatedtest_backend/common/rpc_client.py | zhousheng0325/AutomationPlatform | e7e41e4a26c63fc8151b191bccb0f4a412a3388d | [
"MIT"
] | null | null | null | automatedtest_backend/common/rpc_client.py | zhousheng0325/AutomationPlatform | e7e41e4a26c63fc8151b191bccb0f4a412a3388d | [
"MIT"
] | 10 | 2020-06-06T01:30:29.000Z | 2022-03-12T00:16:52.000Z | automatedtest_backend/common/rpc_client.py | zhousheng0325/AutomationPlatform | e7e41e4a26c63fc8151b191bccb0f4a412a3388d | [
"MIT"
] | null | null | null | import grpc
from django.utils.functional import SimpleLazyObject
client = SimpleLazyObject(lambda:grpc.insecure_channel('127.0.0.1:8001'))
| 28.8 | 74 | 0.798611 | import grpc
from django.utils.functional import SimpleLazyObject
client = SimpleLazyObject(lambda:grpc.insecure_channel('127.0.0.1:8001'))
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
4f602f18cff3560c6a12e793fdb84016fe827f24 | 3,732 | py | Python | chart/controllers/order.py | msamunetogetoge/AutoTrader | 4f5998d070ec4f8f6aee0c80854c4925d6d59dd5 | [
"MIT"
] | 1 | 2021-12-29T02:56:37.000Z | 2021-12-29T02:56:37.000Z | chart/controllers/order.py | msamunetogetoge/AutoTrader | 4f5998d070ec4f8f6aee0c80854c4925d6d59dd5 | [
"MIT"
] | null | null | null | chart/controllers/order.py | msamunetogetoge/AutoTrader | 4f5998d070ec4f8f6aee0c80854c4925d6d59dd5 | [
"MIT"
] | null | null | null | import logging
logger = logging.getLogger(__name__)
| 34.555556 | 95 | 0.590836 | import pybitflyer
import key
from chart.controllers import get_data
import logging
logger = logging.getLogger(__name__)
class BitFlayer_Order():
"""[summary] bitflyer に成り行き注文で売買注文を行うクラス
"""
def __init__(self, api_key, api_secret, product_code="BTC_JPY"):
self.api_key = api_key
... | 396 | 0 | 0 | 3,442 | 0 | 0 | 0 | 2 | 98 |
818c7147a8c30dcd0e76678ab81abc2752ba7f0a | 2,133 | py | Python | dinamicos-rtdata/mouseplot/mouse_trace.py | ochoadavid/SciPyLA2016-VisPy | 1bcd965e9706bbf48a0aedb1ad200db7edc90ba2 | [
"MIT"
] | 1 | 2016-05-16T16:51:18.000Z | 2016-05-16T16:51:18.000Z | dinamicos-rtdata/mouseplot/mouse_trace.py | ochoadavid/SciPyLA2016-VisPy | 1bcd965e9706bbf48a0aedb1ad200db7edc90ba2 | [
"MIT"
] | null | null | null | dinamicos-rtdata/mouseplot/mouse_trace.py | ochoadavid/SciPyLA2016-VisPy | 1bcd965e9706bbf48a0aedb1ad200db7edc90ba2 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
# -*- coding: utf-8 -*-
## Autor: David Ochoa
import numpy as np
CV = np.arange(0, 2.05, 0.05, dtype=np.float32) * 3.14159
ZCV = np.zeros(CV.size, dtype=np.float32)
C_xy = np.array([np.cos(CV), np.sin(CV), ZCV]).T
C_xz = np.array([np.cos(CV), ZCV, np.sin(CV)]).T
C_yz = np.array([ZCV, np.cos(CV), np... | 33.857143 | 88 | 0.601031 | #!/usr/bin/python3
# -*- coding: utf-8 -*-
## Autor: David Ochoa
import numpy as np
from vispy.scene.visuals import Line
from pymouse import PyMouse
CV = np.arange(0, 2.05, 0.05, dtype=np.float32) * 3.14159
ZCV = np.zeros(CV.size, dtype=np.float32)
C_xy = np.array([np.cos(CV), np.sin(CV), ZCV]).T
C_xz = np.array([np.... | 0 | 0 | 0 | 1,596 | 0 | 0 | 0 | 21 | 67 |
15649df9b42b5cd67d61a71c2708e94928e28b91 | 27,932 | py | Python | encoding_utils.py | CodedK/SublimeEncodingUtils | 97f356275518873117be3e8b573034b3e67789dd | [
"MIT"
] | 3 | 2017-07-24T16:02:38.000Z | 2021-03-23T11:27:52.000Z | encoding_utils.py | CodedK/SublimeEncodingUtils | 97f356275518873117be3e8b573034b3e67789dd | [
"MIT"
] | null | null | null | encoding_utils.py | CodedK/SublimeEncodingUtils | 97f356275518873117be3e8b573034b3e67789dd | [
"MIT"
] | null | null | null | # coding: utf8
import base64
import codecs
import hashlib
import json
import math
import re
import string
import sys
import uuid
import webbrowser
import datetime
import sublime
import sublime_plugin
try:
from .encodingutils.escape_table import (html_escape_table, html5_escape_table, html_reserved_list, xml_esca... | 31.419573 | 248 | 0.489331 | # coding: utf8
import base64
import codecs
import hashlib
import json
import math
import re
import string
import sys
import uuid
import webbrowser
import datetime
import sublime
import sublime_plugin
try:
from .encodingutils.escape_table import (
html_escape_table,
html5_escape_table,
htm... | 32 | 0 | 0 | 25,034 | 0 | 131 | 0 | 76 | 1,046 |
a7d26187bda32489c65bb95c3ce97baddbc8200c | 1,709 | py | Python | python/sparseglm/benchmarks/multitask.py | PABannier/sparseglm | ec1c6a15786d9fc0cc58ae3d7e28227bbc9077e9 | [
"MIT"
] | null | null | null | python/sparseglm/benchmarks/multitask.py | PABannier/sparseglm | ec1c6a15786d9fc0cc58ae3d7e28227bbc9077e9 | [
"MIT"
] | null | null | null | python/sparseglm/benchmarks/multitask.py | PABannier/sparseglm | ec1c6a15786d9fc0cc58ae3d7e28227bbc9077e9 | [
"MIT"
] | null | null | null |
import numpy as np
import scipy.sparse as sp
from sklearn.linear_model import MultiTaskLasso as MultiTaskLasso_sk
from sparseglm.estimators import MultiTaskLasso
from sparseglm.utils import make_correlated_data, compute_alpha_max
n_samples = 100
n_features = 3000
n_tasks = 80
snr = 2
corr = 0.7
density = 0.1
tol ... | 23.410959 | 78 | 0.726156 | import time
import numpy as np
import scipy.sparse as sp
from sklearn.linear_model import MultiTaskLasso as MultiTaskLasso_sk
from sparseglm.estimators import MultiTaskLasso
from sparseglm.utils import make_correlated_data, compute_alpha_max
n_samples = 100
n_features = 3000
n_tasks = 80
snr = 2
corr = 0.7
density... | 0 | 0 | 0 | 0 | 0 | 117 | 0 | -10 | 45 |
13a118578e83cf905b5e96b6a52910b29838edf4 | 32,093 | py | Python | pyscf/mcscf/newton_casscf.py | KMCzajkowski/pyscf | e8af41d910cc0d3963655120c0b689590ad978e7 | [
"BSD-2-Clause"
] | null | null | null | pyscf/mcscf/newton_casscf.py | KMCzajkowski/pyscf | e8af41d910cc0d3963655120c0b689590ad978e7 | [
"BSD-2-Clause"
] | null | null | null | pyscf/mcscf/newton_casscf.py | KMCzajkowski/pyscf | e8af41d910cc0d3963655120c0b689590ad978e7 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python
#
# Author: Qiming Sun <osirpt.sun@gmail.com>
#
'''
Second order CASSCF
'''
import sys
import time
import copy
from functools import reduce
import numpy
import scipy.linalg
from pyscf import lib
from pyscf.lib import logger
from pyscf.mcscf import casci, mc1step
from pyscf.mcscf.casci import get... | 39.090134 | 110 | 0.561805 | #!/usr/bin/env python
#
# Author: Qiming Sun <osirpt.sun@gmail.com>
#
'''
Second order CASSCF
'''
import sys
import time
import copy
from functools import reduce
import numpy
import scipy.linalg
from pyscf import lib
from pyscf.lib import logger
from pyscf.mcscf import casci, mc1step
from pyscf.mcscf.casci import get... | 0 | 0 | 0 | 131 | 0 | 21,333 | 3,757 | 0 | 91 |
91d80edfac013cdabd9ac49fea3776cbe574cee5 | 8,441 | py | Python | models/SegNetWithSkipConnection.py | Suraj0712/SegNet | efb2298f36944cbae65b44f15fdc458ebca0b224 | [
"MIT"
] | null | null | null | models/SegNetWithSkipConnection.py | Suraj0712/SegNet | efb2298f36944cbae65b44f15fdc458ebca0b224 | [
"MIT"
] | null | null | null | models/SegNetWithSkipConnection.py | Suraj0712/SegNet | efb2298f36944cbae65b44f15fdc458ebca0b224 | [
"MIT"
] | null | null | null | import torch.nn as nn
import torch.optim as optim
# net = SegNetWithSkipConnection()
# net.zero_grad()
# DATA_PATH = '/home/sur/SemSeg/cityscape/'
# train = datasets.Cityscapes(DATA_PATH, split = 'train', mode = 'fine', target_type = 'semantic',transform=transforms.Compose([transforms.Resize((256,512)),transforms.ToT... | 49.362573 | 271 | 0.727047 | import torch
import torchvision
from torchvision import transforms, datasets
import torchvision.transforms as standard_transforms
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
import time
from PIL import Image
import matplotlib.pyplot as plt
import numpy as np
from torch.autograd im... | 0 | 0 | 0 | 6,842 | 0 | 0 | 0 | 52 | 266 |
9a4d98708ccbc9b36ec24522c149f20f024b0cb4 | 20,247 | py | Python | wizbin/launchers.py | RogueScholar/debreate | 0abc168c51336b31ff87c61f84bc7bb6000e88f4 | [
"MIT"
] | 97 | 2016-09-16T08:44:04.000Z | 2022-01-29T22:30:18.000Z | wizbin/launchers.py | RogueScholar/debreate | 0abc168c51336b31ff87c61f84bc7bb6000e88f4 | [
"MIT"
] | 34 | 2016-09-20T00:42:45.000Z | 2021-04-16T07:21:44.000Z | wizbin/launchers.py | RogueScholar/debreate | 0abc168c51336b31ff87c61f84bc7bb6000e88f4 | [
"MIT"
] | 24 | 2016-09-16T08:44:56.000Z | 2021-07-29T11:32:47.000Z | # -*- coding: utf-8 -*-
## \package wizbin.launchers
# MIT licensing
# See: docs/LICENSE.txt
## Page for creating a system menu launcher
| 29.995556 | 103 | 0.694572 | # -*- coding: utf-8 -*-
## \package wizbin.launchers
# MIT licensing
# See: docs/LICENSE.txt
import os, shutil, wx
from dbr.language import GT
from dbr.log import DebugEnabled
from dbr.log import Logger
from fileio.fileio import ReadFile
from fileio.fileio import WriteFile
from globals.ident import btnid
f... | 0 | 0 | 0 | 18,871 | 0 | 0 | 0 | 462 | 772 |
61f29d40c230362f1cdff9faa18bb4b56ea6a7e4 | 970 | py | Python | pycmark_vfm/readers.py | tk0miya/pycmark-vfm | 29a04c11e0a0dd9dcdda655d559919fc900aed34 | [
"Apache-2.0"
] | 2 | 2020-01-28T03:22:22.000Z | 2020-01-28T15:17:23.000Z | pycmark_vfm/readers.py | tk0miya/pycmark-vfm | 29a04c11e0a0dd9dcdda655d559919fc900aed34 | [
"Apache-2.0"
] | null | null | null | pycmark_vfm/readers.py | tk0miya/pycmark-vfm | 29a04c11e0a0dd9dcdda655d559919fc900aed34 | [
"Apache-2.0"
] | null | null | null | """
pycmark_vfm.readers
~~~~~~~~~~~~~~~~~~~
Vivliostyle Flavored Markdown readers for docutils.
:copyright: Copyright 2020 by Takeshi KOMIYA
:license: Apache License 2.0, see LICENSE for details.
"""
| 27.714286 | 59 | 0.612371 | """
pycmark_vfm.readers
~~~~~~~~~~~~~~~~~~~
Vivliostyle Flavored Markdown readers for docutils.
:copyright: Copyright 2020 by Takeshi KOMIYA
:license: Apache License 2.0, see LICENSE for details.
"""
import re
from pycmark.readers import LineReaderDecorator
class WalledBlockReader(LineReaderDe... | 0 | 0 | 0 | 664 | 0 | 0 | 0 | 14 | 69 |
764e8dc1ef99d73688bc38aba5e92191582a1eff | 810 | py | Python | restrict_ip/migrations/0001_initial.py | celerityweb/django-heroku-restrict-ip | 74b1e7205b0aa4dc0718089525021fba746f32d6 | [
"BSD-3-Clause"
] | null | null | null | restrict_ip/migrations/0001_initial.py | celerityweb/django-heroku-restrict-ip | 74b1e7205b0aa4dc0718089525021fba746f32d6 | [
"BSD-3-Clause"
] | null | null | null | restrict_ip/migrations/0001_initial.py | celerityweb/django-heroku-restrict-ip | 74b1e7205b0aa4dc0718089525021fba746f32d6 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.10.7 on 2017-09-21 14:42
from __future__ import unicode_literals
| 27.931034 | 114 | 0.574074 | # -*- coding: utf-8 -*-
# Generated by Django 1.10.7 on 2017-09-21 14:42
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Restri... | 0 | 0 | 0 | 631 | 0 | 0 | 0 | 19 | 46 |
f0b18a02a26b9160c522a758616c1e8b138ac2b2 | 98 | py | Python | tests/files/crawl_settings.py | dimichxp/grab | 5fedee3009c18c8a1139b0f82736ebe473021b46 | [
"MIT"
] | 2,266 | 2015-01-01T08:47:33.000Z | 2022-03-21T05:02:55.000Z | tests/files/crawl_settings.py | dimichxp/grab | 5fedee3009c18c8a1139b0f82736ebe473021b46 | [
"MIT"
] | 221 | 2015-01-13T01:55:57.000Z | 2022-02-25T23:23:35.000Z | tests/files/crawl_settings.py | dimichxp/grab | 5fedee3009c18c8a1139b0f82736ebe473021b46 | [
"MIT"
] | 315 | 2015-01-23T06:38:55.000Z | 2022-03-27T08:33:33.000Z | GRAB_SPIDER_CONFIG = {
'global': {
'spider_modules': ['tests.script_crawl'],
},
}
| 16.333333 | 49 | 0.561224 | GRAB_SPIDER_CONFIG = {
'global': {
'spider_modules': ['tests.script_crawl'],
},
}
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
a3b3efd7cd3379343c62cf48ceefb554270ed899 | 7,029 | py | Python | flask_app/fh_webhook/schema.py | nablabits/fareharbor-webhook | 70e415b9ccd45220693eecb6a668746a1282dd03 | [
"MIT"
] | null | null | null | flask_app/fh_webhook/schema.py | nablabits/fareharbor-webhook | 70e415b9ccd45220693eecb6a668746a1282dd03 | [
"MIT"
] | null | null | null | flask_app/fh_webhook/schema.py | nablabits/fareharbor-webhook | 70e415b9ccd45220693eecb6a668746a1282dd03 | [
"MIT"
] | null | null | null | import functools
from marshmallow import fields
requiredString = functools.partial(fields.String, required=True)
requiredInteger = functools.partial(fields.Integer, required=True)
requiredBool = functools.partial(fields.Bool, required=True)
requiredFloat = functools.partial(fields.Float, required=True)
requiredEmail ... | 32.845794 | 85 | 0.758998 | import functools
from marshmallow import Schema, fields
requiredString = functools.partial(fields.String, required=True)
requiredInteger = functools.partial(fields.Integer, required=True)
requiredBool = functools.partial(fields.Bool, required=True)
requiredFloat = functools.partial(fields.Float, required=True)
requir... | 0 | 0 | 0 | 6,001 | 0 | 0 | 0 | 8 | 437 |
adbd4e8269a04ff2455439a3cf6e054b7b12029e | 108 | py | Python | py_code_2017/read_json.py | vimm0/python_exercise | 7773d95b4c25b82a9d014f7a814ac83df9ebac17 | [
"MIT"
] | null | null | null | py_code_2017/read_json.py | vimm0/python_exercise | 7773d95b4c25b82a9d014f7a814ac83df9ebac17 | [
"MIT"
] | null | null | null | py_code_2017/read_json.py | vimm0/python_exercise | 7773d95b4c25b82a9d014f7a814ac83df9ebac17 | [
"MIT"
] | 1 | 2018-01-04T16:27:31.000Z | 2018-01-04T16:27:31.000Z | import pandas as pd
vim= pd.read_json("MOCK_DATA.json")
con= vim.to_csv("MOCK_DATA.csv") | 21.6 | 35 | 0.759259 | import pandas as pd
import numpy as np
vim= pd.read_json("MOCK_DATA.json")
con= vim.to_csv("MOCK_DATA.csv") | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -3 | 22 |
b254ea0b951015449d2d1892a98370f19d0e0e4a | 1,263 | py | Python | jnpy/datasource/jotdx/constant.py | jojoquant/jnpy | c874060af4b129ae09cee9f8542517b7b2f6573b | [
"MIT"
] | 5 | 2020-05-19T07:32:39.000Z | 2022-03-14T09:09:48.000Z | jnpy/datasource/jotdx/constant.py | jojoquant/jnpy | c874060af4b129ae09cee9f8542517b7b2f6573b | [
"MIT"
] | null | null | null | jnpy/datasource/jotdx/constant.py | jojoquant/jnpy | c874060af4b129ae09cee9f8542517b7b2f6573b | [
"MIT"
] | 3 | 2020-04-02T08:30:17.000Z | 2020-05-03T12:12:05.000Z | # !/usr/bin/env python3
# -*- coding:utf-8 -*-
# @Datetime : 2020/1/17 22:11
# @Author : Fangyang
# @Software : PyCharm
if __name__ == '__main__':
x = FutureMarketCode['SHFE'].value
print(1)
| 19.734375 | 48 | 0.581948 | # !/usr/bin/env python3
# -*- coding:utf-8 -*-
# @Datetime : 2020/1/17 22:11
# @Author : Fangyang
# @Software : PyCharm
from enum import Enum, unique
class KBarType(Enum):
'''
K 线种类
0 - 5 分钟K 线
1 - 15 分钟K 线
2 - 30 分钟K 线
3 - 1 小时K 线
4 - 日K 线
5 - 周K 线
6 - 月K 线
7 - 1 ... | 309 | 0 | 0 | 876 | 0 | 0 | 0 | 8 | 69 |
c07e0b5eb30cce5d7379f6bd45c7253589758c43 | 22,337 | py | Python | rdfframework/datasets/dataconverter.py | KnowledgeLinks/rdfframework | c6b6408b6e90dd166b4981aeaf3a768e46c22ce0 | [
"MIT"
] | 7 | 2016-11-09T07:59:43.000Z | 2019-02-19T01:34:29.000Z | rdfframework/datasets/dataconverter.py | KnowledgeLinks/rdfframework | c6b6408b6e90dd166b4981aeaf3a768e46c22ce0 | [
"MIT"
] | 22 | 2018-01-10T15:03:22.000Z | 2019-12-17T12:00:10.000Z | rdfframework/datasets/dataconverter.py | KnowledgeLinks/rdfframework | c6b6408b6e90dd166b4981aeaf3a768e46c22ce0 | [
"MIT"
] | null | null | null | """ This module is used for setting an intial test configs and values for
the rdfframework """
import multiprocessing as mp
import multiprocessing.managers as managers
from rdfframework.datatypes import pyrdf, BaseRdfDataType, Uri
def convert_results(data, **kwargs):
""" converts the results of a query to RdfDa... | 47.830835 | 93 | 0.569145 | """ This module is used for setting an intial test configs and values for
the rdfframework """
import datetime
import multiprocessing as mp
import multiprocessing.managers as managers
import pdb
from rdfframework.utilities import SimpleMapReduce
from rdfframework.datatypes import pyrdf, BaseRdfDataType, Uri
def co... | 0 | 0 | 0 | 30 | 0 | 1,471 | 0 | 12 | 136 |
a897a163b5047e9dc7df25355568da4762f01b4b | 4,835 | py | Python | duel_dqn.py | zachary2wave/UAV | df9f46a54b842504f13a4bb257f249b094addc0b | [
"MIT"
] | null | null | null | duel_dqn.py | zachary2wave/UAV | df9f46a54b842504f13a4bb257f249b094addc0b | [
"MIT"
] | null | null | null | duel_dqn.py | zachary2wave/UAV | df9f46a54b842504f13a4bb257f249b094addc0b | [
"MIT"
] | null | null | null | import scipy.io as sio
import time
import os
import numpy as np
import gym
from keras import regularizers
from keras.models import Model
from keras.layers import Dense, Activation, Flatten, Input
from keras.optimizers import Adam
from rl.agents.dqn import DQNAgent
from rl.policy import BoltzmannQPolicy
from rl.memor... | 38.070866 | 115 | 0.680662 | import scipy.io as sio
import time
import os
import numpy as np
import gym
from keras import regularizers
from keras.models import Sequential, Model
from keras.layers import Dense, Activation, Flatten, Input, Subtract, Concatenate, BatchNormalization
from keras.optimizers import Adam
from rl.agents.dqn import DQNAge... | 0 | 0 | 0 | 0 | 0 | 1,273 | 0 | 57 | 45 |
e831e91e03091f462d6e9c6bc4af36897b8dca5b | 1,825 | py | Python | src/artifice/scraper/utils/general.py | artifice-project/artifice-scraper | f224a0da22162fd479d6b9f9095ff5cae4723716 | [
"MIT"
] | null | null | null | src/artifice/scraper/utils/general.py | artifice-project/artifice-scraper | f224a0da22162fd479d6b9f9095ff5cae4723716 | [
"MIT"
] | 5 | 2019-09-18T19:17:14.000Z | 2021-03-20T01:46:06.000Z | src/artifice/scraper/utils/general.py | artifice-project/artifice-scraper | f224a0da22162fd479d6b9f9095ff5cae4723716 | [
"MIT"
] | null | null | null |
def headify(arg):
'''
Eliminates frustration resulting from the automatic formatting
of request header keys.
>>> headify('AUTH_TOKEN')
'Auth-Token'
# TODO::
# >>> headify({'AUTH_TOKEN': 'Unchanged_Value'})
# {'Auth-Token': 'Unchanged_Value'}
'''
func = lambda x: '-'.jo... | 23.701299 | 109 | 0.61589 |
def headify(arg):
'''
Eliminates frustration resulting from the automatic formatting
of request header keys.
>>> headify('AUTH_TOKEN')
'Auth-Token'
# TODO::
# >>> headify({'AUTH_TOKEN': 'Unchanged_Value'})
# {'Auth-Token': 'Unchanged_Value'}
'''
func = lambda x: '-'.jo... | 0 | 0 | 0 | 0 | 0 | 1,277 | 0 | 0 | 161 |
fe67205bcc15927cf1eaff84f93077b22d98de76 | 5,094 | py | Python | src/controller/tunneling/l2_tunnel.py | SSICLOPS/interconnection-agent | 98bd23337de2cc27e0c84d7d1f1c2e060110a4ad | [
"BSD-3-Clause"
] | null | null | null | src/controller/tunneling/l2_tunnel.py | SSICLOPS/interconnection-agent | 98bd23337de2cc27e0c84d7d1f1c2e060110a4ad | [
"BSD-3-Clause"
] | null | null | null | src/controller/tunneling/l2_tunnel.py | SSICLOPS/interconnection-agent | 98bd23337de2cc27e0c84d7d1f1c2e060110a4ad | [
"BSD-3-Clause"
] | null | null | null | """
BSD 3-Clause License
Copyright (c) 2018, Mal Kimmerlin, Aalto University, Finland
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright no... | 37.182482 | 84 | 0.704554 | """
BSD 3-Clause License
Copyright (c) 2018, Maël Kimmerlin, Aalto University, Finland
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright n... | 2 | 53 | 1,584 | 1,456 | 0 | 0 | 0 | 59 | 344 |
d22047a0fb9cfc42ab64bf8122197a1f3d12d798 | 1,269 | py | Python | rpi/manual_tests/move_servos.py | danielmundi/laser-tracking | 7637b04b2cfe71efa265a7e956dd80f99aafd4db | [
"MIT"
] | 2 | 2018-12-13T18:30:17.000Z | 2018-12-13T18:30:31.000Z | rpi/manual_tests/move_servos.py | danielmundi/laser-tracking | 7637b04b2cfe71efa265a7e956dd80f99aafd4db | [
"MIT"
] | null | null | null | rpi/manual_tests/move_servos.py | danielmundi/laser-tracking | 7637b04b2cfe71efa265a7e956dd80f99aafd4db | [
"MIT"
] | null | null | null |
if __name__ == "__main__":
main()
| 27 | 73 | 0.541371 | import pigpio
import time
def main():
laser_pin = 16
motorx_pin = 12
motory_pin = 13
pi = pigpio.pi()
pi.set_mode(motorx_pin, pigpio.OUTPUT) # motor x
pi.set_mode(motory_pin, pigpio.OUTPUT) # motor x
pi.set_mode(laser_pin, pigpio.OUTPUT) # laser
pi.set_pull_up_down(laser_pin, pigpio... | 0 | 0 | 0 | 0 | 0 | 1,158 | 0 | -18 | 90 |
237f7086121854e2159d90eb2b9dc8fa069e5708 | 324 | py | Python | python/Dictionaries/Sports_Data.py | Aditya-Narayan-Nayak/Nxt-wave | 1e0b7daa23ce5c3bdd4f6127c055f053db699573 | [
"MIT"
] | 1 | 2021-11-21T05:31:10.000Z | 2021-11-21T05:31:10.000Z | python/Dictionaries/Sports_Data.py | Aditya-Narayan-Nayak/Bootcamp | 1e0b7daa23ce5c3bdd4f6127c055f053db699573 | [
"MIT"
] | null | null | null | python/Dictionaries/Sports_Data.py | Aditya-Narayan-Nayak/Bootcamp | 1e0b7daa23ce5c3bdd4f6127c055f053db699573 | [
"MIT"
] | 1 | 2021-10-30T16:30:41.000Z | 2021-10-30T16:30:41.000Z | students_dict = {
"Ram": "Cricket",
"Naresh": "Football",
"Vani": "Tennis",
"Rahim": "Cricket"
}
# Write your code here
n = int(input())
for i in range(n):
key_value_pair = input().split()
key, value = key_value_pair[0], key_value_pair[1]
students_dict[key]= value
print(students_dict) ... | 20.25 | 53 | 0.611111 | students_dict = {
"Ram": "Cricket",
"Naresh": "Football",
"Vani": "Tennis",
"Rahim": "Cricket"
}
# Write your code here
n = int(input())
for i in range(n):
key_value_pair = input().split()
key, value = key_value_pair[0], key_value_pair[1]
students_dict[key]= value
print(students_dict) ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
bd8f8bad4fda35e37f23f1431eb3a4af6609864f | 2,977 | py | Python | learn/train.py | girving/pentago-learn | b28399aed8a77152786e97e62ee3e3a8c384af2a | [
"BSD-3-Clause"
] | null | null | null | learn/train.py | girving/pentago-learn | b28399aed8a77152786e97e62ee3e3a8c384af2a | [
"BSD-3-Clause"
] | null | null | null | learn/train.py | girving/pentago-learn | b28399aed8a77152786e97e62ee3e3a8c384af2a | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
"""Pentago neural net training"""
if __name__ == '__main__':
main()
| 26.345133 | 91 | 0.650655 | #!/usr/bin/env python3
"""Pentago neural net training"""
import argparse
import datasets
import equivariant as ev
import haiku as hk
import jax
import jax.numpy as jnp
import numpy as np
import numbers
import optax
import timeit
def pretty_info(info):
def f(v):
return v if isinstance(v, numbers.Integral) else ... | 0 | 709 | 0 | 0 | 0 | 1,880 | 0 | -48 | 336 |
e2dfdf4e284c9277e94a21b459afeef7ae4e11be | 53,701 | py | Python | app/test/test_vesting.py | noob77777/ergopad-api | 50e822b4e54a210688664ca209afcdd09c1bfc2d | [
"MIT"
] | null | null | null | app/test/test_vesting.py | noob77777/ergopad-api | 50e822b4e54a210688664ca209afcdd09c1bfc2d | [
"MIT"
] | 23 | 2022-03-09T11:31:32.000Z | 2022-03-31T08:53:27.000Z | app/test/test_vesting.py | noob77777/ergopad-api | 50e822b4e54a210688664ca209afcdd09c1bfc2d | [
"MIT"
] | 2 | 2022-02-16T03:40:05.000Z | 2022-02-16T22:40:15.000Z | from config import Config, Network
CFG = Config[Network]
DEBUG = True # CFG.DEBUG
| 43.517828 | 626 | 0.571777 | from hashlib import blake2b
import logging
import pytest
from config import Config, Network
from ergo_python_appkit.appkit import ErgoAppKit, ErgoValueT
from sigmastate.lang.exceptions import InterpreterException
from org.ergoplatform.appkit import Address, CoveringBoxes, ErgoToken
import java
CFG = Config[Ne... | 0 | 0 | 0 | 53,268 | 0 | 0 | 0 | 106 | 236 |
5958a2e26d88dc8ace625edd92519b5d66733ed3 | 2,065 | py | Python | plots/LIGO_psds.py | damonge/SNELL | 4bb276225fce8f535619d0f2133a19f3c42aa44f | [
"BSD-3-Clause"
] | 2 | 2020-05-07T03:22:37.000Z | 2021-02-19T14:34:42.000Z | plots/LIGO_psds.py | damonge/SNELL | 4bb276225fce8f535619d0f2133a19f3c42aa44f | [
"BSD-3-Clause"
] | 2 | 2020-04-28T11:13:10.000Z | 2021-06-08T12:20:25.000Z | plots/LIGO_psds.py | damonge/GWSN | 4bb276225fce8f535619d0f2133a19f3c42aa44f | [
"BSD-3-Clause"
] | 2 | 2020-05-07T03:22:43.000Z | 2021-12-05T15:41:05.000Z | import numpy as np
import schnell as snl
import matplotlib.pyplot as plt
from matplotlib import rc
rc('font', **{'family': 'sans-serif',
'sans-serif': ['Helvetica']})
rc('text', usetex=True)
freqs = np.geomspace(8., 1010., 2048)
dets = [snl.GroundDetector('Hanford', 46.4, -119.4, 171.8,
... | 37.545455 | 72 | 0.589831 | import numpy as np
import schnell as snl
import matplotlib.pyplot as plt
from matplotlib import rc
rc('font', **{'family': 'sans-serif',
'sans-serif': ['Helvetica']})
rc('text', usetex=True)
freqs = np.geomspace(8., 1010., 2048)
dets = [snl.GroundDetector('Hanford', 46.4, -119.4, 171.8,
... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
43e5dac36dc6fb3b7053aa83cc101915fd72f719 | 2,930 | py | Python | lively-lions/MUD/items/test/models/test_items.py | Zorakinezear/summer-code-jam-2020 | 33b4158bf89f46eed0a6bc8d37e72d904695a15e | [
"MIT"
] | 40 | 2020-08-02T07:38:22.000Z | 2021-07-26T01:46:50.000Z | lively-lions/MUD/items/test/models/test_items.py | Zorakinezear/summer-code-jam-2020 | 33b4158bf89f46eed0a6bc8d37e72d904695a15e | [
"MIT"
] | 134 | 2020-07-31T12:15:45.000Z | 2020-12-13T04:42:19.000Z | lively-lions/MUD/items/test/models/test_items.py | Zorakinezear/summer-code-jam-2020 | 33b4158bf89f46eed0a6bc8d37e72d904695a15e | [
"MIT"
] | 101 | 2020-07-31T12:00:47.000Z | 2021-11-01T09:06:58.000Z |
# Create your tests here.
| 52.321429 | 110 | 0.594539 | from django.test import TestCase
import pytest
from items.models import Item_Category, Small_Item, Large_Item
# Create your tests here.
@pytest.mark.django_db
class CreateItem(TestCase):
@classmethod
def setUp(self):
# sets up the categories
self.armor_physical = Item_Category.objects.create... | 0 | 2,769 | 0 | 0 | 0 | 0 | 0 | 44 | 89 |
ba641889131fadc1d79f357714df4408ae2397cf | 7,517 | py | Python | minecraft/networking/packets/clientbound/play/chunk_data_packet.py | kisate/mPyCraft | adc986d0035f6c3cfd038482ef90273e0e5ffc3b | [
"Apache-2.0"
] | null | null | null | minecraft/networking/packets/clientbound/play/chunk_data_packet.py | kisate/mPyCraft | adc986d0035f6c3cfd038482ef90273e0e5ffc3b | [
"Apache-2.0"
] | null | null | null | minecraft/networking/packets/clientbound/play/chunk_data_packet.py | kisate/mPyCraft | adc986d0035f6c3cfd038482ef90273e0e5ffc3b | [
"Apache-2.0"
] | null | null | null |
GLOBAL_BITS_PER_BLOCK = 14 #TODO
| 42.954286 | 155 | 0.508847 | from minecraft.networking.packets import (
Packet, AbstractKeepAlivePacket, AbstractPluginMessagePacket, PacketBuffer
)
from minecraft.networking.types import (
Integer, FixedPointInteger, Angle, UnsignedByte, Byte, Boolean, UUID,
Short, VarInt, Double, Float, String, Enum, Difficulty, Dimension,
GameM... | 0 | 37 | 0 | 6,926 | 0 | 0 | 0 | 404 | 114 |