blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 2 283 | content_id stringlengths 40 40 | detected_licenses listlengths 0 91 | license_type stringclasses 2
values | repo_name stringlengths 3 135 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringlengths 4 68 | visit_date timestamp[ns]date 2015-07-25 20:53:29 2023-09-06 10:46:05 | revision_date timestamp[ns]date 1970-01-01 00:00:00 2037-05-03 13:00:00 | committer_date timestamp[ns]date 1970-01-01 00:00:00 2036-02-09 17:40:36 | github_id int64 1.61k 691M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 24
values | gha_event_created_at timestamp[ns]date 2012-06-03 10:21:33 2023-09-14 21:59:50 ⌀ | gha_created_at timestamp[ns]date 2008-03-27 23:40:48 2023-09-13 22:40:33 ⌀ | gha_language stringclasses 250
values | src_encoding stringclasses 27
values | language stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 6 10M | extension stringclasses 289
values | filename stringlengths 1 218 | content stringlengths 6 10M |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
94f2a5887ee2a6b6c7a3d4b81f635fdf60aa1412 | 5141d540e42c82ac0ded31436b5d35686e73d107 | /OOP/Inheritence.py | f6b45a0cf9f37abba27496dbb2ac6a1a5bc58841 | [] | no_license | roxanacaraba/Learning-Python | 5dfcbf39e9e103f1fc5b834da747903136256419 | 411f42ae626559c699bdab3e2fe3fa6a12d8f304 | refs/heads/main | 2023-01-12T14:18:39.782747 | 2020-11-18T19:19:47 | 2020-11-18T19:19:47 | 313,975,689 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,043 | py | Inheritence.py | #Single level inheritence
class Student:
def __init__(self, nume, varsta):
self.nume = nume
self.varsta = varsta
class Carnet(Student):
def __init__(self,nume, varsta, institutie_invatamant, specializare):
self.institutie_invatamant = institutie_invatamant
self.specializare =... |
d7fca1f077978870fa2e08f55fa41ee6fe4ee652 | d656cea60fdbc0426672c115dd310a820d492964 | /product/forms.py | 07caab97939faf7fdfdbd7031ed7d9da649f4e00 | [] | no_license | khs0806/mall_project | 9fff6f191c80b77b48a518beb8beba9e0c121d9a | 699a104d3143605a4f75d4d31b644ec6eecda051 | refs/heads/master | 2020-09-29T22:30:41.254284 | 2020-01-16T09:57:42 | 2020-01-16T09:57:42 | 227,137,260 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 761 | py | forms.py | from django import forms
from .models import Product
class RegisterForm(forms.ModelForm):
name = forms.CharField(
error_messages={
'required':'제목을 입력해주세요.'
},
max_length=64, label='제목'
)
description = forms.CharField(
error_messages={
'required':'내용을 ... |
8e33de09da5f689782382f23ae44791512c736eb | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p02546/s125118755.py | e19654808898d4edf7e86993546163f11af3d92a | [] | no_license | Aasthaengg/IBMdataset | 7abb6cbcc4fb03ef5ca68ac64ba460c4a64f8901 | f33f1c5c3b16d0ea8d1f5a7d479ad288bb3f48d8 | refs/heads/main | 2023-04-22T10:22:44.763102 | 2021-05-13T17:27:22 | 2021-05-13T17:27:22 | 367,112,348 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 66 | py | s125118755.py | s = input()
ans = s
if s[-1] == "s":
ans += "e"
print(ans+"s") |
2037236c927ca35d2ef5cd80efbc990766d2d34d | f051ffdb49c2da76875916b640987ade033460ca | /train.py | 31451bf62dcec3d88b7e13bc5ad55e43b884935b | [] | no_license | davicorreiajr/cyclegan | 2f71811502aece0f798cadd0a0a08be9551d2aa0 | 23e93c0346dbb3c203953e54bb6feb3c1703dd46 | refs/heads/master | 2020-05-24T00:36:31.532210 | 2019-05-19T21:15:39 | 2019-05-19T21:15:39 | 187,018,790 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,465 | py | train.py | import time
from data.custom_dataset_data_loader import CustomDatasetDataLoader
from models.cycle_gan_model import CycleGANModel
from util.object import Object
def print_current_losses(epoch, iters, losses):
"""print current losses on console
Parameters:
epoch (int) -- current epoch
iters (in... |
16a930749b7677bf5d88d2a1c55863690af5d687 | 7caa045d39e8cd5cb299dcb13c3f972764cd066a | /distanciaPuntos.py | 08895ea9347c7e221b112c7353a854b620d2a48c | [] | no_license | mariaangelic1423/Mision_02 | f3ab8a020aa53b1cecc4b9de2a9b5f39b6fde7d6 | e63fd3e37eb63d5fb0bd54cd426cf589e1382eab | refs/heads/master | 2020-04-18T16:16:32.121025 | 2019-01-29T23:00:57 | 2019-01-29T23:00:57 | 167,630,352 | 0 | 0 | null | 2019-01-26T00:03:55 | 2019-01-26T00:03:55 | null | UTF-8 | Python | false | false | 369 | py | distanciaPuntos.py | # Autor: Maria Angelica Hernandez Parada, A01169796
# Descripcion: escribe un programa que calcula la distancia entre dos puntos.
# Escribe tu programa después de esta línea.
x1 = int(input("x1: "))
y1 = int(input("y1: "))
x2 = int(input("x2: "))
y2 = int(input("y2: "))
distancia = ((x2-x1)**2+(y2-y1)**2)*... |
7bff506e246883faca6959387fd82f14cd89d1df | a20bf270a1e8e80c8a1f6b83a7ac489be0afa3ed | /testing/conftest.py | f631fa633348483a2411809447f38d0b633925c0 | [] | no_license | MS-MS-MS/HogwartsSDET | aeb7bbacc6c9cf5ca3f345aaddeba042da3deec9 | 3ab28b8fcd05d123e7e776f6b0db7aca621ef0e4 | refs/heads/master | 2023-01-07T04:11:42.957214 | 2020-11-08T12:17:38 | 2020-11-08T12:17:38 | 311,038,137 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 170 | py | conftest.py | import pytest
"""
前置条件准备
"""
# @pytest.fixture()
@pytest.fixture(scope='module')
def fix():
print("开始计算")
yield
print("计算结束")
|
621f084bbb5b0342bf8126660d18a00d0984e864 | 19a6ef5ecc20519f796fd6f49d0254a273aab45c | /tools/utils.py | 366a3b972038f24cdf6cb455ed2ca56ecc2fd077 | [] | no_license | joey-lou/python-dev | 7460693dcbea32bf786e3e4c345dc86270cf3b92 | d651e87323d32b2c8150db7826fb790601e978e2 | refs/heads/main | 2023-07-21T23:15:47.961422 | 2023-07-08T21:15:29 | 2023-07-08T21:15:29 | 318,077,876 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,986 | py | utils.py | import json
import logging
from typing import Dict, List, Optional
import requests
from pydantic import BaseModel
from twilio.rest import Client
logger = logging.getLogger(__name__)
class BaseCreds(BaseModel):
@classmethod
def from_dict(cls, cred_dict: dict):
return cls(**{k: v for k, v in cred_dict... |
7871152857adc602c203fec9bb017aaee1e4aab0 | 501fd2d8e58a9b8e93df959d45df2a9a94a997be | /day8/day8_part2.py | e8623ab1ccc4e79f7659f5560f993f305d6e2b41 | [] | no_license | elsenorbw/advent-of-code-2019 | 646eb73202b1bb65583128cc46a9df7d4145c8d4 | a2aaa6aae6f6fc05f70f914470a92f0bb8a9585d | refs/heads/master | 2020-09-19T21:17:58.051377 | 2020-09-13T21:34:14 | 2020-09-13T21:34:14 | 224,300,468 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,018 | py | day8_part2.py | # --- Day 8: Space Image Format ---
# The Elves' spirits are lifted when they realize you have an opportunity to reboot one of their Mars rovers, and so they are curious if you would spend a brief sojourn on Mars. You land your ship near the rover.
#
# When you reach the rover, you discover that it's already in th... |
5489c9b29782eafacfb649d9cd260789bdcaa647 | ae3b5affc3831f04c050a445c071be3d7523b174 | /goldfile.py | d7cf5aab64be4090f45e4320c998d1d9e415ba1f | [] | no_license | AvanikaSingh/akinava | 80d22e3c96f56f630a0f5ff07ffbc55c7a497fc4 | c85c0a50395bdc84ca24404e340cd54e6b28cba9 | refs/heads/master | 2022-12-15T19:55:59.495325 | 2020-09-16T12:49:28 | 2020-09-16T12:49:28 | 296,023,419 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 26 | py | goldfile.py | print("goldfile created")
|
0ba8aa116e9b82ba1c38c7acac9328a21469c7a4 | 0f2203331a03df4e20365c9d90c5bc81320f41ac | /apps/views.py | 51df364447e4bfdf434ba4158f4f74c82320fd41 | [] | no_license | prateek-chaurasia/restaurants_app | bb2461b594dd88846710aab97c37ca5337619b69 | 6f766ca703a57d442f45c7915c888d25cd29795d | refs/heads/main | 2023-05-31T05:45:14.479453 | 2021-06-15T10:13:29 | 2021-06-15T10:13:29 | 377,118,389 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,550 | py | views.py | from django.http import HttpResponseRedirect
from django.shortcuts import get_object_or_404, render
from django.urls import reverse
from django.views.generic import DetailView, ListView, UpdateView
from django.views.generic.edit import CreateView
from .models import RestaurantReview, Restaurant #, Dish
from .forms impo... |
acb7bfca8275c17254b6105afcd6455ed632b322 | 1887cc8c3fd9ec2a0944a786e7e875709cebb67c | /cogs/AbsoluteMusic.py | d8b9b955999f8b7a0e99b09d13580aa2044c1594 | [] | no_license | SayuriYuto/DiscordMusicPlaylists | 73ae413ef97691db26902144f4d172a207f9f41c | 2ae9703a0c3d929762c3c9fcb7a7ed7dc58f6239 | refs/heads/main | 2023-07-05T14:56:59.531393 | 2021-08-26T17:04:48 | 2021-08-26T17:04:48 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,973 | py | AbsoluteMusic.py | import discord
from discord.ext import commands
import spotipy
from spotipy.oauth2 import SpotifyClientCredentials
import json
# Refer Spotipy documentations https://spotipy.readthedocs.io/en/2.19.0/
cid = 'your_c_id'
secret = 'your_secret_token'
client_credentials_manager = SpotifyClientCredentials(client_id=cid, cli... |
5e399fb805977646749b99aa7492569255d789bf | 0047db3baff19db8c729215dc03f7341386b8ac6 | /prepare_graph.py | ac4fa5664eaa8d1ede749bdfe3403cd81c79b8da | [
"MIT"
] | permissive | DeVriesMatt/Pytorch-implementation-of-FoldingNet-encoder-and-decoder-with-graph-pooling-covariance-add-quanti | f3d3e571928c01867a4cb50703171fa3af9b62a4 | 19640ad38ac4a9923f1ba4da1ee42a480be2a6e3 | refs/heads/master | 2021-10-16T17:37:31.707567 | 2019-02-12T08:56:37 | 2019-02-12T08:56:37 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,057 | py | prepare_graph.py |
import os
import sys
import numpy as np
import h5py
import argparse
import scipy.sparse
from sklearn.neighbors import KDTree
import multiprocessing as multiproc
from functools import partial
import glog as logger
from copy import deepcopy
import errno
import gdown #https://github.com/wkentaro/gdown
import pyxis
import... |
a647c6430556911d234979edecae525460b50aee | 3a458c1e5d7f52c3c90c128dedc1426da7569f0a | /django/Python Belt Exam/belt_exam/new_app/views.py | e4268caae90bcf6af5235a5613edb16928c8e0c2 | [] | no_license | nizamra/Python-Stack | e222d08e0e3eab0fc34ebe9ac71e091087963532 | 434aa9c51471e50c1c1ce2851cde869ca5b72dfb | refs/heads/master | 2023-03-09T20:26:22.809046 | 2021-02-26T19:54:33 | 2021-02-26T19:54:33 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,660 | py | views.py | from django.shortcuts import render, redirect
from django.shortcuts import render, redirect
from django.shortcuts import render, redirect
from . import models
from django.contrib import messages
from .models import *
def current_user(request):
return User.objects.get(id = request.session['user_id'])
def main(request... |
2e2b79b55f332b23dcdf22a46c791458d169e629 | 09de2d148dce5b03a6a3f364d07ee29d7beb120a | /adventofcode/day16/generic.py | 6e744d92ed7bd1bc43da298e19da447c23c545bd | [] | no_license | DrMcTaco/adventofcode2020 | f5d791f2deac1c140ccfce979e1f5ddb2af48ebd | 4fd43be8dd93389a5163eb92979d2988958c2637 | refs/heads/main | 2023-02-04T07:03:19.895357 | 2020-12-25T17:00:55 | 2020-12-25T17:00:55 | 317,703,212 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,791 | py | generic.py | from dataclasses import dataclass
from typing import List
from aocd import get_data
from dotenv import load_dotenv
from adventofcode.day1.generic import prod
load_dotenv()
@dataclass
class Rule:
name: str
conditions: List[tuple]
potential_pos: set
pos: int = None
def check(self, value: int):
... |
b5f8da400712378ceee3955456d876536ce5a1d8 | 24a9c8f2fac4e2b20f731387336ec4e22d5fd2c7 | /project1/多线程/三种位置参数的使用.py | e1eee7d7e22212b44cdd641de1d2cf87d4148bdc | [] | no_license | yunli45/pycharmProjectHome | 94833822e3036bf2baf8700c4493132e63177d4c | 9a382c060963eb801a3da07423e84a4132257b02 | refs/heads/master | 2020-05-23T23:35:20.476973 | 2019-05-16T09:45:58 | 2019-05-16T09:49:16 | 186,986,803 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 785 | py | 三种位置参数的使用.py |
# arg(单个参数)、 *args(元组参数)、**kwargs(字典参数)三个参数的位置必须是一定的。必须是(arg,*args,**kwargs)这个顺序,否则程序会报错。
# 一、*args的使用方法
# *args 用来将参数打包成tuple给函数体调用
def function_1(*args):
print(args, type(args))
function_1(1)
def function_2(x, y, *args):
print(x, y, args)
function_2(1, 2, 3, 4, 5)
# 二、**kwargs的使用方法
# **kw... |
be8794efd2ed83ee39a9d4e3154d4782b2d68933 | 71761be13f7f86d68d36f68ca035a34e7d0c8a24 | /programmers/making_biggest_num_programmers.py | d92c0b24cb8bae201f8cdd07a83de89dc927a3a7 | [] | no_license | harimkang/coding-interview-problems | 0d5b3bdcd34b65fdc57dd8f1082f5eab56b99980 | 4a12087e62cd9390d2f6bb7b7a9810287b95cef0 | refs/heads/master | 2023-02-16T02:40:12.912099 | 2021-01-10T13:35:57 | 2021-01-10T13:35:57 | 289,935,175 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 865 | py | making_biggest_num_programmers.py | def solution(number, k):
target = len(number) - k
if len(number) == 1:
return number
number = list(number)
answer = []
index = 0
while True:
temp_index = 0
max_v = "-1"
if k == 0:
answer.extend(number[index:])
break
for i in range(i... |
6dc6623456b5f71809807e80eff6ddb26fa5fc0d | bdc6a52f3a6d60047a4df51bd2fb1502e68d3fb3 | /erc20-brownie/scripts/deploy.py | 61f315eda790b45b5409ecfb5852e90feb2dbc4c | [] | no_license | ttong-ai/smartcontracts | c44bb7a301c462fe497a1b7835ff24030be2ea50 | 2809715d7f47d479d17aca6e912af12f9d7f91c8 | refs/heads/master | 2023-08-28T12:09:41.810900 | 2021-11-14T22:01:05 | 2021-11-14T22:01:05 | 425,395,256 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,234 | py | deploy.py | from brownie import accounts, config, network, AntiMatterToken, MockV3Aggregator
from .utils import get_account, deploy_mocks, LOCAL_BLOCKCHAIN_ENVIRONMENTS
class Contract:
account = get_account()
anti_matter = None
if network.show_active() not in LOCAL_BLOCKCHAIN_ENVIRONMENTS:
price_feed_address ... |
76e9fa4bcc63de3187789cb9a287e5f3bd268f60 | d190750d6cb34e9d86ae96724cf4b56a2f57a74a | /tests/r/test_twins.py | 9c4abcdd8e20ca3b0ff300d15937368368be25cc | [
"Apache-2.0"
] | permissive | ROAD2018/observations | a119f61a48213d791de0620804adb8d21c2ad9fb | 2c8b1ac31025938cb17762e540f2f592e302d5de | refs/heads/master | 2021-09-24T04:28:02.725245 | 2018-09-16T23:06:30 | 2018-09-16T23:06:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 502 | py | test_twins.py | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import shutil
import sys
import tempfile
from observations.r.twins import twins
def test_twins():
"""Test module twins.py by downloading
twins.csv and testing shape of
extracted data has 24 rows and ... |
34c2f9afe95b337dcff81a4a9a3ef2908ebf3345 | 191058cd7b73093d98809833d4333d884d349ac8 | /tests/integration/test_it_timeline_api.py | ee7fa8750454e43727528c8da8dea75a5c814c67 | [] | no_license | xstrengthofonex/openchat_api | 9cc1d7a401591378ef9c46dfdcc85b47a090911a | f3414c0e48581f3729be044c42225613c8b3becb | refs/heads/master | 2020-06-25T03:42:14.592023 | 2019-08-04T10:59:16 | 2019-08-04T10:59:16 | 199,189,529 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,994 | py | test_it_timeline_api.py | from itertools import zip_longest
from typing import List
from tests.integration.dsl import (
OpenChatTestDSL, ITUserBuilder, ITUser, ITPostBuilder, ITPost)
class TestITTimelineAPI(OpenChatTestDSL):
DAVID = ITUserBuilder(username="David", about="About David").build()
async def setUp(self) -> N... |
42f3c15ed2c345bedb71b9e7f6442da93017e593 | 7a88b12076c6fa743e1f59699a10b7c1a60782bc | /apps/review_app/models.py | 26a3af1ecb4c03a3ecd8aa52d86a65d8222d38a9 | [] | no_license | manjula21/test_practice | 2c4824dff9196f1e79c59ab09a1925044f5d7ee0 | de092f5bae7537f00dce2277dcd122133dc528b2 | refs/heads/master | 2021-05-09T12:29:33.157621 | 2018-01-26T06:14:01 | 2018-01-26T06:14:01 | 119,013,136 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,927 | py | models.py | from __future__ import unicode_literals
from django.db import models
from django.contrib import messages
import re
import bcrypt
EMAIL_REGEX = re.compile(r'^[a-zA-Z0-9\.\+_-]+@[a-zA-Z0-9\._-]+\.[a-zA-Z]*$')
NAME_REGEX = re.compile(r'^[A-Za-z]\w+$')
# Create your models here.
class UserManager(models.Manager):
d... |
c6c13ab24e4907eecf1db4fded28d4fc8126c834 | 45ae2a6f9ec1bb97e2dab894869ffa4534757053 | /notification/migrations/0003_n_lostandfound.py | 9b53977067b03df02b97c3ff678b532f80df233b | [] | no_license | onthir/warhawks | c017a15d866da6c75be625a29a02f484b6bd16aa | 3f611882871ff1c819d27f39b0a1006b9ca24c5d | refs/heads/master | 2022-08-11T12:12:37.415135 | 2021-02-01T16:23:27 | 2021-02-01T16:23:27 | 135,782,451 | 0 | 0 | null | 2022-07-06T20:21:43 | 2018-06-02T03:01:03 | JavaScript | UTF-8 | Python | false | false | 1,441 | py | 0003_n_lostandfound.py | # -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2018-06-07 12:30
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependenc... |
ebe7c245e3e14116a37020971e67ada054e0b434 | 0db834310946b9cd22f039a62e0516c95421d97b | /water-scrape-aug.py | 11d8c51102eadd3a63240a593e2848b14448bdee | [] | no_license | mfdong/mdong-hearst-texas | 4b237e0842ff092190792f59ba2709b1b87dd37e | 6e5709f7f3d24269f6e80795ade722f0b52ef790 | refs/heads/master | 2023-08-22T04:27:12.972334 | 2021-10-13T03:34:35 | 2021-10-13T03:34:35 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 960 | py | water-scrape-aug.py | import requests
import csv
from bs4 import BeautifulSoup
reservoirs = [["LVQ"], ["HTH"], ["APN"], ["KNT"], ["SHA"]]
for reservoir in reservoirs:
storageURL = "https://cdec.water.ca.gov/dynamicapp/QueryMonthly?s=" + reservoir[0]
storagePage = requests.get(storageURL)
storageSoup = BeautifulSoup(storagePage... |
abdedad2c2b42b54cdba0e61e095ba3df0783b81 | 4644eb637a27eb7a546ee0b0887a174f7d4c13d6 | /src/python/DAS/keywordsearch/metadata/__init__.py | 14f9eb73ae4cfc68515e009234982eba624cb940 | [] | no_license | dmwm/DAS | 4c33ce63156bbe7f87703532e04321320fd6d66d | a2dddea2c2cb18287d607a3f8da0c6364f9f70d7 | refs/heads/master | 2021-08-08T17:40:27.066179 | 2021-05-27T18:47:21 | 2021-05-27T18:47:21 | 4,300,629 | 7 | 5 | null | 2021-05-27T18:47:22 | 2012-05-11T19:07:55 | Python | UTF-8 | Python | false | false | 226 | py | __init__.py | """
Contain meta-data related functions:
* accessing integration schema: fields, values, constraints on inputs/queries
* tracking fields available
* tracking known (input field) values
"""
# coding=utf-8
__author__ = 'vidma'
|
0de735647cf87f64ab64af081da6e11b0ed8a7a7 | d38e4fe4d7b0b3920997c501eec6d16ba78c1cf2 | /cmsys-master/component/urls.py | 4f84e4c84850923d386828f75c8c766389062a1a | [] | no_license | aviralstyle/component | e1a4ea4ba6c29e47e7c1bd008368f3a153f73704 | 4cfa129d98af453b7d57c1d76b5664e28754ee45 | refs/heads/master | 2020-05-02T18:45:58.068980 | 2019-04-30T05:57:28 | 2019-04-30T05:57:28 | 178,139,294 | 0 | 1 | null | 2019-05-01T06:16:05 | 2019-03-28T06:21:20 | Python | UTF-8 | Python | false | false | 1,816 | py | urls.py | """component URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.11/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')... |
96ac9088650490a7da00c7a20f634b76e673ca2d | 47798e56f7be0d14b3efe44a4ae0b2b44c96bf96 | /lib/WINRM.py | 6c4c0140b96fa1972dbda4e42affc5fed9cc3c7e | [] | no_license | snaveen1856/GTA_ref_repo | 40d8bd5476254d3145cb46cd9207195b134a65be | 849da2ebde6a47637a29b73fc79f207647321cdb | refs/heads/master | 2022-05-07T08:55:13.008319 | 2020-04-15T09:15:24 | 2020-04-15T09:15:24 | 250,508,483 | 0 | 0 | null | 2022-03-29T22:00:59 | 2020-03-27T10:47:37 | Python | UTF-8 | Python | false | false | 2,524 | py | WINRM.py | """
WINRM Module to connect to windows host
"""
from winrm.protocol import Protocol
from lib import logger
class WINRM(object):
"""
WINRM Module to connect to windows host
"""
def __init__(self, host_ip, usr, pwd):
"""
- **parameters**, **types**, **return** and **return t... |
ae6a6f7622bf98c094879efb1b9362a915a051b8 | b213515c3744f518ff0cc55e407c7001f77f0952 | /kq/question_vectors.py | 877d0436c0f6afe6049bdef60ec160446a3923fc | [] | no_license | ririw/kaggle-quora | d16cb2b379126c65e0656933d06ddda668379c41 | e94b0ffa8d30854f34843ed654b5a4ab53442cbd | refs/heads/master | 2021-01-25T06:29:34.509373 | 2017-06-04T12:12:17 | 2017-06-04T12:12:17 | 93,575,956 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,631 | py | question_vectors.py | import luigi
import numpy as np
import tqdm
import os
from scipy import spatial
from kq import wordmat_distance
class QuestionVectorTask(luigi.Task):
resources = {'cpu': 1}
dataset = luigi.Parameter()
def requires(self):
#yield wordmat_distance.WeightedSentenceVecs()
yield wordmat_distan... |
37c03732ae52171fc24aec85c940848b02d76dc1 | 529e713a78e82de2ae5d44cfb8ef209e0894d72a | /django-diary/source_code_step_5/entries/views.py | 5258e71abd2364ba645b504f31dd5909788f112d | [
"MIT"
] | permissive | realpython/materials | cd2f548276be2c82f134ca03eadb1cd279e0f26e | d2d62756d3854f54a12a767f2bf9470486c0ceef | refs/heads/master | 2023-09-05T22:12:29.806738 | 2023-08-31T20:56:28 | 2023-08-31T20:56:28 | 132,374,697 | 4,678 | 6,482 | MIT | 2023-09-12T22:22:06 | 2018-05-06T20:46:18 | HTML | UTF-8 | Python | false | false | 775 | py | views.py | from django.urls import reverse_lazy
from django.views.generic import (
ListView,
DetailView,
CreateView,
UpdateView,
DeleteView,
)
from .models import Entry
class EntryListView(ListView):
model = Entry
queryset = Entry.objects.all().order_by("-date_created")
class EntryDetailView(Detai... |
84a516e924252d897be7444e11acfecd66474090 | 811cb5b605ad0656fe018b5d74091307df915c11 | /dazongshangpin/guijinshu/run_vedio_filter_file.py | ecb83b9f8a1b059523582a2f372a49b1f7ce5512 | [] | no_license | chenxy0761/classify_WeChat | fa81151370279e65002189da66ba69b8fa68d73a | 21083ed2207e4bb899b2b27cfb19b57439fd6098 | refs/heads/master | 2021-04-12T08:33:50.214814 | 2018-03-22T03:03:28 | 2018-03-22T03:03:28 | 126,271,661 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,208 | py | run_vedio_filter_file.py | # -*- coding:UTF-8 -*-
from __future__ import print_function
import logging
import numpy as np
from optparse import OptionParser
import sys
from time import time
import matplotlib.pyplot as plt
import os
from sklearn.datasets import fetch_20newsgroups
from sklearn.feature_extraction.text import TfidfVectorizer
from skl... |
be892250c31198e801836dba24fa8218dd50e811 | c4eb52cbb825b3f261f5f525063f18486842e52c | /pythoncode/firstday.py | b3108d7ae147bfa7097ac0767bcb81fd0ee5bccd | [] | no_license | ljwaaa/lagou2qiproject | a32e37c6c26d19a9a8898307620f0841f8182aab | 3cbd10cb5f1da1d8e1cacfc7035c8ebefa96e67c | refs/heads/master | 2022-11-15T17:02:51.096366 | 2020-07-03T08:41:18 | 2020-07-03T08:41:18 | 271,246,482 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 300 | py | firstday.py | def func():
print("这是无参数的打印")
func()
def func1(a):
print(f"这是有参数的打印:{a}")
func1("有参数a")
def func2(a, b):
return a + b
print(f"有返回值打印:{func2(3, 2)}")
def func3(a, b):
return
print(f"无返回值打印:{func3(3, 2)}")
|
dfe0ee5bbb906e5a23adcf06d2d704700fa1567d | 5fa75fd8258695513aba5932a12119ce1a9ef415 | /flat-files/importing-entire-text.py | a155b7db0113d0c3dd03e16d815debdb0fb340b3 | [] | no_license | ColinFendrick/importing-data-in-python | ba34fdc712eb43c5f8d7b83f2a0f4484bebbe6c3 | f9fb4bef5d8a74678c06f181b6575f7579415cf1 | refs/heads/master | 2021-01-06T13:39:05.115851 | 2020-02-24T10:59:25 | 2020-02-24T10:59:25 | 241,345,440 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 125 | py | importing-entire-text.py | file = open('../_datasets/moby_dick.txt', mode='r')
print(file.read())
print(file.closed)
file.close()
print(file.closed)
|
98ab2c428115a3ef5683272d2ec04f2c748a301c | af4abf0a22db1cebae466c56b45da2f36f02f323 | /parser/fase2/team11/parsetab.py | 366c45235f26a58e67a69bf74a0d624b927c4bee | [
"MIT"
] | permissive | joorgej/tytus | 0c29408c09a021781bd3087f419420a62194d726 | 004efe1d73b58b4b8168f32e01b17d7d8a333a69 | refs/heads/main | 2023-02-17T14:00:00.571200 | 2021-01-09T00:48:47 | 2021-01-09T00:48:47 | 322,429,634 | 3 | 0 | MIT | 2021-01-09T00:40:50 | 2020-12-17T22:40:05 | Python | UTF-8 | Python | false | false | 191,115 | py | parsetab.py |
# parsetab.py
# This file is automatically generated. Do not edit.
# pylint: disable=W,C,R
_tabversion = '3.10'
_lr_method = 'LALR'
_lr_signature = 'leftCONCATleftBITWORleftBITWXORleftBITWANDleftBITWSHIFTLBITWSHIFTRleftBITWNOTleftORleftANDleftMENQUEMAYQUEMENIGUALMAYIGUALIGUALDIFERENTEleftMASMENOSleftASTERISCODIVIDID... |
81aade554535706cbda3244e845e7336eb38e5ec | 3afdfb4f81f45004db01231a046b3af18991d3af | /src/api.py | c6445e0c9e6c35bab2be5eae20d38fbac8a59d1c | [
"MIT"
] | permissive | ruanchaves/Zero-Shot-Entity-Linking | 1620eca840c95326c1a7258b2da5d3144aea8e47 | 21195897843366d58ef46bf6adf901d30946a9ec | refs/heads/master | 2022-12-21T15:58:59.082528 | 2020-09-08T00:36:30 | 2020-09-08T00:36:30 | 288,732,674 | 2 | 0 | null | 2020-08-19T12:59:12 | 2020-08-19T12:59:11 | null | UTF-8 | Python | false | false | 5,057 | py | api.py | # Biencoder imports
import pdb, time
from utils import experiment_logger, cuda_device_parser, dev_or_test_finallog, dev_or_test_finallog_rawdata, worlds_loader
from parameters import Params
from data_reader import WorldsReader
import torch
import numpy as np
from embeddings import EmbLoader
from allennlp.data.vocabular... |
db646715ab3372aa19f3dbab33d644047ef6043e | a6dd4d3d7396531d6da2143e9a9c01dee34cdb8e | /ibeis/web/__init__.py | 8b2b56fc868e566e16c4c657c76eb37b6245ee17 | [
"Apache-2.0"
] | permissive | simplesoftMX/ibeis | ec8edf685d4d8770c17d63e0bb3aaf726aa8fa6e | c56eaba3e62165622cadf94175c450d7edfdec91 | refs/heads/master | 2020-07-29T15:24:54.955811 | 2019-07-09T18:00:55 | 2019-07-09T18:00:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 763 | py | __init__.py | # -*- coding: utf-8 -*-
# flake8: noqa
from __future__ import absolute_import, division, print_function
import utool
(print, rrr, profile) = utool.inject2(__name__, '[web]')
from ibeis.web import apis_detect
from ibeis.web import apis_engine
from ibeis.web import apis_json
from ibeis.web import apis_sync
from ibeis.we... |
990dc229c7b8275567052bae66ab4d99011c8d43 | eac0433f78c90735e52331bc757f25efb6b099a5 | /python/classes.py | 8e4f95303403a3e5fdc66585e55b57a3947a5042 | [] | no_license | MatteoAlbi/robotic-arm | a474d0b119e634728414dd017ba5be067076084d | 48cdad269e87f7265c950b1fc20d259765b23c70 | refs/heads/master | 2022-10-19T21:01:21.343681 | 2022-09-29T20:36:07 | 2022-09-29T20:36:07 | 151,836,559 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,119 | py | classes.py | def fabs(x):
if x >=0: return x
else: return x*(-1)
class Point(object):
def __init__(self, x, y):
self.__x = x
self.__y = y
def __str__(self):
return '('+str(self.__x)+', '+str(self.__y)+')'
def get_x(self):
return self.__x
def ge... |
347d735fa02ece119bbd2d2e688b8e1378437cca | ff590b37206257098a257da2362c5c25ee6d768f | /day17/多个fork.py | 560759a72a275885eaa6679c38965ae9a442ca7a | [] | no_license | vhjmlw/Learn-Python | 16de29962bcc045fcedb5cef30e172a7036224ca | b77a1e91a49ca83b3f7610e07cd418c862db37b7 | refs/heads/master | 2021-01-21T13:25:14.481018 | 2017-10-10T01:10:48 | 2017-10-10T01:10:48 | 102,117,465 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 220 | py | 多个fork.py | # coding:utf-8 -*-
"多个fork,每次fork都乘以2"
__author__ = '建磊'
import os
id = os.fork()
if id == 0:
print('1')
else:
print('2')
id = os.fork()
if id == 0:
print('11')
else:
print('22')
|
c348946e7673472db96b7bbe4faa9a7a216c5094 | 1918cadfe3cb9448273efe2549c2ec6ed3ffa9a2 | /pylivolo/module.py | d6cbde26d30e30ba9eacffa9eb5015b14b06f649 | [] | no_license | crankru/pylivolo | a56b8380ad8156b6a680cff27fe31bd6f9ef0fa4 | 0e03b948f864868bd7626d719c531b91f8f5dcbd | refs/heads/master | 2020-04-08T13:18:08.592780 | 2018-11-28T18:30:37 | 2018-11-28T18:30:37 | 159,385,006 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,728 | py | module.py | import wiringpi as wpi
class Livolo:
def __init__(self, pinNumber, debug=False, repeats=150, p_short=110, p_long=300, p_start=520):
self.debug = debug
self.repeats = repeats
self.p_short = p_short # 110 works quite OK
self.p_long = p_long # 300 works quite OK
self.p_start = ... |
9851c2f0f0f53351cc3e43a33786ad1ab9c4754c | b67ae646cd2cb9ea4094e48e9e13e206d63c76ec | /DZ_3/main.py | 94a814339677daa2f6d7c38a9eafbf953a4ba3ec | [] | no_license | edragan484/Oscar_shop | a7ba206fa04ce0fd7fe79392b291426cf43e799a | 4b98ac716894026b56664393148e718bfcb56b5b | refs/heads/master | 2022-12-22T07:43:33.495143 | 2020-09-29T22:36:38 | 2020-09-29T22:36:38 | 296,748,644 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,333 | py | main.py | from selenium import webdriver
import random
from DZ_3 import locators as _locators
def find(parent, locator): return parent.find_element_by_css_selector(locator)
def find_all(parent, locator): return parent.find_elements_by_css_selector(locator)
def find_xpath(parent, locator): return parent.find_element_by_xpat... |
07f8271df80ab6d270e2d00957041cb2356bbbd6 | 62f8885c0677b3c4e2e34ae3903ac455f1a5a3db | /pdf/views.py | 2d2801f77256089390fc83ff059a780195ceb9ed | [] | no_license | ZFCon/fortesting | b22e92bf517c4daae8208c76bab6d67245739858 | 85c0680d4e5c479f63c745fb707f85b3358ee38d | refs/heads/master | 2021-03-01T16:19:44.922553 | 2020-03-08T11:01:28 | 2020-03-08T11:01:28 | 245,798,158 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,086 | py | views.py | from django.shortcuts import render
import io
from django.http import FileResponse
from reportlab.pdfgen import canvas
def pdf_view(request):
# Create a file-like buffer to receive PDF data.
buffer = io.BytesIO()
# Create the PDF object, using the buffer as its "file."
p = canvas.Canvas(buffer)
... |
49faa1512a2013b7bef54d945315374178c58b00 | 3d3fdfd6076596d931e150b4e7532b2d204586cc | /api/python/heedy/users.py | 5716536e2b397f2e0876d2ce4b11ff40ab72b7b8 | [
"Apache-2.0"
] | permissive | heedy/heedy | 7d6821cc7fb45b06759dd5f63adc78f8eacbd0fb | b983da9dd0ca085035eb9f1857ca4552052dd78a | refs/heads/master | 2023-08-24T14:07:43.374006 | 2022-06-27T02:03:00 | 2022-06-27T02:03:00 | 29,364,844 | 221 | 16 | Apache-2.0 | 2022-06-04T20:42:08 | 2015-01-16T19:44:21 | Go | UTF-8 | Python | false | false | 6,541 | py | users.py | from typing import Dict
from .base import APIObject, APIList, Session, q
from .kv import KV
from . import apps
from . import objects
from .notifications import Notifications
class User(APIObject):
props = {"name", "description", "icon", "public_read", "users_read"}
def __init__(self, username: str, session:... |
42f0613725b556ab4b8a10d189c3520e1bc48605 | b92ed56c7ad59f638e45d04e62f723316308bde5 | /kek.py | 05c135cfacfa28e3c5281d0837641446e3209cba | [] | no_license | AlexaEgorova/chm | dafb83a77799ef56b4169ffef4fbba3ec3b70846 | 6bd1da8a897d12371603b8c91cb2881578b18ce2 | refs/heads/master | 2020-03-29T16:01:31.259516 | 2018-12-12T20:26:00 | 2018-12-12T20:26:00 | 150,090,904 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 906 | py | kek.py | def quick_sort(a):
if len(a) <= 1:
return a
q = a[0]
left = [i for i in a if i < q]
medium = [i for i in a if i == q]
right = [i for i in a if i > q]
return quick_sort(left) + medium + quick_sort(right)
def quick_sort_wo_memory(a, left, right):
if left >= right:
return
... |
6199fe67d1a7c607c1bbd9730911408b69b8fed9 | e24410479f4050fa47f7895c93dd08e110ac4d19 | /src/Util/Arduino.py | df4da7e4920f13047c2790720effd458bf2d48f4 | [] | no_license | NewtIndustries/CoDrone | f8d9d886ca1cc6631019996b1e00beb34325c847 | 733b262e9d617d5fa42857ea707175c97294bd3e | refs/heads/master | 2020-04-14T17:32:58.821917 | 2019-01-19T01:33:46 | 2019-01-19T01:33:46 | 163,984,296 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 536 | py | Arduino.py | import serial
Ping = 0x01
class Arduino:
def __init__(self):
# self.ser = serial.Serial('COM3', 9600, timeout=0)
self.ser = serial.Serial(
port = 'COM3',
baudrate = 115200,
parity = serial.PARITY_NONE,
stopbits = serial.STOPBITS_ONE,
bytesize = ser... |
3c8fbe58ba09b0c08b06caf604c97d5b376ecf05 | ecb7156e958d10ceb57c66406fb37e59c96c7adf | /Leetcode Exercise/Leetcode36_Valid Sudoku /learnSolution.py | dfb4aacc766b9e873fdbbde28bc7872cd323e824 | [] | no_license | chenshanghao/RestartJobHunting | b53141be1cfb8713ae7f65f02428cbe51ea741db | 25e5e7be2d584faaf26242f4f6d6328f0a6dc4d4 | refs/heads/master | 2020-07-27T17:39:58.756787 | 2019-10-18T06:27:27 | 2019-10-18T06:27:27 | 209,175,165 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,001 | py | learnSolution.py | class Solution:
def isValidSudoku(self, board: List[List[str]]) -> bool:
return self.isRowValid(board) and self.isColValid(board) and self.isSquareValid(board)
def isRowValid(self, board):
for row in range(9):
if not self.isUnitValid(board[row]):
return False
... |
1616b685b6353f45dec5923e07c429c8d280e4cc | 281bd6909c95dae69efdbb0bdc2ee16f277eb454 | /tests/test_sce.py | 59c343e74a57adf95feae5242118cf4460d8fa88 | [
"MIT"
] | permissive | mcuntz/pyjams | 659d3075a1196810735297bb27021c3ea87f9342 | 82c9090caa6ae8e59f7f2bf9798153a1017b636d | refs/heads/main | 2023-08-02T03:36:18.263674 | 2023-07-31T22:33:46 | 2023-07-31T22:33:46 | 417,959,726 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 11,654 | py | test_sce.py | #!/usr/bin/env python
"""
This is the unittest for sce module.
python -m unittest -v tests/test_sce.py
python -m pytest --cov=pyjams --cov-report term-missing -v tests/test_sce.py
"""
import unittest
import os
import numpy as np
from scipy.optimize._constraints import Bounds
from scipy.optimize import rosen
from pyt... |
3bcdfe7386051ed7b50ee501773fcef053762751 | 59fb52a82dfb19bf6bb7571db913a2d9fa166627 | /xz_transformers/convert_pytorch_checkpoint_to_tf2.py | d341ecb9442f17841eec991269d32bb260c5ac93 | [
"MIT"
] | permissive | enningxie/transformers | bcf37d3cecdaea377e4f7f7309f4a754cced17f9 | eaf35cc8bfc02b0eeefc73a2ab478f4837e53535 | refs/heads/master | 2020-12-26T16:36:17.114638 | 2020-05-27T10:13:29 | 2020-05-27T10:13:29 | 237,566,364 | 4 | 1 | null | null | null | null | UTF-8 | Python | false | false | 6,702 | py | convert_pytorch_checkpoint_to_tf2.py | # coding=utf-8
# Copyright 2018 The HuggingFace Inc. team.
#
# 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... |
49245994c4650e3079e21499064702d1ec133ad9 | 864d04a1baec5cf1a738bbb47a85e6922c21ee63 | /Project_1/extras/drawcontours-test.py | 293554a821ec267841eb318e65ddb274d976db2a | [] | no_license | playertr/ROB514_Group_Project | 27bdc1c8e3cf0031cd4c21fe6736d1ea4be18b4c | 63b569b85bd8b45b41709829230bac1cb9b57600 | refs/heads/main | 2023-01-29T17:11:21.829195 | 2020-12-10T19:18:12 | 2020-12-10T19:18:12 | 308,772,384 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,107 | py | drawcontours-test.py | import cv2
import numpy as np
hsv_lower = (48, 116, 28)
hsv_upper = (255, 255, 255)
img = cv2.imread('screenshot.png')
blurred = cv2.GaussianBlur(img, (11, 11), 0) # apply blur
hsv_frame = cv2.cvtColor(blurred, cv2.COLOR_BGR2HSV) # convert from RGB to HSV colorspace
mask = cv2.inRange(hsv_frame, hsv_lower, hsv_uppe... |
b868926228543aa478a39f6c2244850e38f6ad61 | 313203cd01705e08bc8967246bfeacb7fa5cd6c9 | /Executables_june_28_ble_server/unittset_cases/new/test_case_57.py | ae0861f20880dbd4d60d86b39454e635dbb8c712 | [] | no_license | Nitesh101/Nitesh_old_backup | 17d9c8e8f9694c0ef4d995de7cbb694080523b22 | a0b0263e204f2f46c51e6f20990024396eb0ccb7 | refs/heads/master | 2020-03-19T20:51:51.587343 | 2018-09-21T09:42:11 | 2018-09-21T09:42:11 | 136,919,866 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 295 | py | test_case_57.py | import unittest
import os
print ("Execute Test case_ID_57----> Call Put repeatedly for same resource")
val = os.system("python run.py init 1 discover 1 put 1")
print val
class TestCase(unittest.TestCase):
def test_put(self):
self.assertEqual(val,0)
if __name__=='__main__':
unittest.main()
|
ee8259820544b01a9c9f4b1ee8915298a0885346 | 11f6b9b3c0b3859216bdec7d1499e2cd08774787 | /src_convertors/dictionary_creator.py | f49fc87e5d8ad1c70ef0dcf0810b60a4b43c8a2d | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | gisly/evenki-corpus | f3813f6e8ae3519ff841e6d996459969f06da1bd | e1a306e50e315062cd40170d2e4c3636bd09a262 | refs/heads/master | 2022-07-19T03:36:26.908377 | 2022-07-02T10:49:15 | 2022-07-02T10:49:15 | 189,855,189 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,469 | py | dictionary_creator.py | #!/usr/bin/python
# -*- coding: utf-8 -*
import os
import xml.etree.ElementTree as ET
import re
__author__ = "gisly"
MORPHEME_TIER_NAME = 'fonConcat'
GLOSS_TIER_NAME = 'glConcat'
def generate_morpheme_dictionary_for_word(filename, word, word_gloss, morpheme_dictionary):
word_parts = re.split('[-]', word.strip(... |
5effd7556fe8217682e319a1f37ddce1686b9b64 | 96dcea595e7c16cec07b3f649afd65f3660a0bad | /homeassistant/components/modem_callerid/button.py | 5f9e4cf489ca8240a7047200160ab7f6c737471d | [
"Apache-2.0"
] | permissive | home-assistant/core | 3455eac2e9d925c92d30178643b1aaccf3a6484f | 80caeafcb5b6e2f9da192d0ea6dd1a5b8244b743 | refs/heads/dev | 2023-08-31T15:41:06.299469 | 2023-08-31T14:50:53 | 2023-08-31T14:50:53 | 12,888,993 | 35,501 | 20,617 | Apache-2.0 | 2023-09-14T21:50:15 | 2013-09-17T07:29:48 | Python | UTF-8 | Python | false | false | 1,545 | py | button.py | """Support for Phone Modem button."""
from __future__ import annotations
from phone_modem import PhoneModem
from homeassistant.components.button import ButtonEntity
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import CONF_DEVICE
from homeassistant.core import HomeAssistant
from homeas... |
3a25fead3c088364503cba7d621be7b5156243e7 | 6dc8a8cca60502fba19c99c3d2a1c07d0c79b676 | /MW67.bas.3.A4.C3.py | 0703e75e41290e74c476029469f206670a02d174 | [] | no_license | marcelteun/UniformPolyhedra | 7d7970d412c515360d896166dead40b0801314b4 | ce41d6be97bdd984c4baf485b7a583f9c9b82ea3 | refs/heads/master | 2021-01-20T06:55:13.454746 | 2012-02-17T23:07:15 | 2012-02-17T23:07:15 | 1,103,365 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 324 | py | MW67.bas.3.A4.C3.py | #!/usr/bin/python
import Geom3D
u = 1
Vs = [
[ u, 0, 0],
[ 0, u, 0],
[ 0, 0, u],
]
Fs = [
[0, 1, 2],
]
print "Use A4 | C3"
print "where A4 H0 = [1, 0, 0]"
print "where A4 H1 _|_ H0 = [0, 1, 0]"
print "----------------------------"
print "where C3 O2 = [1, 1, 1]"
shape = Geom3D.SimpleShape(Vs = Vs, Fs = ... |
88e733e89281aa26f1b55ebd994f345ced4793bc | 1199fd9db6bfb5dd03e541cb277b0cbf1c55dac6 | /HW2.py | 153a11cec7820b372a627f92e7b0d8b0b21e0b95 | [] | no_license | Temirlan-G/homework | d714d9d91162b8239b7f2e3f70a23dfa3336fd10 | bde476fc8f867cdf489028f9643b53ed8b8e83d4 | refs/heads/main | 2023-05-06T09:04:28.150716 | 2021-06-06T13:22:40 | 2021-06-06T13:22:40 | 364,485,807 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,371 | py | HW2.py | class Complex:
def __init__(self, a, b):
self.a = a
self.b = b
def __add__(self, mnim):
z1 = self.a + mnim.a
z2 = self.b + mnim.b
return Complex(z1, z2)
def __sub__(self, mnim):
z1 = self.a - mnim.a
z2 = self.b - mnim.b
return Complex(z1, z2... |
c5c493c6e6fc09923e2cb7b3313b833850b5bd93 | 871145a18839272eccf3f715e7036ae210c66a59 | /MS_MARCO/EncoderDecoderModel.py | 653e5c0eae98b38b52a3edac2382e5337a5c9438 | [] | no_license | FreddeFrallan/VisualGlove | 6ee72cf34f7c1b0f74c4584a2254ceedb35c5768 | 95acc2d3e3f4d925c352ab9e7d28bb98a24a613c | refs/heads/master | 2020-07-12T08:58:13.712546 | 2019-09-10T08:11:32 | 2019-09-10T08:11:32 | 204,773,326 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,092 | py | EncoderDecoderModel.py |
def _createModelFromSettings():
pass
def createModel(wordEmbeddingSize, vocabSize, vocabEmbeddings=None, maxSentenceLen=50):
from keras import Model, layers
import keras
encoderIn = layers.Input(shape=(maxSentenceLen, ))
encoderEmbedding = layers.Embedding(vocabSize, wordEmbeddingSize, name="Enco... |
b9015e6040483696b98fdd90bbfc7191848132c3 | f5066772dfe49a579e03176873f64eeab021ffd7 | /dnap/notifications/linux.py | a2fef7b01c77156dfd84615ed83cede0b875ef63 | [
"MIT"
] | permissive | Tenchi2xh/DNAP | 493c7fa72df37590b337db137fb537e869e86cb6 | 60775bc9529d4cd4ee9f236c595b7049b0bb2035 | refs/heads/master | 2021-04-27T04:20:32.007129 | 2018-03-06T18:04:41 | 2018-03-07T13:32:50 | 122,729,050 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 186 | py | linux.py | import notify2
def notify(title, subtitle, message, icon=""):
notification = notify2.Notification(title,
message="%s\n%s" % (subtitle, message),
icon=icon
)
notification.show()
|
2567b78636a82e7b4168614305db7d68d99e55cb | d733778f08c8929bbe6ac5a712aee637ba9f076b | /data/20news/clean_data.py | 4816c182a8101da769ebc229b5cd708b68824083 | [] | no_license | dheeraj7596/Coarse2Fine | 33d7f2ae409b64396f5eb0dd9359289dfebc78c2 | 251142b2e704e595e664031f5a469ebad6de8333 | refs/heads/master | 2023-06-24T02:24:35.810100 | 2021-07-18T06:27:06 | 2021-07-18T06:27:06 | 282,985,036 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,926 | py | clean_data.py | import re
import pickle
import pandas as pd
def clean_html(string: str):
left_mark = '<'
right_mark = '>'
# for every line find matching left_mark and nearest right_mark
while True:
next_left_start = string.find(left_mark)
if next_left_start == -1:
break
next_... |
715c10941a3feefd2dc8b570789d233c3c00cf44 | 249d7e2631f444fc4e23fe0c15fc2c05f3c3466c | /COFICHEPERSO/Old/Creation_de_fiche.py | f9e5014e05f813a5ae46bf54f6f512866b35e46f | [] | no_license | manuteou/-Chronique_Oublie_Character_creation- | 0fff423e7c486706150ec054ce87fad83ac9fb59 | b388e254b3581fafaf771e2efcdc05bcafd7083b | refs/heads/master | 2023-01-11T10:04:37.089495 | 2020-11-15T19:39:55 | 2020-11-15T19:39:55 | 285,321,514 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,413 | py | Creation_de_fiche.py | import random
from COFICHEPERSO.Personnage_Old import Personnages
from COFICHEPERSO.Caracteristiques_Old import Caractéristiques
roll = [random.randint(3,18) for r in range(6)] # Dés lancées pour la valeurs des caractériqtiques du personnage
str = dex = con = inte = sag = cha = 0
def attribution(valeur_choisie):
... |
9d993c92867f02188d75eac06f1f41a77a6140e3 | af133443347494b1e146ee206b86dfb540eee7db | /CodingBat/Logic 2/round_sum.py | 5950de69f71f8f05a4d64c697cb727f721bbfd07 | [] | no_license | inimuzungu/Python-Puzzles | 7dd9eee8c89bb8148138b8053f2c34c02c855979 | efe984bcf9cee1f0d5e3a1a44a2bf9dea25ea1b9 | refs/heads/master | 2022-12-28T13:47:58.468326 | 2020-10-09T11:19:49 | 2020-10-09T11:19:49 | 302,331,039 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,172 | py | round_sum.py | """
For this problem, we'll round an int value up to the next multiple of 10 if its rightmost digit is 5 or more,
so 15 rounds up to 20.
Alternately, round down to the previous multiple of 10 if its rightmost digit is less than 5,
so 12 rounds down to 10.
Given 3 ints, a b c, return the sum of their rounded values.
T... |
4777a4d09ca29ae716ccb7cfc5f7664f244439ea | 8d9bb98fa513281675c7de3a327d6fd31bd2f36d | /preprocessing/article_entities.py | 8ff0c109df29d1cf29a29522701444dac9fd3205 | [] | no_license | Shrub24/Bye-Bye-Bias | fe16a0b7beb3e12ad63a01519c0572ecc35bea95 | dec58f71d336d7cf4445c38f91778875e379068f | refs/heads/master | 2020-06-04T12:26:00.652835 | 2019-12-05T13:48:16 | 2019-12-05T13:48:16 | 192,020,229 | 0 | 0 | null | 2019-12-05T13:48:17 | 2019-06-15T00:38:51 | Python | UTF-8 | Python | false | false | 14,082 | py | article_entities.py | from newspaper import Article
import spacy
import neuralcoref
import re
import copy
from collections import defaultdict
import itertools
class entity_getter():
def __init__(self):
self.nlp = spacy.load("en")
neuralcoref.add_to_pipe(self.nlp, greedyness=0.54, max_dist=100)
self.RELEVANT_ENTI... |
50de508fe1547a489aa0904c95b658766009c94b | bdf0d4d3aac186af3ad0ad6ac9f380f9a0573fba | /aries_cloudagent/vc/ld_proofs/document_loader.py | 3c35d7d9852c0ec371f103003ab0e8136751a403 | [
"LicenseRef-scancode-dco-1.1",
"Apache-2.0"
] | permissive | hyperledger/aries-cloudagent-python | f25d961e0717a4d703bf43df3e4b4bc8ec07b908 | 39cac36d8937ce84a9307ce100aaefb8bc05ec04 | refs/heads/main | 2023-09-01T15:37:05.353674 | 2023-08-31T14:13:06 | 2023-08-31T14:13:06 | 193,556,007 | 370 | 530 | Apache-2.0 | 2023-09-14T17:59:34 | 2019-06-24T18:12:14 | Python | UTF-8 | Python | false | false | 3,579 | py | document_loader.py | """JSON-LD document loader methods."""
import asyncio
import concurrent.futures
from typing import Callable
from pydid.did_url import DIDUrl
from pyld.documentloader import requests
from ...cache.base import BaseCache
from ...core.profile import Profile
from ...resolver.did_resolver import DIDResolver
from .error ... |
920fa3e117c02ef1746ee23b102fbb8a9df60c02 | 0d3d7f328e6061d396f1a5a41843b9924c19baad | /src/fluctmatch/models/base.py | 5a45d71fe1347a0a27861afd9fe91a3aba866291 | [
"BSD-3-Clause",
"BSD-2-Clause"
] | permissive | nixnmtm/python-fluctmatch | 28f9fa67111e7ef99406fc45197ccd3ff2cef8bb | a3682a5597cc775d2c79959e125672cd8742e659 | refs/heads/master | 2022-08-01T01:56:08.083843 | 2022-07-17T02:17:33 | 2022-07-17T02:17:33 | 209,214,083 | 0 | 0 | NOASSERTION | 2022-07-07T15:37:07 | 2019-09-18T04:01:30 | Python | UTF-8 | Python | false | false | 15,664 | py | base.py | # -*- Mode: python; tab-width: 4; indent-tabs-mode:nil; coding: utf-8 -*-
# vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4
#
# fluctmatch --- https://github.com/tclick/python-fluctmatch
# Copyright (c) 2013-2017 The fluctmatch Development Team and contributors
# (see the file AUTHORS for the full list of names)
#
... |
9267cc477d9473fff0d981d84bc6fc57db751145 | 2d4bbea80edf5d05f6a1f9eeb698ee08a5874744 | /apiauth/urls.py | ea13b2f1a5de66ecb20cacae3ff90b9e29a1ecf4 | [
"Apache-2.0"
] | permissive | apiaas/drawer-api | da87160c2ea54d7cffbc9af9996d81e5d1792768 | e54a1bcd7c3a8ec0f66d1cd1eaac2554e4742d8d | refs/heads/master | 2021-01-18T21:11:51.572901 | 2016-05-23T13:11:05 | 2016-05-23T13:11:05 | 55,470,036 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 889 | py | urls.py | from django.conf.urls import patterns, url
from django.contrib.auth.views import logout
from apiauth.views import apilogin, obtain_auth_token, apiregister
app = '^api/'
urlpatterns = [
url(app + 'login/$', apilogin, name='api_login'),
url(app + 'logout/$', logout, name='api_logout'),
url(app + 'auth-token... |
6d3904be2713e60d83b65dcf1618c7dcc982e768 | 46afa58c76f6eca27f8bf5c5cd68dc2a7bd84ab2 | /other/刷访问量.py | 72917db38d5d2f3ab9224a091705495f52fcff33 | [] | no_license | lihowrad/python-tool | b7a1fa15d2bbf1d00bd739ac44b47462f3d26c3a | 65f883ce18e4d9d24f53a985d16099b26262e2d2 | refs/heads/master | 2023-01-31T20:33:08.013041 | 2020-12-15T01:39:45 | 2020-12-15T01:39:45 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,004 | py | 刷访问量.py | import json
import time
from fake_useragent import UserAgent
import requests
import random
headers = {
'User-Agent' : str(UserAgent().random)
}
def get(url):
page = requests.get("http://144.34.226.152:5010/get/").content.decode('utf-8')
page = json.loads(page)
pro = page['proxy']
p = {'http': "htt... |
a954ed58fbb0bde47bcb9cd9a99fb370dac51819 | 01579c65868495d813d9ce64ce317ba6c152b0ad | /example_ai.py | da7c606fcbd6615e71e644bad6fbfdbabf3df65c | [] | no_license | lucaslb1/TerminAItor | abd6334c020564bd380dc530f9dd46aa068baef0 | 2ccfab8c3d787df82efd738f359bfcc928d3e59b | refs/heads/master | 2020-05-22T00:25:59.971054 | 2019-05-12T02:24:06 | 2019-05-12T02:24:06 | 186,172,049 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 5,698 | py | example_ai.py | from colorfight import Colorfight
import time
import random
from colorfight.constants import BLD_GOLD_MINE, BLD_ENERGY_WELL, BLD_FORTRESS, BLD_HOME
from AI import AI
game = Colorfight()
game.connect(room = 'public')
if game.register(username = 'LAX_AI', password = "potter"):
# This is the game loop
while Tru... |
22ede3320a4b623bc3d19c749798afb6f0775834 | 1d0a4750e216f301ec49a247bf7bf07cd61fa29f | /app/serializers/insurance/person_company_supplemental_life_insurance_plan_serializer.py | ce9a372d6c8097e4a7f966af2b578b25e0f7ffbe | [] | no_license | smoothbenefits/BenefitMY_Python | 52745a11db2cc9ab394c8de7954974e6d5a05e13 | b7e8474a728bc22778fd24fe88d1918945a8cfc8 | refs/heads/master | 2021-03-27T15:57:34.798289 | 2018-04-29T19:04:04 | 2018-04-29T19:04:04 | 24,351,568 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,847 | py | person_company_supplemental_life_insurance_plan_serializer.py | from rest_framework import serializers
from ..custom_fields.hash_field import HashField
from ..hash_pk_serializer_base import HashPkSerializerBase
from ..sys_suppl_life_insurance_condition_serializer import \
SysSupplLifeInsuranceConditionSerializer
from app.models.insurance.person_comp_suppl_life_insurance_plan im... |
13065559df950a6cde2e378e8224c5c8f682bfc9 | ba656d14888d6654af2d7aa9fc6a039507ceb4e4 | /tplotter.py | 24e1499ea6aed3bab388a57952dd08a8e6373f6b | [
"MIT"
] | permissive | laragoxhaj/TestPlotter | 42fd2635da1cf7e55080060a9cf1f1171f6ac6ea | 62f20b0695a35336abeb8dbc59fccc4106718e28 | refs/heads/master | 2020-05-29T12:31:13.013994 | 2016-07-19T21:00:42 | 2016-07-19T21:00:42 | 63,639,341 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 19,671 | py | tplotter.py | """A class to generate plots for the predicted output labels vs actual labels
of models trained with machine learning methods. As of now works only on plotting
against a 1D x-value (so produces a 2D, x-y plot).
Based on LossAccPlotter, derived from github.com/aleju/LossAccPlotter
Example:
plotter = TestPlotter()
... |
bfb308e939272b51052823f67982ce322675070b | 96a34a048c783a75736bf0ec775df22142f9ee53 | /services/osparc-gateway-server/src/osparc_gateway_server/app.py | 76c5c0033101a5ee6d5179e2dcdded837a207076 | [
"MIT"
] | permissive | ITISFoundation/osparc-simcore | 77e5b9f7eb549c907f6ba2abb14862154cc7bb66 | f4c57ffc7b494ac06a2692cb5539d3acfd3d1d63 | refs/heads/master | 2023-08-31T17:39:48.466163 | 2023-08-31T15:03:56 | 2023-08-31T15:03:56 | 118,596,920 | 39 | 29 | MIT | 2023-09-14T20:23:09 | 2018-01-23T10:48:05 | Python | UTF-8 | Python | false | false | 97 | py | app.py | import sys
from dask_gateway_server.app import main
def start() -> None:
sys.exit(main())
|
8dbefb11670619b8ef5e3656fcd61aa3f7411a3b | 0529dfd33b8a5c3f82b4cabb2b74e9efd7b70a41 | /31 game/31.py | 64101d8c50a3368a7f96c6ee08f9d95a263cb4f9 | [] | no_license | svkote/Python | e915b4c23c76dafec641928ff969be23f2b891e1 | 4e76502dca6d48d08223c9046921830ce374bc9a | refs/heads/master | 2020-09-16T22:54:00.758584 | 2019-12-15T13:31:27 | 2019-12-15T13:31:27 | 223,911,325 | 6 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,859 | py | 31.py | print("""Ты находишься в темной комнате с двумя дверями.
В какую дверь ты войдешь - 1 или 2?""")
door = input("> ")
if door == "1":
print("В этой комнате гигантский медведь поедает сырок 'Дружба'.")
print("Твои действия?")
print("1. Отберу сырок.")
print("2. Заору медведю в ухо.")
bear = input(">... |
2d76dcb8720ea1fecf5e684a86ef5874f9272a07 | ea8e945af461ae6e5a2dcd9dce244391f14ec695 | /hiroto/chapter09/knock89.py | 8f2a06fb87db0ca6c318fa6052d7a042368a270d | [] | no_license | tmu-nlp/100knock2020 | b5a98485e52b88003fa97966c8d6eef292c9f036 | 1133fa833ea32ad3e54833e420bcb1433f3ec2f3 | refs/heads/master | 2023-04-09T06:48:04.571566 | 2020-08-13T05:38:25 | 2020-08-13T05:38:25 | 258,825,143 | 1 | 2 | null | 2020-08-12T15:56:56 | 2020-04-25T16:43:13 | Python | UTF-8 | Python | false | false | 8,419 | py | knock89.py | # training_data_size ----> 10684 = 2^2 * 2671
from tqdm import tqdm
from sklearn.metrics import accuracy_score
import pandas as pd
import numpy as np
import torch
from torch import nn
from torch import optim
from torch.nn import functional as F
from torch.utils.data import DataLoader
import matplotlib.pyplot as plt
imp... |
53a3354c4d26beb5adf2bd5197fd804d1b74ad92 | 1496dc4ef2579a42bd422d61596448792357eefe | /web/views/file.py | 07d775d10b9830acf7f12f42aba9b60e817e106e | [] | no_license | woodhead12/woodhead12 | b3704f6390b1a07e6ade4174d47ae8e94837e33d | 32ed779bbb58a03c61662575d10880024d125224 | refs/heads/master | 2021-11-28T20:54:28.341436 | 2021-11-17T03:52:00 | 2021-11-17T03:52:00 | 250,453,968 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,232 | py | file.py | from django.shortcuts import render, redirect, reverse, HttpResponse
from django.http import JsonResponse
from django.views.decorators.csrf import csrf_exempt
from web import models
from web.forms.file import FileUploadModelForm, FilePostModelForm
from utils.tencent.cos import delete_from_bucket, credential
import json... |
d64b616d7e24a5d0d7a45fa42f18f9b7ad404730 | 6b9361b29ae38d776d7b00c0efd7d1411ab11ba4 | /student/api_views.py | d46a118268b90e17965b79eb16eb8b894365c851 | [] | no_license | DhruvaDave/django_app | 67596516e605a5f0addd86b450b95204d103f48f | 0889e79b822fdc510ab7de482c355392aad7adbf | refs/heads/master | 2022-12-15T04:57:36.008822 | 2020-09-16T05:24:09 | 2020-09-16T05:24:09 | 293,263,416 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,157 | py | api_views.py | from django.contrib.auth.mixins import LoginRequiredMixin, PermissionRequiredMixin
from django.contrib.messages.views import SuccessMessageMixin
from django import forms
from django.contrib.auth.models import User
from django.http import Http404
from rest_framework.views import APIView
from rest_framework.response imp... |
5e8ed96c6ef67f28363534d836494ea557dd14f2 | 0575058a15c66de8d2cc550fe1f2fb08c5f26132 | /main_video.py | 254842d52bd6de6e989914f44a8c740a12fbfa06 | [
"MIT"
] | permissive | sumedh-inamdar/Finding-Lane-Lines | 4cff89dff6aa3d4c1160419f83426e6bd4df0474 | e0807acbdc2478c10f6a1cbc4c6bed4538d3aba4 | refs/heads/master | 2020-04-10T21:04:17.637498 | 2018-12-22T21:38:56 | 2018-12-22T21:38:56 | 161,286,391 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,601 | py | main_video.py | from moviepy.editor import VideoFileClip
#from IPython.display import HTML
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
import helpers
import numpy as np
import cv2
import os
def process_image(image):
# NOTE: The output you return should be a color image (3 channel) for processing video below
... |
308f72ad80053b7e88bb8a3384da24ea5f925358 | 9160f751dec52c112bb5b50fb74c34bc0d32ed14 | /parte2.py | 09f464bddd95805b78811e8916a24f0a4ba0bfcc | [
"MIT"
] | permissive | camimicastillo/03Tarea | a933dc5435176333cfb26362dec1583dd538b4bc | 5cb292ebb6679406c78730de65b23ff79fce348a | refs/heads/master | 2020-12-11T07:46:11.740072 | 2015-10-08T03:36:39 | 2015-10-08T03:36:39 | 43,651,885 | 0 | 0 | null | 2015-10-04T20:39:35 | 2015-10-04T20:39:33 | Python | UTF-8 | Python | false | false | 1,229 | py | parte2.py | '''
Este script resuelve numericamente el set de ecuaciones del sistema
de Lorenz, mediante el uso del metodo predeterminado de Runge Kutta orden
4 que corresponde al comando ODE.
'''
import numpy as np
import matplotlib.pyplot as plt
from scipy.integrate import ode
from mpl_toolkits.mplot3d import Axes3D
#Parametro... |
b7b1367f67b13547f307043123a6ddf83da04c8e | d69e6fa9c659c896dfae09196d0a5795709d169e | /unisan/lemlit/apps.py | 0508c6d12683bcf62264251216b9b4cf2f718b0a | [
"Apache-2.0"
] | permissive | kurniantoska/ichsan_proj | 3be7e4fd233c18955ea54a905b8c8442af8ebe8c | f79cbcb896df902e129dcdb2affc89dc4f3844ef | refs/heads/master | 2022-12-05T21:18:46.605502 | 2019-07-25T14:47:42 | 2019-07-25T14:47:42 | 101,473,964 | 0 | 0 | Apache-2.0 | 2022-12-04T04:39:44 | 2017-08-26T08:41:46 | HTML | UTF-8 | Python | false | false | 87 | py | apps.py | from django.apps import AppConfig
class LemlitConfig(AppConfig):
name = 'lemlit'
|
1f4babdba6045f980a83d5d024017820d22b521b | c84c7d85d2c20891a5e6238054a684ababbafaca | /common.py | 5d5a285076fbdd4f31e6390245b59547e8ebd28a | [] | no_license | VJaGG/deeplearning-tutorial | 0addf83b6f558402c473742b0510a592e3d1bafd | 97553b9ab5e2f2496c808939266af1693a798604 | refs/heads/master | 2023-07-26T05:03:52.733668 | 2021-08-09T07:57:16 | 2021-08-09T07:57:16 | 397,809,898 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,708 | py | common.py | '''
@File : model.py
@Modify Time @Author @Version @Desciption
------------ ------- -------- -----------
2021/8/5 15:28 WuZhiqiang 1.0 None
'''
from lib import *
from lib.utility.file import *
from lib.utility.layer_np import *
from lib.utility.rate import *
IDENTIFIER = datetime.n... |
f43832e1b4bafd548ea21f38a31e75568cf40901 | 3f5b60fb5c7eb2a8426840265e0d305b97d0a850 | /demo.py | e1dd4bff469d4321381ad8b10803c489d81c0e90 | [
"MIT"
] | permissive | banderasz/minesweeperAI | 698cd6f877ab160c237be7efc90fb84b90e60479 | 058f9d360398b659a8df738cc05055f572d6043d | refs/heads/main | 2023-03-09T03:24:25.870336 | 2021-02-26T18:03:27 | 2021-02-26T18:03:27 | 342,447,512 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 484 | py | demo.py | import logging
import minesweeper as ms
logging.basicConfig(level=logging.INFO, format="%(levelname)s: %(message)s")
print("This will play a single game and then quit.")
print("The minesweeper window needs focus to capture a key press.")
print()
num_games = 1
config = ms.GameConfig(16,16,32)
ai = ms.CSPAI()
viz = ms... |
5e23778406c515e9cc145d0c5394ae349a46abe7 | 3f2143a593c09fbd70ecbc906f86f38cb0cf8824 | /game/urls.py | 6a62c697b8421bd8a451d5359db983ad6eeefcba | [] | no_license | readysetkind/SpeakYourKindMarch4 | e08a61e97b06bfc2b7c57e5f6a1a48d6d0a05d9e | 9f4c470b1fd9d4883b638dc4b090ade220ff2d54 | refs/heads/master | 2020-06-11T12:50:24.811142 | 2019-03-10T18:28:41 | 2019-03-10T18:28:41 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 753 | py | urls.py | from django.conf.urls import url
from django.contrib import admin
from django.urls import path, include
from . import views
app_name = 'game'
urlpatterns = [
path('', views.index, name='index'),
path('scores/', views.player_score, name='player_score'),
path('saved_game/', views.saved_game, name='saved_ga... |
3ec3ab27fc16365f4633bf183746e0408e4c03a3 | f9d2c85eca12360df76428624abfe169ce9a12b0 | /ampleLOS.py | 332d601a6bc0d7e2e29947c46e7ddb97a001c667 | [] | no_license | ssudha1/LOSampledroid | 01147473cde672937cb4ddc67a4950a5e64fbff5 | 67721aa293d24692ce2e9ccdb3c9e3eea5ca3240 | refs/heads/master | 2023-02-13T18:00:15.710860 | 2021-01-02T18:39:15 | 2021-01-02T18:39:15 | 263,978,424 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,839 | py | ampleLOS.py | #!/usr/python
import amplerec as art
import ample_types as types
import amplevm as jvm2
import sys, os, subprocess, struct,binascii
from collections import OrderedDict
path = sys.argv[1]
art.path = path
[nPath, rAddr, memList, mapList, listing,lstList,runtime]=art.main(path)
def extOKlass(reference, mapList):
[g, ... |
8531cd87a3e44e339949adc724123c4c322c5cd0 | b210d58b724c7199f43ddde031eba40996c82257 | /submissions/sm_114_sudhir/week_14/day_1/session_1/cart_class.py | 94be7fb6255c07f6a2fb2295a3a37ff674cb9a08 | [] | no_license | Tanmay53/cohort_3 | 0447efd2dc8b3c1284b03da7326b35393fdf5f93 | 351fb6e1d0c29995fb5cb3b6af411dbcf0ced64c | refs/heads/master | 2021-05-23T17:55:36.508185 | 2020-04-05T12:58:07 | 2020-04-05T12:58:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 676 | py | cart_class.py | class ShoppingCart:
items_present_in_cart = {
}
def add_item(self, product, price):
if product in self.items_present_in_cart:
print(product+"is already present")
else:
self.items_present_in_cart[product] = price
print(product + " Added")
def rem... |
94151d719c1588ad715a399ebd861584dd8e09cc | 8120975953f5ed704894284048efb25ac5acabfd | /server/apps/problem/migrations/0030_codedrafts.py | 5f07549c0e0d0425d3f293ae7a3f0cb816b6df32 | [] | no_license | DICKQI/WeJudge-2-Dev | 9815b69a56dab13a9aab52bcf75ebfabfc05a8e1 | ded211428adc9506e7a7b9bbaa5d38c4b5c798d8 | refs/heads/master | 2021-08-31T18:20:31.285661 | 2017-12-22T07:22:19 | 2017-12-22T07:22:19 | 115,104,196 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,149 | py | 0030_codedrafts.py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.4 on 2017-09-05 00:32
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
import wejudge.db.converter
class Migration(migrations.Migration):
dependencies = [
('account', '0015_auto_20170905_0... |
3cf166991c53a2f14c8c6f4f490d779a091cefb9 | 41dc3f8a7cd29b72f5e72d072132e8f3c2d9dcfa | /train_rl.py | 2f5894941241fdef4606e7d787eca40067a80403 | [] | no_license | mriedman/cs229-project | 10889c2d7f4d27d6cb661d1bac76aa8ec12b4d6f | 0e3c9d7311c14429c96a052e60965588755c4fad | refs/heads/main | 2023-05-06T09:05:26.006266 | 2021-06-03T06:14:22 | 2021-06-03T06:14:22 | 373,380,465 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,435 | py | train_rl.py | import numpy as np
def initialize_mdp_data(num_states):
transition_counts = np.zeros((num_states, num_states, 2))
transition_probs = np.ones((num_states, num_states, 2)) / num_states
# Index zero is sum of rewards, index 1 is count of total num state is reached
reward_counts = np.zeros((num_states, 2))... |
423019c9eadf347838cfa21b2edbeca9629871bf | 7b70d9a6ef5a743fa7144b9cf6ad81a89fa4c4d6 | /Patition_problem.py | d9546ea11d3a3039493086e41dc8c6e031909871 | [] | no_license | abhilash-pinapaka/Python | d4fc2fcf4f8a6ec8f72ae570be9a04f2071b8df5 | 52975e0f05500b1d5224c86c84e20d4bc6bc774e | refs/heads/master | 2021-09-25T22:33:51.247771 | 2018-10-26T06:38:20 | 2018-10-26T06:38:20 | 154,786,051 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,054 | py | Patition_problem.py | """
find if the list can be partitioned into 2 or not
"""
def subset_exists_with_sum(arr, target_sum):
# The value of subset[i%2][j] will be true
# if there exists a subset of sum j in
# arr[0, 1, ...., i-1]
subset = [[False for j in range(target_sum + 1)] for i in range(2)]
n=len(arr)
for i ... |
8bb10c32e0637d5797548268f44a6668e9c6bbc8 | d59eaf9a11a4a7129332c58e2c9ab8ab818c582d | /rest/views.py | ea122e69a4d3ac2f5d3b532feeb59502e857b8ca | [] | no_license | SothanaV/randomRest | 6adef46fc5c99ce063ea0f65e648978dc68d4524 | b06948bab11054e25aa2ec4505e2f7bb6761c37b | refs/heads/master | 2021-01-15T15:15:43.290130 | 2017-08-08T14:59:59 | 2017-08-08T14:59:59 | 99,704,656 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 567 | py | views.py | from django.shortcuts import render
import random
from .models import Rest
from django.contrib.admin.views.decorators import staff_member_required
from django.contrib.auth.decorators import login_required
# Create your views here.
@staff_member_required
def getRest(request):
a = Rest.objects.all().order_by("-no").v... |
d61b04539295f6b25e7f6589d32f313e3c6df82f | 7ea71eada6a8fe5a7d10222155b43bccd7c09cec | /online_background.py | 39827dbe3933d66bd1f17ddc837d05a59b2654fe | [
"MIT"
] | permissive | vishalbelsare/HyperStreamOnlineLearning | bf9016c5f1df88941c6e1d57ba896f7571dd32c2 | 7799e0ea15135fe5cb2935bdd39b471c53ccf0ff | refs/heads/master | 2020-04-07T07:38:24.010109 | 2017-12-04T15:58:47 | 2017-12-04T15:58:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,909 | py | online_background.py | import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
from matplotlib import cm
from matplotlib.lines import Line2D
np.random.seed(42)
n_samples = 5000
MU = np.array([0.5, 1.5])
COV = np.array([[1., 0.7], [0.7, 2.]])
def get_samples(n):
return np.random.multivariate_normal(me... |
58385a7713a8f88925ced714d25f1522bc7e39d8 | 50d827ac9e8c4240f40c2813ac097a07b4bbef02 | /Plotter.py | 708bb0ffa32ab0bda5a9d6f1cf6edac977317f3d | [] | no_license | loudsheep/CovidAPI | a068f85903217cd3f87fd6f6f60af7b66f7ca6ad | a2cc4bd36d9b21b249b8a3a4f454f695483b2c37 | refs/heads/main | 2022-12-31T15:45:56.419873 | 2020-10-20T17:41:02 | 2020-10-20T17:41:02 | 305,066,386 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,154 | py | Plotter.py | import matplotlib.pyplot as plt
class Scatter:
def __init__(self, values, ylabel, title):
self.values = values
self.range = list(range(len(values)))
self.ylabel = ylabel
self.title = title
def plot(self):
fig = plt.figure()
ax = fig.add_axes([0, 0, ... |
70c78021a2544ea372545b037ed55298c26391d1 | b0e9d93b7b1e1b47a3e160f5c0bf34c499b90662 | /service/SendAttachment/SearchResult.py | 05d70f1ea7d59a64fc7977893a81353e5e557c1f | [] | no_license | zengzhuqing/EasyDebug | 6998cdc3b205fdb58ae65b6dca1e9d3317c31efc | 6ffc2ed929ae18b1babb015c71c19d3a5cd84172 | refs/heads/master | 2021-01-18T21:30:38.243000 | 2016-04-20T03:11:55 | 2016-04-20T03:11:55 | 39,123,485 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 3,837 | py | SearchResult.py | #-*- coding:utf-8 -*-
'''
'''
from flask import Flask, jsonify
app = Flask(__name__)
app.debug = True
from datetime import timedelta
from flask import make_response, request, current_app, render_template
from functools import update_wrapper
import json
from subprocess import *
def crossdomain(origin=None, methods=No... |
d0dfea27128ca6966c85da6529ead5c95c86c4cf | 392651974f2e6d006618b64aac6cc2613ba01883 | /blog/migrations/0034_auto_20171016_1335.py | f90e524e0fc6abdaa8aff12d1e70d3e5cdfee32c | [
"MIT",
"Apache-2.0"
] | permissive | davidjrichardson/uwcs-zarya | 654266dc67deaacd6dba2e390c6dbc85a9525d83 | ab0a94540bf496531dd6b13fe7d313badc4a353c | refs/heads/master | 2022-09-29T12:58:14.542328 | 2021-03-10T17:07:06 | 2021-03-10T21:24:29 | 63,612,819 | 7 | 6 | MIT | 2022-08-30T20:57:36 | 2016-07-18T15:04:54 | Python | UTF-8 | Python | false | false | 476 | py | 0034_auto_20171016_1335.py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.6 on 2017-10-16 12:35
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('blog', '0033_auto_20171016_1334'),
]
operations = [
migrations.AlterField(
... |
41006ff35299aa72b69c6dc1c71a45b44dca7d6c | 65309f7b0c4e987a49e5b6fc852c4e372e5618c6 | /410 - Titanic Discussion.py | 3b7d598ca96b647a5c9b85b1bbefd4b28b17ebfb | [] | no_license | StevenBaez/MSDS | 52a0e4044ee884873f5f3fd8200f9c07650ef98b | 633da4a69aab64b89927fc32264731e5a4748600 | refs/heads/master | 2020-12-09T12:00:24.209928 | 2020-01-11T21:22:17 | 2020-01-11T21:22:17 | 233,297,715 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 800 | py | 410 - Titanic Discussion.py | #!/usr/bin/env python
# coding: utf-8
# In[1]:
import pandas as pd
import numpy as np
import seaborn as sb
import matplotlib as mp
data = pd.read_csv("/Users/stevenbaez/Desktop/train.csv")
# In[2]:
data.head()
# In[3]:
subset = data[['Survived','Age', 'Sex']]
# In[5]:
import numpy as np
import matplotli... |
ebebdb0e79e9d78b818dab3f93d130ccddd2914e | 4cdf325be37d7f096020a7b9f989a8ace068da7b | /train_cox_VSI.py | 459a11e984dca973aee4a02721a8610f6be1c769 | [] | no_license | ZidiXiu/VSI | 3b39cb25459b9551d8a82e97d0f901b8d779f3df | 984ed6f7bc9a26fb20a37a8c89b32bbab6954432 | refs/heads/master | 2021-02-19T13:25:57.475772 | 2020-09-14T18:16:01 | 2020-09-14T18:16:01 | 245,312,750 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 25,880 | py | train_cox_VSI.py | import math
import os
import sys
import pandas
import numpy as np
import seaborn as sns
import tensorflow as tf
import logging
# from utils.simulation_functions import simulation_cox_gompertz
from utils.preprocessing import formatted_data, normalize_batch, event_t_bin_prob,risk_t_bin_prob,\
batch_t_categorize, next_b... |
0ac99816248e3306ca6340f7bee8a518877bc3e9 | 25dd41d69c6a008e25eacf85f9f61111ace18b79 | /Patrick_Vanegas_Afternoon_FinalProject.py | 5aafdcf83d6dd3f45043f3470d7053bee2778481 | [] | no_license | pvanny1124/frequency | 46fe738f1bed974694b9ab81b5e60e00a2834fc1 | b95d8f871075a5a23bd0469d5bc8921c38c1bfd1 | refs/heads/master | 2020-06-21T01:43:36.726827 | 2019-07-17T04:18:55 | 2019-07-17T04:18:55 | 197,313,954 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,846 | py | Patrick_Vanegas_Afternoon_FinalProject.py | # Patrick Vanegas - Final project
from tkinter import *
import frequency
import turtle
import math
import random
# intitalize a blank window
root = Tk()
# initialize turtle window
window = turtle.Screen()
# Create widgets to be viewed on the Tkinter window
label_1 = Label(root, text = "Enter a number less than 5... |
004a02f7ff49cb1b63ebedfcfcb4937377859099 | 9b34d791740126b26f01307fcc5a888fe2207578 | /test.py | efcaf865def48847e931c988faafe18169af8c84 | [] | no_license | Hg20170808/Louplus | 97f50959e0b61526c0f584c5181e5e1e97609bfb | 38f79836d3018cde58167d1e0c5df2ff0b665017 | refs/heads/master | 2020-07-18T14:14:16.049924 | 2019-09-04T07:59:20 | 2019-09-04T07:59:20 | 206,261,065 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 24 | py | test.py | print('hello world123')
|
44214492dd7283da4b9a77bd2a1fa9d9c0643ff2 | 6eddad03df402cb45219fbe93e926577592055f6 | /scripts/chains/mfcc_local.py | 3b05e68711d34dff91ec28c288a0d02bb4377639 | [] | no_license | eMaerthin/microevolution-lang-phones | 3b1208e2dcb0ee2607d1e5cb0695333abde17664 | 646e80c45b858943fe4f5b065a45eecc8d09028d | refs/heads/master | 2022-10-28T17:29:13.716054 | 2019-12-06T16:13:08 | 2019-12-06T16:13:08 | 135,938,451 | 0 | 0 | null | 2022-10-18T19:16:42 | 2018-06-03T20:33:27 | Python | UTF-8 | Python | false | false | 2,975 | py | mfcc_local.py | import json
import logging
import numpy as np
from python_speech_features import mfcc
from format_converters import get_segment
from schemas import *
from chains.mfcc import Mfcc
logger = logging.getLogger()
class MfccLocal(Mfcc):
"""
MfccLocal computes Mfcc features for each phoneme from the sample
tha... |
4e9fd3ee2a78fae164d9f38704443ac5b2f4c11c | eea1b6d43bf8e8cb14e371d2a33b9677a4b3f110 | /test/pinsetup.py | 11e12c20a60d49381e63f55cdb51bd2ae9b51ca4 | [] | no_license | nebbles/de2-gizmo-sound | dce462811fbfd2872354df16610b1eab9bf9f9fa | 9e51eb0bafebb4636be970a9b798440d8e67ed59 | refs/heads/master | 2021-01-11T02:13:37.939088 | 2016-12-14T21:40:44 | 2016-12-14T21:40:44 | 71,007,988 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,469 | py | pinsetup.py | #!/usr/bin/env python
# Standardised set up
import RPi.GPIO as GPIO # External module imports GPIO
import time # Library to slow or give a rest to the script
import timeit # Alternative timing library for platform specific timing
import sys # Library to access program arguments and call exits
import os # Library provi... |
e5cc738ac6878ffa35bb52ca26a5db75158e6ce6 | 274edaa85ab4dba6c1c1a5fe04d19f7cf4cf40a2 | /hardfilter.py | a9955babc01927abfcc92f36f851528e1c844d44 | [] | no_license | javibio-git/drosophila_indels | bfc47de71f2c5e7171a5bebb6e90b60ecfc33e65 | c3dff60ecb2cb613738513a09e78a4d78f11f689 | refs/heads/master | 2022-01-05T21:01:41.806903 | 2018-10-30T11:28:53 | 2018-10-30T11:28:53 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,279 | py | hardfilter.py | #!/usr/bin/env python
import argparse
from qsub import *
# command line options
parser = argparse.ArgumentParser()
parser.add_argument('-vcf', '--VCF_input', help='VCF file to filter', required=True)
parser.add_argument('-ref', '--reference', help='Reference genome', required=True)
parser.add_argument('-mode', help='... |
c15403fdb75ef434e98d3a9ae23221bd1df47b02 | 53fab060fa262e5d5026e0807d93c75fb81e67b9 | /backup/user_098/ch161_2020_06_22_13_56_59_902353.py | 5ee3b068ba8d3331418207e105742f37e49929f9 | [] | no_license | gabriellaec/desoft-analise-exercicios | b77c6999424c5ce7e44086a12589a0ad43d6adca | 01940ab0897aa6005764fc220b900e4d6161d36b | refs/heads/main | 2023-01-31T17:19:42.050628 | 2020-12-16T05:21:31 | 2020-12-16T05:21:31 | 306,735,108 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 246 | py | ch161_2020_06_22_13_56_59_902353.py | def PiWallis(n):
numerador,denominador,pi = 2.0, 1.0, 1.0
for i in range(1,n+1):
pi*= (numerador / denominador)
if (i%2) == 1:
denominador+=2.0
else:
numerador+=2.0
pi*=2.0
return pi |
0b295e8eb3b4115040e92931d2671d8d73e44a62 | 3c4ea0741a1024543d78750f62e31042cbb3374f | /TweetWords.py | 55b3990385e03f5eff5184b22f089e05122bf8d7 | [] | no_license | haruka0000/WikiLink | dec883849a3e48f3b52882b73c85f37aea238da6 | fab48e3b789bc122d7b7440c1ee0d309546b6e66 | refs/heads/master | 2021-01-21T13:57:38.234916 | 2016-05-31T10:57:51 | 2016-05-31T10:57:51 | 55,839,762 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,927 | py | TweetWords.py | # -*- coding: utf-8 -*-
#
# Library:
# https://github.com/sixohsix/twitter
#
# Twitter Search API
# https://dev.twitter.com/rest/public/search
# https://dev.twitter.com/rest/reference/get/search/tweets
#
# Twitter API Limits
# 450 queries per 15 minute for seach api
# https://dev.twitter.com/rest/public/rate... |
cdbd11ead65529924e4d6d2d7b34ede460b3daaf | 0d42428af7782e1fee1a00f63ef9b78b8b632106 | /logistic_regression_sgd.py | f76d0dabd661fa43f7faec73feec8fc8fa987577 | [] | no_license | Larix/Logistic_Regression | cac411e27538de994ed87e27b6d4d3c2321eeb5b | 5353a8f5f0855b758598bfb1f95fc68165cf8553 | refs/heads/master | 2020-03-19T04:57:09.434041 | 2018-06-25T16:49:17 | 2018-06-25T16:49:17 | 135,884,822 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,707 | py | logistic_regression_sgd.py | #!/usr/bin/env python
# encoding: utf-8
import matplotlib.pyplot as plt
import numpy as np
import math
import random
# pre load sklearn iris datasets
from sklearn import datasets
from sklearn.metrics import accuracy_score
iris = datasets.load_iris()
X = iris.data
Y = iris.target
dataset = []
target_label = 0 # c... |
77a768642118f0f22dbc52bc0c007557a525655f | dce09129e1f784de54a92447cd1f1d27d8c1fd93 | /core/python/behaviors/previous assignments/stiffness_on.py | 15d7ac3b134f5fe549399baf63cde3aa6efbe5b7 | [
"BSD-2-Clause"
] | permissive | AbheekG/nao | 37d1c931cfe283ce8b7c80e65285100ea7e9b212 | 560f5f672298b8dc18df8f766966d69f19188b61 | refs/heads/master | 2020-03-28T00:46:47.262697 | 2018-11-29T22:30:38 | 2018-11-29T22:30:38 | 147,448,970 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 515 | py | stiffness_on.py | """Stand"""
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
import memory
import pose
import commands
import cfgstiff
from task import Task
from state_machine import Node, C, T, StateMachine
class Playing(StateMachine):
class On(Node):
def run(... |
a2397d978a9d39d04875295121ec01bbc71a443a | 72d4184dc2d32ce9a5c72e4aa381342cc605545a | /src/app/recursos/usuario/contacto.py | 8de0698e5208aee68c189b1eddf425b71106fa82 | [] | no_license | taller2fiuba/chotuve-app-server | 7acddf1e7cd5e7c9cfecae712625cd80304a283e | ac2d389196f3176bf8e3675d113a42a70259d512 | refs/heads/master | 2023-05-02T16:10:43.991179 | 2020-07-31T00:50:17 | 2020-07-31T00:50:17 | 257,125,755 | 0 | 0 | null | 2021-05-06T20:24:18 | 2020-04-19T23:44:44 | Python | UTF-8 | Python | false | false | 629 | py | contacto.py | from flask_restful import Resource
from flask import g
from app.login_requerido_decorator import login_requerido
from app.models.contacto import Contacto
from app.servicios import auth_server
class ContactoResource(Resource):
@login_requerido
def get(self, usuario_id=None):
if not usuario_id:
... |
98eacd665e23fe64ac6b50ba98b3e0824850a478 | 02f6b16d9acecd4dc8408548a335be8f1faf7de9 | /stix2/test/v21/test_location.py | 62fd9e0b5ae9c87bca7b098985fc4d06772c71d9 | [
"BSD-3-Clause",
"LicenseRef-scancode-generic-cla",
"LicenseRef-scancode-free-unknown",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | timngo1/cti-python-stix2 | 968fa922bbb959e7a040749579ab7192eafa4cc4 | 1d6d38e926eb07fcfbe663ed5551eeae5b0140e9 | refs/heads/master | 2020-04-15T23:57:38.562684 | 2019-01-11T23:19:37 | 2019-01-11T23:19:37 | 165,118,795 | 0 | 0 | BSD-3-Clause | 2019-01-10T19:30:54 | 2019-01-10T19:30:53 | null | UTF-8 | Python | false | false | 8,083 | py | test_location.py | import datetime as dt
import re
import pytest
import pytz
import stix2
from .constants import LOCATION_ID
EXPECTED_LOCATION_1 = """{
"type": "location",
"spec_version": "2.1",
"id": "location--a6e9345f-5a15-4c29-8bb3-7dcc5d168d64",
"created": "2016-04-06T20:03:00.000Z",
"modified": "2016-04-06T2... |
bc9624df3c02d234d97e62e17c54a3e9bbbafc96 | 9c4850697d66c6119e1d0b1f6347c1ea1d5d1ebb | /devilry/project/develop/management/commands/devilry_developer_demodb.py | c8bf4e1b402f3682fec70022d388a0d66a251d4c | [] | no_license | evestera/devilry-django | 7952e0d65f23af6c4dc2fd22fb97462e4231deac | 760a4ca1c40a7ac0d60f7675efa6919ffae585da | refs/heads/master | 2020-12-25T20:09:00.756243 | 2015-05-21T16:33:47 | 2015-05-21T16:33:47 | 36,460,383 | 0 | 0 | null | 2015-05-28T19:14:10 | 2015-05-28T19:14:09 | null | UTF-8 | Python | false | false | 13,151 | py | devilry_developer_demodb.py | import random
from django.contrib.auth import get_user_model
from django.core.exceptions import ValidationError
from django.core.management.base import BaseCommand
from django.contrib.webdesign import lorem_ipsum
from devilry.apps.core.models import StaticFeedback, Deadline
from devilry.apps.core.models import Related... |
8e4370c35279fe81b7c36896cd49fff7d644e96a | a95ad506844abe9c054b01563abde1363009a738 | /scripts/mouse_game.py | cb637f34699d08c9f11a5de8bd97ebc5cf0c7df1 | [] | no_license | nDiv/Mouse_game | c2e90883c3fa475915c1e831d491967dbb7a3e44 | 99035d022d83afa05c96bd9e27ccc1ebf1b05c04 | refs/heads/master | 2021-01-10T06:54:37.403473 | 2016-03-30T04:50:54 | 2016-03-30T04:50:54 | 54,974,925 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,132 | py | mouse_game.py | # A game of mouse script
from mouse_player import Player, Game
import random
import time
target = 50
num_play = 10**6
sum_n = 0
#turns = [0]*num_play
#turns_n = []
#turns_count = []
player1 = Player(1)
game1 = Game(target)
random.seed()
startT = time.time()
for i in range(num_play):
game1.play(player1)
#turns[i]... |
865bd72ee3082e62cefc9e9593dd31fa39a88212 | a2ac73af04a07bb070cd85c88778608b561dd3e4 | /addons/base_setup/__openerp__.py | ea2cf26bdb5e915b2b8a052dd9f732a03413f197 | [] | no_license | sannareddy/openerp-heimai | c849586d6099cc7548dec8b3f1cc7ba8be49594a | 58255ecbcea7bf9780948287cf4551ed6494832a | refs/heads/master | 2021-01-15T21:34:46.162550 | 2014-05-13T09:20:37 | 2014-05-13T09:20:37 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 60 | py | __openerp__.py | /usr/share/pyshared/openerp/addons/base_setup/__openerp__.py |