hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 248 | max_stars_repo_name stringlengths 5 125 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | 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 3 248 | max_issues_repo_name stringlengths 5 125 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | 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 3 248 | max_forks_repo_name stringlengths 5 125 | 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 5 2.06M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.03M | alphanum_fraction float64 0 1 | count_classes int64 0 1.6M | score_classes float64 0 1 | count_generators int64 0 651k | score_generators float64 0 1 | count_decorators int64 0 990k | score_decorators float64 0 1 | count_async_functions int64 0 235k | score_async_functions float64 0 1 | count_documentation int64 0 1.04M | score_documentation float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
cf296e88d03c596024b49c000c2c21fe1354248f | 3,991 | py | Python | main.py | prjavidi/C- | 76e7c7720a921e48726ad652cfc0f1000f9a2b3e | [
"MIT"
] | null | null | null | main.py | prjavidi/C- | 76e7c7720a921e48726ad652cfc0f1000f9a2b3e | [
"MIT"
] | null | null | null | main.py | prjavidi/C- | 76e7c7720a921e48726ad652cfc0f1000f9a2b3e | [
"MIT"
] | null | null | null | '''chane the below arguments to check different tasks'''
TRAINSIZE = 5000
TESTSIZE = 500
'''To check TASK 3 put Normalize=1 otherwise 0'''
Nomalize = 1
learningRate = 0.01
threshold = 85
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
@np.vectorize
def sigmoid(x):
return 1 / (1 + np.e ** -x)... | 27.14966 | 104 | 0.606865 | 0 | 0 | 0 | 0 | 61 | 0.015284 | 0 | 0 | 813 | 0.203708 |
cf29a3a3726068b1f04b6f5636cece5035884b63 | 465 | py | Python | stackoverflow.py | kenenbek/MultiAgent | 3276d192416503bb1705a3a190649c8bcf3dd630 | [
"MIT"
] | null | null | null | stackoverflow.py | kenenbek/MultiAgent | 3276d192416503bb1705a3a190649c8bcf3dd630 | [
"MIT"
] | null | null | null | stackoverflow.py | kenenbek/MultiAgent | 3276d192416503bb1705a3a190649c8bcf3dd630 | [
"MIT"
] | null | null | null | from scipy.stats import chi2
import numpy as np
from matplotlib import pyplot as plt
from scipy import optimize
import pickle
objects = []
with open("priceZZZ", "rb") as openfile:
while True:
try:
objects.append(pickle.load(openfile))
except EOFError:
break
for ... | 27.352941 | 93 | 0.636559 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 14 | 0.030108 |
cf2bb8c6d785b39a5517d20fc3e9d6b495f276b6 | 1,080 | py | Python | 11_python-data-science-toolbox-(part-2)/2-list-comprehensions-and-generators/10_changing-the-output-in-generator-expressions.py | mohd-faizy/DataScience-With-Python | 13ebb10cf9083343056d5b782957241de1d595f9 | [
"MIT"
] | 5 | 2021-02-03T14:36:58.000Z | 2022-01-01T10:29:26.000Z | 11_python-data-science-toolbox-(part-2)/2-list-comprehensions-and-generators/10_changing-the-output-in-generator-expressions.py | mohd-faizy/DataScience-With-Python | 13ebb10cf9083343056d5b782957241de1d595f9 | [
"MIT"
] | null | null | null | 11_python-data-science-toolbox-(part-2)/2-list-comprehensions-and-generators/10_changing-the-output-in-generator-expressions.py | mohd-faizy/DataScience-With-Python | 13ebb10cf9083343056d5b782957241de1d595f9 | [
"MIT"
] | 3 | 2021-02-08T00:31:16.000Z | 2022-03-17T13:52:32.000Z | '''
10 - Changing the output in generator expressions
Great! At this point, you already know how to write a basic generator expression.
In this exercise, you will push this idea a little further by adding to the output
expression of a generator expression. Because generator expressions and list
comprehensions are so ... | 36 | 86 | 0.773148 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 964 | 0.892593 |
cf2c4d8068a5e81799ce759db7c058c410706010 | 6,269 | py | Python | polyaxon/scheduler/spawners/tensorboard_spawner.py | elyase/polyaxon | 1c19f059a010a6889e2b7ea340715b2bcfa382a0 | [
"MIT"
] | null | null | null | polyaxon/scheduler/spawners/tensorboard_spawner.py | elyase/polyaxon | 1c19f059a010a6889e2b7ea340715b2bcfa382a0 | [
"MIT"
] | null | null | null | polyaxon/scheduler/spawners/tensorboard_spawner.py | elyase/polyaxon | 1c19f059a010a6889e2b7ea340715b2bcfa382a0 | [
"MIT"
] | null | null | null | import json
import random
from django.conf import settings
from polyaxon_k8s.exceptions import PolyaxonK8SError
from scheduler.spawners.project_job_spawner import ProjectJobSpawner
from scheduler.spawners.templates import constants, ingresses, services
from scheduler.spawners.templates.pod_environment import (
ge... | 43.534722 | 93 | 0.595948 | 5,709 | 0.910672 | 0 | 0 | 0 | 0 | 0 | 0 | 162 | 0.025841 |
cf2cdf5265503bfa5f46413c8c8ff1d4149197dd | 4,651 | py | Python | iot/rooms/__init__.py | joh90/iot | 4a571be7e0760445dd2d5be858ecb4372b5d59b4 | [
"MIT"
] | 6 | 2018-11-06T02:07:21.000Z | 2021-12-15T07:56:14.000Z | iot/rooms/__init__.py | joh90/iot | 4a571be7e0760445dd2d5be858ecb4372b5d59b4 | [
"MIT"
] | 7 | 2019-06-17T15:50:22.000Z | 2021-03-14T19:24:16.000Z | iot/rooms/__init__.py | joh90/iot | 4a571be7e0760445dd2d5be858ecb4372b5d59b4 | [
"MIT"
] | 1 | 2020-05-26T09:32:56.000Z | 2020-05-26T09:32:56.000Z | import logging
from iot.constants import ROOM_LIST_MESSAGE
from iot.utils import return_mac
from iot.devices import DeviceType
from iot.devices.broadlink import (
BroadlinkDeviceFactory,
BroadlinkDeviceTypes
)
from iot.devices.errors import (
DeviceTypeNotFound, BrandNotFound,
SendCommandError
)
from ... | 29.436709 | 81 | 0.529779 | 4,071 | 0.875296 | 0 | 0 | 0 | 0 | 0 | 0 | 656 | 0.141045 |
cf2d6649ae78a91eff025de10e3d668a7dec13c5 | 2,919 | py | Python | start.py | mutageneral/fossdiscord | 54111e6e6ff8ee64f54241a11b9da52db4776223 | [
"MIT"
] | null | null | null | start.py | mutageneral/fossdiscord | 54111e6e6ff8ee64f54241a11b9da52db4776223 | [
"MIT"
] | null | null | null | start.py | mutageneral/fossdiscord | 54111e6e6ff8ee64f54241a11b9da52db4776223 | [
"MIT"
] | null | null | null | import os, ctypes, sys, subprocess, config, globalconfig, shutil
from git import Repo
from shutil import copyfile
commands = ["--help", "--updatebot", "--start", "--credits"]
def startbot():
print("Attempting to start the bot...")
print("REMEMBER: YOU MUST RUN THE COMMAND '" + config.prefix + "shutdownbot' TO... | 42.304348 | 249 | 0.64063 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,398 | 0.478931 |
cf2ebd0be605b85c733e5e7a385de095a11ecc48 | 932 | py | Python | QTM/MixQC/1.0.0/plt.py | binggu56/qmd | e2628710de15f8a8b9a1280fcf92f9e87559414c | [
"MIT"
] | null | null | null | QTM/MixQC/1.0.0/plt.py | binggu56/qmd | e2628710de15f8a8b9a1280fcf92f9e87559414c | [
"MIT"
] | null | null | null | QTM/MixQC/1.0.0/plt.py | binggu56/qmd | e2628710de15f8a8b9a1280fcf92f9e87559414c | [
"MIT"
] | null | null | null | ##!/usr/bin/python
import numpy as np
import pylab as pl
#with open("traj.dat") as f:
# data = f.read()
#
# data = data.split('\n')
#
# x = [row.split(' ')[0] for row in data]
# y = [row.split(' ')[1] for row in data]
#
# fig = plt.figure()
#
# ax1 = fig.add_subplot(111)
#
# ax1.set_title("Plot t... | 19.416667 | 49 | 0.549356 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 663 | 0.711373 |
cf2ee0d6951dff87d2cc119417466bb9ccb36246 | 2,753 | py | Python | generator/generator.py | zbelateche/ee272_cgra | 4cf2e3cf4a4bdf585d87a9209a5bf252666bc6a2 | [
"BSD-3-Clause"
] | 1 | 2020-07-23T02:57:12.000Z | 2020-07-23T02:57:12.000Z | generator/generator.py | zbelateche/ee272_cgra | 4cf2e3cf4a4bdf585d87a9209a5bf252666bc6a2 | [
"BSD-3-Clause"
] | null | null | null | generator/generator.py | zbelateche/ee272_cgra | 4cf2e3cf4a4bdf585d87a9209a5bf252666bc6a2 | [
"BSD-3-Clause"
] | 1 | 2021-04-27T23:13:43.000Z | 2021-04-27T23:13:43.000Z | from abc import ABC, abstractmethod
from ordered_set import OrderedSet
import magma
from common.collections import DotDict
from generator.port_reference import PortReference, PortReferenceBase
import warnings
class Generator(ABC):
def __init__(self):
self.ports = DotDict()
self.wires = []
@ab... | 30.588889 | 69 | 0.55721 | 2,541 | 0.922993 | 0 | 0 | 555 | 0.201598 | 0 | 0 | 117 | 0.042499 |
cf308bf1eb0d73c66e892cc4b6703edb92094ed6 | 709 | py | Python | oms_cms/backend/info_block/models.py | Hamel007/oms_cms | a120b27932fe1bd89f2c621c181b80b19caba0e0 | [
"BSD-3-Clause"
] | null | null | null | oms_cms/backend/info_block/models.py | Hamel007/oms_cms | a120b27932fe1bd89f2c621c181b80b19caba0e0 | [
"BSD-3-Clause"
] | null | null | null | oms_cms/backend/info_block/models.py | Hamel007/oms_cms | a120b27932fe1bd89f2c621c181b80b19caba0e0 | [
"BSD-3-Clause"
] | null | null | null | from django.db import models
from oms_gallery.models import Gallery
from oms_cms.backend.languages.models import AbstractLang
class InfoBlock(AbstractLang):
"""Модель инфо блока"""
title = models.CharField("Заголовок", max_length=100)
sub_title = models.CharField("Под заголовок", max_length=100, blank=Tr... | 28.36 | 88 | 0.686883 | 646 | 0.832474 | 0 | 0 | 0 | 0 | 0 | 0 | 157 | 0.20232 |
cf314a62fbc67887598a3f07228dd471a1ffe7af | 4,724 | py | Python | modules/SampleGenerator/SampleGenerator.py | ediril/BCI | f211ba70d6d75a9badff6872f86416b065f6192b | [
"BSD-2-Clause"
] | 6 | 2016-12-30T03:43:49.000Z | 2020-04-19T16:04:37.000Z | modules/SampleGenerator/SampleGenerator.py | hongweimao/BCI | 49b7e8137bd5f9d18e3efdbd94a112cde5d16c4c | [
"BSD-2-Clause"
] | 1 | 2022-03-08T09:16:10.000Z | 2022-03-08T09:16:10.000Z | modules/SampleGenerator/SampleGenerator.py | ediril/BCI | f211ba70d6d75a9badff6872f86416b065f6192b | [
"BSD-2-Clause"
] | 2 | 2015-06-16T02:46:03.000Z | 2018-12-20T20:07:59.000Z | #!/usr/bin/python
import time
import sys
import platform
from ConfigParser import SafeConfigParser
from PyDragonfly import Dragonfly_Module, CMessage, copy_to_msg, copy_from_msg, MT_EXIT
from argparse import ArgumentParser
from dragonfly_utils import respond_to_ping
import Dragonfly_config as rc
class SampleGenerator... | 41.078261 | 109 | 0.577053 | 4,005 | 0.847798 | 0 | 0 | 0 | 0 | 0 | 0 | 611 | 0.12934 |
cf33c0f359af61ed23f396ff759a9bbdc5a2e5ec | 7,118 | py | Python | app/gws/web/wrappers.py | ewie/gbd-websuite | 6f2814c7bb64d11cb5a0deec712df751718fb3e1 | [
"Apache-2.0"
] | null | null | null | app/gws/web/wrappers.py | ewie/gbd-websuite | 6f2814c7bb64d11cb5a0deec712df751718fb3e1 | [
"Apache-2.0"
] | null | null | null | app/gws/web/wrappers.py | ewie/gbd-websuite | 6f2814c7bb64d11cb5a0deec712df751718fb3e1 | [
"Apache-2.0"
] | null | null | null | import os
import gzip
import io
import werkzeug.utils
import werkzeug.wrappers
import werkzeug.wsgi
from werkzeug.utils import cached_property
import gws
import gws.tools.date
import gws.tools.json2
import gws.tools.net
import gws.tools.vendor.umsgpack as umsgpack
import gws.web.error
import gws.types as t
_JSON =... | 31.635556 | 117 | 0.609722 | 6,647 | 0.93383 | 0 | 0 | 1,688 | 0.237145 | 0 | 0 | 838 | 0.11773 |
cf3478f4de02de9ef45febd053640f7c5386da10 | 778 | py | Python | game_shop/forms.py | ziyic/UoA_PGT_CS551Q_shopping | e0ccf867871f2ecc014a5e6fff95cba4b8342393 | [
"BSD-3-Clause"
] | null | null | null | game_shop/forms.py | ziyic/UoA_PGT_CS551Q_shopping | e0ccf867871f2ecc014a5e6fff95cba4b8342393 | [
"BSD-3-Clause"
] | null | null | null | game_shop/forms.py | ziyic/UoA_PGT_CS551Q_shopping | e0ccf867871f2ecc014a5e6fff95cba4b8342393 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# @Author : Ziyi Cao
# @Time : 2021/4/26
# @Function:
from django import forms
from django.contrib.auth.models import User
from django.contrib.auth.forms import UserCreationForm
from .models import Game
class SignUpForm(UserCreationForm):
username = forms.CharFi... | 25.933333 | 64 | 0.660668 | 517 | 0.664524 | 0 | 0 | 0 | 0 | 0 | 0 | 184 | 0.236504 |
cf34a3f0197c3f6dc8a1f65c74ae293fb179d4ac | 3,299 | py | Python | mozinor/example/toto_stack_model_script.py | Jwuthri/Mozinor | 5a2cd4f0447a96425d899a8e063668741a091a8b | [
"MIT"
] | 3 | 2017-08-17T21:32:05.000Z | 2018-07-30T11:30:09.000Z | mozinor/example/toto_stack_model_script.py | Jwuthri/Mozinor | 5a2cd4f0447a96425d899a8e063668741a091a8b | [
"MIT"
] | null | null | null | mozinor/example/toto_stack_model_script.py | Jwuthri/Mozinor | 5a2cd4f0447a96425d899a8e063668741a091a8b | [
"MIT"
] | null | null | null |
# -*- coding: utf-8 -*-
"""
Created on July 2017
@author: JulienWuthrich
"""
import pandas as pd
import numpy as np
from sklearn.preprocessing import PolynomialFeatures
from sklearn.metrics import mean_absolute_error, accuracy_score, r2_score
from sklearn.model_selection import train_test_split
from sklearn.ensembl... | 35.095745 | 136 | 0.76114 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 453 | 0.137314 |
cf36336bd222b8046304d99fe89eeed7d9b73ede | 4,330 | py | Python | Detection and Tracking/main.py | Jay-Nehra/Object-Detection | f91085ecf709d21bf7ffd3b2e370fc36ae5e88f2 | [
"BSD-3-Clause"
] | 1 | 2021-01-23T09:11:59.000Z | 2021-01-23T09:11:59.000Z | Detection and Tracking/main.py | Jay-Nehra/Object-Detection | f91085ecf709d21bf7ffd3b2e370fc36ae5e88f2 | [
"BSD-3-Clause"
] | null | null | null | Detection and Tracking/main.py | Jay-Nehra/Object-Detection | f91085ecf709d21bf7ffd3b2e370fc36ae5e88f2 | [
"BSD-3-Clause"
] | null | null | null | """
this program takes in a checkerboard image from a camera and calibrates the
image to remove camera radial and tangential distortion.
"""
import cv2
import YOLO as odYOLO # object detection using YOLO
import HOG as odHOG # object detection using an svm and HOG features
import data
import numpy as np
""" Uncomment ... | 37.982456 | 115 | 0.671132 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,158 | 0.498383 |
cf372286c3b00f6d57b36a97cb015d54cb8dfc38 | 28,542 | py | Python | IndoorPositionEstimator/cflib/drone_quaternion.py | capriele/Crazyflie-Indoor-Position-Logger-Controller | 6f7a44984553d85a66a29c169a2f7c758a2aaac7 | [
"Apache-2.0"
] | 6 | 2017-04-23T15:47:57.000Z | 2020-03-15T17:52:15.000Z | IndoorPositionEstimator/cflib/drone_quaternion.py | capriele/Crazyflie-Indoor-Position-Logger-Controller | 6f7a44984553d85a66a29c169a2f7c758a2aaac7 | [
"Apache-2.0"
] | null | null | null | IndoorPositionEstimator/cflib/drone_quaternion.py | capriele/Crazyflie-Indoor-Position-Logger-Controller | 6f7a44984553d85a66a29c169a2f7c758a2aaac7 | [
"Apache-2.0"
] | null | null | null | """
Quadcopter Model + LQR Control + BackStepping Control
"""
#
# Author: Alberto Petrucci (petrucci.alberto@gmail.com) 2017
#
#__author__ = "Alberto Petrucci"
#__copyright__ = "Copyright 2017, Alberto Petrucci"
#__credits__ = ["Alberto Petrucci"]
#__license__ = "Apache"
#__version__ = "1.0.0"
#__maintainer__ = "Alber... | 37.654354 | 1,374 | 0.387044 | 28,042 | 0.982482 | 0 | 0 | 0 | 0 | 0 | 0 | 2,928 | 0.102586 |
cf37f380f3a304d0ac99d99b4a587e12239fe76f | 766 | py | Python | alipay/aop/api/response/AlipayInsSceneInsserviceprodSerinfoSyncResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/response/AlipayInsSceneInsserviceprodSerinfoSyncResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/response/AlipayInsSceneInsserviceprodSerinfoSyncResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.response.AlipayResponse import AlipayResponse
class AlipayInsSceneInsserviceprodSerinfoSyncResponse(AlipayResponse):
def __init__(self):
super(AlipayInsSceneInsserviceprodSerinfoSyncResponse, self).__init__()
self._ser... | 29.461538 | 120 | 0.733681 | 638 | 0.832898 | 0 | 0 | 151 | 0.197128 | 0 | 0 | 68 | 0.088773 |
cf38a491c875d1bd0ae06532a675a01ccb64787d | 426 | py | Python | tests/integration/test_status.py | pnw/env-tracker | ab7a539afa329b529b6e10e55ca23cc214e0fd49 | [
"MIT"
] | null | null | null | tests/integration/test_status.py | pnw/env-tracker | ab7a539afa329b529b6e10e55ca23cc214e0fd49 | [
"MIT"
] | null | null | null | tests/integration/test_status.py | pnw/env-tracker | ab7a539afa329b529b6e10e55ca23cc214e0fd49 | [
"MIT"
] | null | null | null | from tests.helpers import BaseTestCase
class TestStatusCommand(BaseTestCase):
def test_can_status(self):
"""
Default use case where user invokes `et status` with minimal parameters
"""
self.fail('Not Implemented')
def test_does_not_work_outside_of_a_linked_project(self):
... | 26.625 | 79 | 0.65493 | 384 | 0.901408 | 0 | 0 | 0 | 0 | 0 | 0 | 194 | 0.455399 |
cf39abdd7b9db220323875a0a137611f84fce21d | 1,646 | py | Python | functions/07.py | luan-gomes/python-basic-exercises | 213844b421b27ab3e9c09be24d4efb37cc6fce08 | [
"MIT"
] | null | null | null | functions/07.py | luan-gomes/python-basic-exercises | 213844b421b27ab3e9c09be24d4efb37cc6fce08 | [
"MIT"
] | null | null | null | functions/07.py | luan-gomes/python-basic-exercises | 213844b421b27ab3e9c09be24d4efb37cc6fce08 | [
"MIT"
] | null | null | null | """
1) Faça um programa que use a função valorPagamento para determinar o
valor a ser pago por uma prestação de uma conta.
2) O programa deverá solicitar ao usuário o valor da prestação e o número
de dias em atraso e passar estes valores para a função valorPagamento,
que calculará o valor a ser pago e devolverá est... | 35.021277 | 74 | 0.744228 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,158 | 0.688057 |
cf3a73df976f6a84385fb7762c36292debe844b3 | 1,814 | py | Python | common/login.py | zhaopiandehuiyiforsang/python_test | 7a6ef77afd3b436f798ca68c77b9ac8669e00094 | [
"MIT"
] | null | null | null | common/login.py | zhaopiandehuiyiforsang/python_test | 7a6ef77afd3b436f798ca68c77b9ac8669e00094 | [
"MIT"
] | null | null | null | common/login.py | zhaopiandehuiyiforsang/python_test | 7a6ef77afd3b436f798ca68c77b9ac8669e00094 | [
"MIT"
] | null | null | null | # -*- conding:utf-8 -*-
from init_env import BASE_DIR
from common.HttpUtils import HttpUtils
from common.env_config import ServerCC
from common.DateUtils import currentTimeMillis, DateTime
import json
import os
token_json_path = BASE_DIR + '/resources/token.json'
"""
获取接口调用凭证token工具
"""
URL_AUTH = 'https://rasdev9.z... | 25.914286 | 60 | 0.669239 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 307 | 0.165946 |
cf3ae41287d546e236788642c821e46e2316896c | 2,269 | py | Python | practice/src/design_pattern/Interpreter.py | t10471/python | 75056454bfb49197eb44f6b4d6a1b0a0b4b408ec | [
"MIT"
] | null | null | null | practice/src/design_pattern/Interpreter.py | t10471/python | 75056454bfb49197eb44f6b4d6a1b0a0b4b408ec | [
"MIT"
] | null | null | null | practice/src/design_pattern/Interpreter.py | t10471/python | 75056454bfb49197eb44f6b4d6a1b0a0b4b408ec | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import datetime
import os
#compsiteとcommandをあわせたような形
#ContextがhandlerでCommandが処理
class JobCommand(object):
def execute(self, context):
if context.getCurrentCommand() != 'begin':
raise Exception('illegal command ' + str(context.getCurrentCommand()))
command_list... | 26.383721 | 82 | 0.588365 | 1,887 | 0.820792 | 0 | 0 | 0 | 0 | 0 | 0 | 301 | 0.130926 |
cf3bbae06f3088b31cf43074001976c60e15c3b8 | 262 | py | Python | wbb/utils/filter_groups.py | Imran95942/userbotisl | 1614af1d1ba904dfd5e28dfd5b3e21d5e24bb55c | [
"MIT"
] | 1 | 2021-11-17T13:25:25.000Z | 2021-11-17T13:25:25.000Z | wbb/utils/filter_groups.py | Imran95942/userbotisl | 1614af1d1ba904dfd5e28dfd5b3e21d5e24bb55c | [
"MIT"
] | null | null | null | wbb/utils/filter_groups.py | Imran95942/userbotisl | 1614af1d1ba904dfd5e28dfd5b3e21d5e24bb55c | [
"MIT"
] | null | null | null | chat_filters_group = 1
chatbot_group = 2
karma_positive_group = 3
karma_negative_group = 4
regex_group = 5
welcome_captcha_group = 6
antiflood_group = 7
blacklist_filters_group = 8
taglog_group = 9
chat_watcher_group = 10
flood_group = 11
autocorrect_group = 12
| 20.153846 | 27 | 0.816794 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
cf3bfcccde630a28147bd6f4bf35f454312666f8 | 179 | py | Python | tests/model.py | gunyarakun/cached-image-optimizer | 80e4c9501bcde1a82e8aeb24c32563d97841dafa | [
"MIT"
] | 2 | 2021-04-06T06:07:35.000Z | 2021-04-16T08:42:13.000Z | tests/model.py | gunyarakun/cached-image-optimizer | 80e4c9501bcde1a82e8aeb24c32563d97841dafa | [
"MIT"
] | null | null | null | tests/model.py | gunyarakun/cached-image-optimizer | 80e4c9501bcde1a82e8aeb24c32563d97841dafa | [
"MIT"
] | null | null | null | from dataclasses import dataclass
from typing import Dict
@dataclass(frozen=True)
class FixtureURLContent:
content: bytes = b""
FixtureURLS = Dict[str, FixtureURLContent]
| 16.272727 | 42 | 0.776536 | 49 | 0.273743 | 0 | 0 | 73 | 0.407821 | 0 | 0 | 3 | 0.01676 |
cf3e620c460aed9e0fba7d56f5f6161f6fb1dbd6 | 3,162 | py | Python | my_pilz_sandbox/scripts/pause.py | ct2034/my_pilz_sandbox | 40400c6469918f56d384580d41f61b2cca3b49c9 | [
"BSD-3-Clause"
] | null | null | null | my_pilz_sandbox/scripts/pause.py | ct2034/my_pilz_sandbox | 40400c6469918f56d384580d41f61b2cca3b49c9 | [
"BSD-3-Clause"
] | null | null | null | my_pilz_sandbox/scripts/pause.py | ct2034/my_pilz_sandbox | 40400c6469918f56d384580d41f61b2cca3b49c9 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
from geometry_msgs.msg import Pose, Point, PoseArray, Quaternion
import math
import numpy as np
from pilz_robot_programming import *
import random
import rospy
import time
__REQUIRED_API_VERSION__ = "1" # API version
SLOW_VEL_SCALE = .1
ACC_SCALE = .1
GRIPPER_POSE_CLOSED = 0.001
GRIPPER_POSE_OP... | 30.403846 | 92 | 0.606262 | 445 | 0.140734 | 0 | 0 | 0 | 0 | 0 | 0 | 293 | 0.092663 |
cf3f13905a5ccf5bc9884a2805ccfdf8e0e29624 | 822 | py | Python | feed-runner.py | quandram/podcatcher | b1d14b10b3e1afd1947e09ddf2006dac37c6fae7 | [
"MIT"
] | null | null | null | feed-runner.py | quandram/podcatcher | b1d14b10b3e1afd1947e09ddf2006dac37c6fae7 | [
"MIT"
] | null | null | null | feed-runner.py | quandram/podcatcher | b1d14b10b3e1afd1947e09ddf2006dac37c6fae7 | [
"MIT"
] | null | null | null | import configparser
import os
from podcatcher import podcatcher
import configKeys
def update_last_processed_date(config, configSection, lastDownloadedDate):
config.set(configSection, configKeys.LAST_DOWNLOADED_DATE, lastDownloadedDate.strftime("%Y-%m-%d %H:%M:%S %Z"))
with open(os.path.join(os.path.dirname(__... | 37.363636 | 161 | 0.744526 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 59 | 0.071776 |
cf3ffee88a76c631b85e7a5469a248333708be1a | 34 | py | Python | src/superfit/mainwindow/__init__.py | awacha/superfit | a95d346c4b38f61173c7434eb7389e2cf1ccae9c | [
"BSD-3-Clause"
] | null | null | null | src/superfit/mainwindow/__init__.py | awacha/superfit | a95d346c4b38f61173c7434eb7389e2cf1ccae9c | [
"BSD-3-Clause"
] | null | null | null | src/superfit/mainwindow/__init__.py | awacha/superfit | a95d346c4b38f61173c7434eb7389e2cf1ccae9c | [
"BSD-3-Clause"
] | null | null | null | from .mainwindow import MainWindow | 34 | 34 | 0.882353 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
cf431e72726e4b11c54c98c1b966e61f78dddfff | 7,755 | py | Python | source/code/tag_utilities.py | awslabs/tag-tamer | bfd164c36b5e3ba8e01aba54d973ce372e982b09 | [
"MIT",
"MIT-0"
] | 15 | 2021-06-27T23:42:37.000Z | 2021-09-24T19:40:00.000Z | source/code/tag_utilities.py | awslabs/tag-tamer | bfd164c36b5e3ba8e01aba54d973ce372e982b09 | [
"MIT",
"MIT-0"
] | 7 | 2021-07-05T06:56:46.000Z | 2021-08-06T00:59:36.000Z | source/code/tag_utilities.py | awslabs/tag-tamer | bfd164c36b5e3ba8e01aba54d973ce372e982b09 | [
"MIT",
"MIT-0"
] | 5 | 2021-06-23T17:59:01.000Z | 2021-10-20T14:22:44.000Z | """
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: MIT-0
Tag Tamer utility functions to evaluate resource tags
"""
import logging
# Instantiate logging for this module using its file name
log = logging.getLogger(__name__)
def tag_filter_matcher(
conjunct... | 40.602094 | 102 | 0.660477 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,048 | 0.135139 |
cf44da1421ffcad816c602ccc4edb40367643818 | 199 | py | Python | prof_school/__init__.py | mohamedmelsayed/erp-school | 6da9bc4c4634e3b362be18f55300aacf147c32a3 | [
"MIT"
] | null | null | null | prof_school/__init__.py | mohamedmelsayed/erp-school | 6da9bc4c4634e3b362be18f55300aacf147c32a3 | [
"MIT"
] | null | null | null | prof_school/__init__.py | mohamedmelsayed/erp-school | 6da9bc4c4634e3b362be18f55300aacf147c32a3 | [
"MIT"
] | null | null | null | from .models import stage
from .models import level
from .models import class_name
from .models import student
from .models import parent
from .models import study_year
from .models import enrollment | 28.428571 | 30 | 0.829146 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
cf458acadf833d83661ceef97551521840b2249b | 730 | py | Python | brewerslab-orig-commander/metroui/ajaxRecalculate.py | allena29/brewerslabng | f47e671971436b7af806b54f6019c5b185d7d194 | [
"Apache-2.0"
] | 1 | 2020-04-12T10:08:10.000Z | 2020-04-12T10:08:10.000Z | brewerslab-orig-commander/metroui/ajaxRecalculate.py | allena29/brewerslabng | f47e671971436b7af806b54f6019c5b185d7d194 | [
"Apache-2.0"
] | 2 | 2021-12-13T20:09:45.000Z | 2022-03-08T21:09:57.000Z | brewerslab-orig-commander/metroui/ajaxRecalculate.py | allena29/brewerslabng | f47e671971436b7af806b54f6019c5b185d7d194 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
import re
import sys
import cgi
import _mysql
import mysql.connector
from thememetro import *
from cloudNG import *
con=mysql.connector.connect(user='brewerslab',password='beer',database="brewerslab")
form=cgi.FieldStorage()
theme=webTheme()
theme.bgcolor="#ffffff"
if theme.localUser:
sys.stdout.wri... | 28.076923 | 84 | 0.746575 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 319 | 0.436986 |
cf4635f6758052b35e57afc944ef8877bef8bb73 | 3,624 | py | Python | PostDiffMixture/le_experiments/epsilonGreedyPolicy.py | SIGKDDanon/SIGKDD2021DeAnonV2 | 76f0373ec42ab55feefed3f4ce4bf4d532b51dd2 | [
"Apache-2.0"
] | null | null | null | PostDiffMixture/le_experiments/epsilonGreedyPolicy.py | SIGKDDanon/SIGKDD2021DeAnonV2 | 76f0373ec42ab55feefed3f4ce4bf4d532b51dd2 | [
"Apache-2.0"
] | null | null | null | PostDiffMixture/le_experiments/epsilonGreedyPolicy.py | SIGKDDanon/SIGKDD2021DeAnonV2 | 76f0373ec42ab55feefed3f4ce4bf4d532b51dd2 | [
"Apache-2.0"
] | null | null | null | import sys
import csv
import random
import math
import numpy
def constant_policy(num_actions):
''' 1-based action '''
return 1
def getEpsilonGreedyAction(eps, num_actions, default_policy):
'''
Performs epsilon greedy exploration with specified default policy.
This works as follows: in epsilon o... | 34.846154 | 122 | 0.625828 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,215 | 0.33508 |
cf47aca5fbdc5c963454eb2445883327bc3c473e | 267 | py | Python | libp2p/protocol_muxer/exceptions.py | lithp/py-libp2p | f38899e26edabe59b291e466143d1c696c44de8d | [
"Apache-2.0",
"MIT"
] | null | null | null | libp2p/protocol_muxer/exceptions.py | lithp/py-libp2p | f38899e26edabe59b291e466143d1c696c44de8d | [
"Apache-2.0",
"MIT"
] | null | null | null | libp2p/protocol_muxer/exceptions.py | lithp/py-libp2p | f38899e26edabe59b291e466143d1c696c44de8d | [
"Apache-2.0",
"MIT"
] | null | null | null | from libp2p.exceptions import BaseLibp2pError
class MultiselectError(BaseLibp2pError):
"""Raised when an error occurs in multiselect process"""
class MultiselectClientError(BaseLibp2pError):
"""Raised when an error occurs in protocol selection process"""
| 26.7 | 67 | 0.790262 | 215 | 0.805243 | 0 | 0 | 0 | 0 | 0 | 0 | 119 | 0.445693 |
cf47b256b9183a754f0c9560868b735c8181e6d5 | 9,250 | py | Python | cli/train.py | breid1313/nlp_hw3_text_fcn_pytorch | a4234e90d37e94a3043d9715c90bac7543f4b0ae | [
"Apache-2.0"
] | null | null | null | cli/train.py | breid1313/nlp_hw3_text_fcn_pytorch | a4234e90d37e94a3043d9715c90bac7543f4b0ae | [
"Apache-2.0"
] | null | null | null | cli/train.py | breid1313/nlp_hw3_text_fcn_pytorch | a4234e90d37e94a3043d9715c90bac7543f4b0ae | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Vladislav Lialin and Skillfactory LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable la... | 36.27451 | 162 | 0.647027 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4,463 | 0.482486 |
cf483c36d559d50ef56df32e2b8c8288a4ddb79b | 7,436 | py | Python | src/profile.py | SimonPerche/PersonalitiesWars | 495803a5be5e9fde572c3f39086d8a3510c75f58 | [
"MIT"
] | null | null | null | src/profile.py | SimonPerche/PersonalitiesWars | 495803a5be5e9fde572c3f39086d8a3510c75f58 | [
"MIT"
] | null | null | null | src/profile.py | SimonPerche/PersonalitiesWars | 495803a5be5e9fde572c3f39086d8a3510c75f58 | [
"MIT"
] | 1 | 2022-03-08T22:07:50.000Z | 2022-03-08T22:07:50.000Z | from datetime import datetime, timedelta
import asyncio
import math
from collections import defaultdict
import discord
from discord.ext import commands, pages
from discord.commands import slash_command, Option
from database import DatabaseDeck, DatabasePersonality
from roll import min_until_next_claim
import utils
... | 44.261905 | 120 | 0.620764 | 7,115 | 0.956832 | 0 | 0 | 6,943 | 0.933701 | 6,265 | 0.842523 | 1,468 | 0.197418 |
cf49e6d7e31e1c1a3165ef1af9d24717e6080a4b | 11,063 | py | Python | migrations/versions/95805663f7bd_.py | Anioko/CMS | b6465faf2a5d7333f494526bcddf8083d6807aee | [
"MIT"
] | null | null | null | migrations/versions/95805663f7bd_.py | Anioko/CMS | b6465faf2a5d7333f494526bcddf8083d6807aee | [
"MIT"
] | 1 | 2021-06-02T01:40:15.000Z | 2021-06-02T01:40:15.000Z | migrations/versions/95805663f7bd_.py | Anioko/CMS | b6465faf2a5d7333f494526bcddf8083d6807aee | [
"MIT"
] | null | null | null | """empty message
Revision ID: 95805663f7bd
Revises:
Create Date: 2020-05-30 12:10:57.896357
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '95805663f7bd'
down_revision = None
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto gene... | 45.714876 | 92 | 0.669891 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,759 | 0.24939 |
cf4a7aaf148ceec8298f56012e99d6d50054187d | 957 | py | Python | daseg/slack.py | pzelasko/daseg | 5e3aaf6e81a44a5eb42226bd376c92c7d1879261 | [
"Apache-2.0"
] | 4 | 2021-07-12T00:46:32.000Z | 2022-02-28T07:02:27.000Z | daseg/slack.py | pzelasko/daseg | 5e3aaf6e81a44a5eb42226bd376c92c7d1879261 | [
"Apache-2.0"
] | 2 | 2021-12-09T12:34:24.000Z | 2022-02-14T20:37:01.000Z | daseg/slack.py | pzelasko/daseg | 5e3aaf6e81a44a5eb42226bd376c92c7d1879261 | [
"Apache-2.0"
] | null | null | null | import logging
import os
import requests
def slack_notify(msg: str):
token = os.environ.get('SLACK_API_TOKEN')
if token is None:
return
try:
requests.post(token, json={'text': msg})
except:
logging.warning('Unable to send notification to Slack!')
def print_and_slack(msg: str... | 20.804348 | 64 | 0.596656 | 560 | 0.585162 | 0 | 0 | 0 | 0 | 0 | 0 | 66 | 0.068966 |
cf4a971868a5db584bf5e20d4c62c91c74f32e96 | 271 | py | Python | aids/strings/is_palindrome.py | ueg1990/aids | bb543c6f53983d59edbc6a522ca10d64efd9c42e | [
"MIT"
] | null | null | null | aids/strings/is_palindrome.py | ueg1990/aids | bb543c6f53983d59edbc6a522ca10d64efd9c42e | [
"MIT"
] | null | null | null | aids/strings/is_palindrome.py | ueg1990/aids | bb543c6f53983d59edbc6a522ca10d64efd9c42e | [
"MIT"
] | null | null | null | '''
In this module, we determine if a given string is a palindrome
'''
def is_palindrome(string):
'''
Return True if given string is a palindrome
'''
if len(string) < 2:
return True
if string[0] == string[-1]:
return is_palindrome(string[1:-1])
return False
| 16.9375 | 62 | 0.678967 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 125 | 0.461255 |
cf4a98bc5a1223ce3366c7b5c9b02fbe3d60be2f | 2,386 | py | Python | jageocoder/address.py | ny-a/jageocoder | 6c31cd7d81aa496b2fbcd3300ac1ccc9cf00fca3 | [
"MIT"
] | 12 | 2021-03-09T01:22:50.000Z | 2022-03-23T04:18:24.000Z | jageocoder/address.py | ny-a/jageocoder | 6c31cd7d81aa496b2fbcd3300ac1ccc9cf00fca3 | [
"MIT"
] | 3 | 2021-12-14T06:34:52.000Z | 2022-02-18T13:11:59.000Z | jageocoder/address.py | ny-a/jageocoder | 6c31cd7d81aa496b2fbcd3300ac1ccc9cf00fca3 | [
"MIT"
] | 3 | 2021-12-14T06:36:59.000Z | 2022-02-16T00:48:51.000Z | from logging import getLogger
from jageocoder.exceptions import AddressLevelError
logger = getLogger(__name__)
class AddressLevel(object):
"""
Address Levels
1 = 都道府県
2 = 郡・支庁・振興局
3 = 市町村および特別区
4 = 政令市の区
5 = 大字
6 = 字
7 = 地番または住居表示実施地域の街区
8 = 枝番または住居表示実施地域の住居番号
"""
#... | 25.115789 | 79 | 0.508382 | 2,458 | 0.954934 | 0 | 0 | 1,987 | 0.77195 | 0 | 0 | 1,220 | 0.47397 |
cf4c769e8b0574ab598dafe57a75ab7656e052d7 | 2,090 | py | Python | src/sympais/infer/utils.py | ethanluoyc/sympais | 68bc696434c86edb8457a3c74473c810b2c5c8f2 | [
"MIT"
] | 5 | 2021-06-04T23:24:41.000Z | 2021-12-13T21:39:57.000Z | src/sympais/infer/utils.py | ethanluoyc/sympais | 68bc696434c86edb8457a3c74473c810b2c5c8f2 | [
"MIT"
] | 24 | 2021-07-12T02:08:34.000Z | 2021-12-20T02:14:54.000Z | src/sympais/infer/utils.py | ethanluoyc/sympais | 68bc696434c86edb8457a3c74473c810b2c5c8f2 | [
"MIT"
] | 1 | 2021-07-31T10:34:19.000Z | 2021-07-31T10:34:19.000Z | import jax
from jax import lax
from jax import tree_util
import jax.numpy as np
def is_list_like(x):
return isinstance(x, (list, tuple))
def call_fn(fn, args):
if is_list_like(args):
return fn(*args)
return fn(args)
def call_fn_value_and_grad(fn, args):
def _fn(args):
if is_list_like(args):
... | 24.880952 | 86 | 0.679904 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
cf4c7bd09808208650fcf7902fc5aadd3ebc4e2a | 918 | py | Python | __init__.py | nuki111/env_explore | b5dfa05fbcfb0126e246e4ef4eb5a392a8615cf0 | [
"MIT"
] | null | null | null | __init__.py | nuki111/env_explore | b5dfa05fbcfb0126e246e4ef4eb5a392a8615cf0 | [
"MIT"
] | null | null | null | __init__.py | nuki111/env_explore | b5dfa05fbcfb0126e246e4ef4eb5a392a8615cf0 | [
"MIT"
] | null | null | null | '''
env_explore is a library for quick and easy exploration of python objects
=========================================================================
**env_explore** combines pandas and ipywidgets to extract and process data
from almost any given python object into pandas DataFrame and generate a
clickable widget rep... | 43.714286 | 77 | 0.643791 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 378 | 0.411765 |
cf4dc6fb0422c61d631abfb411ae82187b6217d2 | 3,433 | py | Python | Chapter08/python/ab-env/lib/python3.8/site-packages/numpy-1.16.4-py3.8-macosx-10.16-x86_64.egg/numpy/core/_dtype_ctypes.py | PacktPublishing/Supercharge-Your-Applications-with-GraalVM | bfb068e445f0325be9c7d526b6e07324dff9d1d2 | [
"MIT"
] | 9 | 2021-06-27T07:22:14.000Z | 2022-02-25T18:05:01.000Z | Chapter08/python/ab-env/lib/python3.8/site-packages/numpy-1.16.4-py3.8-macosx-10.16-x86_64.egg/numpy/core/_dtype_ctypes.py | PacktPublishing/Supercharge-Your-Applications-with-GraalVM | bfb068e445f0325be9c7d526b6e07324dff9d1d2 | [
"MIT"
] | null | null | null | Chapter08/python/ab-env/lib/python3.8/site-packages/numpy-1.16.4-py3.8-macosx-10.16-x86_64.egg/numpy/core/_dtype_ctypes.py | PacktPublishing/Supercharge-Your-Applications-with-GraalVM | bfb068e445f0325be9c7d526b6e07324dff9d1d2 | [
"MIT"
] | 8 | 2021-05-28T15:45:12.000Z | 2022-02-01T10:21:37.000Z | """
Conversion from ctypes to dtype.
In an ideal world, we could acheive this through the PEP3118 buffer protocol,
something like::
def dtype_from_ctypes_type(t):
# needed to ensure that the shape of `t` is within memoryview.format
class DummyStruct(ctypes.Structure):
_fields_ = [('a',... | 30.380531 | 103 | 0.633848 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,230 | 0.358287 |
cf500d8b74ed4e30cef6a56fa9722244906f9406 | 2,202 | py | Python | tests/test_micromagnetic_zeeman.py | computationalmodelling/fidimag | 07a275c897a44ad1e0d7e8ef563f10345fdc2a6e | [
"BSD-2-Clause"
] | 53 | 2016-02-27T09:40:21.000Z | 2022-01-19T21:37:44.000Z | tests/test_micromagnetic_zeeman.py | computationalmodelling/fidimag | 07a275c897a44ad1e0d7e8ef563f10345fdc2a6e | [
"BSD-2-Clause"
] | 132 | 2016-02-26T13:18:58.000Z | 2021-12-01T21:52:42.000Z | tests/test_micromagnetic_zeeman.py | computationalmodelling/fidimag | 07a275c897a44ad1e0d7e8ef563f10345fdc2a6e | [
"BSD-2-Clause"
] | 32 | 2016-02-26T13:21:40.000Z | 2022-03-08T08:54:51.000Z | from fidimag.micro import Zeeman
from fidimag.common import CuboidMesh
from fidimag.micro import Sim
import numpy as np
def varying_field(pos):
return (1.2 * pos[0], 2.3 * pos[1], 0)
def test_H0_is_indexable_or_callable():
"""
Test that an exception is raised if H0 is not indexable, and that an
exce... | 25.604651 | 78 | 0.560854 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 633 | 0.287466 |
cf50585745c7b40989b43625db650caccd9e042a | 13,058 | py | Python | rule_learner_both_classes.py | mgbarsky/classification_rules | 699969b87bd7a9080a7e937025fd26398c11a60d | [
"MIT"
] | null | null | null | rule_learner_both_classes.py | mgbarsky/classification_rules | 699969b87bd7a9080a7e937025fd26398c11a60d | [
"MIT"
] | null | null | null | rule_learner_both_classes.py | mgbarsky/classification_rules | 699969b87bd7a9080a7e937025fd26398c11a60d | [
"MIT"
] | null | null | null | import pandas as pd
import numpy as np
class Rule:
def __init__(self, class_label):
self.conditions = [] # list of conditions
self.class_label = class_label # rule class
def add_condition(self, condition):
self.conditions.append(condition)
def set_params(self, accuracy, coverag... | 38.519174 | 116 | 0.593736 | 1,953 | 0.149563 | 0 | 0 | 0 | 0 | 0 | 0 | 3,754 | 0.287487 |
cf51ab45924c97d384d57fc81c4e9f5c32da4311 | 23 | py | Python | samtranslator/__init__.py | bhumikapaharia/serverless-application-model | 4161fdd59f1ec449877a64796401ca074ae7be02 | [
"Apache-2.0"
] | 4 | 2021-12-18T06:44:57.000Z | 2021-12-28T09:52:53.000Z | samtranslator/__init__.py | bhumikapaharia/serverless-application-model | 4161fdd59f1ec449877a64796401ca074ae7be02 | [
"Apache-2.0"
] | 1 | 2021-04-13T17:54:21.000Z | 2021-04-13T17:54:21.000Z | samtranslator/__init__.py | chrisoverzero/serverless-application-model | f297cfb7bb68c75b3a75da49c9488e62bad16347 | [
"Apache-2.0"
] | null | null | null | __version__ = "1.35.0"
| 11.5 | 22 | 0.652174 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8 | 0.347826 |
cf5251ba997fd509524b5ed305550da937b3de70 | 5,314 | py | Python | packager/rpm/build.py | csdms/packagebuilder | a72f1d264d9219acfb422864fbcd57dfd6cfd51b | [
"MIT"
] | null | null | null | packager/rpm/build.py | csdms/packagebuilder | a72f1d264d9219acfb422864fbcd57dfd6cfd51b | [
"MIT"
] | null | null | null | packager/rpm/build.py | csdms/packagebuilder | a72f1d264d9219acfb422864fbcd57dfd6cfd51b | [
"MIT"
] | null | null | null | #! /usr/bin/env python
#
# Builds binary and source RPMs for a CSDMS model or tool.
#
# Create the executable script `build_rpm` with:
# $ cd path/to/packagebuilder
# $ sudo python setup.py install
#
# Examples:
# $ build_rpm --help
# $ build_rpm --version
# $ build_rpm hydrotrend
# $ build_rpm babel --tag ... | 36.902778 | 80 | 0.59936 | 3,317 | 0.6242 | 0 | 0 | 0 | 0 | 0 | 0 | 2,303 | 0.433384 |
cf528e1ce597b280628a646ef42b416b3143745b | 1,094 | py | Python | setup.py | dwhall/sx127x_ahsm | 71605ddb218636cb86f628441c2f1aee904bd271 | [
"MIT"
] | 1 | 2019-09-07T08:59:41.000Z | 2019-09-07T08:59:41.000Z | setup.py | dwhall/sx127x_ahsm | 71605ddb218636cb86f628441c2f1aee904bd271 | [
"MIT"
] | 1 | 2020-06-15T14:25:28.000Z | 2020-06-15T22:55:40.000Z | setup.py | dwhall/sx127x_ahsm | 71605ddb218636cb86f628441c2f1aee904bd271 | [
"MIT"
] | 1 | 2020-06-14T16:35:47.000Z | 2020-06-14T16:35:47.000Z | import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name="sx127x_ahsm",
version="0.1.0",
author="Dean Hall",
author_email="dwhall256@gmail.com",
description="A driver for the Semtech SX127X radio data modem.",
long_description=long_descriptio... | 33.151515 | 68 | 0.632541 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 655 | 0.59872 |
cf54217590cfa476b93f2e6e6579db91c814fd52 | 431 | py | Python | buildPersonNet.py | danpelis/CPE322 | 86aa3b77dd710d31c0248957146949ca99b81e0b | [
"MIT"
] | null | null | null | buildPersonNet.py | danpelis/CPE322 | 86aa3b77dd710d31c0248957146949ca99b81e0b | [
"MIT"
] | null | null | null | buildPersonNet.py | danpelis/CPE322 | 86aa3b77dd710d31c0248957146949ca99b81e0b | [
"MIT"
] | null | null | null | PIPELINE_CONFIG_PATH={C:\Users\Dan\Projects\D6\ssd_mobilenet_v1_person.config}
MODEL_DIR={C:\Users\Dan\Projects\D6\personNet}
NUM_TRAIN_STEPS=50000
SAMPLE_1_OF_N_EVAL_EXAMPLES=1
python object_detection/model_main.py \
--pipeline_config_path=${PIPELINE_CONFIG_PATH} \
--model_dir=${MODEL_DIR} \
--num_train_st... | 43.1 | 78 | 0.798144 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
cf545cb8f22abd776b690122d22917eb5c3778ef | 5,756 | py | Python | Preprocessing/reversegeo.py | salathegroup/Semester_Project | 2de38eef4ae6b3c350f8b742021ff098ecb376c4 | [
"MIT"
] | null | null | null | Preprocessing/reversegeo.py | salathegroup/Semester_Project | 2de38eef4ae6b3c350f8b742021ff098ecb376c4 | [
"MIT"
] | 1 | 2018-02-20T15:25:22.000Z | 2018-02-20T15:25:22.000Z | Preprocessing/reversegeo.py | salathegroup/Semester_Project | 2de38eef4ae6b3c350f8b742021ff098ecb376c4 | [
"MIT"
] | 2 | 2017-11-07T09:12:11.000Z | 2019-04-12T16:07:40.000Z | import reverse_geocoder as rg
import csv
import multiprocessing as mp
import multiprocessing.pool
import glob
import re
mx_ca_us_state_abbrev = {
'Alabama': '1',
'Alaska': '2',
'Arizona': '3',
'Arkansas': '4',
'California': '5',
'Colorado': '6',
'Connecticut': '7',
'Delaware': '8',
... | 30.455026 | 130 | 0.509034 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4,033 | 0.70066 |
cf546ea7ea4bd4fa252d37fbbd6a124b7399d0c3 | 5,784 | py | Python | DIR.py | az7jh2/My-Raystation-Scripts | 3454378239320c2944fd96de8cb86be8824b5210 | [
"MIT"
] | 1 | 2021-05-29T22:48:49.000Z | 2021-05-29T22:48:49.000Z | DIR.py | az7jh2/My-Raystation-Scripts | 3454378239320c2944fd96de8cb86be8824b5210 | [
"MIT"
] | null | null | null | DIR.py | az7jh2/My-Raystation-Scripts | 3454378239320c2944fd96de8cb86be8824b5210 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from connect import *
#求均匀性指数HI
def GetHomogenietyIndex(total_dose, Prescription, RoiName):
#total_dose存在于Patient.TreatmentDelivery.TreatmentCourse.TotalDose
#Prescription可输入数字,或者在getcurrentBeamSet.Prescription.PrimaryDosePrescription.DoseValue,此处还有OnStructure.Name
#RoiName可用字符串自定义,或... | 67.255814 | 149 | 0.681017 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,397 | 0.382541 |
cf54c232a75d4a7341295831e0d07ef22dddb9f7 | 12,143 | py | Python | Trainer.py | Gorilla-Lab-SCUT/OrthDNNs | 7391b1751334c485feea212a80abc4dc8430dc1e | [
"BSD-3-Clause"
] | 4 | 2021-07-15T07:34:30.000Z | 2022-03-30T08:23:46.000Z | Trainer.py | Gorilla-Lab-SCUT/OrthDNNs | 7391b1751334c485feea212a80abc4dc8430dc1e | [
"BSD-3-Clause"
] | 1 | 2020-02-11T10:55:46.000Z | 2020-02-11T10:55:46.000Z | Trainer.py | Yuxin-Wen/OrthDNNs | 7391b1751334c485feea212a80abc4dc8430dc1e | [
"BSD-3-Clause"
] | 1 | 2021-11-23T03:31:09.000Z | 2021-11-23T03:31:09.000Z | from __future__ import division
import time
import numpy as np
import math
import random
import torch
import torch.nn as nn
import torch.nn.parallel
import torch.nn.functional as F
import torch.optim as optim
from torch.autograd import Variable
import torchvision
from Utility import Average_meter
from Utility import ... | 43.679856 | 174 | 0.534464 | 11,773 | 0.96953 | 0 | 0 | 0 | 0 | 0 | 0 | 1,494 | 0.123034 |
cf555654bbc3d88a367ec4273df655fffb2396cc | 952 | py | Python | src/utils/login_to_spotify.py | SecondThundeR/spotichecker | 05787bae85cb0d9c5832939c72bad526eb419705 | [
"MIT"
] | null | null | null | src/utils/login_to_spotify.py | SecondThundeR/spotichecker | 05787bae85cb0d9c5832939c72bad526eb419705 | [
"MIT"
] | null | null | null | src/utils/login_to_spotify.py | SecondThundeR/spotichecker | 05787bae85cb0d9c5832939c72bad526eb419705 | [
"MIT"
] | null | null | null | """Utils for logging to Spotify.
This module contains functions for connecting to Spotify API.
This file can also be imported as a module and contains the following functions:
* login_to_spotify - connect to Spotify and return OAuth object
"""
import spotipy
from spotipy.oauth2 import SpotifyOAuth
SCOPES = "u... | 27.2 | 80 | 0.698529 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 596 | 0.62605 |
cf556fe0579840dc64ac6b121230f3d881ae21c9 | 17,516 | py | Python | prostate_cancer_nomograms/statistical_analysis/nomograms_performance_evaluation/decision_curve_analysis/__init__.py | MaxenceLarose/ProstateCancerNomograms | 4ff15dccd1f2dbde58d3a21a2e680e909e2e408a | [
"Apache-2.0"
] | 1 | 2021-10-04T18:03:10.000Z | 2021-10-04T18:03:10.000Z | prostate_cancer_nomograms/statistical_analysis/nomograms_performance_evaluation/decision_curve_analysis/__init__.py | MaxenceLarose/ProstateCancerNomograms | 4ff15dccd1f2dbde58d3a21a2e680e909e2e408a | [
"Apache-2.0"
] | null | null | null | prostate_cancer_nomograms/statistical_analysis/nomograms_performance_evaluation/decision_curve_analysis/__init__.py | MaxenceLarose/ProstateCancerNomograms | 4ff15dccd1f2dbde58d3a21a2e680e909e2e408a | [
"Apache-2.0"
] | null | null | null | import pandas as pd
from .algo import *
from .validate import *
from .validate import DCAError
__all__ = ['DecisionCurveAnalysis'] # only public member should be the class
class DecisionCurveAnalysis:
"""DecisionCurveAnalysis(...)
DecisionCurveAnalysis(algorithm='dca', **kwargs)
Create an object of... | 32.13945 | 99 | 0.565711 | 17,340 | 0.989952 | 0 | 0 | 4,907 | 0.280144 | 0 | 0 | 9,732 | 0.555606 |
cf565b37008bf14878731348b0d414b055945931 | 1,493 | py | Python | pyxmp/xmp.py | jeslyvarghese/pyxmp | 94e9f97574230f04b47fbcc7ed2caaa26e125ec4 | [
"MIT"
] | null | null | null | pyxmp/xmp.py | jeslyvarghese/pyxmp | 94e9f97574230f04b47fbcc7ed2caaa26e125ec4 | [
"MIT"
] | null | null | null | pyxmp/xmp.py | jeslyvarghese/pyxmp | 94e9f97574230f04b47fbcc7ed2caaa26e125ec4 | [
"MIT"
] | null | null | null | import xml.etree.ElementTree as ET
from .__keysearch import keysearch
from .__attribute import Attribute
class XMP(object):
def __init__(self, filepath, **namespaces):
self.filepath = filepath
with open(self.filepath, 'rb') as f:
data = f.read()
xmp_start = data.find(b'<x:xmpmet... | 37.325 | 68 | 0.578701 | 1,386 | 0.928332 | 0 | 0 | 0 | 0 | 0 | 0 | 45 | 0.030141 |
cf56be3b91ad405a29cca6a62ba0311c0c51443c | 1,424 | py | Python | archieves/checkdata.py | Donsuno/conda | d5c8fb2cc3f724c109b7343cc0bdb93a5afa12ba | [
"BSD-3-Clause"
] | null | null | null | archieves/checkdata.py | Donsuno/conda | d5c8fb2cc3f724c109b7343cc0bdb93a5afa12ba | [
"BSD-3-Clause"
] | null | null | null | archieves/checkdata.py | Donsuno/conda | d5c8fb2cc3f724c109b7343cc0bdb93a5afa12ba | [
"BSD-3-Clause"
] | null | null | null | from ipywidgets import widgets,interact, interact_manual
import numpy as np
import pandas as pd
from IPython.display import display,clear_output
from numpy import arange, sin, pi
import plotly.figure_factory as ff
import re
import matplotlib.pyplot as plt
from IPython.display import Image
from plotly.offline import i... | 37.473684 | 147 | 0.70014 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 335 | 0.235253 |
cf58512d21f3bb124c3398a2b735d1fa164545ea | 812 | py | Python | accounts/migrations/0002_auto_20180531_1023.py | USKPA-dev/uskpa | 45481ba59a55f2c202723d11dde9e6b457f9b71d | [
"CC0-1.0"
] | 2 | 2018-06-07T13:06:15.000Z | 2022-02-19T07:51:40.000Z | accounts/migrations/0002_auto_20180531_1023.py | USKPA-dev/uskpa | 45481ba59a55f2c202723d11dde9e6b457f9b71d | [
"CC0-1.0"
] | 164 | 2018-04-11T15:11:54.000Z | 2021-09-07T23:58:59.000Z | accounts/migrations/0002_auto_20180531_1023.py | USKPA-dev/uskpa | 45481ba59a55f2c202723d11dde9e6b457f9b71d | [
"CC0-1.0"
] | 3 | 2018-04-24T18:36:57.000Z | 2018-06-08T21:12:34.000Z | # Generated by Django 2.0.5 on 2018-05-31 10:23
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('accounts', '0001_initial'),
]
operations = [
migrations.RemoveField(
model_name='historicalhistoryuser',
name='history_user'... | 23.2 | 47 | 0.552956 | 727 | 0.89532 | 0 | 0 | 0 | 0 | 0 | 0 | 221 | 0.272167 |
cf58a225d1a16173cd170707ce55c8de870dc56f | 568 | py | Python | sparse/utils.py | ContinuumIO/sparse | 10da2d31f0228f192b3064ab253bc828b3cf1a50 | [
"BSD-3-Clause"
] | 2 | 2017-09-17T21:22:21.000Z | 2019-08-26T02:28:10.000Z | sparse/utils.py | ContinuumIO/sparse | 10da2d31f0228f192b3064ab253bc828b3cf1a50 | [
"BSD-3-Clause"
] | null | null | null | sparse/utils.py | ContinuumIO/sparse | 10da2d31f0228f192b3064ab253bc828b3cf1a50 | [
"BSD-3-Clause"
] | 4 | 2019-03-21T05:38:06.000Z | 2021-02-23T06:26:48.000Z | import numpy as np
from .core import COO
def assert_eq(x, y):
assert x.shape == y.shape
assert x.dtype == y.dtype
if isinstance(x, COO):
if x.sorted:
assert is_lexsorted(x)
if isinstance(y, COO):
if y.sorted:
assert is_lexsorted(y)
if hasattr(x, 'todense')... | 19.586207 | 61 | 0.549296 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 18 | 0.03169 |
cf58f44a787c70c43d9a1a1e3d53a92ccd902710 | 7,019 | py | Python | fusion_platform/translations.py | d-cat-support/fusion-platform-python-sdk | 6f98a60f33a962f6a10861da15affbc28bf4a17a | [
"MIT"
] | null | null | null | fusion_platform/translations.py | d-cat-support/fusion-platform-python-sdk | 6f98a60f33a962f6a10861da15affbc28bf4a17a | [
"MIT"
] | null | null | null | fusion_platform/translations.py | d-cat-support/fusion-platform-python-sdk | 6f98a60f33a962f6a10861da15affbc28bf4a17a | [
"MIT"
] | null | null | null | """
Compiled translations.
author: Matthew Casey
© [Digital Content Analysis Technology Ltd](https://www.d-cat.co.uk)
"""
# Do not modify this file manually as it is built automatically by the localisations.py script.
import i18n
# @formatter:off
i18n.add_translation('session.request_failed', 'API request fai... | 85.597561 | 169 | 0.774327 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5,191 | 0.739564 |
cf5b37ee1fc82e3da020ac4e175a1718c4b48d19 | 115 | py | Python | env.py | olukotun-sandbox/name-button | 8205dc783dd72765d44378b0b6ca354352d21ad5 | [
"MIT"
] | null | null | null | env.py | olukotun-sandbox/name-button | 8205dc783dd72765d44378b0b6ca354352d21ad5 | [
"MIT"
] | null | null | null | env.py | olukotun-sandbox/name-button | 8205dc783dd72765d44378b0b6ca354352d21ad5 | [
"MIT"
] | null | null | null | import os
print('this is home:', os.environ['HOME'])
print('this is circle branch:', os.environ['CIRCLE_BRANCH']) | 23 | 60 | 0.704348 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 60 | 0.521739 |
cf63128ae3837cdf01a72550d0f6236a6665d83c | 35 | py | Python | scripts/tcutils/tests/cores_ut.py | rombie/contrail-test | a68c71d6f282142501a7e2e889bbb232fdd82dc3 | [
"Apache-2.0"
] | 5 | 2020-09-29T00:36:57.000Z | 2022-02-16T06:51:32.000Z | tcutils/tests/cores_ut.py | vkolli/contrail-test-perf | db04b8924a2c330baabe3059788b149d957a7d67 | [
"Apache-2.0"
] | 27 | 2019-11-02T02:18:34.000Z | 2022-02-24T18:49:08.000Z | tcutils/tests/cores_ut.py | vkolli/contrail-test-perf | db04b8924a2c330baabe3059788b149d957a7d67 | [
"Apache-2.0"
] | 20 | 2019-11-28T16:02:25.000Z | 2022-01-06T05:56:58.000Z | """Unittests for cores module.
"""
| 11.666667 | 30 | 0.657143 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 34 | 0.971429 |
cf63b316fcbc7d486530689ffda1e935bef34ddd | 7,937 | py | Python | netunnel/server/peer.py | kobimic/netunnel | fe7f627b01deb67e0d7bd7ae949a42db43738785 | [
"Apache-2.0"
] | 18 | 2021-01-20T16:30:47.000Z | 2022-03-08T03:43:11.000Z | netunnel/server/peer.py | kobimic/netunnel | fe7f627b01deb67e0d7bd7ae949a42db43738785 | [
"Apache-2.0"
] | null | null | null | netunnel/server/peer.py | kobimic/netunnel | fe7f627b01deb67e0d7bd7ae949a42db43738785 | [
"Apache-2.0"
] | 4 | 2021-01-24T17:52:26.000Z | 2021-08-08T14:48:03.000Z | from typing import Dict, List
from .static_tunnel import StaticTunnel
from .schemas import StaticTunnelSchema
from ..client import NETunnelClient
from ..common.utils import get_logger
from ..common.exceptions import NETunnelServerNotFound, NETunnelServerError, NETunnelResponseError, NETunnelAuthError
from ..common.auth... | 45.354286 | 157 | 0.666877 | 7,556 | 0.951997 | 0 | 0 | 512 | 0.064508 | 4,613 | 0.581202 | 2,804 | 0.353282 |
cf6473217e7645ed213ed7c309d9dc071c16091a | 129 | py | Python | dl/initializers/initializer_base.py | nuka137/DeepLearningFramework | 613881e46b48c2206b9424a49106455cb2336d2e | [
"MIT"
] | 10 | 2020-06-28T05:50:41.000Z | 2022-01-30T01:31:43.000Z | dl/initializers/initializer_base.py | nuka137/DeepLearningFramework | 613881e46b48c2206b9424a49106455cb2336d2e | [
"MIT"
] | null | null | null | dl/initializers/initializer_base.py | nuka137/DeepLearningFramework | 613881e46b48c2206b9424a49106455cb2336d2e | [
"MIT"
] | 1 | 2020-07-26T12:36:32.000Z | 2020-07-26T12:36:32.000Z | class InitializerBase:
def __init__(self):
pass
def init(self, shape):
raise NotImprementedError()
| 16.125 | 35 | 0.612403 | 127 | 0.984496 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
cf6581484116a18845484669a17d5f8076cfe782 | 2,612 | py | Python | baseline/xray.py | RoliKhanna/Anchor-Free | e3d599b7cbdc988ad7720c1e8324cabe87917d59 | [
"MIT"
] | null | null | null | baseline/xray.py | RoliKhanna/Anchor-Free | e3d599b7cbdc988ad7720c1e8324cabe87917d59 | [
"MIT"
] | null | null | null | baseline/xray.py | RoliKhanna/Anchor-Free | e3d599b7cbdc988ad7720c1e8324cabe87917d59 | [
"MIT"
] | 1 | 2019-11-25T22:08:19.000Z | 2019-11-25T22:08:19.000Z |
from nltk.corpus import reuters
import sys
import numpy as np
from scipy import optimize
# Loading data here
train_documents, train_categories = zip(*[(reuters.raw(i), reuters.categories(i)) for i in reuters.fileids() if i.startswith('training/')])
test_documents, test_categories = zip(*[(reuters.raw(i), reuters.cate... | 28.086022 | 139 | 0.568147 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 147 | 0.056279 |
cf664ab43e12cf24ecd3e41b3708349ac277b2fd | 2,487 | py | Python | models/deepset.py | sgvdan/OCTransformer | 4bc6861406ea75afd23bdf1608a088dcba99ff14 | [
"Apache-2.0"
] | null | null | null | models/deepset.py | sgvdan/OCTransformer | 4bc6861406ea75afd23bdf1608a088dcba99ff14 | [
"Apache-2.0"
] | null | null | null | models/deepset.py | sgvdan/OCTransformer | 4bc6861406ea75afd23bdf1608a088dcba99ff14 | [
"Apache-2.0"
] | null | null | null | import torch
from torch import nn
# Obtained from: https://github.com/manzilzaheer/DeepSets/blob/master/PointClouds/classifier.py#L58
class PermEqui1_mean(nn.Module):
def __init__(self, in_dim, out_dim):
super().__init__()
self.Gamma = nn.Linear(in_dim, out_dim)
def forward(self, x):
x... | 34.068493 | 112 | 0.602734 | 2,348 | 0.944109 | 0 | 0 | 0 | 0 | 0 | 0 | 513 | 0.206273 |
cf6665e0703b869005a49a58e097cb3fc9a32910 | 20,965 | py | Python | dft_workflow/job_analysis/collect_collate_dft_data/test_models_on_diff_oer_sets/test_models_on_diff_oer_sets.py | raulf2012/PROJ_IrOx_OER | 56883d6f5b62e67703fe40899e2e68b3f5de143b | [
"MIT"
] | 1 | 2022-03-21T04:43:47.000Z | 2022-03-21T04:43:47.000Z | dft_workflow/job_analysis/collect_collate_dft_data/test_models_on_diff_oer_sets/test_models_on_diff_oer_sets.py | raulf2012/PROJ_IrOx_OER | 56883d6f5b62e67703fe40899e2e68b3f5de143b | [
"MIT"
] | null | null | null | dft_workflow/job_analysis/collect_collate_dft_data/test_models_on_diff_oer_sets/test_models_on_diff_oer_sets.py | raulf2012/PROJ_IrOx_OER | 56883d6f5b62e67703fe40899e2e68b3f5de143b | [
"MIT"
] | 1 | 2021-02-13T12:55:02.000Z | 2021-02-13T12:55:02.000Z | # ---
# jupyter:
# jupytext:
# formats: ipynb,py
# text_representation:
# extension: .py
# format_name: light
# format_version: '1.5'
# jupytext_version: 1.4.2
# kernelspec:
# display_name: Python [conda env:PROJ_irox_oer] *
# language: python
# name: conda-env-PROJ_irox_... | 23.582677 | 75 | 0.562127 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 9,545 | 0.455283 |
cf677d8bfffcaf593d5e10ff7108b260a1cb5b41 | 2,478 | py | Python | pandoc-wrapfig.py | nsheff/pandoc-wrapfig | d4523cf43ebab47024d7efde27d7ccddfd983d2f | [
"MIT"
] | null | null | null | pandoc-wrapfig.py | nsheff/pandoc-wrapfig | d4523cf43ebab47024d7efde27d7ccddfd983d2f | [
"MIT"
] | null | null | null | pandoc-wrapfig.py | nsheff/pandoc-wrapfig | d4523cf43ebab47024d7efde27d7ccddfd983d2f | [
"MIT"
] | 1 | 2020-08-11T18:35:53.000Z | 2020-08-11T18:35:53.000Z | #! /usr/bin/env python
# -*- coding: utf-8 -*-
"""Pandoc filter to allow variable wrapping of LaTeX/pdf documents
through the wrapfig package.
Simply add a " {?}" tag to the end of the caption for the figure, where
? is an integer specifying the width of the wrap in inches. 0 will
cause the width of the figure to be ... | 38.71875 | 124 | 0.536723 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,020 | 0.411622 |
cf68743af20103a597b92c1707121c418cb28844 | 34 | py | Python | myscript.py | kRituraj/learnGIt | dad92da290d1aab0713d99af722e86140507e9ab | [
"MIT"
] | null | null | null | myscript.py | kRituraj/learnGIt | dad92da290d1aab0713d99af722e86140507e9ab | [
"MIT"
] | null | null | null | myscript.py | kRituraj/learnGIt | dad92da290d1aab0713d99af722e86140507e9ab | [
"MIT"
] | null | null | null | print("My name is Rituraj Khare")
| 17 | 33 | 0.735294 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 26 | 0.764706 |
cf697a286088c58c3db9ead0e8a7c5dfcff5c956 | 3,999 | py | Python | las2vola.py | moloned/volumetric_accelerator_toolkit | 8f5cf226a7d788e4dd4215c181db49d9568c6240 | [
"Apache-2.0"
] | 6 | 2019-02-11T14:32:23.000Z | 2021-12-07T09:49:41.000Z | las2vola.py | moloned/volumetric_accelerator_toolkit | 8f5cf226a7d788e4dd4215c181db49d9568c6240 | [
"Apache-2.0"
] | null | null | null | las2vola.py | moloned/volumetric_accelerator_toolkit | 8f5cf226a7d788e4dd4215c181db49d9568c6240 | [
"Apache-2.0"
] | 2 | 2018-10-11T17:29:37.000Z | 2021-09-08T12:01:40.000Z | #!/usr/bin/env python3
"""
Las2vola: Converts Las files into VOLA format.
The ISPRS las format is the standard for LIDAR devices and stores information
on the points obtained. This parser uses the las information
for the nbit per voxel representation. The data stored is: color, height,
number of returns, intensity and... | 32.778689 | 118 | 0.607652 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,015 | 0.253813 |
cf6a926cdf026b6807d2fbef9356b946cbf88279 | 2,871 | py | Python | pipeline/test_users.py | streamsets/datacollector-tests-external | 6f255b5e7496deeef333b57a5e9df4911ba3ef00 | [
"Apache-2.0"
] | 1 | 2020-04-14T03:01:51.000Z | 2020-04-14T03:01:51.000Z | pipeline/test_users.py | streamsets/test | 1ead70179ee92a4acd9cfaa33c56a5a9e233bf3d | [
"Apache-2.0"
] | 1 | 2019-04-24T11:06:38.000Z | 2019-04-24T11:06:38.000Z | pipeline/test_users.py | anubandhan/datacollector-tests | 301c024c66d68353735256b262b681dd05ba16cc | [
"Apache-2.0"
] | 2 | 2019-05-24T06:34:37.000Z | 2020-03-30T11:48:18.000Z | # Copyright 2017 StreamSets 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 writi... | 30.542553 | 102 | 0.703239 | 0 | 0 | 342 | 0.119122 | 842 | 0.293278 | 0 | 0 | 1,156 | 0.402647 |
cf6af0cf676fc11ed879ddf07c27b61f75d1ae0d | 1,107 | py | Python | email_client/email_send.py | geeksLabTech/email-client | 0f533f7b33c38d74aec8663ccc6d8116e0a2489d | [
"MIT"
] | 1 | 2021-09-06T16:43:37.000Z | 2021-09-06T16:43:37.000Z | email_client/email_send.py | geeksLabTech/email-client | 0f533f7b33c38d74aec8663ccc6d8116e0a2489d | [
"MIT"
] | null | null | null | email_client/email_send.py | geeksLabTech/email-client | 0f533f7b33c38d74aec8663ccc6d8116e0a2489d | [
"MIT"
] | 2 | 2020-09-13T02:25:50.000Z | 2021-01-06T17:25:38.000Z | import smtplib
from tools.errors import LoginException
from tools.read_config import read_config
def send_mail(sender:str, pwd:str, to:str, subject:str, text:str):
# Read the email config file
config = read_config('./config/config_email.json')
# create connection with the smtp server
smtpserver = smtp... | 42.576923 | 91 | 0.515808 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 296 | 0.267389 |
cf6ccb75aed895f75e03cfa7e1750d857352705e | 1,511 | py | Python | test/test_scores.py | gigantenbein/UNet-Zoo | d157c22ef8041ed743aa7bbcf377f0f8ad85e755 | [
"Apache-2.0"
] | 20 | 2020-02-16T07:20:23.000Z | 2022-03-14T04:11:02.000Z | test/test_scores.py | suyanzhou626/UNet-Zoo | 76d23952d90a45a01da1cc2926b4d3a24a1adb75 | [
"Apache-2.0"
] | 6 | 2021-06-08T21:03:07.000Z | 2022-03-17T13:28:33.000Z | test/test_scores.py | suyanzhou626/UNet-Zoo | 76d23952d90a45a01da1cc2926b4d3a24a1adb75 | [
"Apache-2.0"
] | 5 | 2020-03-20T02:04:49.000Z | 2021-10-20T17:37:52.000Z | """Testing scoring functions"""
import pytest
import os
from importlib.machinery import SourceFileLoader
import utils
import shutil
import torch
import math
import matplotlib.pyplot as plt
import torchvision
@pytest.fixture
def lidc_data():
config_file = '/Users/marcgantenbein/PycharmProjects/UNet-Zoo/models/e... | 25.183333 | 106 | 0.743878 | 0 | 0 | 0 | 0 | 503 | 0.332892 | 0 | 0 | 176 | 0.116479 |
cf704edeb093695bcc194edf614b3bb53790af9a | 1,074 | py | Python | flask_app/services/twitter_service.py | JenBanks8585/twitoff_Banks | 06f18c1daf5745a2d0890d8d04b87d5282b176d8 | [
"MIT"
] | null | null | null | flask_app/services/twitter_service.py | JenBanks8585/twitoff_Banks | 06f18c1daf5745a2d0890d8d04b87d5282b176d8 | [
"MIT"
] | 4 | 2021-06-08T21:50:24.000Z | 2022-03-12T00:42:59.000Z | flask_app/services/twitter_service.py | JenBanks8585/twitoff_Banks | 06f18c1daf5745a2d0890d8d04b87d5282b176d8 | [
"MIT"
] | null | null | null |
import tweepy
import os
from dotenv import load_dotenv
load_dotenv()
TWITTER_API_KEY = os.getenv("TWITTER_API_KEY")
TWITTER_API_SECRET = os.getenv("TWITTER_API_SECRET")
TWITTER_ACCESS_TOKEN = os.getenv("TWITTER_ACCESS_TOKEN")
TWITTER_ACCESS_TOKEN_SECRET = os.getenv("TWITTER_ACCESS_TOKEN_SECRET")
auth = tweepy.OAuth... | 26.195122 | 140 | 0.733706 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 278 | 0.258845 |
cf70a281c3c891880251c2d76efe8ac3eb44248a | 1,860 | py | Python | spongeauth/api/tests/test_delete_user.py | felixoi/SpongeAuth | d44ee52d0b35b2e1909c7bf6bad29aa7b4835b26 | [
"MIT"
] | 10 | 2016-11-18T12:37:24.000Z | 2022-03-04T09:25:25.000Z | spongeauth/api/tests/test_delete_user.py | felixoi/SpongeAuth | d44ee52d0b35b2e1909c7bf6bad29aa7b4835b26 | [
"MIT"
] | 794 | 2016-11-19T18:34:37.000Z | 2022-03-31T16:49:11.000Z | spongeauth/api/tests/test_delete_user.py | PowerNukkit/OreAuth | 96a2926c9601fce6fac471bdb997077f07e8bf9a | [
"MIT"
] | 11 | 2016-11-26T22:30:17.000Z | 2022-03-16T17:20:14.000Z | import urllib.parse
import django.shortcuts
import pytest
import faker
import accounts.tests.factories
import api.models
@pytest.fixture
def fake():
return faker.Faker()
def _make_path(data):
return "{}?{}".format(django.shortcuts.reverse("api:users-list"), urllib.parse.urlencode(data))
@pytest.mark.dj... | 26.956522 | 113 | 0.716129 | 0 | 0 | 0 | 0 | 1,597 | 0.858602 | 0 | 0 | 216 | 0.116129 |
cf70d57cf63af1b7800f864d1cbbd1296009fe92 | 2,091 | py | Python | tests/rw_all.py | clayne/retrowrite | 117dad525114bca695317e14affffd4e3de13cce | [
"MIT"
] | 478 | 2019-06-19T09:33:50.000Z | 2022-03-25T09:34:24.000Z | tests/rw_all.py | clayne/retrowrite | 117dad525114bca695317e14affffd4e3de13cce | [
"MIT"
] | 30 | 2019-07-12T09:38:43.000Z | 2022-03-28T04:53:31.000Z | tests/rw_all.py | clayne/retrowrite | 117dad525114bca695317e14affffd4e3de13cce | [
"MIT"
] | 62 | 2019-06-25T16:41:04.000Z | 2022-02-22T15:47:35.000Z | import argparse
import json
import subprocess
import os
from multiprocessing import Pool
def do_test(cmd):
print("[!] Running on {}".format(cmd))
try:
subprocess.check_call(cmd, shell=True)
except subprocess.CalledProcessError:
print("[x] Failed {}".format(cmd))
def do_tests(tests, filte... | 27.155844 | 79 | 0.583931 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 424 | 0.202774 |
cf71a671f7a019cfe847b9abcb8b86b99ffb82ad | 1,552 | py | Python | codeChallenge/Exercise1.py | jocardozo/Rooftop-Challenge | 0fe2ea9823f38a25911a760f286b0d55eb26e553 | [
"MIT"
] | null | null | null | codeChallenge/Exercise1.py | jocardozo/Rooftop-Challenge | 0fe2ea9823f38a25911a760f286b0d55eb26e553 | [
"MIT"
] | null | null | null | codeChallenge/Exercise1.py | jocardozo/Rooftop-Challenge | 0fe2ea9823f38a25911a760f286b0d55eb26e553 | [
"MIT"
] | null | null | null | def makeFigure(size):
figure = [[0] *(size) for j in range(size)] #creamos la matriz de 0 en el tamaño pedido
x = 0
y = 0
figure[0][0] =1
'''Funciones auxiliares para el recorrido de la serpiente
'''
def moverEste(figure,x,y,pasos):
for i in range(pasos):
y = y +... | 24.25 | 118 | 0.439433 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 239 | 0.153896 |
cf71e91499d6deed3463b430dfcb4800d8deebe8 | 521 | py | Python | app/database.py | dorneanu/flask-app-template | ea238742f354937a19cd72a32418307dd4a7af1a | [
"MIT"
] | null | null | null | app/database.py | dorneanu/flask-app-template | ea238742f354937a19cd72a32418307dd4a7af1a | [
"MIT"
] | null | null | null | app/database.py | dorneanu/flask-app-template | ea238742f354937a19cd72a32418307dd4a7af1a | [
"MIT"
] | null | null | null | from flask import current_app
from flask_sqlalchemy import SQLAlchemy
from sqlalchemy import create_engine
from sqlalchemy.orm import scoped_session, sessionmaker
from sqlalchemy.ext.declarative import declarative_base
# Init engine and db_session
#engine = create_engine(current_app.config['SQLALCHEMY_DATABASE_URI'], ... | 37.214286 | 92 | 0.834933 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 277 | 0.53167 |
cf73010efaaefc559ce2e5d857ca0b89c2eb9c35 | 2,753 | py | Python | tests/conftest.py | Nonse/monkeys | 93681edf18126cc49858992f80df25a7cff931e8 | [
"MIT"
] | null | null | null | tests/conftest.py | Nonse/monkeys | 93681edf18126cc49858992f80df25a7cff931e8 | [
"MIT"
] | null | null | null | tests/conftest.py | Nonse/monkeys | 93681edf18126cc49858992f80df25a7cff931e8 | [
"MIT"
] | null | null | null | import os
import pytest
import random
import config
from monkeygod import create_app, models
from monkeygod.models import db as _db
TEST_DATABASE_URI = 'postgresql://postgres:postgres@localhost/test_monkeydb'
# Adapted from http://goo.gl/KXDq2p
@pytest.fixture(scope='session')
def app(request):
"""Session-wide ... | 24.149123 | 76 | 0.65129 | 0 | 0 | 0 | 0 | 2,488 | 0.903741 | 0 | 0 | 366 | 0.132946 |
cf73290c5bcbebb20fd5e98add009b993c971061 | 8,610 | py | Python | src/classifier.py | WattSocialBot/ijcnlp2017-customer-feedback | 2dccdcfaf26df832343dbb76b1e31a094c578c0e | [
"MIT"
] | 17 | 2017-10-27T20:48:38.000Z | 2020-03-16T15:05:47.000Z | src/classifier.py | WattSocialBot/ijcnlp2017-customer-feedback | 2dccdcfaf26df832343dbb76b1e31a094c578c0e | [
"MIT"
] | null | null | null | src/classifier.py | WattSocialBot/ijcnlp2017-customer-feedback | 2dccdcfaf26df832343dbb76b1e31a094c578c0e | [
"MIT"
] | 3 | 2017-10-28T15:34:26.000Z | 2020-03-09T13:56:40.000Z | __author__ = "bplank"
import argparse
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.pipeline import Pipeline, FeatureUnion
from sklearn.svm import LinearSVC
from sklearn.metrics import accuracy_score, classification_report, confusion_matrix, f1_score
from sklearn.preprocessing import LabelE... | 30.316901 | 180 | 0.589315 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,913 | 0.222184 |
cf7374d195b400da99176ae7ebdc84ce6102d8fa | 1,329 | py | Python | roles/system/files/boot-setup.py | JesperNaarttijarvi/minotaur-centos-install | df5b9ebdd1ccc717d53c06ef0060c84d72bf8e5e | [
"MIT"
] | null | null | null | roles/system/files/boot-setup.py | JesperNaarttijarvi/minotaur-centos-install | df5b9ebdd1ccc717d53c06ef0060c84d72bf8e5e | [
"MIT"
] | null | null | null | roles/system/files/boot-setup.py | JesperNaarttijarvi/minotaur-centos-install | df5b9ebdd1ccc717d53c06ef0060c84d72bf8e5e | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import os
import sys
n_devices = len(os.popen("lspci |grep 'VGA compatible controller: NVIDIA Corporation'").read().rstrip().split("\n"))
if n_devices == 0:
print "fatal: no Nvidia devices found"
sys.exit(1)
with open("/etc/miner-startup.sh","w") as f:
f.write("#!/bin/bash\n")
f.write(... | 37.971429 | 116 | 0.665914 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 912 | 0.68623 |
cf73e7f195ff23cb66846fa6c6da7d28660538de | 20,029 | py | Python | scripts/parser/oldslavdep.py | npedrazzini/jPTDPEarlySlavic | de9d3fa720fb86acadafc923d85473ae3371903f | [
"MIT"
] | 6 | 2021-08-20T20:00:31.000Z | 2022-01-03T15:43:50.000Z | scripts/parser/oldslavdep.py | npedrazzini/jPTDPEarlySlavic | de9d3fa720fb86acadafc923d85473ae3371903f | [
"MIT"
] | 1 | 2021-07-30T13:07:36.000Z | 2021-07-30T13:07:36.000Z | scripts/parser/oldslavdep.py | npedrazzini/jPTDPEarlySlavic | de9d3fa720fb86acadafc923d85473ae3371903f | [
"MIT"
] | 1 | 2021-01-23T20:00:25.000Z | 2021-01-23T20:00:25.000Z | # coding=utf-8
from __future__ import absolute_import, division, print_function, unicode_literals
from builtins import str
from io import open
from dynet import *
import dynet
from utils import read_conll, read_conll_predict, write_conll, load_embeddings_file
from operator import itemgetter
import utils, time, random... | 48.379227 | 127 | 0.567277 | 19,587 | 0.977932 | 5,616 | 0.280393 | 0 | 0 | 0 | 0 | 710 | 0.035449 |
cf74741b8ea29334e97b4fd26bf8a8d8ea156e23 | 18,806 | py | Python | tests/data/ec2_offer.py | andrewmcgilvray/awspricing | fd37598dbdb08545db03c99492ce01f7290ab6f5 | [
"Apache-2.0"
] | null | null | null | tests/data/ec2_offer.py | andrewmcgilvray/awspricing | fd37598dbdb08545db03c99492ce01f7290ab6f5 | [
"Apache-2.0"
] | null | null | null | tests/data/ec2_offer.py | andrewmcgilvray/awspricing | fd37598dbdb08545db03c99492ce01f7290ab6f5 | [
"Apache-2.0"
] | null | null | null |
BASIC_EC2_OFFER_SKU = '4C7N4APU9GEUZ6H6'
BASIC_EC2_OFFER_MODIFIED_FORMAT = {
'offerCode': 'AmazonEC2',
'version': '20161213014831',
'products': {
'4C7N4APU9GEUZ6H6' : {
'sku' : '4C7N4APU9GEUZ6H6',
'productFamily' : 'Compute Instance',
'attributes' : {
... | 44.458629 | 111 | 0.37823 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8,505 | 0.452249 |
cf7897f04a99a685cf752ce25bde96a1bd963ec7 | 183 | py | Python | dist/micropy-cli/frozen/uasyncio/funcs.py | kevindawson/Pico-Stub | 6f9112779d4d81f821a3af273a450b9329ccdbab | [
"Apache-2.0"
] | 19 | 2021-01-25T23:56:09.000Z | 2022-02-21T13:55:16.000Z | dist/micropy-cli/frozen/uasyncio/funcs.py | kevindawson/Pico-Stub | 6f9112779d4d81f821a3af273a450b9329ccdbab | [
"Apache-2.0"
] | 18 | 2021-02-06T09:03:09.000Z | 2021-10-04T16:36:35.000Z | dist/micropy-cli/frozen/uasyncio/funcs.py | kevindawson/Pico-Stub | 6f9112779d4d81f821a3af273a450b9329ccdbab | [
"Apache-2.0"
] | 6 | 2021-01-26T08:41:47.000Z | 2021-04-27T11:33:33.000Z | from typing import Any
def wait_for_ms(aw: Any, timeout: int) -> Any: ...
# 0: return wait_for(aw,timeout,core.sleep_ms)
# ? 0: return wait_for(aw, timeout, core.sleep_ms)
| 30.5 | 54 | 0.672131 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 98 | 0.535519 |
cf7bf89fc30751bcda78ce1d1f53a0da0361b74d | 1,509 | py | Python | dashdaemon/keys.py | rGunti/CarPi-DashDaemon | b8b340d35125b6f7fe5bb9647760d37301b07cac | [
"MIT"
] | null | null | null | dashdaemon/keys.py | rGunti/CarPi-DashDaemon | b8b340d35125b6f7fe5bb9647760d37301b07cac | [
"MIT"
] | null | null | null | dashdaemon/keys.py | rGunti/CarPi-DashDaemon | b8b340d35125b6f7fe5bb9647760d37301b07cac | [
"MIT"
] | null | null | null | """
CARPI DASH DAEMON
(C) 2018, Raphael "rGunti" Guntersweiler
Licensed under MIT
"""
from redisdatabus.bus import TypedBusListener as Types
import gpsdaemon.keys as gpskeys
import obddaemon.keys as obdkeys
SETTINGS_KEY_BASE = 'carpi.settings.'
DASH_KEY_BASE = 'carpi.dashboard.'
def _build_key(type, key_base, name... | 30.795918 | 92 | 0.743539 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 446 | 0.29556 |
cf7e16d1f4e90c037eb66831eeffade73df69683 | 261 | py | Python | imdb_movie_review_sentiment_prediction/training_and_evaluation.py | slaily/deep-learning-bits | cb9ce7ec539efbdfcaa023d141466f919bd31b71 | [
"MIT"
] | null | null | null | imdb_movie_review_sentiment_prediction/training_and_evaluation.py | slaily/deep-learning-bits | cb9ce7ec539efbdfcaa023d141466f919bd31b71 | [
"MIT"
] | null | null | null | imdb_movie_review_sentiment_prediction/training_and_evaluation.py | slaily/deep-learning-bits | cb9ce7ec539efbdfcaa023d141466f919bd31b71 | [
"MIT"
] | null | null | null | model.compile(
optimizer='rmsprop',
loss='binary_crossentropy',
metrics=['acc']
)
history = model.fit(
x_train,
y_train,
epochs=10,
batch_size=32,
validation_data=(x_val, y_val)
)
model.save_weights('pre_trained_glove_model.h5')
| 18.642857 | 48 | 0.678161 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 63 | 0.241379 |
cf7e800c7c1a59352899d5b0f4d9c283b3e91edb | 1,010 | py | Python | launches.py | zweed4u/launchesEND | fd016478c6f757e323009611d6b83ea42fbf8116 | [
"MIT"
] | 5 | 2017-12-05T04:00:22.000Z | 2020-12-16T20:44:46.000Z | launches.py | zweed4u/launchesEND | fd016478c6f757e323009611d6b83ea42fbf8116 | [
"MIT"
] | null | null | null | launches.py | zweed4u/launchesEND | fd016478c6f757e323009611d6b83ea42fbf8116 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#Hmmm... http://www.endclothing.com/media/us_sitemap.xml
import urllib2, zlib, json
url='https://launches.endclothing.com/api/products'
req = urllib2.Request(url)
req.add_header(':host','launches.endclothing.com');req.add_header(':method','GET');req.add_header(':path','/api/products');req.add_hea... | 67.333333 | 598 | 0.723762 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 534 | 0.528713 |
cf815298accec6c14c7afef44e976c7b6069c135 | 73 | py | Python | scalabel/tools/__init__.py | cwlroda/scalabel | 296b7f3050ec0d02b4578d9d1f174ffd22aee3fb | [
"Apache-2.0"
] | 279 | 2019-11-18T01:48:39.000Z | 2022-03-30T00:16:43.000Z | scalabel/tools/__init__.py | cwlroda/scalabel | 296b7f3050ec0d02b4578d9d1f174ffd22aee3fb | [
"Apache-2.0"
] | 141 | 2019-11-20T02:36:11.000Z | 2022-03-29T15:17:46.000Z | scalabel/tools/__init__.py | cwlroda/scalabel | 296b7f3050ec0d02b4578d9d1f174ffd22aee3fb | [
"Apache-2.0"
] | 85 | 2019-11-18T06:10:12.000Z | 2022-03-27T12:32:55.000Z | """Tools for using scalabel."""
from . import edit_labels, prepare_data
| 18.25 | 39 | 0.739726 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 31 | 0.424658 |
cf831543b480d5861c0d351648dc6dd8a55ea5de | 460 | py | Python | python/controls/choicegroup/choicegroup_with_change_event.py | pglet/pglet-samples | ab47e797a4daccfa4779daa3d1fd1cc27d92e7f9 | [
"MIT"
] | null | null | null | python/controls/choicegroup/choicegroup_with_change_event.py | pglet/pglet-samples | ab47e797a4daccfa4779daa3d1fd1cc27d92e7f9 | [
"MIT"
] | null | null | null | python/controls/choicegroup/choicegroup_with_change_event.py | pglet/pglet-samples | ab47e797a4daccfa4779daa3d1fd1cc27d92e7f9 | [
"MIT"
] | null | null | null | import pglet
from pglet import ChoiceGroup, choicegroup, Text
with pglet.page("choicegroup-with-change-event") as page:
def choicegroup_changed(e):
t.value = f"ChoiceGroup value changed to {cg.value}"
t.update()
cg = ChoiceGroup(label='Select color', on_change=choicegroup_changed, options=[
... | 24.210526 | 81 | 0.680435 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 105 | 0.228261 |
cf84fe1671965d8bf607c4db0b1fce05cc370700 | 910 | py | Python | raspberrypi/sound1.py | Shadowsith/python | b8878c822e55528e663de16bd1029d330862c8dc | [
"MIT"
] | null | null | null | raspberrypi/sound1.py | Shadowsith/python | b8878c822e55528e663de16bd1029d330862c8dc | [
"MIT"
] | null | null | null | raspberrypi/sound1.py | Shadowsith/python | b8878c822e55528e663de16bd1029d330862c8dc | [
"MIT"
] | 1 | 2020-05-19T11:32:25.000Z | 2020-05-19T11:32:25.000Z | #!/usr/bin/python
#Doppelklatschen
import time
gpioPort = 40
import RPi.GPIO as GPIO
import mysql.connector
#MySQL Verbindung
statement = "UPDATE Flags SET wert=0 WHERE name='bewegung';"
#GPIO Layout verwenden
GPIO.setmode(GPIO.BOARD)
GPIO.setup(gpioPort, GPIO.IN)
lastSound = 0
def mysqlConnect(statement):
... | 23.947368 | 103 | 0.631868 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 177 | 0.194505 |
cf85325b7b5d658e0a68da64304ce7b4f2588e9a | 7,466 | py | Python | apted/all_possible_mappings_ted.py | JoaoFelipe/apted | 828b3e3f4c053f7d35f0b55b0d5597e8041719ac | [
"MIT"
] | 52 | 2017-11-14T06:45:45.000Z | 2022-03-01T01:14:45.000Z | apted/all_possible_mappings_ted.py | JoaoFelipe/apted | 828b3e3f4c053f7d35f0b55b0d5597e8041719ac | [
"MIT"
] | 7 | 2018-11-21T17:21:14.000Z | 2021-09-04T09:23:53.000Z | apted/all_possible_mappings_ted.py | JoaoFelipe/apted | 828b3e3f4c053f7d35f0b55b0d5597e8041719ac | [
"MIT"
] | 7 | 2017-12-17T16:49:45.000Z | 2020-07-16T18:49:44.000Z | #
# The MIT License
#
# Copyright 2017 Joao Felipe Pimentel
# 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, modif... | 42.420455 | 80 | 0.583311 | 6,047 | 0.809938 | 0 | 0 | 0 | 0 | 0 | 0 | 3,506 | 0.469595 |
cf89cd77b7a7a86eb1c509ae0d28c2801e9db09a | 9,359 | py | Python | util/dynamic_signal_lights.py | ashwxn/Intelligent-Traffic-Management-System-Using-ML-YOLO | cc111d9895efc19f052656f7d140c6895458a819 | [
"CC0-1.0"
] | 1 | 2021-03-11T06:58:31.000Z | 2021-03-11T06:58:31.000Z | util/dynamic_signal_lights.py | ashwxn/Intelligent-Traffic-Management-System-Using-ML-YOLO | cc111d9895efc19f052656f7d140c6895458a819 | [
"CC0-1.0"
] | null | null | null | util/dynamic_signal_lights.py | ashwxn/Intelligent-Traffic-Management-System-Using-ML-YOLO | cc111d9895efc19f052656f7d140c6895458a819 | [
"CC0-1.0"
] | null | null | null | import time
import emoji
def switch_signal(denser_lane,seconds):
print('\033[1m' + '\n\033[99m' +
"OPENING LANE-{}: ".format(str(denser_lane))+ '\033[0m' )
print("----------------------------------------------------------------------------------")
if denser_lane==1:
print(
... | 69.843284 | 221 | 0.398761 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4,891 | 0.522599 |
cf8a7c68901bef8af36175c6396dc707d25c27e2 | 4,429 | py | Python | Antics/AI/AIPlayer.py | sundercode/AI-Homework | 423f703685852313bc127338f9cf6b4e862b898e | [
"MIT"
] | null | null | null | Antics/AI/AIPlayer.py | sundercode/AI-Homework | 423f703685852313bc127338f9cf6b4e862b898e | [
"MIT"
] | null | null | null | Antics/AI/AIPlayer.py | sundercode/AI-Homework | 423f703685852313bc127338f9cf6b4e862b898e | [
"MIT"
] | null | null | null | import random
import sys
sys.path.append("..") #so other modules can be found in parent dir
from Player import *
from Constants import *
from Construction import CONSTR_STATS
from Ant import UNIT_STATS
from Move import Move
from GameState import *
from AIPlayerUtils import *
##
#AIPlayer
#Description: The responsbili... | 37.533898 | 105 | 0.589298 | 3,865 | 0.872657 | 0 | 0 | 0 | 0 | 0 | 0 | 1,912 | 0.4317 |
d83daa61f951ded7d9855286838edef9a66c37b5 | 170 | py | Python | AIZU_ONLINE_JUDGE/0007.py | vox256/Codes | c408ef0fbc25af46dacef93b3496985feb98dd5c | [
"MIT"
] | null | null | null | AIZU_ONLINE_JUDGE/0007.py | vox256/Codes | c408ef0fbc25af46dacef93b3496985feb98dd5c | [
"MIT"
] | null | null | null | AIZU_ONLINE_JUDGE/0007.py | vox256/Codes | c408ef0fbc25af46dacef93b3496985feb98dd5c | [
"MIT"
] | null | null | null | n = int(input())
debt = 100000
for i in range (n):
debt *= 1.05
if debt % 1000 != 0:
debt -= debt % 1000
debt += 1000
print (int(debt)) | 17 | 28 | 0.476471 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d8415d3e67ce2c47d7251854165bcf91208abf86 | 22,718 | py | Python | pysnptools/util/mapreduce1/runner/hpc.py | fastlmm/PySnpTools | ce2ecaa5548e82b64c8ed6a205dbf419701b66b6 | [
"Apache-2.0"
] | 13 | 2019-12-23T06:51:08.000Z | 2022-01-07T18:14:55.000Z | pysnptools/util/mapreduce1/runner/hpc.py | fastlmm/PySnpTools | ce2ecaa5548e82b64c8ed6a205dbf419701b66b6 | [
"Apache-2.0"
] | 3 | 2020-07-30T16:07:43.000Z | 2021-07-14T09:00:42.000Z | pysnptools/util/mapreduce1/runner/hpc.py | fastlmm/PySnpTools | ce2ecaa5548e82b64c8ed6a205dbf419701b66b6 | [
"Apache-2.0"
] | 3 | 2020-05-22T09:46:16.000Z | 2021-01-26T13:27:36.000Z |
from pysnptools.util.mapreduce1.runner import *
import os
import subprocess, sys, os.path
import multiprocessing
import pysnptools.util as pstutil
import pdb
import logging
try:
import dill as pickle
except:
logging.warning("Can't import dill, so won't be able to clusterize lambda expressions. If you try, you'... | 52.832558 | 265 | 0.61832 | 22,263 | 0.979972 | 0 | 0 | 713 | 0.031385 | 0 | 0 | 6,663 | 0.293292 |
d8424bf36382d1072f3fbfbb2e4fabd3526822c8 | 496 | py | Python | tests/formatters_test.py | MiraGeoscience/mirageoscience-apps | 8c445ec8f2391349aa4cac6c705426301b3c31ca | [
"MIT"
] | 1 | 2022-02-18T16:28:22.000Z | 2022-02-18T16:28:22.000Z | tests/formatters_test.py | nwilliams-kobold/geoapps | eb972321316a33628d8ae04613cc403a27d942ee | [
"MIT"
] | null | null | null | tests/formatters_test.py | nwilliams-kobold/geoapps | eb972321316a33628d8ae04613cc403a27d942ee | [
"MIT"
] | null | null | null | # Copyright (c) 2022 Mira Geoscience Ltd.
#
# This file is part of geoapps.
#
# geoapps is distributed under the terms and conditions of the MIT License
# (see LICENSE file at the root of this source code package).
import pytest
from geoapps.utils.formatters import string_name
def test_string_name():
char... | 23.619048 | 75 | 0.681452 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 301 | 0.606855 |
d843b63a70d99dba02ce0c7f86e18727de78351a | 300 | py | Python | solutions/python3/841.py | sm2774us/amazon_interview_prep_2021 | f580080e4a6b712b0b295bb429bf676eb15668de | [
"MIT"
] | 42 | 2020-08-02T07:03:49.000Z | 2022-03-26T07:50:15.000Z | solutions/python3/841.py | ajayv13/leetcode | de02576a9503be6054816b7444ccadcc0c31c59d | [
"MIT"
] | null | null | null | solutions/python3/841.py | ajayv13/leetcode | de02576a9503be6054816b7444ccadcc0c31c59d | [
"MIT"
] | 40 | 2020-02-08T02:50:24.000Z | 2022-03-26T15:38:10.000Z | class Solution:
def canVisitAllRooms(self, rooms):
pool, stack = set(range(len(rooms))), [0]
while stack:
pool.discard(stack[-1])
for nex in rooms[stack.pop()]:
if nex in pool:
stack.append(nex)
return not pool | 33.333333 | 49 | 0.51 | 300 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d84405eb47cc619295c6637f42822db41956a203 | 10,213 | py | Python | 15_observation_fixed_direction.py | kuntzer/SALSA-public | 79fd601d3999ac977bbc97be010b2c4ef81e4c35 | [
"BSD-3-Clause"
] | 1 | 2021-07-30T09:59:41.000Z | 2021-07-30T09:59:41.000Z | 15_observation_fixed_direction.py | kuntzer/SALSA-public | 79fd601d3999ac977bbc97be010b2c4ef81e4c35 | [
"BSD-3-Clause"
] | null | null | null | 15_observation_fixed_direction.py | kuntzer/SALSA-public | 79fd601d3999ac977bbc97be010b2c4ef81e4c35 | [
"BSD-3-Clause"
] | 1 | 2021-07-30T10:38:54.000Z | 2021-07-30T10:38:54.000Z | ''' 15-observation_fixed_direction
===============================================
AIM: Similar to 14-<...>.py, but for only one traget.
INPUT: files: - <orbit_id>_misc/orbits.dat
- <orbit_id>_flux/flux_*.dat
variables: see section PARAMETERS (below)
OUTPUT: in <orbit_id>_figures/ : (see below for file name defin... | 27.380697 | 117 | 0.675218 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4,036 | 0.395183 |
d8455d466c10af2e80eabb1b98ebf27274580915 | 5,992 | py | Python | midonet/neutron/services/l2gateway/plugin.py | NeCTAR-RC/networking-midonet | 7a69af3eab25f57e77738fd8398b6f4854346fd9 | [
"Apache-2.0"
] | null | null | null | midonet/neutron/services/l2gateway/plugin.py | NeCTAR-RC/networking-midonet | 7a69af3eab25f57e77738fd8398b6f4854346fd9 | [
"Apache-2.0"
] | null | null | null | midonet/neutron/services/l2gateway/plugin.py | NeCTAR-RC/networking-midonet | 7a69af3eab25f57e77738fd8398b6f4854346fd9 | [
"Apache-2.0"
] | null | null | null | # Copyright (C) 2015 Midokura SARL
# 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... | 47.555556 | 79 | 0.691255 | 4,720 | 0.787717 | 0 | 0 | 1,887 | 0.31492 | 0 | 0 | 2,131 | 0.355641 |
d8465626d2247b15a81fc86df366ab13b3a32e07 | 1,706 | py | Python | QueroInternetWeb/main/migrations/0008_auto_20190507_2146.py | quero-internet/quero-internet-web | 95f1763ecb587dcb6d09c0cd3c15c29f837ced90 | [
"MIT"
] | null | null | null | QueroInternetWeb/main/migrations/0008_auto_20190507_2146.py | quero-internet/quero-internet-web | 95f1763ecb587dcb6d09c0cd3c15c29f837ced90 | [
"MIT"
] | 2 | 2019-08-06T01:04:37.000Z | 2019-08-27T00:26:32.000Z | QueroInternetWeb/main/migrations/0008_auto_20190507_2146.py | quero-internet/quero-internet-web | 95f1763ecb587dcb6d09c0cd3c15c29f837ced90 | [
"MIT"
] | null | null | null | # Generated by Django 2.1.7 on 2019-05-08 01:46
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('main', '0007_auto_201904... | 37.911111 | 140 | 0.616647 | 1,551 | 0.907018 | 0 | 0 | 0 | 0 | 0 | 0 | 347 | 0.202924 |
d846ca90573fc0df20d1b67f785499c31a7ee515 | 409 | py | Python | instructionsWW.py | felixboehm/chatBot | 3c3cc9a9a283f9048b6f40dfcf1ac324ad2eecb8 | [
"Apache-2.0"
] | null | null | null | instructionsWW.py | felixboehm/chatBot | 3c3cc9a9a283f9048b6f40dfcf1ac324ad2eecb8 | [
"Apache-2.0"
] | null | null | null | instructionsWW.py | felixboehm/chatBot | 3c3cc9a9a283f9048b6f40dfcf1ac324ad2eecb8 | [
"Apache-2.0"
] | null | null | null | def showHelp(bot, message):
helpText = """** HowTo Play "Werwolf” **
Commands:
`join` trete dem Spiel bei
`join @player` lade dich und einen anderen Spieler ein
`go` starte das Spiel
`bite @player` Werwölfe töten ihr Opfer
`hang @player` Dorfbewohner hängen den Verdächtigen
`restart` sto... | 37.181818 | 59 | 0.687042 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 331 | 0.795673 |
d848f8dd8085e1bf86cb047117735a5685ffbd13 | 1,781 | py | Python | setup.py | mcrowson/wunderpy2 | a3a959d1a3569ccb0869adba10e671978609a697 | [
"MIT"
] | null | null | null | setup.py | mcrowson/wunderpy2 | a3a959d1a3569ccb0869adba10e671978609a697 | [
"MIT"
] | null | null | null | setup.py | mcrowson/wunderpy2 | a3a959d1a3569ccb0869adba10e671978609a697 | [
"MIT"
] | null | null | null | from setuptools import setup, find_packages
from codecs import open
import os.path
import sys
script_dir = os.path.abspath(os.path.dirname(__file__))
def read(*paths):
"""Build a file path from *paths* and return the contents."""
with open(os.path.join(*paths), 'r') as f:
return f.read()
# argparse i... | 36.346939 | 95 | 0.632229 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 993 | 0.557552 |
d8491385a7cb1fe2a3fcabf28f8d930e00a5e6f3 | 612 | py | Python | mpos/web/manager.py | cackharot/ngen-milk-pos | 4814bdbc6bddf02530ff10e1ec842fb316b0fa91 | [
"Apache-2.0"
] | null | null | null | mpos/web/manager.py | cackharot/ngen-milk-pos | 4814bdbc6bddf02530ff10e1ec842fb316b0fa91 | [
"Apache-2.0"
] | null | null | null | mpos/web/manager.py | cackharot/ngen-milk-pos | 4814bdbc6bddf02530ff10e1ec842fb316b0fa91 | [
"Apache-2.0"
] | 1 | 2019-04-24T06:11:47.000Z | 2019-04-24T06:11:47.000Z | # Set the path
import os
import sys
from flask_script import Manager, Server
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
from web import app
manager = Manager(app)
# Turn on debugger by default and reloader
manager.add_command("run", Server(
use_debugger=True,
use_reloade... | 19.741935 | 79 | 0.691176 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 156 | 0.254902 |
d849ad31053906c063fe54eb88c77659c721172b | 288 | py | Python | polish_case_trainer/word/word_bag.py | davidhelbig/casetrainer-api | e420070960996302e8cf4ee370f4cf844222ed98 | [
"MIT"
] | 5 | 2018-01-30T22:10:40.000Z | 2020-09-22T10:43:57.000Z | polish_case_trainer/word/word_bag.py | davidhelbig/casetrainer-api | e420070960996302e8cf4ee370f4cf844222ed98 | [
"MIT"
] | 3 | 2017-05-02T21:42:10.000Z | 2019-07-19T09:41:07.000Z | polish_case_trainer/word/word_bag.py | davidhelbig/casetrainer-api | e420070960996302e8cf4ee370f4cf844222ed98 | [
"MIT"
] | 4 | 2017-05-01T22:44:57.000Z | 2020-09-21T23:34:01.000Z | import random
class WordBag:
def __init__(self, word_list):
if not isinstance(word_list, list):
raise TypeError("word_list must be a list object")
self.word_list = word_list
def get_word_from_bag(self):
return random.choice(self.word_list)
| 22.153846 | 62 | 0.670139 | 271 | 0.940972 | 0 | 0 | 0 | 0 | 0 | 0 | 33 | 0.114583 |
d84b963aacb5fb2dab3e77cf74727cfedec95c03 | 323 | py | Python | setup.py | khsk/Python-App-Capture | a0b893765558f144399ec31f1f11fb0b30025cc7 | [
"MIT"
] | null | null | null | setup.py | khsk/Python-App-Capture | a0b893765558f144399ec31f1f11fb0b30025cc7 | [
"MIT"
] | null | null | null | setup.py | khsk/Python-App-Capture | a0b893765558f144399ec31f1f11fb0b30025cc7 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Tue Oct 03 15:54:20 2017
@author: y-takeuchi
"""
from cx_Freeze import setup, Executable
exe = Executable(script = 'capture.py', base = 'Win32Gui')
setup(name = 'AppCapture',
version = '0.1',
description = 'Save Screen',
executables = [ex... | 17.944444 | 60 | 0.585139 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 144 | 0.44582 |