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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
d71ef60452f93c3082f20fbe83c932bc0aae65bd | 5c02d03d5bf7566f4c5a08f98502982c34eab568 | /ms.py | 0bc4b35a064438be5838a0e7d2251e53aed24c18 | [] | no_license | BenjaminLam1202/PythonInitLaravel | b258430e7d00da0a3ebb950eb1534b11d7c751db | da069cca78170cb489fb4d84f808054f3832dcca | refs/heads/master | 2022-11-24T05:11:19.650448 | 2020-07-30T03:16:48 | 2020-07-30T03:16:48 | 283,653,440 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 15,457 | py | ms.py | import subprocess
import os
import time
ha1 ="@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@ @*#@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n@@@@@@@@@@@@@@@@@@@@@@@@@@@ ... |
14488ad8f6ff4c4cc496f9cdfbeee612ca55317f | ea0cf8348730456065d14d2d7178140c97e3e3b3 | /examples/config-exmple.py | b4e908aaf0e84646c6195dd542137635cdbd0423 | [] | no_license | noeldolores/crypto_tracker | c1d316a7f11e47d011a42bf1e2ffdab626329636 | 3d300660cc6f82007f9f0593e22b5f8f95b64f5f | refs/heads/master | 2023-05-25T15:25:22.886486 | 2021-06-17T02:59:59 | 2021-06-17T02:59:59 | 367,760,757 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 391 | py | config-exmple.py | ##############################
# For SECRET_KEY
# >> import secrets
# >> secrets.token_urlsafe(24)
# Copy output to SECRET_KEY
##############################
class Config(object):
DEBUG = False
TESTING = False
SECRET_KEY = "Some_Secret_String_Here"
class ProductionConfig(Config):
pass
class DevelopmentConfig... |
8e964be3a68e43c60e66d848851a02b5f7ab60f7 | 1090c74e10d70492ec7f3218f839fdcebb6a5acc | /python/slot/controller.py | a66be81ef22da5f3fb002ca149ac1910f026b7ed | [
"Apache-2.0"
] | permissive | jeffersonvenancio/therightpark | d1fe4b7e8e2bb486a07e33cf46aac45bb7ad73b3 | 7363a30d3cc15ab2612e84488e96c7d36396fb46 | refs/heads/master | 2020-03-25T18:10:10.440921 | 2018-08-10T10:43:54 | 2018-08-10T10:43:54 | 144,016,303 | 0 | 1 | Apache-2.0 | 2020-10-09T14:48:40 | 2018-08-08T13:17:44 | JavaScript | UTF-8 | Python | false | false | 689 | py | controller.py | import json
from flask import Blueprint, request, session
from google.appengine.api import search
from slot.model import Slot
slots = Blueprint('slots', __name__)
@slots.route('/', methods=['GET'])
def get_all():
slots = [u.to_dict() for u in Slot.query().fetch()]
return json.dumps(slots)
@slots.route('/<i... |
d0994eed2716fb7f44bb4ce728d56b36b364ce2b | 628d0c78cf83d5f1753755009a1dd503f04009cb | /MutliProcessing/test.py | 869cb37493148944f689f7b12af235faf41b9aac | [] | no_license | lxngoddess5321/python-files-backup | 2384d43982ce165a137c3e5c12c5a8b01b403011 | 73ce7ae3ebb6806e0a597bb2390e87c04894a4d7 | refs/heads/master | 2021-10-08T22:12:37.743199 | 2018-07-06T08:16:50 | 2018-07-06T08:16:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 136 | py | test.py | #!/usr/bin/python
num = int(input("Please enter a number:"))
sum = 0
for i in range(num+1):
sum += i ** 2
print("The sum is:",sum) |
1285dff808c939ae3a7796c3762eafe98b7516f0 | 25071ee2e06d10f2ec0373150d30da0d85cb6c8f | /acuro/aruco_detector.py | 31e556aab7ce739bad11b178096c7f1c8cea3772 | [] | no_license | ttkuea/acuro-bugbug | e2e3561e758ccc99e094a213aa59578fa4b00605 | 9fcce7bb395d22b7d57b90ada3db416b13d5014e | refs/heads/master | 2023-01-27T21:33:22.160201 | 2020-12-12T16:47:22 | 2020-12-12T16:47:22 | 310,792,152 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,684 | py | aruco_detector.py | import cv2
import cv2.aruco as aruco
import numpy as np
import time
import yaml
from glob import glob
from threading import Thread
aruco_max_number = 4
class ArucoDetector:
def __init__(self, delay=1.0/60.0):
self.cap = cv2.VideoCapture(0)
self.cap.set(3, 640)
self.cap.set(4, 480)
... |
76159fff65ca35b4efc46c320813e20d702f55e1 | 4c177d9c3dc13d7afcc69fd5d6c32231c68a5f20 | /data/contacts.py | a6d123f0b4d190a4edefd47dfbf333761b675bdf | [
"Apache-2.0"
] | permissive | assassinen/python_training | a4573be33095f2ec4fe35324717d388d0372250a | 4a1996c9fec50c330183959154c240a4a30a6919 | refs/heads/master | 2021-12-12T13:32:32.435745 | 2021-11-20T15:37:34 | 2021-11-20T15:37:34 | 72,524,111 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,669 | py | contacts.py | __author__ = 'NovikovII'
from model.contact import Contact
import random
import string
def random_string(prefix, maxlen):
#symbols = string.ascii_letters + string.digits + string.punctuation + " "*10
symbols = string.ascii_letters + string.digits #+ " "*10
return prefix + "".join([random.choice(symbols) ... |
49795b7a85eb727d723f3c6eeb2bdd5fcbede535 | 80b867d2b49b31b5606614f607f90bd2733eb70e | /pennychat/models.py | 2e6dc66226a5bb95af78e6ca492af347232d884a | [] | no_license | gtback/penny_university | abf77f47008f9ef3f8fef3726e58667a6705c962 | 04c9117f71bd572fb2a87cd1962845cbc22d816a | refs/heads/master | 2021-05-17T01:36:49.573588 | 2020-03-19T02:33:47 | 2020-03-19T02:33:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,448 | py | models.py | from django.db import models
from django.utils import timezone
from common.utils import pprint_obj
from users.models import UserProfile
class PennyChat(models.Model):
DRAFT = 10
SHARED = 20
COMPLETED = 30
ABANDONED = 40
STATUS_CHOICES = (
(DRAFT, 'Draft'),
(SHARED, 'Shared'),
... |
a49677358361766e6120232e159d6d5ee70eff45 | aaa29202f0f2d9e687e9ba934fb8c06420b9c57e | /src/ch06-array/add_last_digit.py | f45022235c13ebd5a122d843ec4868c591e17894 | [] | no_license | vinhsu/Py-EPI | 33a357bf071cb62a7397c666c109990a804c235c | 4daaaba9211c81df14beb266a7449633969e3e3c | refs/heads/master | 2020-12-11T22:18:21.260052 | 2020-02-12T04:30:29 | 2020-02-12T04:30:29 | 54,850,097 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 481 | py | add_last_digit.py | '''
Created on Mar 27, 2016
@author: ninja
'''
def addLastdigit(list):
list.reverse()
list[0] += 1;
for i in range(len(list)):
if list[i] == 10:
list[i] = 0
if (i+1 == len(list)):
list.append(0)
list[i+1] += 1
list.reverse()
... |
e67fd15e3e45fa18850edb6c867be3b7e2b8209e | c1aef9282013b1326a800dcefa954afbefdca590 | /base/baseutils.py | b33bc9ba5ff206f882ea4c3ee69f0f24b5c2501c | [
"MIT"
] | permissive | MohitGhodasara/OdooServerTool-Source | a20ea9bf06411ca7d57bc5ec51d44a48328f4995 | 28ec79b435fa3789ca523c40ae08753123a40ebd | refs/heads/master | 2020-04-13T10:25:42.157749 | 2018-12-26T06:06:20 | 2019-01-14T12:52:14 | 163,139,754 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,165 | py | baseutils.py | import time
import sys
import platform
import base64
from .slash_x import hex_
class utils():
if sys.version_info[0] >= 3:
from tkinter import messagebox
else:
import tkMessageBox as messagebox
def performance(method):
def perform(*args, **kwargs):
ts = time.time()
... |
86bfe94211196f21ad28ef5460ded31177e7e3ea | b280688fd42e49cc768eca9c0c0f3541d23c7c1f | /setup.py | d090389cbfd3a0d211bc653939c4a2ea94c34d3c | [] | no_license | tmnkopp/PieOMatic | 9ce857933ebfca81c86b961a2674e2c9730c66cc | 8da8dc05372a82ec578c9d93aa7ebc69427d46e7 | refs/heads/main | 2023-05-04T12:11:47.900273 | 2021-05-30T15:51:35 | 2021-05-30T15:51:35 | 306,457,368 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 386 | py | setup.py | from setuptools import setup
setup(name='pyomatic',
version='1.0',
# list folders, not files
packages=['pyomatic'],
scripts=['pyomatic/bin/pom.py'],
package_dir={'pyomatic':'pyomatic'},
#package_data={'pyomatic': ['data/snippets.txt']},
package_data = {
'': ['dat... |
fc7fd863b4201dd8c596e8e51340935c1dcfae56 | ca1b603c1f122bf078f71fbe08e59b36fa92394e | /def_example.py | 07fd1a6650c4be1503ebc153565d47fd0d90544f | [] | no_license | sashavinocurov/automate-boring-stuff-with-python | ffeb27f8a0f3e651d63b209f2de95f203eae9276 | 3b98a66e99be55b9e9804ce4e2e44bb32910d60f | refs/heads/main | 2022-12-26T22:16:18.171576 | 2020-10-12T20:56:20 | 2020-10-12T20:56:20 | 303,510,401 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 297 | py | def_example.py | ##def hello():
## print ('Howdy!')
## print ('Howdy!!!')
## print ('Hello there!')
##
##
##hello()
##hello()
##hello()
##def hello(name):
## print('Hello ' + name)
##
##hello('Alice')
##hello('Bob')
def plusOne(number):
return number + 1
newNumber = plusOne(5)
print(newNumber)
|
d7b1eb597858d2ea91c6be1ef6776499947af939 | fc471f7837f6d7d125a2391eec462df0963643f4 | /models.py | 3d1f12f591e53d243595c4fffe2efe369877f6f2 | [] | no_license | dimashisenov/Backend_redart | 42049dbb64daf5e791ac59d4f44b134de4c1b9be | b3283c0790efec125c5d8e7a470f8764e1c8c84c | refs/heads/main | 2023-05-02T01:42:28.409233 | 2021-05-27T09:34:34 | 2021-05-27T09:34:34 | 371,317,502 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,221 | py | models.py | from datetime import date
from os import name
from fastapi.exceptions import FastAPIError
from sqlalchemy.sql.sqltypes import Enum
from database import Base
from pydantic import Field,BaseModel
#this is the structure of our JSON file sent from a web
#for authorization/registration
class Role(str):
ADMIN = "admi... |
123692f1d83c0d850298be8ebd18dc3df003f4e0 | fb4b70ad38d0fc810cb9ee034c8fb963c079f64b | /easy/Self_Dividing_Numbers.py | 33c51ce1cd72ee84467d7802a1ee8de8713c2bb0 | [] | no_license | ChrisLiu95/Leetcode | 0e14f0a7b7aa557bb2576589da8e73dbeeae8483 | baa3342ebe2600f365b9348455f6342e19866a44 | refs/heads/master | 2021-07-11T12:01:00.249208 | 2018-09-26T21:27:42 | 2018-09-26T21:27:42 | 117,451,180 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,069 | py | Self_Dividing_Numbers.py | """
A self-dividing number is a number that is divisible by every digit it contains.
For example, 128 is a self-dividing number because 128 % 1 == 0, 128 % 2 == 0, and 128 % 8 == 0.
Also, a self-dividing number is not allowed to contain the digit zero.
Given a lower and upper number bound, output a list of every pos... |
cea27cb2cfdf4ffb2d994b3b627c9d54c5eb7bd5 | c8277c79c82edc41ab5c45a02ffc5be3deb20cf9 | /client.py | baa4380288df694df3867365c301ad952f131312 | [] | no_license | tayyebsoubra/network_project | a9a5d6d11e07d031a0dfd27fdc39beb5ed2237b5 | d12e8ea8eb5bfbe2a9777546a57b9bb3bb666475 | refs/heads/main | 2023-04-28T12:56:49.576774 | 2021-05-25T14:12:19 | 2021-05-25T14:12:19 | 370,644,833 | 0 | 1 | null | 2021-05-25T09:57:08 | 2021-05-25T09:57:05 | null | UTF-8 | Python | false | false | 1,540 | py | client.py | import socket
import time
import encryption
import NRZ
ClientSocket = socket.socket() # create socket
host = '127.0.0.1' # local host ip for now
port = 1234
score = 0
print('Waiting for connection')
try:
ClientSocket.connect((host, port)) # connect socket to host on a specific port
except socket.er... |
5bbcdf03836321291c83dd7a341288561945154d | dba0f23c18464bdb22336fded40494daf3aee78e | /app/config/__init__.py | 81e6440d3ac7ac3602dec26d89f994a8baf21642 | [] | no_license | pineapplebin/api-server-flask | fa89e18648e5fd6981958680acbd7bd9390c6b25 | 49c9adc8b013324cad776d6197ca3425ddc81f3e | refs/heads/master | 2022-12-15T04:58:38.501429 | 2018-04-14T11:36:46 | 2018-04-14T11:36:46 | 129,511,466 | 0 | 0 | null | 2022-12-07T23:51:46 | 2018-04-14T11:39:11 | Python | UTF-8 | Python | false | false | 285 | py | __init__.py | from kernel.core.sysconfig import SysConfig
class Config(SysConfig):
DEBUG = True
AUTH_BACKENDS = [
'app.backends.Backend'
]
SQLALCHEMY_DATABASE_URI = ("postgresql://flask:123456@db:5432/flask")
REDIS_HOST = 'db'
configs = {
'default': Config(),
}
|
3fd0a7a0feee6883250d7c6ac36688013d8ffc39 | afd2087e80478010d9df66e78280f75e1ff17d45 | /benchmarks/operator_benchmark/pt/as_strided_test.py | 793e82cf11b52b958e49344c2654e4a61cdaa755 | [
"BSD-3-Clause",
"BSD-2-Clause",
"LicenseRef-scancode-secret-labs-2011",
"LicenseRef-scancode-generic-cla",
"BSL-1.0",
"Apache-2.0"
] | permissive | pytorch/pytorch | 7521ac50c47d18b916ae47a6592c4646c2cb69b5 | a6f7dd4707ac116c0f5fb5f44f42429f38d23ab4 | refs/heads/main | 2023-08-03T05:05:02.822937 | 2023-08-03T00:40:33 | 2023-08-03T04:14:52 | 65,600,975 | 77,092 | 24,610 | NOASSERTION | 2023-09-14T21:58:39 | 2016-08-13T05:26:41 | Python | UTF-8 | Python | false | false | 1,431 | py | as_strided_test.py | from typing import List
import torch
import operator_benchmark as op_bench
"""Microbenchmarks for as_strided operator"""
# Configs for PT as_strided operator
as_strided_configs_short = op_bench.config_list(
attr_names=["M", "N", "size", "stride", "storage_offset"],
attrs=[
[8, 8, (2, 2), (1, 1), 0... |
21e24c82e1db240e196620d6f53b3217aa028903 | 4a67a69357c1ac7aad5cfdf02a53b262c13d4c30 | /visualize/vis_alignment.py | 20da89901c48bfd33dcb50019053374dce23b6b7 | [] | no_license | HElenZWHU/PhysChem | 7ef6ac298461d975e8a2d5369fed126bfce9cd11 | d41d0acf90f9717390a91295d7c347a937f7d80a | refs/heads/main | 2023-08-24T00:37:27.391405 | 2021-10-22T11:21:09 | 2021-10-22T11:21:09 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,625 | py | vis_alignment.py | import numpy as np
import torch
from typing import List, Dict, Tuple
from rdkit import Chem
from data.encode import encode_smiles, get_massive_from_atom_features
from net.utils.MaskMatrices import MaskMatrices, cuda_copy
from net.models import GeomNN
from train.utils.cache_batch import BatchCache
from train.utils.rdki... |
a44751829948f1045f7cece6c1b7c86db3a7dfc6 | 494305cc15db7212d27a2a6ec83d7888f2c1f302 | /Su_2019_Term_1/Final/Final_Problem_1.py | 6deb088ddab66a01f3a292f37df879d6363be10c | [] | no_license | AustenHsiao/CS199 | e210e2e15e7590b97cd770fb3d350e43cd05f6d3 | 9594f73a93175854d42fceeb62a86c0538346332 | refs/heads/master | 2022-12-01T05:27:41.319311 | 2020-08-22T01:18:47 | 2020-08-22T01:18:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,531 | py | Final_Problem_1.py | #Final problem #1 CS199
#Austen Hsiao
#take in a list of positive numbers from the user, terminated with a -1
#print out alternating even numbers
all_numbers = []
even = []
odd = []
user_in = int(input("Enter a positive number (-1 to terminate): ")) # get some numbers
while user_in != -1: #as long as its not -1, keep ... |
51d1ebeaa0839d089a37ea99f3617de6352918a2 | 9fd99718985a834440645371a0f6530f673a08cf | /DS101-04-PS-01-plot_weather_data.py | e7c4b6531482658e30b22230692e42dcfd7ad055 | [] | no_license | feliperafaeldamiani/Udacity-DS101-IntroToDataScience | cf11c146c66337b6698c8c4ba5de6a6eefd21c31 | a68f01536921f3d2b652d5ae14a7c74c2180d1e4 | refs/heads/master | 2021-09-21T22:06:31.560862 | 2018-09-01T14:34:44 | 2018-09-01T14:34:44 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,197 | py | DS101-04-PS-01-plot_weather_data.py | import pandas as pd
import numpy as np
from datetime import datetime
from ggplot import *
import pandasql
pd.options.mode.chained_assignment = None
def get_day_number(date):
return datetime.strftime(datetime.strptime(date, '%Y-%m-%d').date(), '%d')
def plot_weather_data(weather_data):
"""
You are passed... |
c727472cd789d0c37eec6b6a0d07e8db4011352b | 371ddf5a9a609624400b7490a97a1c9358c41603 | /elk-master-stack/bin/send_data_to_filebeat.py | f35284e342c4f1796afd39c390d67c9f0d3827f4 | [
"MIT"
] | permissive | mrunix1998/cluster-elasticsearch-with-ssl | 4af47440e6102a639f8e8155ed8a9c842c35b9c7 | 591234a9a0a6c50ed67b9a508f3e612f4b0e9fb4 | refs/heads/main | 2023-08-19T14:31:29.587244 | 2021-10-31T06:34:05 | 2021-10-31T06:34:05 | 420,447,686 | 7 | 0 | null | null | null | null | UTF-8 | Python | false | false | 432 | py | send_data_to_filebeat.py | import socket, json, sys
HOST = '0.0.0.0'
PORT = 9000
try:
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
except socket.error as msg:
sys.stderr.write("[ERROR] {}\n".format(msg[1]))
sys.exit(1)
try:
sock.connect((HOST, PORT))
except socket.error as msg:
sys.stderr.write("[ERROR] {}\n".... |
b67d4562fd65870bf0f8dea3f8b150e6db90c5e8 | 1d99ba6518dd0814ffb2a8b92febd0c2f455ba69 | /Dersler/RestAPI/RestAPI_Requests.py | 60ddd9123260097434a43cd1c2aea870cb484298 | [] | no_license | dogan1612/Learning_Python | 85606911a240c5ee6dc7b030a334c9d179ec4097 | 8b3ce0aadd2a715331582c1dc14b662c29341930 | refs/heads/main | 2023-01-20T00:15:42.957981 | 2020-12-04T22:24:29 | 2020-12-04T22:24:29 | 318,638,246 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,393 | py | RestAPI_Requests.py |
import requests
url = 'https://jsonplaceholder.typicode.com/photos'
# GET REQUEST
response = requests.get(url) #get the data about the photos
print(response.json()) # to print all the objects ==> [{...},{...},{...}] ==> {'albumId': 98, 'id': 4863, 'title': 'volup... |
ea83b3df31884e2c44dc97d97d2ae4d2aaf20e51 | 0c1e9c19eb25be293d544906b528c4dcee26208e | /gearman/command_handler.py | 388ccedc2fb710798296447d40217dcb36974905 | [
"MIT",
"Apache-2.0"
] | permissive | wellcomecollection/python-gearman | ebe55ddd59bb38a0f5e2fd7b3997b98d3a70b427 | 688c40204d08ce6e01ecfac4cb2fd1d2d03267bd | refs/heads/master | 2023-04-26T07:36:55.791313 | 2021-06-03T10:08:50 | 2021-06-03T10:08:50 | 152,239,487 | 6 | 3 | NOASSERTION | 2021-06-03T09:58:46 | 2018-10-09T11:29:14 | Python | UTF-8 | Python | false | false | 3,201 | py | command_handler.py | import logging
from gearman.errors import UnknownCommandError
from gearman.protocol import get_command_name
gearman_logger = logging.getLogger(__name__)
class GearmanCommandHandler(object):
"""A command handler manages the state which we should be in given a certain stream of commands
GearmanCommandHandler ... |
57dbfa611f99adbcc96912a4b8c1fcf84c2e6da5 | 992fb48f59ac2302e7a42a3f16826a00ed4aa479 | /Project/clear_state.py | f7adf2d109ca15dcfc4a8d9ff71f835b7a2e786a | [] | no_license | SH-Broar/EDMS | 76e02f570a78c6fb0355ee5cf2719fa20d783c2a | c54b6e4bc39717fe9dd7ef3738b9e608ddccb5ef | refs/heads/master | 2020-04-05T00:10:03.490174 | 2018-12-01T14:43:50 | 2018-12-01T14:43:50 | 156,385,965 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,001 | py | clear_state.py | import game_framework
import main_state
from pico2d import *
name = "ClearState"
BackgroundImage = None
BGM = None
by = None
class Stage0_Bgm:
def __init__(self):
self.bgm = load_music("1City.mp3")
self.bgm.set_volume(64)
self.bgm.repeat_play()
def enter():
global BackgroundImage,BGM... |
ea40de709722ffd7c4cf4a45c111b7dba2dcf6dc | 3747535b2c86bc5646ca2c843731243439a55bb8 | /app/work_tasks/admin.py | f0338133197b6e6feaa8bc7082da273ed9f10e0d | [] | no_license | nikitasellin/RMS | ee7e41e69ee5102bfa80ffa9259463fdea7639ce | 3e670168875f2a1d34abc55130dd8608a620438b | refs/heads/master | 2023-04-20T17:01:22.381647 | 2021-05-13T07:44:41 | 2021-05-13T07:44:41 | 366,973,468 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 201 | py | admin.py | from django.contrib import admin
from work_tasks.models import Direction, ExecutionVariant, WorkTask
admin.site.register(Direction)
admin.site.register(ExecutionVariant)
admin.site.register(WorkTask) |
fa92249d4ae4e9703799c9e58ad4e1f38326e8ef | 6785bd6122e6eb013da781dd6ab6f1989f243e8e | /ocqm_cohort_website/tests/test_locale.py | 6c0ff6a6ff9158ce7ca1d655cfc261f9a42e74f9 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | seantis/ocqm_cohort_website | aed5cff8432fbde503c02ea253e7c1206f633f28 | 21701f2aeed3c317ead24bd6244a1adfe4d89c6a | refs/heads/master | 2016-09-16T15:10:50.174636 | 2014-09-22T12:24:00 | 2014-09-22T12:24:00 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 637 | py | test_locale.py | import pytest
from .. import locale
def test_localized():
localized = locale.Localized({
'id': 'cake',
'name': {
'en': 'Delicious cake',
'de': 'Leckerer Kuchen'
},
'description': {
'en': 'You know.. cake!'
}
}, languages=['en', 'de']... |
d6cae2b46d5da0fc517cc05820aab9553e0efdb7 | f342173a42f7ce7c8f43521dab3fe4b690d12ee4 | /bus_stops.py | 7b86cba420d6821a0ed88b4b16853cb8681acebc | [] | no_license | gombleon/python-coursera | 81622f1b8aaf8ad6ae96d13638ad4971bf2555da | 5557349da5a199cf27d2761dc63e98b4e446dde4 | refs/heads/master | 2023-09-04T02:09:32.875818 | 2021-10-24T12:23:40 | 2021-10-24T12:23:40 | 418,030,066 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 329 | py | bus_stops.py | station1, station2, station3, station4 = list(map(int, input().split()))
stations_bus1 = set(range(min(station1, station2),
max(station1, station2) + 1))
stations_bus2 = set(range(min(station4, station3),
max(station4, station3) + 1))
print(len(stations_bus1 & station... |
90d85bcf094b7ff4428c080078b5387321b3e084 | 5ef11db83bd245b149966e629a81aa56de162cdf | /encoder.py | 5c972b9abe71d07f59877f8b5bdb5d1d6ad40351 | [
"MIT"
] | permissive | takumak/jpegdec | 2d0ed3496f7ae0039b7b059845f65546f3610393 | 9037ed6e9b82ede1955afbb8f5897f06575f4bd4 | refs/heads/master | 2021-02-10T06:52:26.379268 | 2020-03-02T11:51:34 | 2020-03-02T11:51:34 | 244,358,296 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,986 | py | encoder.py | from common import *
class Encoder:
def __init__(self, out):
self.out = out
def prepare_scan(self):
mfh = max([c.factorh for c in self.comps])
mfv = max([c.factorv for c in self.comps])
self.runvals = {}
for c in self.comps:
def write_marker(self, name):
self.out.write(b'\xff')
... |
195c0fc74efd0828eaec2cd707d553e4a3327a70 | 2b2eaa0e919e146affefec8d971991f62cf50c65 | /digg5.py | b5ee02da54c274b894634241680385d8adc1804f | [] | no_license | 13tm034/maze_maker | b011f93eaafb59b5d704f3b85bb160f5ec00dcb9 | aaa4b6c12a05ae3f6fd84a10e8296bd3d550195b | refs/heads/master | 2021-01-20T22:20:10.572922 | 2016-08-04T07:17:02 | 2016-08-04T07:17:02 | 64,908,170 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,028 | py | digg5.py | import random
import time
import sys
def region(arr,xlim,ylim,xd,yd,xp,yp,x,y):
if xd < xlim-1 and yd < ylim-1 and xd > 0 and yd > 0:
if arr[yd][xd] == 0:
arr[y+yp][x+xp]=1
return 0,xd,yd
else:
return 1,x,y
else:
print('wall flag')
return 1,x,y
def chk(arr,xlim,ylim,x,y):
i... |
023e7473b5112add10964a26da83cecb9006ecd3 | b03231f2e962fbb4ec25c7b9348abec129fc0ced | /backend/invites/migrations/0001_initial.py | e82d158105bc9cc7bf75465a90fd264dc9bc4f5e | [] | no_license | viktortat/budgetManager | 982e514e75dd7d7e27e382d1017cf437ef56fafd | 51ff01e97432e76abacd5f7a21231116e3fc1085 | refs/heads/master | 2020-03-29T02:07:07.002776 | 2018-06-28T17:22:51 | 2018-06-28T17:22:51 | 149,421,240 | 1 | 0 | null | 2018-09-19T08:54:31 | 2018-09-19T08:54:31 | null | UTF-8 | Python | false | false | 1,410 | py | 0001_initial.py | # Generated by Django 2.0.3 on 2018-04-20 07:30
import datetime
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL)... |
81fa7dcc91b3ae5ca3476fdc71da2982d63914f1 | 078918048099dfa2454cfac2d449ea3d77fbec55 | /937-reorder-data-in-log-files.py | 114d58a2afbf9bb3d4e0b6161cd7b8a3d2dad538 | [] | no_license | DmitryVlaznev/leetcode | 931784dcc4b465eebda7d22311f5bf5fa879f068 | b2a2afdfc725330545c9a2869fefc7d45ec594bc | refs/heads/master | 2023-06-10T05:42:34.992220 | 2023-06-05T09:54:10 | 2023-06-05T09:54:30 | 241,064,389 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,306 | py | 937-reorder-data-in-log-files.py | # 937. Reorder Data in Log Files
# You have an array of logs. Each log is a space delimited string of
# words.
# For each log, the first word in each log is an alphanumeric
# identifier. Then, either:
# Each word after the identifier will consist only of lowercase letters,
# or;
# Each word after the identifier wi... |
ff09d5c201668944f3e0da4cb240216d62b700eb | 82db461036ffb2adbf0424a6f0575cd9d24b48a8 | /gamma_hedging_template.py | ad8bd11abf2629ea4178cafd6d893b0e05873432 | [] | no_license | webclinic017/option_pdt | fdc559f02cc529b54278e90e04170713fe93684f | dd302c6b2661e26dbfcbea0384b99e85ae9584e1 | refs/heads/master | 2023-03-24T10:43:35.998775 | 2021-03-19T14:08:38 | 2021-03-19T14:08:38 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,721 | py | gamma_hedging_template.py | from base.strategy_base import StrategyBase
from configs.typedef import TradeSide, OrderType, Direction, OrderStatus
from utils.util_func import getATMstk
import numpy as np
import pandas as pd
import pickle
import traceback
from configs import EXCHANGE_CONFIGS
from datetime import datetime
class Template(StrategyBas... |
81ed925acca46b4d20ac4fed1c57d00a1366f166 | 8a203b1226a5d3736b5d7dfdc40997898e6f989f | /sensor.py | 5d5649d33534abe77fdbff4a95c3735849f74421 | [] | no_license | ashipp98/Circuitpython | d8a4f6cb831ccd8a95194a06974d529cc2b7c03c | 79089899737ad32e8813132a5ad84ed7430e7729 | refs/heads/master | 2020-08-05T14:52:12.497933 | 2019-11-25T14:40:49 | 2019-11-25T14:40:49 | 212,586,880 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 647 | py | sensor.py | import time
import board
import adafruit_hcsr04
import neopixel
import simpleio
sonar = adafruit_hcsr04.HCSR04(trigger_pin=board.D2, echo_pin=board.D3)
led = neopixel.NeoPixel(board.NEOPIXEL, 1)
while True:
try:
dist = sonar.distance
if dist < 20:
red = simpleio.map_range(dist, 5, 20, 2... |
cc958668839e045d90dc1627674382be4a4600f4 | b96dc08aab6c06fb6d516ccac9ab215b69e991ac | /tools/create_pascal_selective_search_data.py | ad7e23748cc08aece73920ccb260b1cc550b8be2 | [] | no_license | yekeren/WSOD | 8ae92e88482e939a6c46d439c7abeea764718a46 | 3bcc6ca4f38ec9f0378b341363a25c618d86ebac | refs/heads/master | 2020-03-30T15:10:53.181128 | 2019-04-17T18:29:16 | 2019-04-17T18:29:16 | 151,351,598 | 1 | 2 | null | 2018-11-10T16:54:15 | 2018-10-03T02:34:13 | Python | UTF-8 | Python | false | false | 7,111 | py | create_pascal_selective_search_data.py | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... |
af10de7530d8026e6e5a8b885d69aa0855db9d30 | 881af614ea65be288d14287b54560b96bfc42af6 | /product/admin.py | ae25cbbf61ab8a7412da681ec0a63d95d35e081e | [] | no_license | varunm0503/elixir_jewels | 8c303bba02afa5c64458bf39771beaff2f156a8f | 4481d2b4f3aab68256f9602dbac0222b4b04f2f0 | refs/heads/master | 2021-01-10T20:16:41.938211 | 2015-04-18T09:45:41 | 2015-04-18T09:45:41 | 34,160,485 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 319 | py | admin.py | from django.contrib import admin
from product.models import *
# Register your models here.
admin.site.register(Country)
admin.site.register(State)
admin.site.register(City)
admin.site.register(Type)
admin.site.register(Product)
admin.site.register(Gold)
admin.site.register(Diamond_class)
admin.site.register(Entry)
|
732d1b993506d01f3094544e83eb1b6b63d9fca8 | 1358cf23a20588bec8741e820ad092df74eaf9cc | /src/scripts/pbs/modules/local_pbs.py | 09058843c2c9b626864308176c39c4760923cbbf | [] | no_license | andrew-c-esp/Flow123d-python-utils | 35d14d356b8accea63f6c8260c30ea90b0633d9d | 371f2620457a0094e1fa931b7022fb18aabf00bb | refs/heads/master | 2021-01-20T23:40:40.766986 | 2016-06-30T12:06:42 | 2016-06-30T12:06:42 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,073 | py | local_pbs.py | #!/usr/bin/python
# -*- coding: utf-8 -*-
# author: Jan Hybs
import re
import random
from scripts.pbs.job import Job
from scripts.prescriptions.remote_run import PBSModule
class Module(PBSModule):
def __init__(self, case):
super(Module, self).__init__(case)
def get_pbs_command(self, pbs_script_fil... |
ab7d2380b85f5ad023de87a12b550bc892e2c712 | a270914d8820d6b2e458dc84e3a79cd74cdad7ee | /infrastructure/views.py | 7a860ffb6f989787d67e88ec9b070c765c9c29c0 | [] | no_license | Sirbin/MiprA-Project | b6366deb916220cf582f2c9d4c55dd3177c5f7dc | a19dbf8dc1153f9856177c39e862da145f21b00a | refs/heads/master | 2022-12-07T16:33:28.521578 | 2016-09-05T11:00:50 | 2016-09-05T11:00:50 | 67,412,562 | 2 | 0 | null | 2022-11-22T01:09:31 | 2016-09-05T10:45:18 | JavaScript | UTF-8 | Python | false | false | 4,269 | py | views.py | from django.shortcuts import render
# Create your views here.
from django.shortcuts import render,HttpResponseRedirect,Http404,HttpResponse,render_to_response
from django.contrib.auth.models import User,check_password
from django.contrib.auth import authenticate, login, logout
from django.contrib.auth.decorators impo... |
c6ee1bd66b74a1215cd174227051d7447ff1025d | 70dce5b7c883e4f383542c5836ac53038fd236e4 | /scripts/cs_rescale_bboxes_in_csv.py | 42a2d9117de8e8e87a91ed75d77dcaa466ee21f8 | [
"LicenseRef-scancode-public-domain",
"Unlicense"
] | permissive | cezs/IJCB2017 | 77ae546ee71e0389e4eb05ed73267227d0e49de0 | bdc3f7581a6258443ddf09d64cdd19215a20f5d3 | refs/heads/master | 2021-01-23T06:40:15.870357 | 2017-08-04T16:09:59 | 2018-01-28T14:45:41 | 86,388,994 | 4 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,150 | py | cs_rescale_bboxes_in_csv.py | import os
import csv
factor = 1.0/9.0
face_id = []
filename = []
subject_id= []
x = []
y = []
width = []
height = []
first_row = []
training_input_file = '/media/win/_/IJCB2017/protocol/training_modified.csv'
training_output_file = '/media/win/_/IJCB2017/protocol/training_resized.csv'
with open(training_input_file... |
4c8321fda6d9d69019fe7d6e13be611e826acda9 | 9437418dc50f0ac0af5ea158b8782e5679709221 | /Technical_Test_pro/Pages/page_obj.py | 685f946a70548f0fa7b2685aaf285e4f67cd8e2d | [] | no_license | biswaranjan8/AMTea_auto_test_pro | 1d99839ff1dda2a7908660e4563b62e224056406 | 1ff0f8818316c5b3ec2635c51e1ac06347992114 | refs/heads/main | 2023-06-29T13:22:13.330332 | 2021-08-08T19:19:44 | 2021-08-08T19:19:44 | 393,759,591 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,066 | py | page_obj.py | from Library.read_config_elements import conf_ele_read
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By
class Test_Page:
def __init__(self, driver):
self.driver = driver
self.wait =... |
81884ff28622828934b46bee2638798eb6df101e | 538aa761743bebb473da8d9600c124f4e73f44f3 | /learnpython/learnpython/shipin/1/lambda.py | d3c6509eba35caa80048990cfaf4104649ca4bca | [] | no_license | Dyryamo/all | 302bb92e63da60494daf616f43c8cd76fa417fdc | c28bfe8bc1c6489db08f9ae093c8bf35b32c17ce | refs/heads/master | 2021-09-08T07:05:04.002994 | 2018-03-08T05:07:03 | 2018-03-08T05:07:03 | 105,863,446 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 26 | py | lambda.py | a=lambda x,y:100
print(a)
|
bfdf6e41acfc081b563aa86f299feb4d8b82c40f | 634afdc9abd5d212e5a203578d1046704a829107 | /EvoAgent.py | f867f95422fa21a19d812afcbb3d0ead28954f82 | [] | no_license | declanoller/MRL_NAS | db4470b1244fee88a85ba8693a8ca2a92ad66abe | 98e4c381ff2a999d2559b6e40bdf65288ef17d82 | refs/heads/master | 2020-05-30T03:54:19.660047 | 2019-05-31T03:56:37 | 2019-05-31T03:56:37 | 189,524,390 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,358 | py | EvoAgent.py | import numpy as np
from copy import deepcopy
from HyperEPANN import HyperEPANN
import FileSystemTools as fst
import matplotlib.pyplot as plt
import torch
'''
Last time, I had the EPANN class create an Agent object, but that doesn't really
make much sense -- the agent is really using the EPANN, not the other way aroun... |
db98759a3fbfc3d345965f0b249d7646d8640d53 | 99201745217c81dbb9c16366aa671939ac4468cc | /gpu.py | defa7eb1f219ab590ac108aa7a33d84cb2ae70ad | [] | no_license | martinpanacek789/NPFL114_DeepLearning | d95fdbe482cc0a08bfe252b817e41d981f5fa9d5 | 7c97cb7bc7080efabd416dca496b11a747d60abb | refs/heads/main | 2023-08-06T20:44:27.971954 | 2021-10-06T21:36:07 | 2021-10-06T21:36:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 255 | py | gpu.py | #!/usr/bin/env python
import tensorflow as tf
assert tf.test.is_gpu_available()
assert tf.test.is_built_with_cuda()
print("It would appear that you can use GPU!")
print("Num GPUs Available: ", len(tf.config.experimental.list_physical_devices('GPU')))
|
76e69c42fbd82d98e5a1c071274d8c70abc45e62 | 166d436efc91d690f3a3bd1325b671f82432cca0 | /PlacementPractice/7.py | cef01c9984c08668b8dbbb37eee64d592f10a48c | [] | no_license | viharika-22/Python-Practice | c549592f040bd5f48001d1a49268f26f29a49351 | cff224e3f22ab1da80525382be2d900b6ec08e67 | refs/heads/master | 2022-12-03T23:51:38.389721 | 2020-08-30T17:14:02 | 2020-08-30T17:14:02 | 291,297,759 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 100 | py | 7.py | di = dict()
li = list()
li.append(input())
for key in li:
di[key]= int(input())
print(di)
|
88e8640bdedbb39163dfb90fd096a839ff3da834 | e0adfbed3274f3e80c3d6b7503747836bdb8bbb2 | /art/tests/rhevmtests/compute/virt/smbios_customize/helper.py | 02edb99e15d5589c2b45f52b659a7c77cff2ef5b | [] | no_license | AlertBear/ovirt-manager-auto | f65330384ce6e9d1bdb8bd02ae8849abd8092508 | 333521cfb1ac6cbcf2fedd604288ff7ffcb11d45 | refs/heads/master | 2021-01-24T11:04:50.815178 | 2018-02-21T14:37:34 | 2018-02-22T11:17:38 | 123,068,739 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,264 | py | helper.py | def verify_uuid(uuid, uuid_via_cmd, uuid_via_resource):
"""
Verify proper UUID was assigned to a VM.
Args:
uuid (str): uuid assigned to VM by user, if such exists (can be none if
uuid supposed to be generated by Engine.)
uuid_via_cmd (str): UUID obtained by executing "dm... |
4d67a1c02cf0111027c52211c956ff76dab50ba3 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03030/s740140319.py | 205439c28d43d2d6f8bb7438aad946b1d4a52371 | [] | 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 | 287 | py | s740140319.py | n = int(input())
restaurants = []
for i in range(n):
s, p = input().split()
restaurants.append((s, int(p)))
sorted_list = sorted(restaurants, key=lambda x:x[1], reverse=True)
sorted_list.sort(key=lambda x:x[0])
for i in range(n):
print(restaurants.index(sorted_list[i]) + 1) |
8a3b137b37d8070296d45eace5323d52468e4110 | a0a8ebec1ea6f36b5f7af1ba8ce28752b26c2c5b | /src/flaskr/app/__init__.py | 1ab54bbbf65d675f395e80226ed74a1a87233d3e | [] | no_license | IntersysConsulting/mdc_team_b_back | 3fd1a6fad1449ec2999b80587b6d95fe5e789b52 | 0bee8868c95f348b5efd4ea74ecd7d62c8849435 | refs/heads/master | 2020-07-01T09:31:14.284788 | 2019-10-28T21:38:07 | 2019-10-28T21:38:07 | 201,127,916 | 0 | 0 | null | 2021-08-12T16:58:58 | 2019-08-07T21:04:52 | Python | UTF-8 | Python | false | false | 505 | py | __init__.py | from flask import Flask
from .modules.db import Database
from .modules.api import api, v1_blueprint
db = Database()
def create_app(config_type='dev'):
from config import config
app = Flask(__name__)
app.config.from_object(config[config_type])
# api.init_app(app)
app.register_blueprint... |
ba47c27f6050a92eb8ee273604f53fbd2a383afb | 3cb567f0edca83a24b6d3c2bf5541f59b4fff43a | /SacarElCoche2/Main.py | 82663b1cae0eac04c03b9653e13cd65698dfb10b | [] | no_license | Jsanzo97/PracticasPDP | 024ba4f26fa36b4233ef1e09bfdd4b88ff8804a7 | 8039e003e342efe144ad498a8d84e4d4c29b9ea2 | refs/heads/master | 2020-03-28T12:51:42.852781 | 2018-09-13T10:01:11 | 2018-09-13T10:01:11 | 148,341,430 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 40,477 | py | Main.py | #!/usr/bin/env python
import pygtk
from sys import argv
pygtk.require('2.0')
import gtk
import os.path
#Ventana de inicio donde se elegira el nivel a jugar entre el 1 y el 12
class VentanaMenu:
nivel=0
def __init__(self,nivel):
self.nivel=nivel
#Si se reinicia ... |
698a9333bb7aaa5ce2bb91cdef88ffc5e4bf3ea6 | 641efa22d9b4497ad1641270c45922d213e00071 | /function_N_factorial_and_combination.py | 499aa84c23000d1c6f130132d88e5adf9c1e5dc9 | [] | no_license | killuazzm/py_learn | 405a3cd53d9bed1c7f767e00904ac8af7fff21ae | 01dbf39ab67de7e8220b3d6e7590bd3fc71378f6 | refs/heads/master | 2023-07-09T23:49:52.600790 | 2021-07-29T07:41:41 | 2021-07-29T07:41:41 | 370,686,133 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 318 | py | function_N_factorial_and_combination.py | # -*- coding:utf-8 -*-
def fac(num):
ans = 1
for i in range(1,num+1):
ans *= i
return ans
def comp(n,m):
fm = fac(n) * fac(m-n)
return fac(m)/fm
cm = int(input('m = '))
cn = int(input('n = '))
print(comp(cn,cm))
# python的math模块中包含factorial函数,其实现了阶乘运算 |
80a0e5c5fb58506e8fed94750acad95f0f64c788 | 103b17217a42420ab4590d9c8921f91185a26c26 | /controllers/default.py | 49c609f04eb49dead63b901d23b442c3c2259505 | [
"LicenseRef-scancode-public-domain"
] | permissive | rufio/travel | 3291c32035e0ccb28e4688933a788c849811b5d5 | a054c160433d2ffbe5fe0249ce08682f1f795c20 | refs/heads/master | 2021-01-17T09:53:39.544276 | 2016-07-07T00:48:10 | 2016-07-07T00:48:10 | 57,936,462 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 11,278 | py | default.py | # -*- coding: utf-8 -*-
# this file is released under public domain and you can use without limitations
# -------------------------------------------------------------------------
# This is a sample controller
# - index is the default action of any application
# - user is required for authentication and authorization
... |
f81cfadf04322286c0a4eefd0078dbc4058397f3 | b54ba6923597138d744c890c21f09ceb768ea0ac | /Python 7 to 8PM/FIleHandling/Demo7.py | 4476138ef02dd634824fc6932c9fc88e76f2d317 | [] | no_license | ashokreddy7013/python | ad3893e598a827bf520a97ed63e7441ce5ebea62 | e9032166ad32001e5fc89903b62d419d6d68b6d0 | refs/heads/master | 2020-05-01T08:54:19.106039 | 2019-03-24T08:19:18 | 2019-03-24T08:19:18 | 171,410,344 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 169 | py | Demo7.py | try:
file = open("sample.txt")
for x in file:
#print(x)
print(x,end=" ")
file.close()
except FileNotFoundError:
print("File not Found")
|
291b6ffd18ec4378be60deb2db1b5da850ee7feb | 5aaf40c75f2ccea72c97e0bf1e25c9d9af219a6e | /day1.py | a2bc38563dab9bde044f75dba7de02d2fc010d7a | [] | no_license | Topperz/Advent-of-Code | 987772ad8d6e0fbe349432fde85074d62fe2db0a | 8e7b5b43e4ba82095f8a87b66081bc617ebc2153 | refs/heads/master | 2016-08-12T10:46:11.561659 | 2015-12-15T12:51:42 | 2015-12-15T12:51:42 | 48,042,361 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,162 | py | day1.py | text = "((((()(()(((((((()))(((()((((()())(())()(((()((((((()((()(()(((()(()((())))()((()()())))))))))()((((((())((()))(((((()(((((((((()()))((()(())()((())((()(()))((()))()))()(((((()(((()()))()())((()((((())()())()((((())()(()(()(((()(())(()(())(((((((())()()(((())(()(()(()(())))(()((((())((()))(((()(()()(((((()()(()... |
15151ca837875599aeb0a8a08f394ed7b3bc11f3 | f514c33dfe9dd67908bf724367fff850b117c487 | /api/library/schema.py | fe7cd24839b2b9e7c5a11ebcae6ae39cfff31485 | [] | no_license | Rishub21/modern_health_project | 918b83898c55a0d88ca2fb1832d9805c4203854a | 495c6248408b8043500cba9394a6bbb9702e6a77 | refs/heads/master | 2023-01-11T14:10:26.241150 | 2020-01-15T06:17:19 | 2020-01-15T06:17:19 | 233,990,511 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,245 | py | schema.py | import graphene
from graphene_django.types import DjangoObjectType, ObjectType
from library.models import Program, Section
# make the graphl schema directly from the database model
class SectionType(DjangoObjectType):
class Meta:
model = Section
class ProgramType(DjangoObjectType):
class Meta:
... |
770bc7e507b04c1a60fbe71912dba8350336ad9b | 31b678ca74fa31510ca8b028b51563157b05588a | /decryption.py | 701c270186eb988790f6c2b994b1da98bb267c67 | [] | no_license | karunamgoyal/iot-security | cff3868b5a2c5422aff2968d286793fab875e9cd | 7d5a4d8cf5267a4d67f128108c196c00ba0332fe | refs/heads/master | 2023-03-21T21:53:46.177495 | 2021-02-13T16:05:12 | 2021-02-13T16:05:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 512 | py | decryption.py | import numpy as np
from sklearn.linear_model import orthogonal_mp
from utils import Utility
class Decryption_CS:
def decrypt(seed, sensor_priv_num, org_data_len, n_nonzero_coefs, enc_data):
enc_data /= Utility.generate_secret_value(seed, sensor_priv_num)
enc_data_size = np.size(enc_data)
... |
bbe17a59d0dfc5646de60ba8b5036c83c3338e1d | da67cd71a4e7e88b33586ccf9a1f37d90b28b2bb | /models/interactive/views.py | ca7d1f588046455365cebce94060e0777b09be21 | [] | no_license | IldikoMagda/ildiko-web | 9278fa262764c7b1bdd0e6291d5fbb95216c86f4 | 2e62a9172382b38b1888cae2a4b3a658b464bfd0 | refs/heads/master | 2023-02-21T23:15:21.441879 | 2022-08-23T09:03:52 | 2022-08-23T09:03:52 | 205,897,369 | 0 | 0 | null | 2023-02-16T06:27:09 | 2019-09-02T16:37:15 | HTML | UTF-8 | Python | false | false | 249 | py | views.py | from flask import Blueprint, render_template
__author__ = 'Ildiko'
interactive_blueprint = Blueprint('interactive', __name__)
@interactive_blueprint.route('/', methods=['GET'])
def index():
return render_template('interactive/index.html') |
d9455664e107e7bbff5886348936028cc3d1bf9c | d193a2472c232306149d69c04ebfaba910c31077 | /PythonZTM/100 Python exercises/12. Day03-even-digits.py | fc2219caabfc63332603251836bccfd70e258235 | [] | no_license | eloghin/Python-courses | d244a3f3bfcaef9d924dc1049ffd94de2d30e01e | 3f2ad34136623c2abce01e4a88b09b8869d26163 | refs/heads/main | 2023-03-28T14:28:34.869866 | 2021-03-29T06:42:18 | 2021-03-29T06:42:18 | 310,083,984 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,360 | py | 12. Day03-even-digits.py | """ Write a program, which will find all such numbers between 1000 and 3000 (both included)
such that each digit of the number is an even number.The numbers obtained should be printed in a
comma-separated sequence on a single line.
"""
# ***********
# ** SOL 1 **
# ***********
def check_even(digit):
if digit%2... |
37a4c0884a8dccc881d4a8a2591d30cbec2dffc0 | 11812a0cc7b818292e601ecdd4aa4c4e03d131c5 | /100days_of_python/day4/test_2_pay_bill.py | 745d0fb390a6b6b4e4087dec7984c8f35953e797 | [] | no_license | SunshineFaxixi/Python_Learning | f1e55adcfa898489cc9146ccfb220f0b48a31a22 | ab3ca44d013311b6de02124091acc4c36a83c4d9 | refs/heads/master | 2021-08-16T05:47:29.963118 | 2021-01-04T13:48:30 | 2021-01-04T13:48:30 | 238,857,341 | 1 | 0 | null | 2020-03-03T13:53:08 | 2020-02-07T06:21:46 | HTML | UTF-8 | Python | false | false | 310 | py | test_2_pay_bill.py | import random
names_str = input("please entry the names with comma: \n")
names_list = names_str.split(", ")
# print(names_list)
# index = random.randint(0, len(names_list) - 1)
# print(f"{names_list[index]} will pay the bill")
random_name = random.choice(names_list)
print(f"{random_name} will pay the bill") |
210e66aa3cf54bee3fa83fe8f40e1e8256c454dd | 7828df8195a7a4812e83b65bfb97b0b3dc7db15d | /eth2deposit/utils/constants.py | 4a991d61eb869d7a0ac81b01da5123818666ce9c | [
"CC0-1.0"
] | permissive | hwwhww/eth2.0-deposit-cli | 00b479bbf309d00a8c8782681ef308ee1b060a3a | 37fb6de2256c14120014de51c3a31ad9ec9ce4ae | refs/heads/master | 2022-12-27T03:24:54.402361 | 2020-05-08T20:11:02 | 2020-05-08T20:11:02 | 262,419,087 | 2 | 0 | CC0-1.0 | 2020-05-08T20:11:44 | 2020-05-08T20:11:43 | null | UTF-8 | Python | false | false | 331 | py | constants.py | import os
DOMAIN_DEPOSIT = bytes.fromhex('03000000')
GENESIS_FORK_VERSION = bytes.fromhex('00000000')
MIN_DEPOSIT_AMOUNT = 2 ** 0 * 10 ** 9
MAX_DEPOSIT_AMOUNT = 2 ** 5 * 10 ** 9
WORD_LISTS_PATH = os.path.join('eth2deposit', 'key_handling', 'key_derivation', 'word_lists')
DEFAULT_VALIDATOR_KEYS_FOLDER_NAME = 'valid... |
14749ecc06dc2602110f0d4bc518b8dffed1cf2b | 4861ac41b86a35b8f0f30385fa5442aa5f6f566f | /src/readdxf.py | 37018caf1013eabb3754c1c20d6ba446dc15221d | [] | no_license | darkworks/nctools | 7aafc541be0a3704c1b83a41cc1c28897597a43f | c8fba73af48ef0b5752de1f2391282b00a354b4b | refs/heads/master | 2021-04-09T15:42:32.360162 | 2016-02-19T10:42:02 | 2016-02-19T10:42:02 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,504 | py | readdxf.py | # readdxf - main program
# vim:fileencoding=utf-8
"""Reads DXF files and prints the entities in human-readable form."""
__version__ = '1.12-beta'
_lic = """readdxf {}
Copyright © 2011-2015 R.F. Smith <rsmith@xs4all.nl>. All rights reserved.
Redistribution and use in source and binary forms, with or without
modifica... |
0566d1a62596f1b800059e6a0657f3fd5f79d2d6 | 68861f1a8fa54efe296ed83b89a28ce7a24d72d8 | /src/tasks/standards.py | 962891090f02cddf7356b2bf680c040fe6261e29 | [
"Apache-2.0"
] | permissive | navnorth/LR-Data | 6acab4933a29474f71f9d539dff6c3c054280d5c | 6a4a3dae57e05fec1dd32bd43cff6b1bd8c2839d | refs/heads/master | 2021-01-15T15:04:38.610479 | 2018-04-24T16:40:57 | 2018-04-24T16:40:57 | 16,806,054 | 1 | 3 | null | 2016-06-27T13:01:55 | 2014-02-13T14:55:18 | Python | UTF-8 | Python | false | false | 2,957 | py | standards.py | from celery.task import task
from celery.log import get_default_logger
log = get_default_logger()
from couchdb import Database
from redis import StrictRedis
from threading import Thread, active_count
from time import sleep
keys_to_remove = [unicode(x) for x in ['leaf', 'dcterms_language', "text",
'dct... |
29f3615b91ed366fbf7b50f092d01c59fa063f41 | 73b5d880fa06943c20ff0a9aee9d0c1d1eeebe10 | /tinyos-2.x-contrib/wsu/tools/simx/simx/python/simx/sensor/.svn/text-base/util.py.svn-base | a469d145733fc60968189f1486c0d888a358a179 | [] | no_license | x3ro/tinyos-legacy | 101d19f9e639f5a9d59d3edd4ed04b1f53221e63 | cdc0e7ba1cac505fcace33b974b2e0aca1ccc56a | refs/heads/master | 2021-01-16T19:20:21.744228 | 2015-06-30T20:23:05 | 2015-06-30T20:23:05 | 38,358,728 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,803 | util.py.svn-base | """
Nifty utility functions for dealing with different sensor sources.
"""
import types
from warnings import warn
def multi_config(motes, source, streamer, **extra):
"""
Return a dictionary of callbacks for mote sensor configuration.
The dictionary can be used to feed mote sensor configuration with
... | |
dc8dc537e6ea91b43ab70ae0807b454d8db92750 | 2dcd4c175c5b43e95f122842881d36f610178f2e | /aula07-exercicios/comFor.py | 476446675f7a6e6e61dd1d0586964075ff1353a1 | [] | no_license | GarconeAna/aulasBlue | 7c84349484e131f459d2e90969856c86b2c196b8 | aa2437e37acea39327eb93c2d501c61c1372a20d | refs/heads/main | 2023-06-01T08:59:54.852046 | 2021-07-02T18:33:20 | 2021-07-02T18:33:20 | 376,984,113 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,405 | py | comFor.py | # # Execute as atividades abaixo, utilizando a estrutura de repetição FOR:
# ####01 - Faça um programa que leia o peso de cinco pessoas. No final, mostre qual foi
# # o maior e o menor peso lidos.
maior = 0
menor = 10000
for p in range(5) :
peso = float(input('Qual peso? '))
if peso > maior :
maior = ... |
19c3e76cc8560fe5e4d9dd8d134d92a0e9a05da8 | 076f432ccaad3d2e20a597dd2171e87428967d16 | /apps/subject/signals.py | 3d012c8eca6dc2a9737ca33272e7a6c8634e5b83 | [
"MIT"
] | permissive | victory-jooyon/otlplus | 5e4150d95682d9b600e571b83dc24b941ee6ed81 | 88bf72972e5d63e29355a9e60f7a5fec247b5890 | refs/heads/feature/logging-past | 2022-11-06T14:13:08.287153 | 2020-06-23T17:20:02 | 2020-06-23T17:20:02 | 269,069,102 | 1 | 0 | MIT | 2020-06-20T04:34:44 | 2020-06-03T11:24:21 | Python | UTF-8 | Python | false | false | 1,199 | py | signals.py | # -*- coding: utf-8 -*-
from apps.subject.models import Lecture, Course
from django.db.models.signals import m2m_changed, post_save
from django.dispatch import receiver
@receiver(m2m_changed, sender=Lecture.professor.through)
def lecture_professor_changed(**kwargs):
if kwargs['action'] == 'post_add' or \
... |
b8a2618db148a8490e89b4143c4846454d4a1244 | 10c3edfb22d1484bd17769617ee82c342d945ca6 | /Mock Vita 2 2019/MockVita 2 2019/paper_generation.py | 68534cc8dda88fc6f6f87472e22e3a806593b5cb | [] | no_license | Riteshkpandey/TCS-Codevita | f612d4b3042bed057e01474262cbc3635983ffab | c13fa2bccd608283108b3b6759a491be99d17600 | refs/heads/master | 2020-08-30T22:06:21.532513 | 2019-10-30T10:38:34 | 2019-10-30T10:38:34 | 218,502,275 | 0 | 0 | null | 2019-10-30T10:33:19 | 2019-10-30T10:33:19 | null | UTF-8 | Python | false | false | 1,891 | py | paper_generation.py | def nCr(n,r):
if n<r:
return False
if r==0 or n==0:
return 1
if r==1:
return n
step = min(r,n-r)
mul=1
for i in range(step,0,-1):
mul *=n/i
n-=1
return round(mul)
import sys
#this is the paper generation program
#taking input from user... |
15df332f0d3cd84a3a27f6b97b2b85daf5799421 | 730884554fc2bb06a697ad87f71a9c2ab3333316 | /app/main.py | 696748eebd8ab458a24d9a7028a27c30acbbf4d9 | [] | no_license | altescy/elk-logging | e3c2583802029abab686701086641715707245e0 | 26de7b2e7519afc1d3f0cb97088f041ae07daf0e | refs/heads/master | 2020-04-27T09:06:35.017016 | 2019-03-06T18:46:03 | 2019-03-06T19:02:51 | 174,201,019 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 688 | py | main.py | import logging
import os
import random
from flask import Flask, jsonify
LOGPATH = os.environ.get('LOGPATH', '/tmp/app.log')
logging.basicConfig(filename=LOGPATH,
filemode='a',
format='%(asctime)s %(levelname)s-%(message)s',
datefmt='%Y-%m-%d %H:%M:%S')
app =... |
14d619d9d9d3b65e58bbe9244e593d3f4e524029 | 5cfcde1e889bb47d3d79418d221c4e748c20901f | /MovieRecommender1M.py | 81039dd62d106c1a46bd2d34c83dacc83cca460a | [] | no_license | Pranithakeerthi/MovieRecommenderSystem | 3a7010d9b86919962272c16af0c8d61e4889f63c | c03d1d06d920f123a935d668f1e2b948053848c2 | refs/heads/master | 2020-04-10T20:59:13.886509 | 2018-12-11T13:51:44 | 2018-12-11T13:51:44 | 161,284,448 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,967 | py | MovieRecommender1M.py | #this file is executed locally
import sys
from pyspark import SparkConf, SparkContext
from math import sqrt
def loadMovieNames():
#this function will create an rdd which contains a dictionary of (movieID, movieName)
# this will be used as a look up table later when we get the movie id's
mov... |
b277f1eeea91b18a2c08999af06b54741faa3a11 | 06805c67ce2dac0c2cc015410480ac2a026c9f31 | /factorial.py | 093737c31cd0c89bc803f2e0458ca27f96186297 | [] | no_license | nishantmarkad/Python-Programming | 862aef5c27f7cd84e22ae488fefbab6a1188b004 | e622ddef7783440b7039184793a83cbbab82e147 | refs/heads/master | 2020-03-31T12:32:31.836228 | 2018-12-20T09:42:05 | 2018-12-20T09:42:05 | 152,219,857 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 382 | py | factorial.py | #FACTORIAL OF A NUMBER.
#NISHANT MARKAD
#DIV-M,ROLL NO-39
print("Factorial(!)")
print("Enter a number")
x=int(input()) #user input
product=1 #initialize
if x==0:
product=1
if x==1:
product=1
while x>1: #while loop
product=product*x
x=x-1 ... |
fb35e3f1ed8e849bc044978512fbac2a212155e9 | 0490f448c68ff270379dbd3759087009f7ab0404 | /Mod_1/aulas/aula4/aula04_codelab_desafios.py | 22e7691c7eb0f2564483a41fa59e585cf9cfe960 | [] | no_license | MirianAmorim/T3C5 | 869f4f8c464402fdc3feafcf0ad67071e26e6f24 | 483134abdef33b8857941091b330b0197104c144 | refs/heads/main | 2023-06-24T13:49:35.681549 | 2021-07-26T22:50:01 | 2021-07-26T22:50:01 | 375,507,875 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,980 | py | aula04_codelab_desafios.py | # -*- coding: utf-8 -*-
"""Cópia de Aula_04_Codelab - Desafios.ipynb
Automatically generated by Colaboratory.
Original file is located at
https://colab.research.google.com/drive/1If9K_4k-nrZPkyb1kJAz6caCfyP9vhH0
## **DESAFIO 01**
**Reajuste salarial**
As empresas @.com resolveram dar um aumento de salário aos ... |
e2e73af74642d97e44575ed51abc69580a6c0761 | 5a6555a37ea574a6a02eb4a612171fec86724edf | /Tornado/websocket/day01/chat.py | d5bf14671a06c88e4a0f0e046cff5a10823e487c | [] | no_license | heiyouyou/Python | 9b014b3d3619824eb739c7d87fa5304fa2cf1546 | 74b0b0d1e4d678b74ada61b03a026b64f2a084d9 | refs/heads/master | 2021-05-06T13:48:22.616248 | 2018-10-24T10:33:19 | 2018-10-24T10:33:19 | 113,288,102 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,121 | py | chat.py | # -*- coding: utf-8 -*-
import tornado.ioloop
import tornado.web
import sockjs.tornado
class IndexHandler(tornado.web.RequestHandler):
def get(self):
self.render('index.html')
class ChatConnection(sockjs.tornado.SockJSConnection):
participants = set()
def on_open(self, info):
self.broadcast(self.particip... |
b8dcdbf9fedecf9c9b24cbc59e4bfa52fa85fd26 | 00372fa4b6def85495980812fb1a277f221f4f2c | /src/DbManager.py | 26d94f554316b8c1a05abecbe7f4cad97a3e400d | [
"MIT"
] | permissive | ZzzGin/WeChatDiscover | ebfd5b24768f09d711765a4541385366049874d1 | cf06807d504e80a0e91df57f080f59f64b583270 | refs/heads/master | 2022-12-01T10:07:35.397579 | 2019-06-27T16:04:27 | 2019-06-27T16:04:27 | 190,922,627 | 1 | 1 | MIT | 2022-11-22T03:53:58 | 2019-06-08T18:37:30 | Python | UTF-8 | Python | false | false | 4,031 | py | DbManager.py | from hashlib import md5
import sqlite3
import datetime
import collections
import string
from Errors import UserNameQueryError
class DbManager:
def __init__(self, documentRoot, accountMD5, isChatRoom=False):
self.__documentRoot = documentRoot
self.__accountMD5 = accountMD5
self.__isChatRoom ... |
f92a5d3675ec1ac2ee5427a74dae345c51f704c7 | a14b27620cbb9f398ff8d5eb76a9bb57f429b9ca | /q2.py | 8411fc6a4a8305ea48d37588d65c752a55cee422 | [] | no_license | nairaaoliveira/TESI | 0f7d8396dbcec446a8ab4eea903f33680931283d | 6ada42e6a38725547ed12487a6b605bbc46963f1 | refs/heads/master | 2021-09-08T18:56:02.690739 | 2018-03-11T19:18:55 | 2018-03-11T19:18:55 | 124,787,413 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 826 | py | q2.py | import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
sns.set()
dt = pd.read_csv('forestfires.csv')
dt.head()
#TIPOS DAS COLUNAS
print("\nVARIAVEL - TIPO\n", dt.dtypes)
#CAMPOS NULOS
print("\nNulos\n ", dt.isnull().sum())
#print("\nNulos\n ", dt.isnull().any())
#NOVA COLUNA... |
f5dfee75198a8f10fa0de755fa892444762f2d8c | bae0561f13e3464e7ec04716c19efc43bef02ce1 | /odata/serializers.py | 87855570e41d240efea1ebf14728ffd52495bae4 | [
"MIT"
] | permissive | mujtaba556786/mujtaba556786 | facd286d0816599a7b982cfc4c48519b1e3cb5bd | 9e11119d235caffdd6e53c6b99085b62a08b99a9 | refs/heads/master | 2023-03-26T15:31:34.474841 | 2021-03-14T13:45:49 | 2021-03-14T13:45:49 | 347,506,194 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,914 | py | serializers.py | from django.contrib.auth.models import User
from rest_framework import serializers
from odata.models import Product, Customer, Category, Shipper, Order, OrderDetail
class ProductSerializers(serializers.ModelSerializer):
class Meta:
model = Product
fields = '__all__'
class CustomerSerialize... |
8b9b6bd94fb498692e443144fa311ff25a17e4c7 | dab822049c442364ace00bf3437035eaae0ea2e9 | /compatibility.py | 05d9a753fbb6b37a06b9709aeb87ebf0ed17bf50 | [] | no_license | spencertipping/blendscript | 1255d9817c9d78ca5460b546d627040c6859d771 | 137c48ac84035fb963e677805d982af2d0329849 | refs/heads/master | 2023-01-11T15:33:37.117447 | 2020-11-06T18:45:17 | 2020-11-06T18:45:20 | 306,898,900 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 260 | py | compatibility.py | """
A function to complain if we don't have stuff.
"""
import sys
already_printed = False
def blender_not_found():
global already_printed
if not already_printed:
print('warning: Blender APIs not available', file=sys.stderr)
already_printed = True
|
8dca70e632af14aa969b3bf5d9b789280b32778d | 8634b4f7f2293bf431ba8ed59e95f80abc59483f | /Homework/6/6_6.py | 8cb7ebb7303aa03f8ef9607ebde867004316dbbf | [] | no_license | TitanVA/Metiz | e1e2dca42118f660356254c39c7fadc47f772719 | e54f10b98226e102a5bb1eeda7f1e1eb30587c32 | refs/heads/master | 2020-12-22T11:44:58.746055 | 2020-02-10T14:41:16 | 2020-02-10T14:41:16 | 236,770,476 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 527 | py | 6_6.py | favorite_languages = {
'jen': 'python',
'sarah': 'c',
'edward': 'ruby',
'phil': 'python',
}
favorite_languages['alex'] = 'c++'
favorite_languages['taller'] = 'java'
new_users = {
'oksana': 'c#',
'viktor': 'python',
'sarah': 'c'
}
for name, lang in favorite_languages.items():
print... |
f9e9c37c6e65dc6d4ca071525ec0ce76809f1333 | a7de5645537980ea6267f96d5e4b978bf5e9ab3e | /pismo.py | 09124803d6b8a5cd47db7b485ebab1972ea2234f | [] | no_license | t3d/pismo | f30c9ceb018e76358452d79826371cb2981a1daf | 1f24e5b5e845a1c3de9234de85d34804f6f968f9 | HEAD | 2016-09-06T07:35:13.378301 | 2014-10-26T11:08:51 | 2014-10-26T11:08:51 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,602 | py | pismo.py | #!/usr/bin/python
# coding=utf-8
__license__ = 'GPL 3'
__copyright__ = '2012-2014, Tomasz Długosz <tomek3d@gmail.com>'
import urllib2
from lxml import html
import unicodedata
import re
masterURL='http://biblia.deon.pl/'
def getPage(url):
fetcher = urllib2.build_opener()
fetcher.addheaders = [('User-agent', ... |
a6c525f560927a21d61bb6efb2424b7104e6af24 | d08cf46d3e16ab8e6a958731168469ba38daf069 | /tests/test_tensorproductspace.py | 8c061030684ffb32ae00971d5835ff67936769ac | [
"BSD-2-Clause"
] | permissive | spectralDNS/shenfun | ce808edc5258c896f2cccfbd88e67153e3f621c9 | bcda39d8d8e4741df1cafe719d81733cc1024def | refs/heads/master | 2023-07-27T20:29:57.075970 | 2023-07-11T12:33:04 | 2023-07-11T12:33:04 | 79,914,066 | 190 | 46 | BSD-2-Clause | 2022-05-11T19:10:33 | 2017-01-24T13:29:02 | Python | UTF-8 | Python | false | false | 22,163 | py | test_tensorproductspace.py | from __future__ import print_function
from time import time
import functools
from itertools import product
import pytest
import numpy as np
from mpi4py import MPI
from sympy import symbols, cos, sin, lambdify, exp
from shenfun.config import config
from shenfun.fourier import bases as fbases
from shenfun.chebyshev impor... |
0c64034a210e830d418391d66d9cf83dae6a8ccc | 250538d7e39c4757e90afa2aae91e5141ac4c1bf | /tensorFlow/util/ErrorUtil.py | b47d7f08353fc03cd960167f90611a39deb231d2 | [] | no_license | SakaiMasato/pythonTest | e9c518d43cf19b2cf5003475830b3f5d3d7b7518 | a653f1f2870a37212457f5cdf8188be097ed78da | refs/heads/master | 2020-05-30T04:39:02.024203 | 2020-01-09T10:17:00 | 2020-01-09T10:17:00 | 189,543,125 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 337 | py | ErrorUtil.py | #线性均方差
def mseLinear(b, w, points):
totalErr = 0
for i in range(0, len(points)):
x = points[i, 0] #获得i的x
y = points[i, 1] # 获得i的y
#计算差的平方,累加误差
totalErr += (y - (w * x + b)) ** 2
#求平均,得到均方差
return totalErr / float(len(points)) |
f632f59737e0a36dd485aaaeae20862ceac82ef7 | d55e0bb2d0be41b9435b4fbe9f1385a508b70e19 | /app/blueprints/getAllocationComplete.py | 9fae0dc3e9b5520221265a25c70ac36feb1e04b8 | [] | no_license | SilbernagelR/Verlustberechnung | 3afc0f8661145226f03a470e2e18aa58e692d075 | 258ad57c3a5e6638f5ee2cbddc63b0b23c9be821 | refs/heads/master | 2023-04-19T04:19:35.406204 | 2022-12-12T08:13:54 | 2022-12-12T08:13:54 | 577,231,363 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,037 | py | getAllocationComplete.py | import pandas as pd
from flask import Blueprint, request, jsonify
from app.calculations.allocations import allocate_complete
from app.utils.requests import parse_qc_strategy
bp = Blueprint("allocate_complete", __name__)
@bp.route("/getAllocationComplete", methods=["POST"])
def get_allocation_complete():
"""
... |
d399153643cc6f5e9cc24a09ec9737602aac4000 | afa1205b49d7bb35b52aad43fbcc9413642ef268 | /src/Test/member/views.py | d410a528ce2707d8b1f205ad4c1aa76ebbb496a7 | [] | no_license | liuyouqian/djangoproject | 9afd1cce46b96dafb7b4cf5244f21514ec4601f3 | e4340c3f0d4779d8817c18031e97bc1621fae632 | refs/heads/master | 2021-01-23T14:04:28.607510 | 2011-11-03T17:22:31 | 2011-11-03T17:22:31 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 168 | py | views.py | from django.shortcuts import render_to_response
def index(request):
hello = 'hello world'
return render_to_response('member/member.html', {'hello': hello})
|
30e81a7c6d1e63e45c4efc96e56f55717dc3919f | ab8187626aa68c1f92301db78e9f8b0c4b088554 | /CodingTest/2021kakao/enterprise/3-2.py | 7b1733fede7fd98e05db4f19987552606cd70909 | [] | no_license | khj68/algorithm | 2818f87671019f9f2305ec761fd226e737f12025 | efebe142b9b52e966e0436be3b87fb32b4f7ea32 | refs/heads/master | 2023-04-25T02:33:13.403943 | 2021-05-04T03:09:38 | 2021-05-04T03:09:38 | 287,733,041 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,096 | py | 3-2.py | import time
def segment(x, space):
s = []
n = len(space)
left = [-1] * (n+1)
right = [n] * (n+1)
for i in range(n):
while (len(s) != 0 and space[s[-1]] >= space[i]):
s.pop()
if (len(s) != 0):
left[i] = s[-1]
s.append(i)
# print... |
f9aedc98f8db785d7ac06f8148ba6d7097f73f23 | a354615386e5bc0163fe91af627252b1d0de83ee | /vision.py | e708a340f1f98b03124c491871eb3634283dcd02 | [] | no_license | Anoushka1406/remove_text_from_image | 21cbdb9bdb0b500421de70ba87970fa7209b9185 | 71474082e21c79429bc8c3ab1fd76c00a969f424 | refs/heads/main | 2022-12-24T07:48:00.445603 | 2020-10-01T18:37:31 | 2020-10-01T18:37:31 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,159 | py | vision.py | from google.cloud import vision
import io
import cv2
import numpy as np
client = vision.ImageAnnotatorClient()
path = 'Bath1.png'
with io.open(path, 'rb') as image_file:
content = image_file.read()
image = vision.types.Image(content=content)
response = client.text_detection(image=image)
texts = response.text_ann... |
5bae8f3d4cb87590a39be60a93884386b4da7cd2 | 2a72014cadf6200fed329c46ee942434a6bc50a3 | /Algorithm.Python/CustomWarmUpPeriodIndicatorAlgorithm.py | 96708c41b746859bca0ce021e5d996bf95a1d2f4 | [
"Apache-2.0"
] | permissive | Capnode/Algoloop | 8d7f2c7b3b8dcf36d6495a53a3832caa43a6cfc6 | b33dd3bc140e14b883f39ecf848a793cf7292277 | refs/heads/master | 2023-08-10T09:55:53.600795 | 2023-08-05T17:46:03 | 2023-08-05T17:46:03 | 174,588,998 | 87 | 42 | Apache-2.0 | 2023-06-24T11:50:53 | 2019-03-08T18:31:57 | C# | UTF-8 | Python | false | false | 7,445 | py | CustomWarmUpPeriodIndicatorAlgorithm.py | # QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
# Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation.
#
# 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 Licen... |
6f852105f49dca7ef56b8d171ec63e49e22f204d | a990bd26d3a69d1ea6699c85efa2cea99452c3df | /problems/generateBinary.py | e8c67b86c6301441a7891eb02812b390beb607a9 | [] | no_license | abecus/DS-and-Algorithms | 5f1a948a085465ae165090ec957a9d5307ce729d | 3259e8183382265a27cf8c91e37d0086175a5703 | refs/heads/master | 2022-05-05T07:07:08.194243 | 2022-04-05T16:23:39 | 2022-04-05T16:23:39 | 193,111,610 | 11 | 6 | null | 2020-11-18T16:19:18 | 2019-06-21T14:27:25 | Python | UTF-8 | Python | false | false | 482 | py | generateBinary.py | def generateNumber(n, base=2):
"""
itype: int : number of digits in a number
rtype: none
It generates every possible numbers of a base <= 10
"""
def helper(n, base, prefix=""):
# print(n)
if n==0:
print(prefix)
return
else:
... |
9e084ef32c666cebfe0473262241221bc7f980fb | 2dfdfac073b99c74b8ac6a33a59c9b10fbbe7520 | /mysite/cms_plugins/structural_plugins/column_4.py | 38ee5019658b230d117cd1675ea71fb6f1b4c7dd | [] | no_license | Marti2203/cosmos-website | 51ee8e80c05588a35bd4930f0c180b8ce28b6fb7 | 9f4770201cb2e025c55edf5b4c65c533a7142a70 | refs/heads/master | 2022-11-16T21:52:45.497663 | 2020-07-06T15:51:06 | 2020-07-06T15:51:06 | 277,062,416 | 0 | 0 | null | 2020-07-04T07:35:05 | 2020-07-04T07:35:04 | null | UTF-8 | Python | false | false | 981 | py | column_4.py | from cms.plugin_base import CMSPluginBase
from cms.plugin_pool import plugin_pool
from mysite.models import ColumnPlugin
class Column4Plugin(CMSPluginBase):
"""
Column that is a third of the row it is in.
"""
render_template = './structure/column4.html' # The html this represents
# The name you ... |
f90a4ec062ecacb99ea77e0c331753afeebd7b2d | 7c439b5ff87c2990306643b4eb4f9622b75eb2c1 | /core/AppVars.py | a6d0a2e2831657b43bd09fd7ca1cdd07ca672dda | [
"MIT"
] | permissive | sameerAhmad101/Registrationshop | fc1f24fc52e814b151fbe25f64f94ab5d3c03f5b | 0d6f3ee5324865cdcb419369139f37c39dfe9a1c | refs/heads/master | 2020-03-19T17:12:17.432617 | 2018-02-16T13:34:26 | 2018-02-16T13:34:26 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,912 | py | AppVars.py | """
AppVars
Global variables for RegistrationShop
author: Berend Klein Haneveld 2013
"""
import os
import sys
# Variables are adjusted by RegistrationShop
# This serves as a sort of global environment for
# stuff like application paths.
# This is because application path on OS X gives path
# to Python framework ins... |
f40a3e83c7a8a29bf29d7de2e7c67028d6441708 | 15cf2b66ef596723cf1f2397ce0eb4d93f34fc6b | /answers.py | cce87965f7911156cc48d377299ad38645ef45ad | [] | no_license | infnetdanpro/lesson1 | b89effb6717159fa9cab1b52e5dd9b260166f28f | 0e0e6aa6b355d18a42133b7ba7286d22ef84d863 | refs/heads/master | 2021-09-20T17:04:18.150178 | 2018-08-12T21:04:28 | 2018-08-12T21:04:28 | 111,208,590 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 319 | py | answers.py | def get_answer(question):
answers = {'привет':'И тебе привет!', 'как дела':'Лучше всех', 'пока':'Увидимся'}
return answers.get(question, 'Задайте вопрос еще раз').lower()
question = input('Введите текст: ')
print(get_answer(question)) |
21212d71d9439a9320d01d475b2e7b95c34dc180 | bf7d24f4853d803819cb720183519012ebb4f32b | /src/zope/app/file/tests/__init__.py | f93c8ceb26e38e20d60125d1510514f906f8adfd | [] | no_license | zopefoundation/zope.app.file | 296d487ff4e4ae746c81bfacb383cb2047209b85 | 28571276c0b7f18425196f87a92051663ada72cf | refs/heads/master | 2023-09-01T06:07:13.802807 | 2022-12-20T14:02:31 | 2022-12-20T14:02:31 | 91,089,916 | 0 | 0 | null | 2022-12-20T12:54:05 | 2017-05-12T12:36:01 | Python | UTF-8 | Python | false | false | 490 | py | __init__.py | #
# This file is necessary to make this directory a package.
from zope.app.wsgi.testlayer import http as _http
from zope.app.file.testing import AppFileLayer
def http(query_str, *args, **kwargs):
wsgi_app = AppFileLayer.make_wsgi_app()
# Strip leading \n
query_str = query_str.lstrip()
kwargs.setdefa... |
eac3733c07977eab9ec138e6ac73ffaa4fd9e81c | ed2e09dd2d5be5fbfe7c87b970e9a369323d6259 | /src/brasil/gov/portlets/tests/test_setup.py | f415c235830f2e4f7a7983874c7b9d4cc4be70f9 | [] | no_license | plonegovbr/brasil.gov.portlets | b18456720d38c21bd94951cadbf17ba44614f91d | 1f471d7cdabd704d9d4bcea4591ed33fda064c28 | refs/heads/master | 2021-01-17T15:15:16.384587 | 2018-08-31T18:31:45 | 2018-08-31T18:31:45 | 25,933,129 | 0 | 4 | null | 2018-08-01T15:01:47 | 2014-10-29T17:37:48 | Python | UTF-8 | Python | false | false | 1,635 | py | test_setup.py | # -*- coding: utf-8 -*-
from brasil.gov.portlets.config import PROJECTNAME
from brasil.gov.portlets.interfaces import IBrowserLayer
from brasil.gov.portlets.testing import FUNCTIONAL_TESTING
from brasil.gov.portlets.testing import INTEGRATION_TESTING
from plone.browserlayer.utils import registered_layers
import unitte... |
53aff5e8547e54e70a9730d4a2ad7d17d288b922 | 292eb20c2feaf95daced9f922cf0555385196fbe | /usr_local_bin_bustracker/bustracker.py | 581ebfa5e0ac17b6b8479fc12a8219cfe1f651c5 | [] | no_license | falloutphil/bustracker | 8701e1d55651636b67ab7231184612f9ee41526e | 62cdf468cb10af8881f9d209aa2f37c2a0abd941 | refs/heads/master | 2023-02-09T03:58:43.214491 | 2023-01-22T15:37:24 | 2023-01-22T15:37:24 | 99,622,233 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,494 | py | bustracker.py | #!/usr/bin/env python
# python2 - remember!
from Adafruit_8x8 import EightByEight
from time import sleep
from urllib import urlopen
from json import loads
from sys import stderr
from itertools import izip_longest, cycle
font = {
' ':[
[0,0,0],
[0,0,0],
[0,0,0],
[0,0,0],
[0,0,0]
],
'1':[
[0,1,0],
[1,1,0],
[0... |
371a4d8112dcd943036f6f085b703723ed2675a1 | 8c8b7b56ff7425c425f46e6b5d72b1cbb617a0aa | /src/temp/simple-python-language-tests/CPS.py | 80042f30562213b835ab7a9b18c7bd65afda997f | [] | no_license | rumineykova/monitor | 6148d4468f24d1e85febfb35d01b5358f2f6cfa1 | ff283e136b2cd7e2439c8729a0f03ec8a4e8d00b | refs/heads/master | 2021-12-14T01:40:05.029479 | 2021-11-23T14:36:20 | 2021-11-23T14:36:20 | 234,670,007 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,415 | py | CPS.py | import sys
from string import letters
from random import choice, sample, seed
import string
class Test(object):
def __init__(self, f):
self.f = f
def test (s): print s
def sum(x, y, c):
c(x+y, printTest)
def printTest(): print 'Ihuu'
def generate_and_save_random_string(size):
s = ''.join([choice... |
989b5b53a2df9ab9ca7c1476307871eac2d8006b | 20adbde585495c888e137f3b2ca7a1980e44cd42 | /config.py | 287cfcb0f58b0a68e50f25b273c62c43b65be829 | [] | no_license | federicocunico/recycling | 51f8cdb5e979ea700418f00f60e91e38243e565e | 071eab1dd8bce0b189c38c0a009775071f83686e | refs/heads/master | 2023-08-15T07:27:59.538608 | 2021-09-11T21:15:09 | 2021-09-11T21:15:09 | 403,757,484 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 159 | py | config.py | PDF = "http://www.consorziovr2.it/ae00328/images/Documenti/BUSSOLENGO%20ZONA%20A.pdf"
TELEGRAM_SECRET_TOKEN="1982227949:AAFW3l815ChA9Gjm9tEUPnrqGQ0S00iQUaY" |
144543f840f1f40258faa42a0eb58a142ea5e5f5 | 48f73129ffcfc2a257a5841b84036f861fbe6a91 | /1.Fundamentals/1.Programming Model/31.py | 55541c090a0693568b2d523b880c3a6089f1a303 | [] | no_license | Zer0xPoint/Algorithms4_python | 2febceafc1f1da2755e81200a0e0d1cea1e15822 | f256b95e9545964f49f853e724b5df0fdd72c1ac | refs/heads/master | 2020-07-06T10:44:07.345677 | 2019-08-25T05:32:41 | 2019-08-25T05:32:41 | 202,990,803 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 720 | py | 31.py | import math
import random
import matplotlib.pyplot as plt
N = 45
p = 0.5
angle = 360 / N # 计算每个点相隔的角度
point = []
for i in range(N + 1):
point.append([0] * 2) # 新建一个N*2的二位列表 用来保存点x,y轴的坐标
for i in range(N):
point[i][0] = math.cos(2 * math.pi * i / N) / 5.0 # x轴
point[i][1] = math.sin(2 * math.pi * i / ... |
f7805d0e67fbb0e8b4f6382cf77f6eec747b8365 | f8fc98661e73b11495db52d9c49a8696f8bc7de8 | /mainapp/clients/views.py | be8fb3eb6be9581b7422e9153c5d8fd31c2207bd | [] | no_license | 11Salavat/doc_filler | d623a4bf5f1504096bf921be487883ef2b203ad6 | 6c4ad6bcd794cd91cdde8713c826f811f0150baf | refs/heads/master | 2020-06-27T04:37:24.972185 | 2019-07-30T06:45:06 | 2019-07-30T06:45:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,121 | py | views.py | from django.shortcuts import render
from django.http import HttpResponse, HttpResponseRedirect
from .models import *
from doc_filler_app.main_file_filler import *
from .utils import *
from mainapp.settings import *
from .create_test_data import *
from django.core.files.storage import FileSystemStorage
from .forms impor... |
b41edbc09518a59cde54558a7f0f7d302bac4ac2 | 83700e95c8e96475a2ddb150251a9c606dc1b396 | /Ntru Encryption.py | 77cc151a3b20da1661ac509307678c13ec02aad1 | [] | no_license | MichaelNorberto/NTRUPythonImplementation | 995e2da9546242cb163350a709e42bd98e2f9e49 | 8dfa83910c68114619ad033c8f97ec1bd88ee766 | refs/heads/main | 2023-06-23T19:00:39.257852 | 2021-07-28T18:36:29 | 2021-07-28T18:36:29 | 390,463,105 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 960 | py | Ntru Encryption.py | from GoBetweenFile import *
userSelection = input("Would You Like to Generate a Public and Private Key Set, or Encrypt a Message (Generate/Encrypt)? ")
if (userSelection == 'Encrypt' or userSelection == 'encrypt' or userSelection == 'E' or userSelection == "e"):
message = messageConversion()
#M = polynomi... |
1f058717c3b518ecc8a708ecb4b440cd63ff3aed | 98c6ea9c884152e8340605a706efefbea6170be5 | /examples/data/Assignment_2/mngmic011/question3.py | cd31397879de5bbde0817484d44d02fbff7f2eb0 | [] | no_license | MrHamdulay/csc3-capstone | 479d659e1dcd28040e83ebd9e3374d0ccc0c6817 | 6f0fa0fa1555ceb1b0fb33f25e9694e68b6a53d2 | refs/heads/master | 2021-03-12T21:55:57.781339 | 2014-09-22T02:22:22 | 2014-09-22T02:22:22 | 22,372,174 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 315 | py | question3.py | #area of circle
import math
i=math.sqrt(2)
denom=1
pi=2
while denom<2:
denom=i
k=(2/denom)
pi=(pi*k)
i=(math.sqrt(2+(i)))
piround=round(pi,3)
print("Approximation of pi:", piround)
radius=eval(input("Enter the radius:" "\n"))
area=round((pi*(radius*radius)),3)
print("Area:", area)
|
a09ded0144a11609fac74dd3a46f03dfb06bd288 | acc22ae0e4abb5e61abfb13a427c24440253a718 | /player.py | 5e69f62826d1807736feabde8a9f762dcf99b1c2 | [] | no_license | christophejacques/JDR | 3892c6254f785c4e9b3d56c8a85dd438991dffb4 | 324cc0c8bf6bce976f8fe2e963f3871f04df9bd3 | refs/heads/master | 2022-11-14T23:02:58.260468 | 2020-07-15T14:47:47 | 2020-07-15T14:47:47 | 279,166,066 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 27,135 | py | player.py | import traceback
import os, json
from colors import setColor, printXY
from msvcrt import getch;
from random import randint, choice
from listes import *
class FenetreListe:
def __init__(self, titre, taille, liste):
self.ligne_selected = 0
self.selected = False
self.titre = tit... |
08b254fc7c25e73810f0b513600693ad2ce1079f | d27c8580ae3897899f325d22d4c337adb57a92b4 | /myPythonProjects/superlottogame.py | 03610a110d5d61b772574e11f142d8e677579a36 | [] | no_license | johnnymcodes/cs131b_python_programming | a87fa4803670ff9b3f3a9914a4482f4e3f208b9b | a5bfcf8e0629e947084ce23c187fee9bcae22fd0 | refs/heads/master | 2022-12-28T15:47:52.602455 | 2020-08-07T20:57:30 | 2020-08-07T20:57:30 | 285,878,388 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,406 | py | superlottogame.py |
draw = list()
n = 0
while n < 5 :
num = int(input('Enter num :'))
draw.append(num)
n = n + 1
num = int(input('enter mega number'))
draw.append(num)
def supperlotto(draw, balls):
winnings = 0
matches = 0
mega = balls[5] == draw[5]
print(mega)
#[:5] ommiting last ball ... |
5f584a784d57762c79287e0a62db2e78b4117eee | bc4a47b47be4629c69e9e57493d280581428735f | /planetutils/elevation_tile_downloader.py | c6a5b0d328ad1e6ee05b31df74e4ddc01d8ba1cb | [
"MIT"
] | permissive | sindile/planetutils | af1f239f20312ac1e00182fcdafe4455f838f4fa | 6529c56730482143299e46ca41c051fd3f2a4941 | refs/heads/master | 2020-03-21T04:47:40.208032 | 2018-05-22T20:36:49 | 2018-05-22T20:36:49 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,477 | py | elevation_tile_downloader.py | #!/usr/bin/env python
import os
import subprocess
import math
import download
import log
from bbox import validate_bbox
def makedirs(path):
try:
os.makedirs(path)
except OSError, e:
pass
class ElevationTileDownloader(object):
HGT_SIZE = (3601 * 3601 * 2)
def __init__(self, outpat... |
c5ecb6b05fec6a0f1435699fb85ce6b8ac60e041 | 0b6c6a886311712f400242f58a04077a05075c82 | /djBeatTheCurve/main/models.py | fa2d9176ade80fdcc183d6a86d4484e9066856a7 | [
"MIT"
] | permissive | niederha/BeatTheCurve | bfb859ea07ab0fcc2000f167da635a3947560640 | 6fc544e1990251e913d840b1d33b5777abf9882f | refs/heads/master | 2021-05-21T20:56:27.800695 | 2020-04-06T13:46:59 | 2020-04-06T13:46:59 | 252,798,164 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,000 | py | models.py | from django.db import models
from django.contrib.auth.models import User
from django.utils.translation import gettext_lazy as _
# Create your models here.
class Symptom(models.Model):
class SymptomType(models.TextChoices):
NONE = 'NONE', _('None')
TASTE_LOSS = 'TASTE', _('Taste loss')
COL... |
deb30f1708486ce6dc7006a1f4c0097c0fc2fc05 | 784ae830e46bef9f0e6d8de824f175cd89e8837b | /whishlist/migrations/0003_auto_20200915_2118.py | 7bdf7467e5af03771bd7c0ab08ae4509dbd9c95c | [] | no_license | RootenberG/test-social-network | 3f0c25b8b1789ecd2728e7da111613a46c56af23 | 3d7781d102f5cc061b9a1b0820ce0e3380b28d63 | refs/heads/master | 2022-12-17T10:26:04.476884 | 2020-09-18T07:29:19 | 2020-09-18T07:32:28 | 295,661,235 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 504 | py | 0003_auto_20200915_2118.py | # Generated by Django 3.1.1 on 2020-09-15 21:18
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('whishlist', '0002_auto_20200915_1246'),
]
operations = [
migrations.AlterField(
model_name='ite... |
1aeeb9474870abed176e4292c6475aa859062b5b | e3ae821cc209231a266a58e554199b5a0512e775 | /carsus/tests/test_base.py | 541d9dac3361f262703950a656f7d3daa149e63c | [] | no_license | mishinma/carsus | ab6ad3ee924a575ab5f4ce503c592c687528bd72 | 6c245dfd95bf5527cc39a0f52976f98dce0d4063 | refs/heads/master | 2020-04-15T14:30:16.298388 | 2016-05-03T16:42:34 | 2016-05-03T16:42:34 | 53,023,332 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 813 | py | test_base.py | import pytest
from numpy.testing import assert_almost_equal
from carsus.model import Atom
def test_init_db(test_session):
assert test_session.query(Atom).count() == 118
@pytest.mark.parametrize("atomic_number,expected",[
(1, {'atomic_number':1, 'symbol':'H', 'name':'Hydrogen', 'group': 1.0, 'period':1}),
... |
ce22e4d609ff18bb9c448d4e3eb93cc80cf34b11 | 24399342d48b0a211cfa64977fe292fb176b5c19 | /SOUI/source/components/ScriptModule-LUA/ScriptModule-LUA.gyp | f22d9cdef0ab8714a81f8b375d8693e88496e46d | [
"MIT"
] | permissive | danfengzi/soui_gyp | 3a0037171dc1f96ef30463ea73b34d4a9a2794b1 | 94faf00b83373ab16bf2f342002f055e17278887 | refs/heads/master | 2020-04-17T17:43:09.099565 | 2016-08-15T07:56:35 | 2016-08-15T07:56:35 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 520 | gyp | ScriptModule-LUA.gyp |
{
'includes': [
'../../../build/win_precompile.gypi',
'ScriptModule-LUA.gypi',
],
'targets': [
{
'target_name': 'ScriptModule-LUA',
'type': '<(component)',
'includes': [ '../../build/common.gypi', ],
'dependencies': [
'../../utilities/utilities.gyp:*',
'../.... |