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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
21be86e7a0069f1bcde233a5d67b5bbd797a598a | f6b3547a162ae6b578cfea9e07f8e91c59115cc2 | /news_edu.py | 3c95d92aba0a15226419c079829e5fa0a2695b17 | [] | no_license | SindhujaNadgoud/WebNoiseReduction-Major-project | aa06b3cfe86174049b30cc9deea6e11a78c6110c | 5e981eab56ea726a3ab50ae4f3a7cb5bb95161db | refs/heads/main | 2023-06-07T07:37:13.012144 | 2021-06-24T18:05:25 | 2021-06-24T18:05:25 | 370,284,720 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 616 | py | news_edu.py | import os
topic = 'News'
l = ['News_1','News_2','News_3','News_4','News_5','News_6','News_7','News_8','News_9','News_10','News_11','News_12','News_13','News_14','News_15','News_16','News_17','News_18','News_19']
if not os.path.isdir('./project/main/templates/main/'+topic):
os.mkdir('./project/main/templates/main/'+to... |
0c3d89b745388abc5d922d4025c2d41b50362a1b | dc57a3754d1c253d839812eb78957005c8ce4399 | /965.univalued-binary-tree.py | 07c90d88e34d7783031e43251f77d678f9a99049 | [] | no_license | lijiayu0725/Leetcode-Python | 5cc00ceff09b8c4c8a9038c872f7ba1a5bc9be39 | adebaf0a7c290ad7e4fdc7a26f5e9542b1193c80 | refs/heads/master | 2020-08-24T04:31:56.076857 | 2019-12-20T14:59:28 | 2019-12-20T14:59:28 | 216,761,643 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 577 | py | 965.univalued-binary-tree.py | class TreeNode:
def __init__(self, x):
self.val = x
self.left = None
self.right = None
class Solution:
def isUnivalTree(self, root: TreeNode) -> bool:
if root is None:
return True
left = self.isUnivalTree(root.left)
right = self.isUnivalTree(root.rig... |
3fd213ab2677eb457bad34c94e5aad44d1f3055a | 7b9bf72c79eae0bb6ed6c0625cdbdfe501acb551 | /src/musician.py | d6da0eb23073c05a5e92733cbd0194f81952ac87 | [] | no_license | amyg-cc/inheritance_lab | f0738fad5c5b00a20e18af0a34ed6babe7d85fcc | 39ebdace42015f2a6c4005ccf77cd76ff520cb85 | refs/heads/main | 2023-07-08T09:23:57.198224 | 2021-08-17T07:23:05 | 2021-08-17T07:23:05 | 397,150,870 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 736 | py | musician.py | class Musician:
def __init__(self, name, age):
self.name = name
self.age = age
def perform(self):
return "Hello Wembley!"
class Guitarist(Musician):
def __init__(self, name, age, guitar_type):
super().__init__(name, age)
self.guitar_type = guitar_type
def perf... |
fddfebac0efa1ce4f68dcd56b33e115b9f0e80f4 | 56d465ca455072306e79f5ea8311db0933a28a26 | /back_end/view.py | cace4c204669579ff88c66a0c5cf85443004ed49 | [] | no_license | ncss/projects-2017-3 | feb69618a9d0a4de36e680c0eb0a1638d71d1f75 | 37bfe94c1af84c744121519471641072e6c5782d | refs/heads/master | 2018-12-18T09:08:44.562998 | 2017-01-23T23:12:16 | 2017-01-23T23:12:16 | 75,156,065 | 5 | 2 | null | 2017-01-29T12:25:20 | 2016-11-30T05:54:01 | Python | UTF-8 | Python | false | false | 1,595 | py | view.py | from auth import requires_login
from back_end.common import *
from template_engine import render
from os import path
from db import db_api as db
from auth import requires_login, authenticate_cookie
def view_question_handler(request, question_id):
# try:
post = db.Post.find(question_id)
post_info = {
... |
8e3a59f2241f91c547a7c25a377abdb0e892c166 | ef8d22395c8fdc0cc39b033fb4754349f9f887cc | /part3-把函数视作对象/chapter5-一等函数/5.4可调用对象.py | 7c96298a804b9a3f29f1338d42958d84810e4968 | [] | no_license | zxy199803/fluent_python_exercise | 02966b8c0d62b24afffefad410a5e333b8286d84 | b872b92ff727048bbf067ef323e19715e607f5d6 | refs/heads/master | 2023-04-04T10:46:11.382674 | 2021-04-08T12:57:39 | 2021-04-08T12:57:39 | 346,048,071 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 855 | py | 5.4可调用对象.py | """
调用运算符(即())
可调用对象
用户定义的函数
使用def或lambda创建
内置函数
使用C(CPython)实现的函数,如len,time.strftime
内置方法
使用C语言实现的方法,如dict.get
方法
在类的定义体中定义的函数
类
调用类时会运行类的__new__方法创建一个实例,然后运行__init__方法初始化实例,把实例返回给调用方
python没有new运算符,所以调用类相当于调用函数
类的实例
如果类定义了__call__方法,它的实例可... |
d71013425732656c8982b93d65cd263e773e658c | 9a3edffa407c63e64e12e216eed1c02f5d7c3a5a | /微信/download_video.py | 492f7581479cdeb8daf752415d61049a6089602a | [] | no_license | xubigshu/python_code | 9abbfa1a198d3c15128c0350fa66e1ba0c2a0264 | db59f631635ca32df251d7fe7d51961fa0f35d3e | refs/heads/master | 2016-09-14T15:31:11.731714 | 2016-08-08T02:18:05 | 2016-08-08T02:18:05 | 53,396,693 | 3 | 2 | null | null | null | null | UTF-8 | Python | false | false | 1,759 | py | download_video.py | #!/usr/bin/python
#coding=utf-8
import json
import urllib
import urllib2
def Schedule(a,b,c):
'''''
a:已经下载的数据块
b:数据块的大小
c:远程文件的大小
'''
per = 100.0 * a * b / c
if per > 100 :
per = 100
print '%.2f%%' % per
def get_meadid():
data = {
'type':'video',
'offset':0,
'count':20
... |
18965d815679ffa90a76e037880b8315dc9c09c6 | 1325d72c579d889c180a99b4d28f5d63e9caffb7 | /lacie_uboot/network.py | fb180a94464d473260fa3e5d9136424862825826 | [
"BSD-3-Clause"
] | permissive | maximeh/lacie-uboot | b1ae981250c9ada0b28173d55d66ca60b0d45007 | ef6d97a558b0039751d05715b2cbd46d185e2c1f | refs/heads/master | 2021-06-20T01:02:51.915803 | 2021-02-28T21:49:15 | 2021-02-28T21:49:15 | 946,306 | 2 | 2 | NOASSERTION | 2021-02-28T21:49:16 | 2010-09-28T18:32:22 | Python | UTF-8 | Python | false | false | 11,164 | py | network.py | #! /usr/bin/python -B
# -*- coding: utf-8 -*-
'''
network is a small library with a few utils functions.
'''
# Author: Maxime Hadjinlian (C) 2013
# maxime.hadjinlian@gmail.com
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted pr... |
d3e0715d4c6fc79449d0304db4303fbfc69c8e43 | c792b076cdf8c943c344d90b21817dd501c165ab | /boj/그리디알고리즘/1202_보석도둑.py | 5f186afb9eb9653b72f38e1a78471e9120b2bee5 | [] | no_license | Jdoublee/CodingTestPractice | d68afa38e64de67aa53ab8c6569e07e7b310a83d | 83eb2b84f63d55808a5e9b014e023b72bf4a4e9e | refs/heads/master | 2023-06-02T16:48:52.913402 | 2021-06-16T13:34:40 | 2021-06-16T13:34:40 | 290,072,409 | 6 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,038 | py | 1202_보석도둑.py | # 우선순위 큐 사용
# 일반 배열 사용시 시간초과
# 각각의 리스트 우선순위 큐(heapq)로 선언 및 사용
import heapq
import sys
input = sys.stdin.readline
n, k = map(int, input().rstrip().split())
q = []
for _ in range(n):
mv = list(map(int, input().rstrip().split()))
heapq.heappush(q, mv) # 무게 가벼운 순으로 저장
bags = []
for _ in range(k):
heapq.heappush(bags... |
cd39a623b1c345d13ce5d1f31794de0fe3177990 | 9e761fbd5297b4cf999163d59c9787abd48d8f7f | /carla-train/train.py | 85b7e42e39260e6c771b5df75210feb783573d1f | [] | no_license | w5688414/selfdriving_cv | 45638b69c0083f1c3453db7527bc76220fdc65ef | 885695468b97e4b46efc4325ab9c16b7d1e57f48 | refs/heads/master | 2020-03-24T16:27:53.891363 | 2018-08-19T15:33:49 | 2018-08-19T15:33:49 | 142,825,663 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,359 | py | train.py | import numpy as np
import tensorflow as tf
from network import make_network
from data_provider import DataProvider
from tensorflow.core.protobuf import saver_pb2
import time
import os
log_path = './log'
save_path = './data'
if __name__ == '__main__':
with tf.Session(config=tf.ConfigProto(log_device_placement=T... |
76a713bbc9a28512c91a88e53bd04e4f2bd7e609 | 9d6b618d0c1dab0b60ce227d87b7b32fd980623f | /bloger/models.py | 674a16233ebba0655b2a275cc3f4039c032cb878 | [] | no_license | justinh9408/Django-blog | 18ac712f375c04adcf63e25a724e21ea3fdd2951 | 16333b78fc43aebaabb08247ab2167aad125a40d | refs/heads/master | 2021-06-24T16:14:06.018265 | 2017-09-09T16:40:19 | 2017-09-09T16:40:19 | 102,969,294 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 735 | py | models.py | from django.db import models
# from ckeditor.fields import RichTextField
# Create your models here.
class Tag(models.Model):
tag = models.CharField(verbose_name="标签",max_length=20)
class Meta:
verbose_name = '标签'
verbose_name_plural = verbose_name
def __str__(self):
return self.tag
... |
f8291f4c61530cea783be5bc92c201078bd3d00f | 873df9cc7a75bc1e09fb0cfc6692dfc5ff636fd7 | /spider/test_mysql.py | 4dba4ad3c70451ea2a761cae4bf38bf8cbe6c0d0 | [] | no_license | chrome-extension/spider | 3c943d1a71c351d00d6db411ad597c9b1a85c383 | 85065f37ee508e843fd138d592138040880f4ce1 | refs/heads/master | 2020-08-29T04:43:36.512025 | 2018-05-03T06:58:31 | 2018-05-03T06:58:31 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 524 | py | test_mysql.py | import sys
import unittest
import pymysql.cursors
class PythonMySQL(unittest.TestCase):
def test_connect(self):
print('sys.path: ' + str(sys.path))
print('module pymysql: ')
print(dir(pymysql))
conn = pymysql.connect('localhost', 'root', 'password', 'spider')
cursor = conn... |
d105dea9af091f7cf168c1acd5a45382c2bf56f1 | 820722faf4f47c1e3bd13fb4f8c539c3b739d1bd | /RandomModule_test.py | c6e1c90f6c94d71b8231cfd465c0fa757a286ad6 | [] | no_license | izzygull/CircleCI_demo | 706d0c19cc9a77cd73d2fbad5376a7cbaae60868 | ebcd8773707d17d4f1f2c9cbda6ff4e7fa18a62a | refs/heads/master | 2023-01-24T10:43:11.189173 | 2018-07-25T18:09:20 | 2018-07-25T18:09:20 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 317 | py | RandomModule_test.py | from RandomModule import RandomModule
def test_adder():
assert RandomModule.adder(1,5) == 6
assert RandomModule.adder("Hello ", "there!")== "Hello there!"
def test_that_fails():
assert True
def test_read_file():
f = open('testfile.test', 'r')
assert f.readline() == "I am a file"
f.close()
|
acfda3ffa7244f74f7cc49692f47b8524a52b653 | 262b95fa25ad745372633e379bef8e1794fec837 | /relationships_to_upload/relation_neo4j.py | ef991f8df059f6c7c294f5b9b4555c9c667d1521 | [] | no_license | LeoVogiatzis/GraphAnalysis | a397edfdc44edb4864bacb8674bd01a2732950c8 | 021cd5ac751ec8b0c478ecb27581f2bae4dba844 | refs/heads/master | 2021-01-08T23:52:14.857335 | 2020-09-14T18:23:44 | 2020-09-14T18:23:44 | 242,565,846 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,474 | py | relation_neo4j.py | import glob
import json
import sys
from datetime import datetime
import pandas as pd
from py2neo import Graph
def read_config():
with open('../neo_config/neoConfig.json') as f:
try:
neo_config = json.load(f)
return neo_config
except:
sys.exit('Failure to retrie... |
f17ff5beab06bae2d89f9a1d900a6c83f308a9d3 | de10a4905d6951092a4bef3eaf0ea8f94cce3caf | /apps/regions/views.py | 223f85af5bca9dae0b14fd6c6dda1f75d529355c | [] | no_license | magocod/pokemon | a7c565f630623a9f94c2c99df294e1d758b23f0c | 0646d83c0ef9d0cd4c4fc89572a4d6c6ff6510cc | refs/heads/master | 2023-08-11T00:32:35.735219 | 2020-10-21T23:20:52 | 2020-10-21T23:20:52 | 303,834,770 | 1 | 0 | null | 2021-09-22T19:38:32 | 2020-10-13T21:39:32 | Python | UTF-8 | Python | false | false | 1,871 | py | views.py | # from rest_framework import status
from rest_framework.response import Response
from rest_framework.views import APIView
from django.http import Http404
from .models import Area, Location, Region
from .serializers import (
AreaDetailSerializer,
LocationDetailSerializer,
RegionDetailSerializer,
Region... |
ec8c6984f27e5650b02f33dec451a89307b3fb34 | 599ecb635fd5e970a1a128f1ba20de9b182acd0c | /cats.py | 6aef8f59e862730268f9ce5b67575e41dd1fe93c | [] | no_license | C1PR14N055/scraper | d07ccead39c3110880d3ab3fe344adacdc55e29e | 2662b95b8851ccc1dd1077c588ff302def42cf31 | refs/heads/master | 2020-04-06T07:10:53.549292 | 2016-09-06T17:03:53 | 2016-09-06T17:03:53 | 63,166,964 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,710 | py | cats.py | #!/bin/python
# -*- coding: utf-8 -*-
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.firefox.firefox_binary import FirefoxBinary
''' WAIT FOR EXPECTED CONDITIONS IMPORTS '''
from selenium.common.exceptions import TimeoutException
from selenium.webdriver.common.by ... |
4f0199932be1d95eb1042c02a76153861d3e1fca | 306045a1cd0fb362f46d4db88311f442311bbc16 | /examples/idioms/programs/159.2281-trie.py | f1df2f9419ef5b9d59e4b47addab4103e79e40eb | [
"MIT"
] | permissive | laowantong/paroxython | 608c9010a2b57c8f7ed5ea309e24035c2b2e44a3 | a6d45829dd34f046d20e5bae780fbf7af59429cb | refs/heads/master | 2023-09-01T05:18:29.687916 | 2022-11-07T17:40:31 | 2022-11-07T17:40:31 | 220,820,424 | 36 | 5 | MIT | 2023-09-08T04:44:58 | 2019-11-10T16:54:56 | Python | UTF-8 | Python | false | false | 419 | py | 159.2281-trie.py | """Trie.
Define a Trie data structure, where entries have an associated value.
(Not all nodes are entries)
Source: programming-idioms.org
"""
# Implementation author: bukzor
# Created on 2018-04-08T19:10:28.833888Z
# Last modified on 2018-04-08T19:10:28.833888Z
# Version 1
class Trie:
def __init__(self, prefi... |
1044c27293cc523d7c206231282ef8ed31da07ab | dd4622390bb7122db37a889e647f28004a265ccd | /1906101100卢栎冰/第三次培训/test3.py | 87726802ab53a772172ee1ec5f76f9ae980d9fc5 | [] | no_license | gschen/where2go-python-test | c8adaa095aa8a095401f98c7b3f8f17c72d0532d | eb9e6011b8d33fa45a6b1ef853affd01a296db21 | refs/heads/master | 2022-12-13T19:45:09.874691 | 2020-10-15T13:12:52 | 2020-10-15T13:12:52 | 211,591,156 | 4 | 1 | null | 2022-12-05T07:46:12 | 2019-09-29T02:35:00 | Python | UTF-8 | Python | false | false | 56 | py | test3.py | s="人生苦短,我学Python"
print(s.encode("utf-8")) |
9ef805fe7e9e496d822f27cee13c86f75ce8044e | bbd69601912a3361d788efd03a47f9d4e3bac09e | /unittests/test_dcprint.py | 6a329caf407e7c0a0630adb5802c7fc923a307ed | [] | no_license | wxWidgets/Phoenix | 56929484460a0399a8f1d9582bc77c20aa14748d | a1184286703cf24c4b88e5bc14cf2979c1b1ea00 | refs/heads/master | 2023-09-01T07:10:17.437093 | 2023-08-31T05:38:01 | 2023-08-31T05:38:01 | 5,078,061 | 2,268 | 677 | null | 2023-09-09T17:06:59 | 2012-07-17T06:22:25 | Python | UTF-8 | Python | false | false | 503 | py | test_dcprint.py | import unittest
from unittests import wtc
import wx
import sys
#---------------------------------------------------------------------------
class dcprint_tests(wtc.WidgetTestCase):
@unittest.skipIf('wxGTK' in wx.PlatformInfo, 'PrinterDC not supported on wxGTK')
def test_PrinterDC1(self):
dc = wx.Prin... |
17c4e18b77fa85efce996b2ed20d8fa639e22729 | 789df9d45e148916f4e70c15349ddcb3c0bdd8f4 | /branch_jtnn/center_pred.py | 90a08e4c527e94eb942c1d3ac80591a0f008e568 | [
"MIT"
] | permissive | zhengyijia/T-S-polish | 00764b11cea3a3efab8ab1eedcb3c863a0fed1f1 | 1bffdee11b486f199dcb798cea090892521c9123 | refs/heads/master | 2023-03-04T03:47:10.620887 | 2021-02-21T03:46:08 | 2021-02-21T03:46:08 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,501 | py | center_pred.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Author: Yijia Zheng
# @email : yj.zheng@siat.ac.cn
# @Time : 2019/12/26 11:06:40
from util.nnutils import *
from branch_jtnn.mpn import MPN
class CenterPredictor(nn.Module):
def __init__(self, hidden_size):
super(CenterPredictor, self).__init__()
... |
8ed494ba8a4078d1abb6a00b9b35bc0b67bb58e2 | a5d12bca257d7f0ced7adc29e7eaf382b5844f81 | /projects/week04/20_03_2019/inheritance.py | f224837f5c95ed73f9725b8a951924d22a1cd087 | [] | no_license | SashoStoichkovArchive/HB_TASKS | f2e3131dadf3aef6355f5d59a642a196f4603d2e | 6f7587a712f7c3c66e7cf83a5b86099322a069c9 | refs/heads/master | 2022-02-13T20:10:04.433653 | 2019-08-19T10:18:35 | 2019-08-19T10:18:35 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 666 | py | inheritance.py | class Worker:
def __init__(self, name, salary):
self.name = name
self._salary = salary
def salary(self):
return self._salary
class Tailor(Worker):
def __init__(self, name, address, salary):
super().__init__(name, salary)
self.tailor_address = address
@classmeth... |
5ca3f83e17de5031f4ec6616b0165bf88b58a45f | 510b653af1f7c39472fd3359d9cbf4f3df14daf7 | /modulosCuenta.py | cbfa64ad4cf9f0f56186464bc6657c338b27f809 | [] | no_license | RANoelle/software | f6894dd143d26601be18fc435a85afa4a15f760b | 6dce9b923c144832841e2abeb39eca84b39bcc30 | refs/heads/master | 2020-04-13T17:41:16.269306 | 2019-01-25T05:27:06 | 2019-01-25T05:27:06 | 163,354,332 | 0 | 1 | null | 2019-01-24T21:19:56 | 2018-12-28T02:06:39 | null | UTF-8 | Python | false | false | 4,394 | py | modulosCuenta.py | from flask import Flask, render_template, session, flash, request
from principal import *
import formulariosUsuario
import formulariosCuenta
import formulariosBuscar
@app.route('/addCuenta/<rutUsuario>', methods=['GET', 'POST'])
def addCuenta(rutUsuario):
if session['privilegios'] != 'ADMINISTRADOR':
ret... |
c36504a59793e9464a2e7d280c623009dfb052f6 | 5e28411b9d48f990c9e348f94dca50ac91abcf13 | /noisi/util/make_synthetic_data.py | b2aba3554790ceff57c8880da04f65890f515038 | [] | no_license | jigel/noisi | 1ce53e2e05a68b1c44c7786d6dd09048dbe93874 | bb940c99069cf66a6ff7b267265a76af9e252c9c | refs/heads/master | 2021-05-09T23:59:57.223626 | 2018-09-27T13:22:49 | 2018-09-27T13:22:49 | 118,816,779 | 1 | 0 | null | 2018-09-26T18:51:41 | 2018-01-24T20:15:00 | Jupyter Notebook | UTF-8 | Python | false | false | 6,076 | py | make_synthetic_data.py | # # Make synthetic data from modelled data
# NOTE: This Jupyter Notebook should be run in /project_name/source_name until arguments can be put in externally.
# Expects stationlist.csv, modelled correlations
# The aim is to calculate the kernels. To do this, observed correlation data is necessary. This script converts... |
ae9e336f68d2db4e1a71fa37423bd3a428210e9b | 7fc211bbfa5808cbf2fc7c359e33a5bc766da4f6 | /utils.py | dea3d3e0027eec4d9a7206e47e178c40aa396d76 | [
"MIT"
] | permissive | GzuPark/prarxivate | 057a8acd44a0f0fc021fc67d72f8c561cd855125 | 7051f9a45632fd291842ee986536998d42f1fb22 | refs/heads/master | 2020-09-12T10:38:00.849939 | 2020-01-03T01:20:39 | 2020-01-03T01:20:39 | 222,396,321 | 6 | 2 | MIT | 2019-11-27T09:24:04 | 2019-11-18T08:15:00 | Python | UTF-8 | Python | false | false | 1,489 | py | utils.py | import os
import pickle
import tempfile
from contextlib import contextmanager
class Config(object):
realpath = os.path.dirname(os.path.realpath(__file__))
db_path = os.path.join(realpath, 'data', 'db.p')
report_path = os.path.join(realpath, 'results')
# https://github.com/karpathy/arxiv-sanity-preserve... |
335911ddce7701c6e263989884501094f52e597f | bf679da9486bf85e4ce1cb8a4e88fe964c1500ad | /birds_id.py | 75bb53ed65e66053d3c29b82ea88aaee2bd413cf | [] | no_license | chusk2/python-code | 2fbebbd571eaddc4d87b986d857918d1126f87b3 | 45788a57523ac1f1e04b50275116b9f420ba1d31 | refs/heads/main | 2023-08-05T21:04:09.733107 | 2021-10-09T17:50:38 | 2021-10-09T17:50:38 | 347,965,056 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 565 | py | birds_id.py | def migratoryBirds(arr):
# select the unique id's in the arr
id_list = list( set(arr) )
# count how many times each id appears
amounts = []
for element in id_list :
amounts.append(arr.count(element))
# find the maximum of amounts
max_amount = max(amounts)
# the position ... |
539b5c9c54268109431dea4537ccf0770435c763 | 85efb2b76b2e37d58e39f47f7b188a6d87fb917b | /detect_duplicate_results.py | 896f9aa3805c14c344db56c160c90bfb453b9a51 | [
"MIT"
] | permissive | emanuil-tolev/wellcome-outputs-from-ncbi | 6d5b40a7a9373fac4ea61e71fbe0afa896443584 | 7f4c15310da103bcae66b80d4e93d87266133493 | refs/heads/master | 2021-01-19T08:10:53.326928 | 2013-07-20T22:44:28 | 2013-07-20T22:44:28 | 11,152,295 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 410 | py | detect_duplicate_results.py | import sys
with open(sys.argv[1], 'rb') as f:
content = f.read()
content = content.splitlines()
data = []
for row in content:
data.append(row.split(','))
duplicate_count = 0
processed_items = []
for row in data:
for item in row:
if item in processed_items:
duplicate_count = duplicat... |
adb6d79221edfb4a255000f4f0830cb00a320ffe | ebf723d6066e157ad5cedf94099deb62e6191390 | /py/countLang.py | a0fbc9f343384281e38848806ac727934a4a9fea | [] | no_license | PeterGrainfield/AltCoder | a960bd2642887502829bb4078a35712c492a8d54 | 378cebdf1cf713310a83575b4dc1e39834e76e59 | refs/heads/master | 2023-05-08T16:32:53.653689 | 2021-05-31T06:10:55 | 2021-05-31T06:10:55 | 368,459,650 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 154 | py | countLang.py | N = 610
ans = ""
for i in range(N):
ans += input().replace("AC", "")
if i % 10 == 9:
ans += "\n"
else:
ans += ","
print(ans)
|
57cba3388a32858e39261356a69888771f964010 | 2812e1e1de4b7397b48a515f6e125825e7069c9c | /2 - Regression/S9 - Support Vector Regression/svr.py | 75c59b41617a207e603ea675ac630963dc147c97 | [] | no_license | AymanNasser/Machine-Learning-From-A-Z | 0a1cb239c40ece5bf1c32d841554bd356b057528 | f37d4db35c15581f44adbcb849e7a7bec4d95da5 | refs/heads/master | 2022-11-20T03:44:45.732113 | 2020-06-23T02:23:37 | 2020-06-23T02:23:37 | 271,357,414 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,912 | py | svr.py | from sklearn.svm import SVR
from sklearn.preprocessing import StandardScaler
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
# Loading data
dataset = pd.read_csv('Position_Salaries.csv')
X = dataset.iloc[:, 1:-1].values # Features
y = dataset.iloc[:, -1].values # Label
# Feature scaling
# Tra... |
63d7c7ca2c0ea1a7dd7333974674d38f253036e2 | 1f320d258b8e9cf4c7f535cf9c900f7d02235b59 | /spaces/math_space/common/env/equation_net/net/eq_net.py | 7734b24f716e8105800a5ab1551cd6daed647db9 | [] | no_license | dglyzin/tracer | 7157078a2f3bf526492de8201094b9f8f2768194 | 1e1e5d46713bb15519653f4e9151f559f6637e4a | refs/heads/master | 2022-12-25T15:30:14.167348 | 2020-10-14T11:19:39 | 2020-10-14T11:19:39 | 303,990,280 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 987 | py | eq_net.py | from translator.tree.maps import map_tree, map_tree_postproc, flatten
import logging
# if using from tester.py uncoment that:
# create logger that child of tests.tester loger
logger = logging.getLogger('equation.tree')
# if using directly uncoment that:
'''
# create logger
log_level = logging.INFO # logging.DEBUG
l... |
56d5807853a1b4b78ca8a93c7bbf0f9b5c587853 | c9757e5235bb28b3fb744661c268d72b7778c2ca | /brain/server.py | 1fd728bd433077efee939b5fe91c0569d123b73b | [] | no_license | PorkShoulderHolder/control | 44ce0a1d3cb37d4f1135e4c110c370adb71ee594 | a48de21711bedb21fed88a59a451ca300d2e0ce1 | refs/heads/master | 2021-01-11T12:35:43.850828 | 2017-11-28T06:46:24 | 2017-11-28T06:46:24 | 76,264,589 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,945 | py | server.py | __author__ = 'sam.royston'
import SocketServer
import json
from constants import *
import pickle
import signal
import sys
import numpy as np
import datetime
from utils import Ingestor
from random import random, randint
from q_network import Learner, Policy, ReplayMemory, softmax
session_training_data = []
f = open(CLA... |
053fbb7aa49d4fc8e49ff6c8bec0cad4dd96e465 | ebbc32882b1bbb6e6935695a400e8ffd8c0fb7f6 | /ROAR/control_module/udp_pid_controller.py | 67a62a7afeece2aa731353ac44fd5de3ef2dd655 | [
"Apache-2.0"
] | permissive | augcog/ROAR | 25fc3555934854871883de84bae49d84f86fbd7b | b7cd322f451ceccf5c53b331e15f5025f2e63bac | refs/heads/main | 2023-08-31T16:51:00.857463 | 2023-08-12T00:08:06 | 2023-08-12T00:08:06 | 302,450,761 | 29 | 222 | Apache-2.0 | 2023-08-26T07:04:26 | 2020-10-08T20:10:20 | Jupyter Notebook | UTF-8 | Python | false | false | 4,707 | py | udp_pid_controller.py | from ROAR.control_module.controller import Controller
from ROAR.utilities_module.data_structures_models import Transform
from ROAR.utilities_module.vehicle_models import Vehicle
from ROAR.utilities_module.vehicle_models import VehicleControl
from collections import deque
import numpy as np
import math
from typing impor... |
58a80a3af7f44816ae2b2566ce63c5695ceb9dd6 | fc798e64fbc85aa229bf8893ceef766adc80ae33 | /chat-master/chat_server/main.py | b81a32e6f005a84a1601e6a25814bf17733a0fa1 | [] | no_license | zhouyongxyz/JerryPython | cf51365142fbef18f424eb3bc8b96accace07d43 | 43bc0ca459f8a5dd507cdebb45ec8f8e46aaf5b7 | refs/heads/master | 2021-10-14T06:57:35.016601 | 2019-02-02T06:33:43 | 2019-02-02T06:33:43 | 120,301,301 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,199 | py | main.py | #!/usr/bin/python3
# -*- coding: utf-8 -*-
import json
import socket
import datetime
import pymysql.cursors
from bson import json_util
config = {
'host': '127.0.0.1',
'user': 'root',
'password': '',
'db': 'chat',
'charset': 'utf8',
'cursorclass': pymysql.cursors.DictCursor
}
connect = pymysql... |
97e9fd6bb84aac9ab167fb3554cc8b6ccffb1562 | f9f0b83e91a206b351dcf0f746c6ded0b7efac29 | /training/RecurrentNN.py | 96970d42eaa31dd6f767c0e3ef376183571414af | [] | no_license | InfoLight/innosoft-weather | 90554cb65f6e8eb8cf7f4947f19c1a1bb402cfa4 | 5f7e0d5c25b56ab2196b6a5c5a2c5a4c5edec726 | refs/heads/master | 2020-06-20T06:05:48.092473 | 2019-07-30T12:49:28 | 2019-07-30T12:49:28 | 197,019,078 | 1 | 0 | null | 2019-07-15T14:52:39 | 2019-07-15T14:52:38 | null | UTF-8 | Python | false | false | 1,608 | py | RecurrentNN.py | from training import datahelper
import numpy as np
from sklearn.metrics import mean_squared_error, r2_score, mean_absolute_error
import pickle
from keras.models import Sequential
from keras.layers import Dense, Activation, Flatten
from sklearn.model_selection import train_test_split
from keras.layers import LSTM, Dense... |
f3ae744f58dd7dc4e819645613adc9cc150effcd | 8aca819288dcfcdd2d0b72cba3d24f07bf8e6dfa | /forward_euler.py | 3c86c8bdb2b9f7dcf03a751527dd5a944bf7334a | [] | no_license | LegionMG/cm | c4867216d326674a63fc19bb0dbba256b185f177 | f20600ed869cecd249b6020779ac8c56585ae9f0 | refs/heads/master | 2021-09-05T11:04:30.211421 | 2018-01-26T18:50:07 | 2018-01-26T18:50:07 | 109,167,297 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,532 | py | forward_euler.py |
import matplotlib.pyplot as plt
from matplotlib.widgets import Button
from config import *
class Index(object):
ind = 0
def next(self, event):
self.ind = (self.ind + 1) % len(u_s)
s = u_s[self.ind]
ax.cla()
ax.plot(t, s[0], 'bo')
ax.plot(t, s[1], 'r--')
... |
9f44c561f8b31782d330c6e4f98fe19783365a82 | b430808e89058e89681fc3dc7358bc566182d8e9 | /modeling/builders.py | 5f94d8ebd695b09f96f3233c4512df86b51ac5c0 | [] | no_license | Libardo1/modeling | 54f978072b9cc3c14b2c408eb39325a0d3b108df | 667350650bd444474ccf3d1243c63841ea22c10c | refs/heads/master | 2021-01-17T18:46:00.821008 | 2016-03-14T15:41:53 | 2016-03-14T15:41:53 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,172 | py | builders.py | import numpy as np
from keras.layers.core import Dense
from keras.layers.embeddings import Embedding
from keras.layers.convolutional import (Convolution1D, MaxPooling1D)
from keras.optimizers import (SGD, Adam, Adadelta, Adagrad, RMSprop)
from keras.constraints import maxnorm
from keras.regularizers import l2
from mo... |
3ad204f23568d1631a96bbeb35dc6f44594b387e | 1e232d3b8391f9c5092f9a0bfd9f3810680145a5 | /Fun_with_numbers/find_the_cat.py | fe876e03b880fe0bdc54d803aead9c6652b68068 | [] | no_license | Azeasy/Some-scripts | 10e7b6550976006d4451337f69ab6e015d5076d2 | cdeb38598fbfbabf58a2863ad5862ca3771c24fc | refs/heads/master | 2023-08-31T22:33:10.394697 | 2023-08-22T17:53:16 | 2023-08-22T17:53:16 | 125,418,310 | 2 | 0 | null | 2022-11-22T07:41:41 | 2018-03-15T19:45:26 | Python | UTF-8 | Python | false | false | 5,130 | py | find_the_cat.py | from random import randint
import json
class Game():
"""
A cat is hiding in one of the five boxes.
The boxes are numbered one to five and are all sitting in a row,
lined up in order. Each night,
the sneaky little cat hides in an adjacent box,
exactly one box away from the box it's in during th... |
376db25d515324a6c2add7d144d88e1686dde39a | 760ef8fa1fa34f7a0621ed1a72cd4070d5825e34 | /src/object_mover.py | 54ea33dda00283f34ebcc0b7f43a103d2385d723 | [] | no_license | michaelarfreed/MotionTaskPlanningProject | 9a2670565fe2923504d678407d3dcb4659bc06df | 384f9801f031f0d413854bc844a452d2681b34af | refs/heads/master | 2023-04-10T12:08:35.538339 | 2021-04-04T23:12:37 | 2021-04-04T23:12:37 | 354,664,871 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,639 | py | object_mover.py | import numpy as np
import openravepy
import utils
from openrave_tests.PlannerPR2 import PlannerPR2
from openrave_tests.PR2 import mirror_arm_joints, Arm
from trajectory_generator import TrajectoryGenerator, PickTrajGenerator
from grasp_pose_generator import GraspPoseGenerator2
class ObjectMover(object):
def __init_... |
1c4ee507f855fdb6ba7eeeb87d9c6db481da7105 | c0a3d1f468f2808e7fed8179d33f16353c91eb38 | /django/myConcretePlantPWA/myConcreteREST/admin.py | f970e951a596382544dfc534436de307bc8ee148 | [
"MIT"
] | permissive | Soichi-Tamashiro/Django-con-Samuel | f4762de40dc0ab48a84141d8c860c26325b70fda | f95177498966451d03f251a62a4eb1d448616675 | refs/heads/main | 2023-03-19T01:01:57.608009 | 2021-03-15T18:55:52 | 2021-03-15T18:55:52 | 323,955,046 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 137 | py | admin.py | from django.contrib import admin
from .models import myConcrete_Data
# Register your models here.
admin.site.register(myConcrete_Data)
|
6e6eb81e06a19b2e952c60de3be6033155bb3291 | f0d713996eb095bcdc701f3fab0a8110b8541cbb | /f48nSAebxBNMfmc9D_6.py | 3ebb3833f84e9b46148ed9b4622f5f3e62cb2461 | [] | no_license | daniel-reich/turbo-robot | feda6c0523bb83ab8954b6d06302bfec5b16ebdf | a7a25c63097674c0a81675eed7e6b763785f1c41 | refs/heads/main | 2023-03-26T01:55:14.210264 | 2021-03-23T16:08:01 | 2021-03-23T16:08:01 | 350,773,815 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,002 | py | f48nSAebxBNMfmc9D_6.py | """
Write a function that receives a list of words and a mask. Return a list of
words, sorted alphabetically, that match the given mask.
### Examples
scrambled([”red”, “dee”, “cede”, “reed”, “creed”, “decree”], “*re**”) ➞ [“creed”]
scrambled([”red”, “dee”, “cede”, “reed”, “creed”, “decree”], “***”) ➞ ... |
d977d4251b4fef42afb783a6a0791c153c5798ac | b84b66f071050213a18ea6824fae443271f7d166 | /0257_Binary_Tree_Paths.py | 75a584e849ec960f91f26673165d921a90164cf1 | [] | no_license | oveis/LeetCode | c4c400196de0cae4cd963384c7cb4826aa11e078 | 9ea466f1ebfd976b60dfa2ff2e8b0b2e5c99a9b3 | refs/heads/master | 2021-06-26T04:32:16.373204 | 2021-01-02T08:13:09 | 2021-01-02T08:13:09 | 192,046,829 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 818 | py | 0257_Binary_Tree_Paths.py | # Definition for a binary tree node.
# class TreeNode(object):
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
class Solution(object):
def binaryTreePaths(self, root):
"""
:type root: TreeNode
:rtype: List[str]
"""
p... |
7b262b6841212b28b033cee40865113ca1944195 | f7bf818abbf6e616035ceca3db09b78267201265 | /inference2/migrations/0018_auto_20171001_0807.py | 6f3eae06d3e72c8459162426ef0761b7afa3695b | [] | no_license | kylefoley76/inference_engine | 5de9646053ede5ffb099be60442601c20c15e77c | 91bd70eaacd14e9e21945260429af241aa801bff | refs/heads/master | 2022-07-21T23:43:57.997784 | 2022-07-06T01:38:18 | 2022-07-06T01:38:18 | 102,761,903 | 0 | 0 | null | 2017-10-05T21:31:06 | 2017-09-07T16:41:33 | Python | UTF-8 | Python | false | false | 531 | py | 0018_auto_20171001_0807.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('inference2', '0017_instructionfile_file_extension'),
]
operations = [
migrations.AlterField(
model_name='instruc... |
0c012743434a0ffacf746c856d7c4e10cc05c2e9 | 2c4648efe8c7e408b8c3a649b2eed8bb846446ec | /codewars/Python/5 kyu/Rot13/rot13_test.py | 7445df56b034eaea012cf74a03a9646da8703d59 | [] | no_license | Adasumizox/ProgrammingChallenges | 9d79bd1b0ce4794b576124f9874aabb86d5c0713 | 3630fcde088d7991e344eb1b84805e9e756aa1a2 | refs/heads/master | 2021-07-16T08:16:57.538577 | 2020-07-19T19:58:28 | 2020-07-19T19:58:28 | 190,159,085 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 966 | py | rot13_test.py | from rot13 import rot13
import unittest
from random import choice
from string import ascii_uppercase, digits
from codecs import encode
class TestROT13(unittest.TestCase):
def test(self):
sol = lambda s: encode(s, 'rot13')
def static(d):
self.assertEqual(rot13(d),sol(d))
... |
dbc054ad38f8d9d6ef5914e32fd1ca8e395557b5 | a98b1ea1c541c69af46c82c61a475427d77985b5 | /convertEML.py | ab428db680163e6603f7340869e6c6553ad4083d | [
"Unlicense"
] | permissive | UAlbanyArchives/ingest-processing-workflow | cbb368092ff34e7ee0514edf2dfed0de6d287255 | 0fd258509079a46c71c87bd607001ff0e431c6b1 | refs/heads/master | 2022-07-14T06:24:00.548488 | 2022-06-24T20:13:08 | 2022-06-24T20:13:08 | 188,279,367 | 1 | 0 | Unlicense | 2022-01-13T01:20:32 | 2019-05-23T17:35:26 | Python | UTF-8 | Python | false | false | 2,173 | py | convertEML.py | import os
import argparse
from subprocess import Popen, PIPE
argParse = argparse.ArgumentParser()
argParse.add_argument("package", help="Package ID in Processing directory.")
args = argParse.parse_args()
if os.name == 'nt':
processingDir = "\\\\Lincoln\\Library\\SPE_Processing\\backlog"
else:
processingDir = ... |
e1e2843d16b5b18b7db9204675b2919f7b905512 | 3701e0448f5f7741a64c2ccbb170a291b43a9d00 | /malib/__init__.py | 598630a8c0a99d87577c1a06c039af4d1b0274e1 | [] | no_license | komi24/courspython | d32f4cf6e4cdbe52175487ad964420fa87c5d8ca | 6693e755672cac00907eaf8ab004150b5d013931 | refs/heads/master | 2021-09-11T15:22:22.714909 | 2018-04-09T06:55:44 | 2018-04-09T06:55:44 | 109,668,149 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 23 | py | __init__.py | __all__ = ['monmodule'] |
7b041a9f674f0c53867343b4c0fcbfda489a59ae | a66dfd98fe607b333bafc3c7e62e60d04b361fc1 | /cmdb_agent.py | 10b97831916ded4c95bc8bdeaa0240b59d486214 | [] | no_license | charlesxs/cmdb_agent | 35d87c8a0b0d7295ca2e76d35903718fcaa3856f | 500dbd8118fad4a32e5aafed7ceafbc16c1ef714 | refs/heads/master | 2021-01-01T16:23:25.303066 | 2017-07-20T10:49:08 | 2017-07-20T10:49:08 | 97,822,137 | 2 | 2 | null | null | null | null | UTF-8 | Python | false | false | 2,630 | py | cmdb_agent.py | # coding=utf-8
#
import json
import re
import requests
import logging
from collecter import Collector
from config import *
VERSION = '0.1.0'
logging.basicConfig(level=logging.INFO,
format='%(asctime)s [%(levelname)s] %(message)s',
filename=os.path.join(pdir, 'cmdb_agent.log'... |
cb0c37ee7e7a2fdd996796e2529013208c5b310d | 48bb4ccf6781675e295f239d7236bf1fd0d03e11 | /tieba/spiders/tieba_detail_spider.py | 8de61e1eb8c79fc2149bbcaae6e0c980d75b2bc5 | [] | no_license | liuhao940826/self_tieba_spider | b2e065312c6dd295ade24040c8b20920c05b9e89 | 9317a204ab0943480973443c34e07cb8c97bfd0b | refs/heads/master | 2020-11-28T21:11:40.972701 | 2020-03-15T19:25:36 | 2020-03-15T19:25:36 | 229,920,783 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,903 | py | tieba_detail_spider.py | # import json
#
# import scrapy
#
# from tieba.items import UserDetailInfo
#
#
# class mingyan(scrapy.Spider): # 需要继承scrapy.Spider类
#
# #内置配置覆盖全局 pipline
# # custom_settings = {
# # 'ITEM_PIPELINES': {
# # 'mingyan2.pipelines.Mingyan4Pipeline': 100,
# # }
# # }
# start_urls ... |
748137188780d927d5936d56b077186c86b5fbd6 | 1a917bacd1c336140997eb159ccc43ecb561fca2 | /HW1/smu/demo.py | f3137b5d0be462d2a8d7fcfc4a103a5bfa561a75 | [] | no_license | pankajti/ML2 | 9515f336f7c5e46c24aeec9229c21fda62f9ad12 | fa0edb43fa8877ff6c28de68010cdfb6645f98d8 | refs/heads/master | 2020-12-08T17:26:22.520001 | 2020-03-02T00:19:00 | 2020-03-02T00:19:00 | 233,046,581 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 819 | py | demo.py | import numpy as np
from sklearn.linear_model import LinearRegression
from sklearn.linear_model.logistic import LogisticRegression
from sklearn.model_selection import KFold
# from sklearn.metrics.regression import
import matplotlib.pyplot as plt
model = LogisticRegression()
arr = np.array([2, 3, 4, 5, 6])
X = np.array... |
937261faca9bbd48675ae9e95e4eea81fa534c19 | b83b4b14fcd150606b9e0dff07c4977e64c620f7 | /ecom/migrations/0008_auto_20191219_1248.py | 5f3d4b77a0d2d911093f9a0dcd8f9de8f389d51e | [] | no_license | AnjanaAjith16/demo | eb438be3bb5957135042bf088eae23c08b0f58eb | 01461385b92f1bf3e67079266b25ac64ad97a71e | refs/heads/master | 2020-12-02T18:32:32.343665 | 2019-12-31T11:48:25 | 2019-12-31T11:48:25 | 231,080,461 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 389 | py | 0008_auto_20191219_1248.py | # Generated by Django 2.2.6 on 2019-12-19 07:18
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('ecom', '0007_auto_20191219_1244'),
]
operations = [
migrations.AlterField(
model_name='cartitem',
name='line_total',... |
f99cf1a56e306dac5711464ce989beb04f57a597 | bce9f75d6eb8d5051100d357a12cf8104c4dfb18 | /http_tests/channels_listall_http_test.py | 47af650df7b70f044062956b005917e83940f309 | [] | no_license | AnonymousAlligator/1531Project | 89cb3e563240c7dcae6071cb271a892868f59160 | ef8222676791d77340c7ae2f7ef1fc22e0ebcbae | refs/heads/master | 2023-02-04T23:34:52.611189 | 2020-11-14T11:48:57 | 2020-11-14T11:48:57 | 323,523,504 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,950 | py | channels_listall_http_test.py | from url_fixture import url
import pytest
import requests
import urllib
@pytest.fixture
def initialisation(url):
# Clear data space
requests.delete(f'{url}/clear')
# Register users
user0 = requests.post(f'{url}/auth/register', json={
'email' : 'Benjamin@email.com',
'password' : 'passwo... |
aa0894a44f7926546f95dd056e2f8a090c863937 | 8015f1c62a2cb4efd21aa8938336913bf8117868 | /bamap/ba1046.pngMap.py | b58974b3a94039d971d069ec43368547454af148 | [] | no_license | GamerNoTitle/Beepers-and-OLED | 675b5e3c179df0f0e27b42bf594c43860d03b9af | afe1340e5394ae96bda5f9022a8a66824368091e | refs/heads/master | 2020-04-20T00:09:47.122471 | 2019-04-29T04:59:35 | 2019-04-29T04:59:35 | 168,515,579 | 4 | 2 | null | null | null | null | UTF-8 | Python | false | false | 8,468 | py | ba1046.pngMap.py | ba1046.pngMap = [
'11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111',
'11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111',
'1111111111111111111111111111111111111... |
d748359f1181b0b84bc2621fe02833d7eae95266 | a38651bdd9ac400db6992b51fe841aa162ebddfe | /cart/admin.py | 35e6ab6c212981194b0aee69d7c62b55f7a30123 | [] | no_license | 88Evgeniy88/m-shop | 1506c5074de949192976f4bcc6580b84a4cd1cb1 | 284a1790b73711794498bdc9fc64e99ca40d57eb | refs/heads/master | 2023-07-24T04:42:25.238591 | 2021-09-03T07:11:33 | 2021-09-03T07:11:33 | 401,711,915 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 408 | py | admin.py | from django.contrib import admin
from cart.models import *
@admin.register(Cart)
class CartAdmin(admin.ModelAdmin):
list_display = ['user', 'create']
@admin.register(CartProduct)
class CartProductAdmin(admin.ModelAdmin):
list_display = ['user', 'items']
@admin.register(Order)
class OrderAdmin(admin.Mod... |
6459d403ffcb69589709966480391ed40e26762b | c95c1eac9db3b41209c2a398db3120ce109226a3 | /helper.py | d5b117782e18fd5468e8dfdddfb24849ca52c885 | [] | no_license | vladirive/flask | 954343aede599f2c23a20baa52259bd5d2b868a0 | 980f4b869d4542f7e1d7f0656934dceb92f74421 | refs/heads/master | 2022-11-08T00:29:56.547714 | 2019-07-28T11:37:22 | 2019-07-28T11:37:22 | 199,278,735 | 0 | 1 | null | 2022-10-21T21:28:24 | 2019-07-28T11:27:58 | Python | UTF-8 | Python | false | false | 290 | py | helper.py | def date_format(value):
months = ("Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre")
month = months[value.month - 1]
return "{} de {} del {} a las {}:{} ".format(value.day,month,value.year,value.hour,value.minute)
|
645e5abf6ce0d7ef7d18cf87eb145ef5111a57cc | b271450572f4efba6ce6711a260a45b61636321a | /baselinelibs.py | 678df09f252498398b36f6557930e16b150713d7 | [
"MIT"
] | permissive | pinakigupta/BehaviorRL | 6fd646c6e9fc88a0809ea27c71149f432b4d1592 | b0136ee68f577c9dc1e7f1e8b359e2418051d6e8 | refs/heads/master | 2023-07-30T11:07:24.961155 | 2022-03-14T16:42:28 | 2022-03-14T16:42:28 | 202,264,440 | 8 | 0 | MIT | 2023-07-06T21:35:31 | 2019-08-14T03:06:51 | Python | UTF-8 | Python | false | false | 1,523 | py | baselinelibs.py | from baselines import logger
import gym
from gym.envs.registration import registry
def baselines_play(env, policy):
# env = gym.make(env_id)
logger.configure()
# logger.log("Running trained model")
obs = env.reset()
state = policy.initial_state if hasattr(policy, 'initial_state') else None
d... |
2e9fd985909d7fa916cc043b1f5bad9ee0f1a64c | 1befbad9a094afd5a01101fe302fe1fc393cf59a | /Python/Cool Drawing.py | c893ceee3a738ef2b036cbf12cdd92849d810d46 | [] | no_license | jayparikh37/jayparikh37.github.io | 2b35c09402fa2ce7a57ffe0c20aa55cf5d202146 | d6d7f566234708b353f8ac38ab9977260ca0316e | refs/heads/master | 2021-05-02T16:11:30.896032 | 2018-04-12T13:24:05 | 2018-04-12T13:24:05 | 120,669,243 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 380 | py | Cool Drawing.py | import turtle
akela = turtle.Turtle("turtle")
pad = turtle.Screen()
def circleInd(turtle, radius):
turtle.circle(radius)
def drawmultiplecirlces(turtle, numberOfCircles, radius):
colorList = ["black", "blue", "red", "orange", "yellow", "green"]
for circles in numberOfCircles:
circleInd(turtle, ... |
64a75f9b54303e4e355f17cea79949718dffc216 | e6b4617a8031a84a17217d8fbadf22a8582bd33d | /utils/context_processors.py | ea6cf273c75ac3a30bd151fe1835a8229bc5454d | [] | no_license | JesseWoods/spirit_buzz | 3b3946841892df2c3c4374e2f06e81d11b37ec63 | 4434f795e487c3c04b3f38a7aa598b122ec67e2f | refs/heads/master | 2021-01-17T07:56:08.990758 | 2016-09-22T20:32:42 | 2016-09-22T20:32:42 | 23,504,225 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 313 | py | context_processors.py | from spiritbuzz.models import Category
from spirit_buzz import settings
def spiritbuzz(request):
return{'active_categories': Category.objects.filter(is_active = True), 'site_name': settings.SITE_NAME, 'meta_keywords': settings.META_KEYWORDS, 'meta_description': settings.META_DESCRIPTION, 'request': request} |
aa04cc91cbdda19e93dcc127ad8d6e8aa5a4b9da | 8a1ab23b056886965fec2a3e4064c5ed55e22bfb | /домашка/essential/lesson 4/Marukniak Denys/L_4_1.py | da0258d36ae6c67da533ef4e467adf59c5b510f8 | [] | no_license | django-group/python-itvdn | 5d8a59f06618f993d20d2f60374c36aae4ae8ab0 | 62ef87dfac947ed4bf1f5b6b890461f56814d893 | refs/heads/master | 2021-01-07T11:16:37.996524 | 2020-02-14T13:53:47 | 2020-02-14T13:53:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 704 | py | L_4_1.py | # Задание 1
# Напишите итератор, который возвращает элементы заданного списка в обратном порядке (аналог
# reversed).
class Revers:
def __init__(self, string):
self.string = string
self.index = len(string)
def __iter__(self):
return self
def __next__(self):
while True:
... |
ec7a51d6bdbdf381ecde8291a0aaa70ee7aef559 | d982c21771beac5d8a87c5bd6c858ed7b76c7efa | /models/Freyberg/start_pp_slaves.py | 5bfbfff630f30b9863b17900d2dec005b46d09cc | [] | no_license | GuiV06/GW1876 | 9d4856be54dff02edc8d0a1523f4bdde5900a5c6 | e0d88f8a51ed75d9ad3495d84fb6e00688067d9b | refs/heads/master | 2023-03-15T18:42:51.981476 | 2018-04-22T18:34:34 | 2018-04-22T18:34:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 127 | py | start_pp_slaves.py | import os
import pyemu
pyemu.pst_utils.start_slaves("Freyberg_pilotpoints","pestpp","freyberg_pp.pst",num_slaves=10,port=4004) |
58a2b7c814abe3d61f2a1181125bc70a5af84381 | b6e34dec0831f43d442e89c64f521f77bb2438b2 | /tools/630406_thanos_remove_some_phototank_resume/630406_remove_some_resume_key.py | 99424fbb97058c4b308bdea883b48789a4d3c880 | [] | no_license | kandation/FBTAFast | a1a38e09d5964915d46492f84f8fa0fead43185c | 505a2f232ef7ef9b6fc153357fb4eec5480cd92a | refs/heads/master | 2022-12-31T02:43:09.339384 | 2020-04-22T19:13:54 | 2020-04-22T19:13:54 | 212,693,322 | 0 | 0 | null | 2020-04-22T19:13:56 | 2019-10-03T22:34:15 | HTML | UTF-8 | Python | false | false | 1,273 | py | 630406_remove_some_resume_key.py | db_name = 'fbta_20200407_1257'
db_name = 'fbta_20200404_1650'
from parsel import Selector
from pymongo import MongoClient
import random
if __name__ == '__main__':
"""
Thanos snippet : Remove some "downloaded-recheck" Tag (magic key for resume system)
"""
client = MongoClient()
db = client.get_data... |
2a27976cd02e23eadb8a2a58e7392c5ee0a0d6b4 | 71f004ced0f855c48e9adb8c96f2632b0f2d3345 | /scripts/temperature_viz_reg.py | b846c25b05f7139e5206e5051f0c15715fae134b | [] | no_license | TheChanRProject/SCDSD_OM1 | 5630051bda7e42220373d49ad9c49dcdfcb5a89c | f64850ec11b50bf0aea57449acbe37acba07492e | refs/heads/master | 2020-04-28T21:56:17.073432 | 2019-03-17T20:44:01 | 2019-03-17T20:44:01 | 175,599,608 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 406 | py | temperature_viz_reg.py | import os
import numpy as np, pandas as pd, matplotlib.pyplot as plt
from jupyterthemes import jtplot
jtplot.style(theme='monokai')
def farenheit(x):
return 1.8*x + 32
X = np.arange(-50, 51, 10)
Y = farenheit(X)
plt.figure(figsize=(12,8))
plt.scatter(X,Y)
temp_dict = {'col1': X, 'col2': Y}
df = pd.DataFrame.f... |
f6e2fa586ef0a0a4de5301a6f0607c75baa9c784 | 54fe70287ff9106f0863f6978a71e9f0de21106b | /remedy/rad/models.py | 9cec2dc823c4e8a378024d0414b7bc1b18fab097 | [
"BSD-3-Clause"
] | permissive | wilbertom/radremedy | 38fd3bf434b77766c94a68092b462d973f37d35b | 4c4e447909d6171eff738457017b5449eac2893a | refs/heads/master | 2021-01-20T22:03:04.577269 | 2014-11-13T15:45:50 | 2014-11-13T15:45:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,946 | py | models.py | """
models.py
Defines the database models.
"""
from datetime import datetime
from sqlalchemy import event
from sqlalchemy.event import listens_for
from flask.ext.sqlalchemy import SQLAlchemy
from flask.ext.login import UserMixin
import bcrypt
db = SQLAlchemy()
resourcecategory = db.Table(
'resourcecategory',
... |
9140236c730ddb0aba80053004c194ce061d6150 | 563b2dfecce610102470e109c36d35c85aef2367 | /titanic_survival.py | 037ac1f29e307174978f1f5329e20cbb4fa151ef | [] | no_license | mirucar/mlprojects | cf5d54ce0cb993d56959437653877e30ed8164dc | 3710d6a395fe1125c3e0ecb5a3b124baf7a560db | refs/heads/main | 2023-04-27T07:39:46.014070 | 2021-05-08T22:01:58 | 2021-05-08T22:01:58 | 362,668,183 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,123 | py | titanic_survival.py | import codecademylib3_seaborn
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from sklearn.linear_model import LogisticRegression
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import StandardScaler
# Load the passenger data
passengers = pd.read_csv('passengers.c... |
40058a5ee886beab77b853b4863c006ab5a9caf4 | 4f49a1ddd513e3d43f73b94039982d6b7cb51ecb | /tollspider/vai66tolls/vai66tolls/spiders/vai66tolls_spider.py | 26a628835c31f18cc428be3b330d0c0d702028cd | [] | no_license | agussman/hotlanesbot | f10cef64d099a298385ee08106f32d48523f58e8 | f16d2d727cfe56dcd12f7d61c949aa7891ba3590 | refs/heads/master | 2023-01-05T05:28:08.978907 | 2020-10-31T03:05:11 | 2020-10-31T03:05:11 | 115,975,924 | 0 | 0 | null | 2022-12-29T09:00:11 | 2018-01-02T04:52:16 | Python | UTF-8 | Python | false | false | 12,633 | py | vai66tolls_spider.py | # -*- coding: utf-8 -*-
import scrapy
from scrapy import Request, FormRequest
from itertools import izip_longest # used by grouper
import json
import datetime
import boto3
OUTDIR="./log/"
class Vai66tollsSpiderSpider(scrapy.Spider):
name = 'vai66tolls-spider'
allowed_domains = ['vai66tolls.com']
start_url... |
7052acf97e63afecee2dd571dbe7684e034b51cd | 8b6030838cfc189d83f289d0b0ae6ee49a218f20 | /hacker rank/sortingbubblesort.py | 06a6715006aeb37c6987d432e6a5a6cce4bfc685 | [] | no_license | 9hafidz6/self-projects | 6555278f250ab504d8e1108c6d57b7744f3369d6 | 700b13ad4dffae69d8ae6772e42e58bcba33b896 | refs/heads/main | 2023-08-01T03:46:48.584288 | 2021-09-19T09:23:18 | 2021-09-19T09:23:18 | 313,806,348 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 918 | py | sortingbubblesort.py | #!/bin/python3
import math
import os
import random
import re
import sys
#
# Complete the 'countSwaps' function below.
#
# The function accepts INTEGER_ARRAY a as parameter.
#
res = 0
def swap(i,j,a):
global res
tempi = a[i]
tempj = a[j]
a[j] = tempi
a[i] = tempj
res += 1
return a
def cou... |
1f16b3b9b42a6fc68a3bd880c3e34913dc19d91e | 291bfa41cc44c5807c1f50ac76de778dc3b69ef8 | /timeServer.py | c1d67f7f7c21861f742c5054be38ff8326f25b56 | [] | no_license | oursonvie/AirQualityPlateNumber | 5e8d083d56c02815f83d4136012ba8e2604e3909 | 358971b83399c2b6983d74c70fc124c18df8a99f | refs/heads/master | 2020-12-24T12:14:11.039724 | 2016-11-07T09:01:49 | 2016-11-07T09:01:49 | 73,060,115 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 390 | py | timeServer.py | from flask import Flask
import schedule
import moment
app = Flask(__name__)
@app.route("/")
def hello():
return "Hello World!"
@app.route("/time")
def timeNow():
return moment.now().timezone("Asia/Shanghai").format("YYYY-M-D h:m:s A")
def job():
print("I'm working...")
schedule.every(1).seconds.do(job)... |
bb42e052339feb33e5bca5130d2f75a67ee1411a | 97eecc44e37e95f2f6f7c6a0dcc5883e4d295e76 | /bbq.py | a1c20de0b183955e307466020da5f80343c91544 | [] | no_license | huxx-j/web_crawler | 6d6d1566cc814f53888a54d1df3c718a2938f208 | 42ca707d17e9ccc4d81bb4091a3228f5bbef216c | refs/heads/master | 2020-03-18T18:26:50.919246 | 2018-05-28T00:57:31 | 2018-05-28T00:57:31 | 135,093,328 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 978 | py | bbq.py | from itertools import count
import requests as requests
from bs4 import BeautifulSoup
import pandas as pd
def bbqStore():
bbqList = []
for page in count(start=1):
url = "http://changup.bbq.co.kr/findstore/findstore_ajax.asp?page=%s" % page
html = requests.get(url).text
soup = Beauti... |
087da810e60124275a6ba8d74dd7f29df953ccbc | 1a220abd21c56728aa3368534506bfc9ced8ad46 | /백준/Gold/14442. 벽 부수고 이동하기 2/벽 부수고 이동하기 2.py | 61f6f765e60d1db2cd2b8d20e1fa130335053f56 | [] | no_license | JeonJe/Algorithm | 0ff0cbf47900e7877be077e1ffeee0c1cd50639a | 6f8da6dbeef350f71b7c297502a37f87eb7d0823 | refs/heads/main | 2023-08-23T11:08:17.781953 | 2023-08-23T08:31:41 | 2023-08-23T08:31:41 | 197,085,186 | 0 | 0 | null | 2023-02-21T03:26:41 | 2019-07-15T23:22:55 | Python | UTF-8 | Python | false | false | 1,346 | py | 벽 부수고 이동하기 2.py | from collections import deque
N, M, K = map(int,input().split())
graph = [list(map(int,input())) for _ in range(N)]
visited = [ [ [0] * (K+1) for _ in range(M)] for _ in range(N)]
dx = [0,1,0,-1]
dy = [1,0,-1,0]
def bfs(x,y):
queue = deque()
queue.append((x,y,0))
visited[x][y][0] = 1
whi... |
69646ecae088f6eaa778dd041c0d13f1d7c30115 | d20d62f1e5d2c6eaa90465b5f80923165bcf4937 | /CO_LAB6-master/test.py | 26e45423520af23f354edae3c373348bb0ff8d41 | [] | no_license | EazyReal/Computer-Organization-2020 | a476c45a55980ac7d6ea6eb837d05c878a53ed6a | 637db87374435cc1f9bfc1ce4bf58e69baa0510c | refs/heads/master | 2021-08-19T00:57:00.672677 | 2021-04-26T07:52:41 | 2021-04-26T07:52:41 | 249,949,066 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 580 | py | test.py | import numpy as np
from collections import defaultdict
#import networkx as nx
import time
import subprocess
from subprocess import Popen, PIPE, STDOUT, run
import matplotlib.pyplot as plt
exe_file_name = "AI_game.exe"
exe_cmd = "./" + exe_file_name
player1 = "40\n./d.exe\n"
player2 = "1\n./Sample1.exe\n"
std_in = byt... |
acb67e28d6bed9ff62b87e0df92ab7815fe4828f | 1cc6a3650d41515d12626f14f71d30a5911a9962 | /make_xy_event_manual_years.py | cb7ec47565478aebf9e9383fb11b0680e83d6d6c | [] | no_license | mkp0015/Hail_Reports_GIS | fdd45220d454615149798c0759391500ebab2173 | e21660c099dfbfcb831a48d2198e4617ea897c8e | refs/heads/master | 2021-06-13T16:20:17.561818 | 2017-05-10T14:22:00 | 2017-05-10T14:22:00 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,099 | py | make_xy_event_manual_years.py | #********************************************************
# FILE: make_xy_event.py
# AUTHOR: Melinda Pullman
# EMAIL: mkp0015@uah.edu
# MODIFIED BY: n/a
# ORGANIZATION: UAH/ATS Dept.
# CREATION DATE: 03/25/2017
# LAST MOD DATE: n/a
# PURPOSE: This script takes imported CSV datafiles within a folder, iterates
# ... |
3285e2433b9445332b1431f55f720e068781ab39 | 7737fd9eacc1a8b8d8b14a3ebca4e86c174ff8b4 | /FINAL/origyn.py | d6bb9301affaaebb534a55df448fd47377366555 | [] | no_license | davidgjordan/gym_tensorflow | e82a021ee329e8f6430ff52e6ec36444e842dcec | d97070cfd8079356c77f079d821c0ba5aebcaabc | refs/heads/master | 2018-09-23T17:16:20.968122 | 2018-06-27T18:55:00 | 2018-06-27T18:55:00 | 117,039,839 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,233 | py | origyn.py | #!/usr/bin/env python
import sys
sys.path.insert(0,'/home/ubuntu/Desktop')
import gym
import tensorflow as tf
import numpy as np
import pygame
# # # # # # # # # # # # GYM # # # # # # # # # # # # # # # # # # # # # # # # # #
list_obs_por_juego, list_action_esperadas_por_juego = [], []
env = gym.make('MsPacman-ram-... |
9e9560a29cf7c225deffa5088ec86533c73dcbe2 | 8cced97a617f980cca7b5e1342ac15e2ffbf8d33 | /scripts/osm_delete_all.py | 6310935d9b92ef89358c444f87d5191df4bca4d2 | [
"Apache-2.0"
] | permissive | CN-UPB/python-mano-wrappers | 403900713a9622cbc4b51f342aaf3e31f8a87590 | 8e3607feaa97bc3e2c906ee8e4b25b21853ea6cf | refs/heads/master | 2020-07-28T20:54:53.039799 | 2020-04-12T13:09:29 | 2020-04-12T13:09:29 | 209,535,069 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,325 | py | osm_delete_all.py | import wrappers
import json
USERNAME = "admin"
PASSWORD = "admin"
HOST_URL = "vm-hadik3r-05.cs.uni-paderborn.de"
osm_nsd = wrappers.OSMClient.Nsd(HOST_URL)
osm_auth = wrappers.OSMClient.Auth(HOST_URL)
osm_vnfpkgm = wrappers.OSMClient.VnfPkgm(HOST_URL)
_token = json.loads(osm_auth.auth(
usern... |
d70a74ffde20fbe6a20ad4715a70a643da8f2d28 | 30559d27a0bec6501d16476b7f6e97bacaae5165 | /rankingapp/views.py | f1342cd49cd7c3fa5711129d533ec4c784f52ffe | [] | no_license | idnstory/2021-hackerthon-kkobugi | afd125bdcc42c9d514f917a621c37daffe21c8e7 | 6e4df02d609494e469e05baa446407a5fb810521 | refs/heads/main | 2023-06-13T02:22:34.823603 | 2021-07-07T12:37:23 | 2021-07-07T12:37:23 | 383,036,171 | 0 | 0 | null | 2021-07-06T16:01:17 | 2021-07-05T06:24:28 | Vue | UTF-8 | Python | false | false | 539 | py | views.py | from rest_framework import viewsets
from .serializers import RankingSerializer
from .models import Ranking
import datetime
class RankingViewset(viewsets.ModelViewSet):
today_min = datetime.datetime.combine(datetime.date.today(), datetime.time.min)
today_max = datetime.datetime.combine(datetime.date.today(), da... |
26413391a2999f6e84585a78c1cf950c1526de05 | b06c4ed54e218b5e03075b5fe4f27e7219df6bc3 | /senpos.py | dad15b774269b7e7b1db9ac616d83142fd36a000 | [] | no_license | unvisibleman/SenPos | 6ae0641429d3b8e9c95807ef86151d80ebf23eb2 | 7d95e77fa44e72f74b8d2c8b7e2b986925d979ff | refs/heads/master | 2020-03-06T17:57:27.950083 | 2018-07-18T14:23:30 | 2018-07-18T14:23:30 | 126,997,498 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,835 | py | senpos.py | import clr
import math
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *
# прямое произведение
def product(v1, v2):
result = ()
for t1 in v1:
for t2 in v2:
result += ((t1,t2), )
return result
# ИСХОДНЫЕЕ ДАННЫЕ СП5
Lss_=[1, 2]
Lsw_=[1, 2]
# ди... |
0b3ca41a9ca1762832d9d8a0b48dc3be96098a59 | f8e9282909c76a433520556c4e6e5b1b982339a9 | /PythonAnalysisScripts/saccades/detect_saccades.py | 89a406b61ca10079416250e6f263790b2343343e | [
"MIT"
] | permissive | everymind/SurprisingMinds-Analysis | 0a8269b5f96c57484bfbb3556a8383a564175166 | eeb308043f471de3cdb505f82461cf8d6cf40e16 | refs/heads/master | 2021-01-19T17:28:06.307389 | 2020-11-05T16:58:22 | 2020-11-05T16:58:22 | 101,057,671 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,463 | py | detect_saccades.py | import os
import glob
import numpy as np
import matplotlib.pyplot as plt
import datetime
import os.path
# Detectes saccades in each speed file and saves a new intermediate binary file
# Grab today's date
now = datetime.datetime.now()
todays_datetime = datetime.datetime.today().strftime('%Y%m%d-%H%M%S')
current_workin... |
5d4268b148824ea03564fc0b6246cb1171361bba | 117dceedcb8e93e40428e439fb02d16c58aa4474 | /课件/1130/07-dataType.py | 82d9dcd327355432f8a4f75c4cbd89054d0cdfed | [] | no_license | qwert19981228/P4 | ab5ceff94ec49ecbc47d008d6f239e03781eb0fd | b7c434cc64df64ae48a84ee056cbccc0db622fde | refs/heads/master | 2021-10-24T12:32:34.160886 | 2019-03-26T03:39:52 | 2019-03-26T03:39:52 | 167,921,434 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 492 | py | 07-dataType.py | '''
数据类型: 变量值的类型
Python3中 6个标准类型
1. 数字 Number
2. 字符串 String
3. 列表 list
4. 元组 tuple
5. 集合 set
6. 字典 dictionary 简称 dict
6个标准类型又分为两种人:
可变数据类型: 变量值可以修改, 但内存地址不会更改
列表
字典
不可变数据类型: 变量一旦修改, 则重新指向一个新的内存地址
数字
字符串
元组
集合
''' |
65aa2d92213f65122e250b2a284d24dbac183131 | 439209b858af5555d2ae659a530a48f93bfbcfb8 | /wxy/views.py | 3566188f37bafed990fc98cddf216edc0f9828c8 | [] | no_license | 0wuxinyun/python_website | 0752cc7329ea7ffded75ce349a325a2bbe4a6c90 | c6db46f7c39f29a18d9ca827fa3ab8b207bf2d8a | refs/heads/master | 2021-07-15T05:39:21.016455 | 2020-08-04T18:02:38 | 2020-08-04T18:02:38 | 248,999,444 | 1 | 0 | null | 2021-06-10T22:40:37 | 2020-03-21T15:03:00 | Python | UTF-8 | Python | false | false | 2,455 | py | views.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.shortcuts import render
from .models import Subject, Note
from django.http import HttpResponseRedirect,Http404
from django.core.urlresolvers import reverse
from .forms import SubjectForm,NoteForm
from django.contrib.auth.decorators import... |
e55d661184e1d2d92bc171483719c331b0ac0dac | 8aee355628af7799287623e1c6671f882da11cd4 | /pyramid.py | 462ac1ddd4a9cf5cc4bba6c758befb823f510de7 | [] | no_license | rdoherty2019/Computer_Programming | 71a2864f3af3745fe15b36a990d8541bb569aed8 | 2b24f84337badf4acd458d159763218f1d6b2764 | refs/heads/master | 2022-07-01T22:56:45.128601 | 2020-05-06T19:56:58 | 2020-05-06T19:56:58 | 261,857,435 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,205 | py | pyramid.py | """
Print out each number
or accumulate and print out each row
Accumulate into big string
"""
num = 0
while num < 1 :
num = int(input("Enter height of your pyramid"))
"""
for row_num in range(len(num)):
for col_num in range(num):
n = 0
# while n != num:
# n += 1
for i in ra... |
5568ac2feeb990a91501e53cff2fc95fb985de0e | d8b5d7c6869a1e66e694143520364c51af4c0686 | /src/perceptron.py | f54f51398b806b7c6c8e0e6d103a32a41806d4a6 | [] | no_license | apelykh/42-ft_sommelier | b6be779da9f8ee35064f38ecd61c343039ad180f | cc0556f65ebe5f50abc551dd25fb670505de8828 | refs/heads/master | 2021-06-08T09:07:54.634993 | 2020-01-24T13:31:34 | 2020-01-24T13:31:34 | 170,468,229 | 6 | 2 | null | null | null | null | UTF-8 | Python | false | false | 938 | py | perceptron.py | from .model import Model
from .utils import ft_dot
class Perceptron(Model):
def __init__(self, lr):
self.W = None
self.lr = lr
self.performance = []
def predict(self, X):
"""
Mapping the net input to binary class value using unit (heaviside) step function
... |
00ccae8e958945fca35d5360b191a9cef8fbda5b | a41d5c04b145296c2fad34477e1c5456211ec78c | /2019/day1/day1.1.py | 7016cd90ca4a27aea5e8e21c34e0e457bbad632d | [] | no_license | Veli-V/adventofcode | 04a0f9add0fd508c85cda371b804a84c422ae122 | 27f783dff5fddea7fb3b60a65226a54f7e9aca34 | refs/heads/master | 2022-12-21T11:11:25.916402 | 2022-12-17T11:36:10 | 2022-12-17T11:36:10 | 160,183,600 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 339 | py | day1.1.py | import math
import os
def countGas( mass ):
gas = 0;
gas = int(mass) / 3
gas = math.floor(gas)
gas = gas - 2
return gas
gasAll = 0
with open('test.txt') as file:
for line in file:
gas = countGas(line)
#print("for line " + str(line) + " answer is " + str(gas))
gasAll += ... |
29a01a45db9246ef386f5269391ad652030e6743 | bcf1d32d7e7028bf6138496d6c731c0442636754 | /models.py | be6d2c2975fcd74298c39afbacc2b6255dd6f348 | [] | no_license | zotbins/zbce_api | 2deb30b19329808ec8eaf4a4786682ae1d13bc69 | 3c481a2876de2b95ff22bf2c2e6ce943dfdd644a | refs/heads/main | 2023-07-28T23:30:17.044027 | 2021-06-26T21:30:51 | 2021-06-26T21:30:51 | 321,230,489 | 2 | 1 | null | 2021-09-17T05:14:13 | 2020-12-14T04:14:55 | Python | UTF-8 | Python | false | false | 2,504 | py | models.py | # library imports
from flask import (
Flask,
render_template,
session,
redirect,
url_for,
flash,
jsonify,
make_response,
request,
abort,
flash,
send_from_directory,
)
from werkzeug.utils import secure_filename
import os
from flask_sqlalchemy import SQLAlchemy
import datet... |
a0c9beec8ac9cbaab169da1c21016cacf3b3192f | 3eef0a95735cb18589538ce16f89cdbfffce6864 | /elite_ships/__main__.py | 0b58ab784f99f627cd4b12149d5c834a0b2e4541 | [] | no_license | irmen/Elite-ships | 455f3e40fc5d55d3640f222b685415ca730db273 | a4de502211644affb2f15d1e8593a0154fa1988f | refs/heads/master | 2023-07-05T14:28:32.655323 | 2021-02-14T15:29:35 | 2021-02-14T15:29:35 | 293,910,648 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 31 | py | __main__.py | from .viz import main
main()
|
9f43ca208e2bf8cbfcc9e22541011c22408c3935 | b4e4ee497c1eae1fb9618e6c9a76b4f740ec1f39 | /library_app/views.py | 87b0b1826610f73b68cc89b56370b6b1983f4f79 | [] | no_license | petulienocka/Django-LibrarySystem | 4298994e2ef2a6433d6a57c2f552d073e5d92154 | 697f92d4be0f958861e2597af52d2f068ceca5d6 | refs/heads/master | 2023-01-24T12:51:10.726388 | 2020-12-01T15:56:57 | 2020-12-01T15:56:57 | 317,591,786 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,402 | py | views.py | from django.shortcuts import render
from library_app.models import Book, Author, BookInstance, Genre, Catalog, CatalogCase
def index(request):
num_books = Book.objects.all().count()
num_instances = BookInstance.objects.all().count()
num_instances_available = BookInstance.objects.filter(status__exact='a').... |
292ad05d595798840c3f23d5c98174c858a387db | 84241109edf2a454908bdc8e603d4122c25ebab6 | /initialize_pos_vel.py | b6639be7df0be276d07e327d0ec42c3d0230220a | [] | no_license | xgdhar/MD-force-routines | 9ce977715c5ac3cb9d90ddd888d57fa5ec210e9c | a2d7698c567bd87ecc742bbaf4707d5f9f922401 | refs/heads/main | 2023-08-25T01:13:51.005252 | 2021-09-11T23:36:37 | 2021-09-11T23:36:37 | 390,081,460 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,344 | py | initialize_pos_vel.py | import numpy as np
# Assigns velocities with Maxwell-Boltzmann (Gaussian) distribution and positions with uniform random distribution
def initial(seed_int,N,Lv,pos,vel,T_desired):
np.random.seed(seed=seed_int)
sig = np.sqrt(T_desired/3) # standard deviation in terms of temperature in reduced uni... |
b19baa526a73f3a93066b950b7a1ed9154df35b0 | a527ba6a9cf6177677a9c4adfa6eb6f983bacf68 | /update_MoreVMs.py | 3c687d4282c4e8bf240872dcfbbb70d2343eadd2 | [] | no_license | rdapaz/doctools | 6425f95b4cd4c2530c53fbbb27a1b091e1f345c5 | 2c190bfa0f6932b70e8398aa0c1fff99b57c0ea4 | refs/heads/master | 2021-01-25T13:05:47.666118 | 2018-08-13T08:16:43 | 2018-08-13T08:16:43 | 123,527,262 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 948 | py | update_MoreVMs.py |
import psycopg2
import pprint
def pretty_printer(o):
pp = pprint.PrettyPrinter(indent=4)
pp.pprint(o)
def try_to_int(int_p):
print(int_p)
try:
return int(int_p)
except:
return int_p
data = """
PER2SAPE01DEV|8|32|m4.2xlarge
PER2SAPE01TST|4|16|m4.xlarge
PER2SAPG01DEV|4|16|m4.xla... |
d8b3f08279c6c971f9146bea458d433d38253a1f | 5286255a93db21ea9defc1f8f6fc71990c3c2fa9 | /samples/python/montecarlo/QCD_Pt_20to30_7TeV_pythia8_Summer10_START36_V10_S09_v1.py | a1e6d4897b0867a763fd624ab6e36b411c279b65 | [] | no_license | brynmathias/AnalysisV2 | 1367767dbf22eef6924700c4b0a00581ea8ed965 | ee17c019bb04243876a51c7ef7719cc58a52adea | refs/heads/master | 2021-01-01T19:20:27.277628 | 2012-04-17T13:34:26 | 2012-04-17T13:34:26 | 2,600,415 | 0 | 2 | null | null | null | null | UTF-8 | Python | false | false | 1,516 | py | QCD_Pt_20to30_7TeV_pythia8_Summer10_START36_V10_S09_v1.py | from icf.core import PSet
QCD_Pt_20to30_7TeV_pythia8_Summer10_START36_V10_S09_v1=PSet(
Name="QCD_Pt_20to30_7TeV_pythia8_Summer10_START36_V10_S09_v1",
Format=("ICF",2),
File=[
"root://xrootd.grid.hep.ph.ic.ac.uk//store/user/bm409//ICF/automated/2010_07_26_10_23_33//QCD_Pt-20to30_7TeV-pythia8.Summer10-START36_V1... |
9c559c6a131268e723cdfeb3f05411374246ab87 | 270b48fc02b9cbc9b52172bccf598479694d3a42 | /live/renderer.py | b8e814bcb529ffbc7dd40422fad8e043413a431c | [
"MIT"
] | permissive | svenschultze/Colab-Live-Figures | 8623b81171306f4e61fa8b5c0e92091cde9a545a | fe70ac089eb30f4ccda0996128c3fe13654567f0 | refs/heads/main | 2023-01-03T02:03:49.633044 | 2020-11-02T19:45:35 | 2020-11-02T19:45:35 | 308,057,808 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 623 | py | renderer.py | from google.colab.output._js_builder import Js
listen = Js("""
function(channel, width) {
let elem = document.createElement("img")
elem.style.imageRendering = "pixelated"
elem.style.width = width + "%"
elem.style.float = "left"
elem.style.margin = "5px"
let output = ... |
137ce21714282cd4b469b9a5bcf6252d9e2cf6e0 | 4aa13b3219ab58123b706edb98e5d15be39f170a | /app/wsgi.py | 88b4b7e0821c7e2f33833bb0fc478ff7e5b40dfa | [] | no_license | zoripong/simple-flask-app-template | e79670853d930209616edb5074a1434cfa888f1c | b06745c14696a5fecd60c484c7bbb05070c2a9e0 | refs/heads/main | 2023-05-23T08:31:01.114109 | 2021-06-12T02:23:44 | 2021-06-12T02:23:44 | 300,565,232 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 722 | py | wsgi.py | import json
from flask import Flask, jsonify
from flask_cors import CORS
from app.context import session
def ping():
result = session.execute('SELECT 1').scalar()
assert result == 1
return jsonify('pong')
def http_ping():
return jsonify('pong')
def load_configuration(path: str) -> dict:
wit... |
f7b3684436b3256b95cd5f3b573dabec8513107e | 8dd8b50c83864b2d00f95d48a81a12475c78f022 | /src/haydi/base/values.py | f48d4d69af5e1a1ccb65a32525b996c8a5f5c45c | [
"MIT"
] | permissive | spirali/haydi | f54c257ad90e28e690d513533b57dd178f457af9 | e0f7fce05d25db25bf533ebdb3ddc395513efef9 | refs/heads/master | 2021-08-23T08:24:51.524232 | 2017-12-04T08:59:20 | 2017-12-04T08:59:20 | 48,799,199 | 5 | 2 | MIT | 2017-12-04T11:24:27 | 2015-12-30T12:13:28 | Python | UTF-8 | Python | false | false | 2,119 | py | values.py | from .domain import Domain
from .cnf import expand, is_canonical
import random
class Values(Domain):
"""
A domain created from a collection of Python objects.
Args:
values (collection): A collection of items that is
used as the content for the new domain
name... |
c3889de4ee86ea64d45bc60d46f8094734542a1d | 07715c32adcb375dce9764b185a049aa4baec931 | /Lyrics Analysis.py | fe1e8debdb7350c2d9eafc65c886b9ef2253efa4 | [] | no_license | ChamRoshi/Eminem-Lyrics-Linguistics | 05d84997ce13f3ac0e6771a3332fbf17665df0a7 | 3010423acf4f179926fa6fd5f68140c94d08eb99 | refs/heads/master | 2020-12-30T15:54:15.931924 | 2017-05-13T15:11:47 | 2017-05-13T15:11:47 | 91,181,426 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,599 | py | Lyrics Analysis.py | from tswift import Artist, Song
import pprint
from nltk.corpus import cmudict
import nltk
import string
import pandas as pd
import csv
import os
d = cmudict.dict()
def nsyl(word):
return [len(list(y for y in x if y[-1].isdigit())) for x in d[word.lower()]]
def clean_lyrics(lyrics):
lyrics1 = lyrics.split("\n\nm... |
e46b88814127a52d59d5a36ddc0b1e6d9f65d260 | 394b3e8e3cef86ba386de547cb2b180ab0b3275e | /tests/analysis_tests.py | a6ce7917bfb58d33854a986030218b2534d1b4d2 | [
"MIT"
] | permissive | lhoupert/narwhal | 45b968dcb5c67ce94dd9d4a1240aa649fa625f82 | 734bc4e0ebf322fc1f770df5473f423611fce5bf | refs/heads/master | 2021-05-25T13:45:46.109220 | 2019-01-24T04:36:00 | 2019-01-24T04:36:00 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,403 | py | analysis_tests.py | import unittest
import os
import numpy as np
import narwhal
from narwhal.cast import Cast, CTDCast, XBTCast, LADCP
from narwhal.cast import CastCollection
directory = os.path.dirname(__file__)
DATADIR = os.path.join(directory, "data")
class WaterFractionTests(unittest.TestCase):
def test_three_sources_constant(... |
74964a7c382efae8977285a26e34c3dcf5f221e0 | bb52b02acff97576446b303d98d9e2bbc36358a6 | /tk_mangorona.py | 8079b8f1cbb5e69601f1c91920a3f487cb5d8e84 | [
"Unlicense"
] | permissive | nirinA/scripts_python | bfd2f8c2c06c2b348c89150a4a6637ce66c88fa9 | f0ae4a4308e4857e61d2e70a40ea3bc769c99663 | refs/heads/master | 2021-01-15T13:18:22.070029 | 2014-08-02T17:11:13 | 2014-08-02T17:11:13 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 16,389 | py | tk_mangorona.py | '''<h1>Jeu de Mangorona</h1>
<h2>nouveau jeu , new game</h2>
<h3>configuration</h3>
on peut configurer les éléments suivants
pour un nouveau jeu:
<h4>lattice: réseau</h4>
<ul>
<li>star: le réseau habituel du jeu
<li>diamond: idem à star mais inversé.
mais moins intéressa... |
8e7172fd6a7775f89dc99a94ac8a532cb019c737 | 1eb41fd38b44e74baec888f31cce87cf62656e42 | /filehandle/qiniu_letssl.py | acaa29524a1c645fd1a72203218a13bac5eb6ccc | [] | no_license | tools-env/shell-tools | 0cc7eb23365ae51a3a20b910a01f7effa1118f95 | 486fee0949e04b1112cf7ccf8b638049c4665c1d | refs/heads/master | 2022-12-04T04:16:51.093599 | 2020-08-13T13:12:21 | 2020-08-13T13:12:21 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,482 | py | qiniu_letssl.py | #!/usr/bin/python
# -*- coding: UTF-8 -*-
# FileName: qiniu_letssl.py
# (c) 2019.6.23 vfhky https://typecodes.com/python/qiniuletssl1.html
# https://github.com/vfhky/shell-tools/blob/master/filehandle/qiniu_letssl.py
# 脚本功能:上传从Let's Encrypt申请的 cdn.typecodes.com 的SSL证书到七牛云存储并启用。
# 使用方法: python qiniu_letssl.py
#
# ... |
6a575c521af5a053f83463a5bd9cc1e27840e3c1 | 31c0ab34f3b32bd2082473888d97088ab926c6b8 | /tests/conftest.py | ec204df8064458de5ca89ebcf8fe20f06cbbe03b | [
"MIT"
] | permissive | analyzere/analyzere-python | 8367168ec40b16878916f6957602c9282ca55a58 | 0599d82237c918f80cd17f3c61901e7d4fd96cd4 | refs/heads/master | 2023-09-04T04:09:33.288907 | 2023-08-10T14:31:12 | 2023-08-10T14:31:12 | 37,935,114 | 4 | 7 | MIT | 2023-08-10T16:58:19 | 2015-06-23T17:51:53 | Python | UTF-8 | Python | false | false | 612 | py | conftest.py | import pytest
import requests_mock
@pytest.fixture
def reqmock(request):
m = requests_mock.Mocker()
m.start()
request.addfinalizer(lambda: m.stop())
return m
@pytest.fixture
def mock_bar_request(reqmock):
reqmock.post('https://api/bars/abc123/data', status_code=201,
text='data')... |
2496a0bed9ad53b86e90d34007e4f8613c1ceb5f | 70be2618de9674215c0f4a7ed86d5af5c7d09260 | /dfstools/tests/test_csv_tools.py | 30d68ea1bc110cb3f0221f9b43e8e6719ffdc4da | [
"Apache-2.0"
] | permissive | CamilaGaitan/comp410_summer2020 | 16121b3eba5d9f4ac6d5f09514f269f9511916aa | e82fc97a0272d7d9c1fe071bb13195b46d9d69e5 | refs/heads/master | 2022-10-23T03:56:20.195983 | 2020-06-02T11:22:27 | 2020-06-02T11:22:27 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 323 | py | test_csv_tools.py | import unittest
from dfstools import load_csv_to_df
class CsvTools(unittest.TestCase):
def test_load_csv_to_df(self):
expected = ['airlines', 'airports', 'flights', 'trip_logs']
result = load_csv_to_df(None)
self.assertEqual(expected, result)
if __name__ == '__main__':
unittest.main... |
d18af7ab508bd6b55944dcfd3a937d24d225c704 | 3cbe1374a686d205dcc2e4b8ed4adc08f31dcaef | /home/migrations/0011_auto_20210715_0711.py | 097fcc3eecf75884e08e2899f1cf36a3fa0879eb | [] | no_license | as1212742/Airveda-assignment | 0dbc87298ad38b53241e9278dc44c1227e6cab20 | 3118bced3310284e3a9c96945d811749567a6d1b | refs/heads/master | 2023-06-19T15:41:31.240955 | 2021-07-16T20:22:30 | 2021-07-16T20:22:30 | 386,755,028 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 661 | py | 0011_auto_20210715_0711.py | # Generated by Django 3.2.5 on 2021-07-15 07:11
import datetime
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('home', '0010_auto_20210715_0709'),
]
operations = [
migrations.AlterField(
model_name='humidityreading',
... |
eabc9f90962fae5ecadc3beea5f5dee5352ed79d | e4f828eb6cfb775d9e8cb792902680f45a94470e | /Python/Regex and Parsing/01_Detect Floating Point Number.py | f87fb925f8e8618d2def0cb5116389dc2fdfc998 | [] | no_license | j471n/Hacker-Rank | 831a90412e86be1314a401143290fd6e843848be | 0a56107d413c5f661db59a3d1c3f700460ccb618 | refs/heads/master | 2022-12-29T22:33:51.759452 | 2020-10-05T08:04:51 | 2020-10-05T08:04:51 | 285,738,337 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 158 | py | 01_Detect Floating Point Number.py | # Programmer : Jatin Sharma
import re
t = int(input())
for i in range(t):
n = input()
print(bool(re.match(r'^[-+]?[0-9]*\.[0-9]+$', n)))
|
f47239ad036d20293cc32980b4cfe4390a696000 | e140dbe79f63da45028a5645a3d5f633b1a70d5b | /countingday.py | 1a09f5d2d979cca54c78ef4fa5ffe99e96b27e44 | [] | no_license | tswaroop/election | a7d1fc79c31b3869cdb1ecc87639f74de9680989 | 1ff3bc7f9abe9474d2d3a15547ee4a4a2a1caed6 | refs/heads/master | 2021-01-01T20:03:14.273369 | 2015-05-26T02:05:36 | 2015-05-26T02:05:36 | 98,753,261 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,274 | py | countingday.py | """
A script to create and sync counting day visualisations.
To be run every time the SQL server data changes.
May also be run at a fixed interval (e.g. 1 minute)
Usage: python countingday.py
"""
import json
import datetime
import pyodbc
import pandas as pd
from pandas import read_sql
from time import time, sleep
d... |
45b1afffee15ad2a041308d08413943901f18c34 | 131363bdcb25ce4c4d504e1934f52419d24e5972 | /utils.py | 48fe6b1edfb316679b473718055c1e61eb023899 | [
"Apache-2.0"
] | permissive | 0x11111111/PyAutoPlay | 513f0f5da8b7440db5c9743bdc7433181648415f | 5b0f86ec00e03930d586834b45762f68cb8e15c7 | refs/heads/main | 2023-04-26T02:11:31.155928 | 2021-05-31T10:54:12 | 2021-05-31T10:54:12 | 356,303,186 | 4 | 0 | Apache-2.0 | 2021-05-31T11:01:59 | 2021-04-09T14:43:02 | Python | UTF-8 | Python | false | false | 172 | py | utils.py | # -*- coding:utf-8 -*-
class PAPException(Exception):
"""PyAutoPlay Exception"""
class PAP_ImageNotFound(PAPException):
"""PyAutoPlay image not found exception""" |
7c0ce67264fef5b2b161801febbd5db01d81b2c0 | cfd82f6acc67f25349f8d7c7b32c34de17caf5d8 | /start.py | 28265c2e8e994db328af79e4d393c1e0eb459550 | [] | no_license | kosmokrator/rubik | 736ce528ad8e2e266ab93acf13e7e7492b902c3c | a44699c7971aa6e0a2f6934bfac6f9eb328fb0f0 | refs/heads/master | 2021-01-10T19:05:15.896116 | 2013-06-16T13:45:20 | 2013-06-16T13:45:20 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 320 | py | start.py | import rubik, config, random, time, sys, math
if __name__=="__main__":
ani_class = None
if len(sys.argv) > 1:
try:
ani_class = config.__dict__[sys.argv[1]]
except:
ani_class = None
if not ani_class:
ani_class = config.Solver
rubik.Cube(ani_class().loop)
|
e49a8f7b0c19750be934e2776419a052bbfb0fa2 | 796dd05d84c56d0873797b29be58247b1be782c6 | /spotseeker_server/test/hours/open_until.py | 31676a1f57f52af018de34d4032dc09b60da575e | [
"Apache-2.0"
] | permissive | uw-it-aca/spotseeker_server | 039e65824887a8303f12a3f07e730ca061bab2d5 | 5f21a58b4084d798b1c4f87721b63bad01ac4f36 | refs/heads/main | 2023-08-16T08:53:38.124987 | 2023-04-14T21:41:34 | 2023-04-14T21:41:34 | 11,489,866 | 6 | 7 | Apache-2.0 | 2023-08-15T22:45:30 | 2013-07-17T23:18:17 | Python | UTF-8 | Python | false | false | 10,624 | py | open_until.py | # Copyright 2023 UW-IT, University of Washington
# SPDX-License-Identifier: Apache-2.0
from django.test import TestCase
from django.test.utils import override_settings
from django.test.client import Client
import mock
from spotseeker_server.models import Spot, SpotAvailableHours
import simplejson as json
from datetime... |
d861d8a80520f8e5697f605060e6c0ea75335509 | d8d6c220000ca97177070d88a391577d8a33edfb | /urgentapp/urls.py | 5abec7ace29e5634ae236cb54f37d61e96142abb | [] | no_license | urgentsystems/rapidaid | e500e66f02b7b01c1c96c728b6bfd40045c66928 | 961bf74cf821a27508964d4e89ce0acf0ac6d7f5 | refs/heads/master | 2016-09-05T16:56:39.470648 | 2012-11-24T21:26:51 | 2012-11-24T21:26:51 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 390 | py | urls.py | from django.conf.urls import patterns, url
from rest_framework.urlpatterns import format_suffix_patterns
from urgentapp import views
urlpatterns = patterns('',
url(r'^units/$', views.UnitList.as_view()),
url(r'^units/(?P<pk>[0-9]+)/$', views.UnitDetail.as_view()),
url(r'^users/$', views.UserList.as_view()... |
2b77587152fce1b5240ab6eaf3ccc89a487e50c1 | 9856363bd269924e87743ae46ab8cbf37b3747aa | /ARSU/TravelGuide/models.py | f1f4b91d63e9ed4ba29eab7ef57b5dc233cd61ad | [] | no_license | SuryaVeda/arsu | f7f286ae845e89fea9fab4d2ac85247ffb2730a6 | c437e8cb8d50a08de634403798ede7be63866e96 | refs/heads/master | 2022-11-24T11:24:22.561890 | 2020-12-08T00:19:57 | 2020-12-08T00:19:57 | 182,396,540 | 0 | 0 | null | 2022-11-22T03:32:20 | 2019-04-20T11:17:52 | JavaScript | UTF-8 | Python | false | false | 932 | py | models.py | from django.db import models
from accounts.models import User
# Create your models here.
class Travel(models.Model):
user = models.ForeignKey(User,on_delete=models.SET_NULL, null=True, blank=True)
heading = models.CharField(max_length = 20, null = False, blank = False, default = "fuck")
itinerary = models.... |