blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 2 616 | content_id stringlengths 40 40 | detected_licenses listlengths 0 69 | license_type stringclasses 2
values | repo_name stringlengths 5 118 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringlengths 4 63 | visit_date timestamp[us] | revision_date timestamp[us] | committer_date timestamp[us] | github_id int64 2.91k 686M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 23
values | gha_event_created_at timestamp[us] | gha_created_at timestamp[us] | gha_language stringclasses 213
values | src_encoding stringclasses 30
values | language stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 2 10.3M | extension stringclasses 246
values | content stringlengths 2 10.3M | authors listlengths 1 1 | author_id stringlengths 0 212 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6a9b08d396841136195b73cc21064a5ed3377c65 | 6eee8d0fba684826613f01fbc307219255fd6beb | /Policy_Gradient_Softmax/run_robotFetchReach.py | 3b22395d804e7a86a77a3133d3173e9517ea6404 | [] | no_license | liheng12345/RL | 847a6508d687d0f3b381485dc5a900698a84aeac | 60fbcea8b60e47793d066880c3def13cce5ffdbb | refs/heads/main | 2023-05-01T14:34:53.058256 | 2021-05-20T08:57:20 | 2021-05-20T08:57:20 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,428 | py | import gym
from PGS_model import PolicyGradient
import matplotlib.pyplot as plt
#DISPLAY_REWARD_THRESHOLD = 5000
RENDER = True
env = gym.make('CartPole-v0')
env.seed(1)
env = env.unwrapped
print(env.action_space)
print(env.observation_space)
print(env.observation_space.high)
print(env.observation_space.low)
RL = Po... | [
"noreply@github.com"
] | liheng12345.noreply@github.com |
8c016d6e81d4f8aa2af12226ade161145e7b6f0c | a01d41c134bb92ed9179ff1ff5aa97a722973684 | /AutoTestpass/projects/PrinterControl/po/pages/android/Page_MyFile.py | 6497ee16870239d581f6983e127f4082baf4aeb8 | [] | no_license | Kate-zhongxin/AutoTestpass | 65b152bb193d6a70b7ef44c1d61bd1a72880f469 | d066f6b699c8c1cda49af6c2411cdca5609fef6e | refs/heads/master | 2020-04-10T12:19:27.425239 | 2018-10-27T05:52:55 | 2018-10-27T05:52:55 | 161,018,775 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,177 | py | # coding: utf-8
from projects.PrinterControl.po.models.android.Page_MyFile_model import Page_MyFile_model
'''MyFile page.'''
class Page_MyFile(Page_MyFile_model):
def __init__(self, UI):
self.UI = UI
if 1 > 1:
from fwk.object.AndroidFwk import AndroidFwk
self.UI = AndroidFw... | [
"474308199@qq.com"
] | 474308199@qq.com |
481436780741170de647cc988d139a4b34d2979d | c0264f7a462f3fe4bba4ee110a51f49cfb018ab0 | /homework-5/predict1.py | 08ffe6ce1148eaee411275d57f789cbe3cddab77 | [] | no_license | m-wambua/homework-5 | 467cd2713be23be3577876e3dcd25dcf0bcfae34 | 45f8bb3d733a7e1b2e7821e385910fc28d840291 | refs/heads/main | 2023-08-05T23:15:32.693043 | 2021-10-11T13:56:53 | 2021-10-11T13:56:53 | 415,949,050 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 626 | py |
import pickle
from flask import Flask
from flask import request
from flask import jsonify
model_file= 'model_C=1.0.bin'
with open(model_file,'rb') as f_in:
dv,model=pickle.load(f_in)
app = Flask('churn')
@app.route('/predict1',methods = ['POST'])
def predict():
customer =request.get_json()
... | [
"noreply@github.com"
] | m-wambua.noreply@github.com |
3e475b499dd37802b646062be8b0061132819906 | b678b3a1f794f180f00b1414bfbd8f3442984443 | /GanNetwork.py | ae89821d1323de6bee3bb202ea245999f714b0ed | [] | no_license | nekomiao123/medical | fe2401c31bbe1a617c16e86786745518c6d39698 | 62054bc4d92909315bf7f4157eeb5b85ca845c29 | refs/heads/master | 2023-06-25T23:44:27.440281 | 2021-07-28T13:21:28 | 2021-07-28T13:21:28 | 375,958,324 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,058 | py | import torch
import torch.nn as nn
class ConvBlock(nn.Module):
def __init__(self, in_channels, out_channels, down=True, use_act=True, **kwargs):
super().__init__()
self.conv = nn.Sequential(
nn.Conv2d(in_channels, out_channels, padding_mode="reflect", **kwargs)
if down
... | [
"447140443@qq.com"
] | 447140443@qq.com |
c4acd6784d5e7292721ab27fa3e0b14a93af92ba | 1aca3f447c14fe3e191ce8770b5532f3a5c57caf | /StaticCoders/asgi.py | 9a7da1989fd4ad8fe7ae0313230975a048feb146 | [] | no_license | sanmiljadhav/Django-Blog | 994b70118310591e33689912ed94797e4b096c87 | a6d4e55b552549bc2c16944b817b6e99da8b2b07 | refs/heads/master | 2023-04-22T04:14:02.403740 | 2021-05-07T16:37:34 | 2021-05-07T16:37:34 | 365,290,413 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 401 | py | """
ASGI config for StaticCoders project.
It exposes the ASGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.1/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault('DJANGO_... | [
"sanmil.jadhav@gmail.com"
] | sanmil.jadhav@gmail.com |
de6d9bdba05bffa7668b1d69cfae8baa06748436 | c88bf2bbb01b0c42c845fd2ed749e4dfab47b321 | /Stack.py | baf5f108a7062da6563b9876099b8ed0fbde86ad | [] | no_license | PhaniSantosh21/Sorting | 8d8d436c24a632169b48d123460843978b0a760b | bfadc4c4f241bb1585d53c8cd6ba05dfd9abe18b | refs/heads/master | 2020-03-06T14:56:31.046305 | 2018-07-28T19:22:02 | 2018-07-28T19:22:02 | 126,945,318 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 566 | py | class stack:
arr = []
stackLen = 5
def push(self, a):
if(len(self.arr) == self.stackLen):
print("Stack is full")
else:
self.arr.append(a)
def pop(self):
if(self.arr == []):
print("Stack is empty")
else:
... | [
"noreply@github.com"
] | PhaniSantosh21.noreply@github.com |
c6c0c0ec05add7dbe4ef9213cc81551cc0cbbafa | 0a4f3e1a3a99eea168d4146f5eb3f02b88ea01b4 | /source/conf.py | 32280e4604ce3dda9fe8965fb987d8ab9b66bf0a | [
"CC-BY-4.0"
] | permissive | m4sk1n-weblate/lubuntu-manual | 4ace3ca9a0df1a27d55a474bc79439bdef8b5971 | 816877150d0971baf4ecc62986ad6ab61b5ac32e | refs/heads/master | 2021-09-04T21:32:05.033331 | 2018-01-22T11:38:55 | 2018-01-22T11:38:55 | 118,484,253 | 1 | 0 | null | 2018-01-22T16:35:27 | 2018-01-22T16:35:27 | null | UTF-8 | Python | false | false | 11,252 | py | # -*- coding: utf-8 -*-
import sphinx_bootstrap_theme
# import os
# import sys
# sys.path.insert(0, os.path.abspath('.'))
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.todo',
]
# Add ... | [
"tsimonq2@ubuntu.com"
] | tsimonq2@ubuntu.com |
c71de68d5d8e1ed94307b087f795dddfc08ddc00 | 7b8b03b7818a1fea58f174ff8c18b43578a6233f | /tests/core/test_models.py | b6c868d65b928963cc11299b613fc8c6b8eeec36 | [] | no_license | defance/coins_ph | 400e4316a2d9a63752b21190ca7f1b0543b85343 | 2f0d3038f5dcca4c0f8711a1b095c6078799eb0b | refs/heads/master | 2020-04-30T19:15:58.398453 | 2019-03-21T22:30:16 | 2019-03-21T22:30:16 | 177,033,466 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 316 | py | from django.test import TestCase
from tests.factories import AccountFactory
class TestTransactionAccount(TestCase):
def test_update_balance(self):
account = AccountFactory(balance=10)
account.update_balance(42)
account.refresh_from_db()
self.assertEquals(account.balance, 52)
| [
"defance@gmail.com"
] | defance@gmail.com |
cc5c8ee8b919667a4e0c92b4fc9a5ca78bfa5604 | 44701119c8331bb8e9256f2afa730978ecbb93ae | /rassPaper.py | 06d1a2ff4c418bec0df2b19ab66dccd445b9fdff | [] | no_license | martydingo/rassPaper | d3e1e6df888a4b70f509fcf2683ce2e088066354 | bd3368c277142e55ba372390e3a8a9cb1af6b25a | refs/heads/master | 2023-06-15T01:53:31.314096 | 2021-07-09T17:38:18 | 2021-07-09T17:38:18 | 384,506,789 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 487 | py | from waveshare_epd import epd2in13_V2
class rassPaper:
def __init__(self):
self.display = epd2in13_V2.EPD()
self.clearScreen()
def clearScreen(self):
self.display.init(self.display.FULL_UPDATE)
self.display.Clear(0xFF)
self.display.sleep()
if(__name__=='__main__'):
... | [
"marty@dingo.sh"
] | marty@dingo.sh |
c92f4be0b081b00cb58aecee72325a357a5d2afb | 971d5e787113700c20ea3c87a5065ebf405d4820 | /plot.py | ae83daa7ee6fc489de383657ddea64a37f0261f3 | [] | no_license | shashankn91/unsupervised-learning | 2c1d5d76fb12868b1a90830fd6869960b393a7ab | 6d37c328d01be66a66f5ab50baecf43fb30244e9 | refs/heads/master | 2020-04-04T17:03:14.815181 | 2018-11-04T17:01:58 | 2018-11-04T17:01:58 | 156,104,532 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,334 | py | import matplotlib.pyplot as plt
import pandas as pd
import numpy as np
import sys
out = './{}/'.format(sys.argv[1])
df = pd.read_csv(out + 'digits2D.csv')
Z = pd.DataFrame(df['target'])
reduced_data = df.drop(['target'], axis = 1)
h = .02
x_min, x_max = df['x'].min() - 1, df['x'].max() + 1
y_min, y_max = df['y'].min... | [
"shashank@fashtag.info"
] | shashank@fashtag.info |
bd11de2b5160f52fe4fc4a85912a099999ee72f1 | 33800418f82f5cd689e855d905a361285f9172d1 | /mma/mmaapp/migrations/0002_auto_20151218_0534.py | 6682ac47e86c4c6dd158d2a03684eb69edddadf7 | [] | no_license | FadiAlnabolsi/MMA_IR | 94651735e43ef4ac042c2a47b4976bbaa34bfd28 | 89ac6423b35eaa2fc7549851723da39364e4f26d | refs/heads/master | 2016-08-12T23:24:41.422356 | 2015-12-18T20:17:26 | 2015-12-18T20:17:26 | 48,214,756 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,306 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.9 on 2015-12-18 05:34
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('mmaapp', '0001_initial'),
]
operations = [
mi... | [
"fadi@service.com"
] | fadi@service.com |
62e1d7b9b0866e34755d7d9147b6af4caa893cf8 | a95aff2d2e0250704daac432e7dac2e6138733ae | /FacialRecognition/frec_env/bin/pip3 | ba59b5f06d6242659902ee715bf87fece95963cb | [] | no_license | josedev9/Additional-scripts | 74b6b3bf9b5ba93f59b10fd6aacc938e2cfe0fca | aedefca7357225383c786b8917ab1119d6b436d2 | refs/heads/main | 2023-08-30T05:44:20.440601 | 2021-10-05T11:07:30 | 2021-10-05T11:07:30 | 388,692,450 | 0 | 1 | null | 2021-09-29T09:17:38 | 2021-07-23T05:55:11 | Python | UTF-8 | Python | false | false | 270 | #!/home/joser/Desktop/fac_rec/FacialRecognition/frec_env/bin/python
# -*- coding: utf-8 -*-
import re
import sys
from pip._internal.cli.main import main
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
sys.exit(main())
| [
"[joseangelrodrrodr@gmail.com]"
] | [joseangelrodrrodr@gmail.com] | |
0b72ded122399b000404bb6e0054f0f87a596751 | 2ffb1e1eae3bf5eb2409db9a037572254ed8d051 | /spatial.py | defebbd8481ca1145619cbd415c2b6699f9ca47e | [] | no_license | a2a-research/automatic-gcp-detector | 3037065e203c0ccfef853ce5358aba56f35e49a3 | 8dfe10a6859ca174a2302eb38e5cca398fb4bf43 | refs/heads/master | 2022-05-12T00:17:08.670239 | 2018-07-22T07:18:51 | 2018-07-22T07:18:51 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 17,238 | py | """
Helper library containing functions that perform spatial geometric operation
like determining if a point is inside a polygon
.. versionadded:: 0.1
.. codeauthor:: Nekhelesh Ramananthan <krnekhelesh@skylarkdrones.com>
**External Dependencies**
.. hlist::
:columns: 4
- geopy
- numpy
- scipy
- shape... | [
"noreply@github.com"
] | a2a-research.noreply@github.com |
86e1b97b98349eb9e9cff28953b46b6184c6b6b3 | 3cffbd776e9d21d10759788aa3ee05be7da3dc84 | /web/docker_django/urls.py | 8c3a5330d949e1fd071bee41edbb3a16c7a00667 | [] | no_license | roy-rc/b2b | a482347d6848754c516e6ae06fac4ba1b340f3cb | 65bc7d99132702a9170180602d43e66bbdce1587 | refs/heads/master | 2022-05-05T05:41:01.136381 | 2020-02-12T18:54:51 | 2020-02-12T18:54:51 | 191,446,628 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 194 | py | from django.urls import include, re_path
from django.contrib import admin
urlpatterns = [
re_path(r'^admin/', admin.site.urls),
re_path(r'^', include('docker_django.products.urls')),
]
| [
"roiman@mitocondria.cl"
] | roiman@mitocondria.cl |
3188d90a661c2d9b856f8af75351df705de6d1bf | 26762585d08aa774af9f104472c97a8c7a9df181 | /generators/v4d_super_station_2.py | 1ff715d9c377df692ba6d0c4d8295bd62762d559 | [] | no_license | OxfordSKA/SKA1-low-layouts | 379fbe5c056dc73706b1073f09e485880ecfa180 | 49e3ba2af4a447be38af03dde1d11898e3f8300b | refs/heads/master | 2021-01-17T17:10:41.469929 | 2016-08-12T10:48:24 | 2016-08-12T10:48:24 | 47,823,977 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 11,178 | py | """Module to generate super-stations for trail v4d spec. layouts"""
# -*- coding: utf-8 -*-
from __future__ import print_function
import matplotlib.pyplot as pyplot
import numpy
from numpy.random import rand
import shutil
import os
from os.path import join
from math import radians
def rotate_coords(x, y, angle):
... | [
"benjamin.mort@oerc.ox.ac.uk"
] | benjamin.mort@oerc.ox.ac.uk |
4cd0d4c05c9d8088b4dad0adf66220da4e1665bf | a48a24d45b569f3ca11b1599009c11c161548edc | /src/models/schnorr_scheme_validator_model.py | 3616865a61b8bc8cde78e08b2addfef9989d8f2f | [] | no_license | lepesevichnikita/DSA | fdacd32ac8b10ed3f07b69bb458483d56642874a | b677755e825df8eb188a0453ff95d213abb17c8d | refs/heads/master | 2020-05-22T13:31:49.891037 | 2019-05-26T14:37:17 | 2019-05-26T14:37:17 | 186,361,635 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,394 | py | from PyQt5.QtCore import pyqtProperty, pyqtSignal, pyqtSlot, QObject
from src.schnorr_scheme import SchnorrSchemeValidator
class SchnorrSchemeValidatorModel(QObject):
complexityChanged = pyqtSignal()
sChanged = pyqtSignal()
eChanged = pyqtSignal()
isValidChanged = pyqtSignal()
xChanged = pyqtSign... | [
"lepesevich.nikita@yandex.com"
] | lepesevich.nikita@yandex.com |
0ad106e142946f1ade9edc6cfbe1e35446f4d07d | 236141f0ece71073d0452ae5d0436a44843d16e7 | /movieproject/movieapp/migrations/0002_movie_img.py | 39fd6ffd551c26e58c47d6b5d41299e384db6337 | [] | no_license | Nikhil7736/movie | 6437098c8c1202ada6ed0889c623b6bec9202fd5 | e9cc8db9b84c89fd004d20da42608d22bc113efb | refs/heads/master | 2023-07-28T16:13:53.895581 | 2021-09-11T11:10:29 | 2021-09-11T11:10:29 | 405,355,041 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 477 | py | # Generated by Django 3.2.6 on 2021-08-27 05:19
from django.db import migrations, models
import django.utils.timezone
class Migration(migrations.Migration):
dependencies = [
('movieapp', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='movie',
n... | [
"nikhilprasad61@gmail.com"
] | nikhilprasad61@gmail.com |
007b9d008b4040510b20cb5edf5341a7b17b6cfe | 77f10c4d240fe9cc18874459509352b25db227f2 | /methodclass/c3.py | c392cb7958883b2052368f8a791489ecce58855d | [] | no_license | bhchen-0914/PythonCourse | f776c66ed3bbb564c3040c0060da3eec069e70df | b7a536ab0b3196af7d97245d9a12f90c3ee7df03 | refs/heads/master | 2023-05-24T05:27:18.848494 | 2021-06-19T09:51:52 | 2021-06-19T09:51:52 | 378,376,618 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 95 | py | """
用于测试__init__.py初始化效果
"""
def init_test():
print('this is c3 file')
| [
"364293032@qq.com"
] | 364293032@qq.com |
d5bf55cd95af3580caec5f9c2ec2353f31c95a68 | 616ca750df6e31054c1ad0fa1121555f36186965 | /two pointers/validate_stack_sequences.py | 619466b7dd9a557ca103fa2e936f4155cb5e859d | [] | no_license | asset311/leetcode | d4cdc0af1967f08868c9df566353e324a606efbd | 973ec60b9aea3522ca54fd0375505e4ad274ed3d | refs/heads/master | 2022-12-14T02:37:36.764472 | 2020-08-27T16:56:18 | 2020-08-27T16:56:18 | 271,077,961 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 825 | py | '''
946. Validate Stack Sequences
https://leetcode.com/problems/validate-stack-sequences/
'''
from typing import List
class Solution:
def validateStackSequences(self, pushed: List[int], popped: List[int]) -> bool:
# use two pointers
stack = []
# second pointer traversing 'popped' a... | [
"32253546+Aseka311@users.noreply.github.com"
] | 32253546+Aseka311@users.noreply.github.com |
3d94a4dfc9debe0d5e6bcdb0e806f2c379a11a70 | 294764af60107e4fd1d2f9c8b3c03b24dcfe6ee6 | /items.py | 423f726bf5d4eb1bc930b727aa994b755b63b21b | [] | no_license | josephcorbin91/architectureDaily | e44b7c45f96f9438c707b7a6fbf776ec05f34268 | 140d45779782b39b6e9615807d69bfe18009ef62 | refs/heads/master | 2021-01-17T16:55:37.280514 | 2016-11-01T17:22:51 | 2016-11-01T17:22:51 | 69,365,110 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 729 | py |
# -*- coding: utf-8 -*-
# Define here the models for your scraped items
#
# See documentation in:
# http://doc.scrapy.org/en/latest/topics/items.html
import scrapy
class ArchitecturedailyItem(scrapy.Item):
# define the fields for your item here like:
# name = scrapy.Field()
id = scrapy.Field()... | [
"noreply@github.com"
] | josephcorbin91.noreply@github.com |
8f0e75f7605fa4adae8aa901808c5e6ca7ee11d3 | ff8bfdea7cf7fb3201c2e5ccca308a660193dfe7 | /DecoraterClasses/Employer_Plan_decorator.py | dede9b487f81a8a5f69a57ffa8157349265b718a | [
"MIT"
] | permissive | rohitgs28/FindMyEmployer | 8d42e8fcde8c3ecc4654b37006f0feab045a75cf | d4b369eb488f44e40ef371ac09847f8ccc39994c | refs/heads/master | 2022-12-10T17:19:16.953014 | 2018-09-07T06:44:38 | 2018-09-07T06:44:38 | 147,781,155 | 0 | 0 | MIT | 2022-12-08T02:23:39 | 2018-09-07T06:33:59 | Python | UTF-8 | Python | false | false | 491 | py | from EmployerDecorator import EmployerDecorator
class Employer_Plan_decorator(EmployerDecorator):
def __init__(self, employer):
super(Employer_Plan_decorator, self).__init__(employer)
def plan_rules(self,givenCount,userCount,messagePermission):
allow = False
givenCount = int(givenCount)
u... | [
"rohit.gs28@gmail.com"
] | rohit.gs28@gmail.com |
f800d6b3ca316df0db0ffe4717caaddae33260f8 | 3ea684487ef727fb2f8d16a030769f32a4f4003a | /datahq/apps/receiver/bootstrap.py | 90c3fa6dc99fc38cd04840c76b173a531f02f9b5 | [] | no_license | adewinter/data-hq | 5781e6669e0625ea9ae7cf94ec77c528485c2951 | ca03656c835f8caa5156326500c05bb83ab931ca | refs/heads/master | 2021-01-18T12:48:26.584454 | 2010-08-19T13:15:03 | 2010-08-19T13:15:03 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 280 | py | import os
from django.conf import settings
# make our directories if they're not there
for dir in [settings.RECEIVER_SUBMISSION_PATH,
settings.RECEIVER_ATTACHMENT_PATH,
settings.RECEIVER_EXPORT_PATH]:
if not os.path.isdir(dir):
os.mkdir(dir)
| [
"czue@dimagi.com"
] | czue@dimagi.com |
75a3cd2e9f625d1e43a53e0412340d4ddac9a76a | 9923e30eb99716bfc179ba2bb789dcddc28f45e6 | /swagger-codegen/python/test/test_asset.py | 4d4822c956810304a52b9be4b031c37a4dfaaa89 | [] | no_license | silverspace/samsara-sdks | cefcd61458ed3c3753ac5e6bf767229dd8df9485 | c054b91e488ab4266f3b3874e9b8e1c9e2d4d5fa | refs/heads/master | 2020-04-25T13:16:59.137551 | 2019-03-01T05:49:05 | 2019-03-01T05:49:05 | 172,804,041 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,361 | py | # coding: utf-8
"""
Samsara API
# Introduction Samsara provides API endpoints for interacting with Samsara Cloud, so that you can build powerful applications and custom solutions with sensor data. Samsara has endpoints available to track and analyze sensors, vehicles, and entire fleets. The Samsara Cloud AP... | [
"greg@samsara.com"
] | greg@samsara.com |
dfae9c8d976ac7ac0f418b942f53ee151796d454 | 58ec0c399df3820c4662e45f72b1722e73d5999a | /lambda_function.py | 319eba49f621172513e29f7652648872967276f4 | [
"Apache-2.0"
] | permissive | anjilinux/lambda-refarch-iotbackend | 7e644743293a97520c5c33ae636523b2dce0fa4a | 5fc6ec68380bbe5e1f294c19482971fba6de479b | refs/heads/master | 2023-03-15T19:56:19.542814 | 2020-08-28T00:58:04 | 2020-08-28T00:58:04 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 538 | py | import boto3
import os
sns = boto3.client('sns')
alertsns=os.environ['alert_sns']
def lambda_handler(event, context):
print(event)
deviceName=event['name']
humidity=event['humidity']
print("send alert")
alertmessage="Humidity "+ str(humidity) + " under threshold for d... | [
"rajdsah@38f9d33c705d.ant.amazon.com"
] | rajdsah@38f9d33c705d.ant.amazon.com |
9cea75b600ef874d8dec1fc2c24dbca872f750d9 | 213c7de871594e436c1997078d41388adf6bbac5 | /SortingAlg/plugins/Scripts/pip3.7-script.py | 324bfba37e550ac93166c6231a6e3a5b6f24b42e | [] | no_license | LennartPaciner/python-stuff | d8657c4f0904f5326c023adc23395d6123a7241f | 554755ad96dfcae223849e7f29f65dfa4f5c1625 | refs/heads/master | 2021-06-24T09:06:19.009408 | 2021-05-29T09:31:37 | 2021-05-29T09:31:37 | 217,899,628 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 434 | py | #!C:\Users\wombo\github-privat\python-stuff\SortingAlg\plugins\Scripts\python.exe
# EASY-INSTALL-ENTRY-SCRIPT: 'pip==10.0.1','console_scripts','pip3.7'
__requires__ = 'pip==10.0.1'
import re
import sys
from pkg_resources import load_entry_point
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe... | [
"lpaciner@students.uni-mainz.de"
] | lpaciner@students.uni-mainz.de |
a0980b9644baf082aecd80772f09b050037a45e1 | 323bddba2caa2d1c0dc5c91e0de046a2d7f4a5f8 | /src/vdb_to_numpy/utils/mesher.py | 79108e9c228c22d1a5e6366b97c8ff2cc72c6157 | [
"MIT"
] | permissive | PRBonn/vdb_to_numpy | 00b9206f64cbc545636c6a5307e7557bd798b675 | d759b8cd26d5cba2cbdcc1b8261b7d918d9113cc | refs/heads/main | 2023-07-05T20:37:02.075071 | 2023-01-02T06:37:34 | 2023-01-02T06:37:34 | 480,339,860 | 5 | 4 | MIT | 2023-06-29T12:49:48 | 2022-04-11T10:55:22 | Jupyter Notebook | UTF-8 | Python | false | false | 1,084 | py | import numpy as np
import open3d as o3d
from skimage.measure import marching_cubes
def extract_mesh(volume, mask=None):
"""Run marching_cubes and extract a triangular mesh of the volume.
Parameters - copied from skimage -
----------
volume : (M, N, P) array
Input data volume to find isosurfac... | [
"ignaciovizzo@gmail.com"
] | ignaciovizzo@gmail.com |
19cc849f50ba984019a615ec3532eb04f622db66 | 3efee0cf2bd9e0c34bfdd94ab24a15cb88c04509 | /PWEM_examples/kxky_bandstructure_benchmark_plotting_with_fdfd.py | 20872b8c10843e1edc1184e3d3cbe5d7ee1b70bd | [
"MIT"
] | permissive | luwl85/Rigorous-Coupled-Wave-Analysis | bf5016ec70525f5e7bf59dfa93a03902afdfac12 | a28fdf90b5b5fc0fedacc8bb44a0a0c2f2a02143 | refs/heads/master | 2023-04-25T20:46:45.397976 | 2021-05-20T22:17:54 | 2021-05-20T22:17:54 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 800 | py | import sys
import os
import scipy.io
import matplotlib.pyplot as plt
import numpy as np
import plotly
import plotly.graph_objs as go
from plotly.offline import download_plotlyjs, init_notebook_mode, plot, iplot
from mpl_toolkits.mplot3d import Axes3D
matlab_data =os.path.join('kxky_photonic_circle_bandstructure.mat')... | [
"nzz2102@stanford.edu"
] | nzz2102@stanford.edu |
8eeda9eafbd385126da3185c7429ce42e6a1a598 | 3a2921780f62433e6c486cf59dab3fa9ba3f8a52 | /tethys/startup.py | 406e75fb67f2e9d8c2130ed51a3ed76ef7a1da47 | [
"MIT"
] | permissive | JosePedroMatos/Tethys | 8295a7fa27a5c93291765e16593acc5c1bd49574 | e4bedfb9051f2f7fb665b4aef856a6b1660521d4 | refs/heads/master | 2021-01-11T16:08:23.887999 | 2017-01-25T15:50:51 | 2017-01-25T15:50:51 | 80,015,953 | 2 | 0 | null | 2017-01-25T15:50:52 | 2017-01-25T13:16:59 | Python | UTF-8 | Python | false | false | 6,084 | py | '''
Created on 29 Oct 2016
Responsible for checking and including default database entries into Tethys.
'''
import os
from Crypto.Random import random
from timeSeries.models import DataProvider, DataType, Colormap
from django.contrib.auth.models import User
from django.core.files import File
def prepareTet... | [
"jpgscm@gmail.com"
] | jpgscm@gmail.com |
ef0ef5c0ce92555256715da547ac40faeea34fb3 | 8a519b5e5cc1a03471dfe7bc016f993f40b1a585 | /MAY13_LCS.py~ | d4f0ddb599cc75421ee6d2625a1d2fa5f3823fdd | [] | no_license | saikiranboga/coding-scripts | 7c12a8f0d3303de74eeb6cebaf45496f8699253b | c95c8da731897521555d29e8bc14848aa22d8e4f | refs/heads/master | 2020-12-24T15:22:24.752105 | 2013-07-04T03:58:39 | 2013-07-04T03:58:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 45 | #!/usr/bin/python
if __name__ == "__main__":
| [
"saikiranboga110792@gmail.com"
] | saikiranboga110792@gmail.com | |
921f5f114fdee39bcc021e670ff6794d79a144dc | 94e134baa379584521ccaa8a634f36b662cad382 | /recursos/migrations/0005_auto_20210127_1519.py | e3aefbbc0b4882e90151fafa54a10d6222546ee4 | [] | no_license | alvaromateus/monitor_recursos | cb142d2bf2cb1c55e3481efb89b8f803d149489d | 94de62193cb652d62297686d6e312ce80e3cc07b | refs/heads/master | 2023-02-24T14:35:29.115530 | 2021-01-27T22:55:15 | 2021-01-27T22:55:15 | 329,765,939 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 412 | py | # Generated by Django 3.1.5 on 2021-01-27 15:19
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('recursos', '0004_auto_20210127_1449'),
]
operations = [
migrations.AlterField(
model_name='registro',
name='clock_pr... | [
"alvaromateus@gmail.com"
] | alvaromateus@gmail.com |
d56f61c624424aa16dbda193d9b44aa754b4c235 | 5e4b8f263c07694c05bbc0e4fbaeb3f9f479d40e | /lab-bmplib/lab-bmplib/compile | 5307157d40cf8720dc3aca1c793d132c9dfc2dad | [] | no_license | BrianHerron-exe/CS103 | 2a2391c70e18989ec6dd8c579d30a6187de1b6eb | 8bc0f2dff053531e1869938ce9aefd01d8d0bafa | refs/heads/master | 2021-06-15T21:51:23.810121 | 2017-04-05T04:27:17 | 2017-04-05T04:27:17 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,245 | #!/usr/bin/python
#-*- mode: python -*-
"""
Usage:
compile foo # runs clang++ <options> foo.cpp -o foo
compile foo.cpp # same as previous
compile foo.cpp bar.cpp baz.o -o bar # clang++ <options> <args>
For installation instructions, see
http://bits.usc.edu/cs103/compile/
Contact: dpritcha@usc.edu
"""
def... | [
"bellathu@usc.edu"
] | bellathu@usc.edu | |
4aea8cc4695fedfd388451908d4491da7819fc1a | f95102d0d572780bdafbbf309e181aa2107c5d82 | /q.py | d442a34f09dc3599d523110e480f719406a61812 | [] | no_license | auimendoza/cs7641-omscs-a4 | 02982111367476f987880435b4708f5b2d14617a | 6b43070c655f4ea876c519270aec90331018a164 | refs/heads/master | 2020-04-07T11:31:19.195803 | 2018-11-20T04:20:10 | 2018-11-20T04:20:10 | 157,265,598 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,390 | py | import gym
import numpy as np
from mdptoolbox.mdp import ValueIteration
from mdplib import PolicyIteration, QLearning
import common
import sys
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns; sns.set()
def Usage():
print("Usage:")
print("python %s <envid> <exploreinterval>" % (sys.argv[0]... | [
"auimendoza@gmail.com"
] | auimendoza@gmail.com |
bbab4019507f7f9140e39b56dbd67484ab09ce33 | ce0fb1feddf3178426ee130a0fb2150131858fc0 | /src/preprocess.py | fcf546d3fcb6d43e98dad0817c90f3c037ad1c46 | [] | no_license | carsonzchen/MSiA423_ACE.AI | d6b466ec81b468c8dc7e204d2d45814945ed124b | ac381613e8f978a74ca4c04d7ff5add0e3a3c740 | refs/heads/master | 2020-05-07T21:37:00.605451 | 2019-06-13T04:48:44 | 2019-06-13T04:48:44 | 180,911,498 | 1 | 1 | null | 2019-05-23T05:57:35 | 2019-04-12T02:04:56 | Python | UTF-8 | Python | false | false | 8,058 | py | import numpy as np
import pandas as pd
import argparse
import yaml
from src.helpers.helpers import read_raw, save_dataset, setFeatureType, fillColumnNAs
import logging
logger = logging.getLogger(__name__)
def trim_columns(df, columnlist):
"""
Return dataframe that has selected columns with leading or trailing... | [
"zijinchen2019@u.northwestern.edu"
] | zijinchen2019@u.northwestern.edu |
d4a9e5885c4f58e0f7e1c34b9e62a46a6cb72b66 | 2d36eecc0b123fb5c6b0d77036edffe3cba68e8c | /billsToPay/asgi.py | b79f83e7410d2fc0e9080c7223f088887baf5cd4 | [] | no_license | zwykuy-gracz/billstopay | e7ee60ab32ce9866223aa888d48f21821043e5ad | bcb8d6a181cfc29cedc1dbe8af50eee0cdaae78f | refs/heads/master | 2023-07-31T02:48:46.095531 | 2021-09-16T08:56:38 | 2021-09-16T08:56:38 | 405,963,177 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 397 | py | """
ASGI config for billsToPay project.
It exposes the ASGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.2/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault('DJANGO_SE... | [
"Paul.Specjal@intrum.com"
] | Paul.Specjal@intrum.com |
6821205dff8d4bf5af67bd99c4b092e8d390a3c3 | 5c533e2cf1f2fa87e55253cdbfc6cc63fb2d1982 | /python/pymonad/monad_parse.py | a37f2195d1412f89bfddadf9d4bb469858d0db09 | [] | no_license | philzook58/python | 940c24088968f0d5c655e2344dfa084deaefe7c6 | 6d43db5165c9bcb17e8348a650710c5f603e6a96 | refs/heads/master | 2020-05-25T15:42:55.428149 | 2018-05-14T03:33:29 | 2018-05-14T03:33:29 | 69,040,196 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 312 | py |
# parser is of form string -> [(symbol, therestofstring), (other possiblity), (other possiblity), ...]
#parserbind needsto return
def parsebind(parser , parserproducer):
def combinerparser(string):
possibleparses = parser(string)
for (symb, restofstring) in possibleparses:
return combinedparser | [
"philip@FartMachine7.local"
] | philip@FartMachine7.local |
1f08fdcb74ad6a4d0aa6e04cbcf96f1ef20e4d48 | 05bbf828f376844b26c5cee143cb4a85f07f3827 | /examples/test_case_management_v1_examples.py | bc98561d1d7a6583e9a781ea56243c6a1143e4df | [
"Apache-2.0"
] | permissive | KRuelY/platform-services-python-sdk | b8da1a499d9ea13f9dfac88686b0490df9a269c5 | 71a24742c28de4bdee9bfcc53e66c8741746d089 | refs/heads/main | 2023-06-26T02:46:06.227936 | 2021-06-29T15:32:29 | 2021-06-29T15:32:29 | 390,108,509 | 0 | 0 | Apache-2.0 | 2021-07-27T19:49:14 | 2021-07-27T19:49:13 | null | UTF-8 | Python | false | false | 11,253 | py | # -*- coding: utf-8 -*-
# (C) Copyright IBM Corp. 2021.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | [
"noreply@github.com"
] | KRuelY.noreply@github.com |
ecee1674e72267c285c73c6c53e20b11c7b039b3 | 2419dbbdeceb2776340e24e1190a49f0974cbd6f | /Preprocessing.py | e7404c6f9bf731629fef68231bcb588f298c986a | [] | no_license | AumPC/Walmart_Forecasting | ecb508f6837b4ea759e64d0d9992e98986a67fa7 | f0c9fe057e7e65773a7fd65efb378a3826dd8d74 | refs/heads/master | 2020-03-07T18:30:10.925770 | 2018-04-01T15:26:30 | 2018-04-01T15:26:30 | 127,640,609 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 525 | py | import pandas as pd
features = pd.read_csv("data/features.csv")
test = pd.read_csv("data/test.csv")
train = pd.read_csv("data/train.csv")
stores = pd.read_csv("data/stores.csv")
train_data = pd.merge(train, stores)
train_data = pd.merge(merged_train , features)
test_data = test.merge(test.merge(stores, how='left',... | [
"blue-aum@live.com"
] | blue-aum@live.com |
58585528755e79552c9fb1ef6ccb42c3078b6450 | 13edd4b08d610170b1777d627e616636fe9c2ce4 | /startup/80-settings.py | f78b61f70e1b990a4a262765b9106d53e8598e47 | [] | no_license | licode/profile_collection | 1a53bfef31ebb638fca60e5c248c18a203659664 | b67711626eaede033a11587b454cd7f4a1e7871b | refs/heads/master | 2021-01-19T12:37:21.382510 | 2016-09-30T16:20:23 | 2016-09-30T16:20:38 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 928 | py | from ophyd import EpicsSignal, EpicsSignalRO
#gs.DETS = []
#all_objs = globals()
#counters = [counter for counter in all_objs.values() if isinstance(counter, EpicsSignal)]
#gs.DETS = counters
"""
import logging
from ophyd.session import get_session_manager
sessionmgr = get_session_manager()
sessionmgr['olog_client... | [
"xf21id1@xf21id1-ws1.cs.nsls2.local"
] | xf21id1@xf21id1-ws1.cs.nsls2.local |
48cfa488723f8876386d29af748c3142f4adf3b5 | 2271ec0ecde1016cc75455ac4d9a32d1db5de518 | /test/test_resources.py | 7f6320438eac143c814b6b666c41d54c8d3bc373 | [] | no_license | faalkao/HotSpotAnalysis_Plugin | a344a36826346d24b29659b70300a96e90e5635d | 185463c44892718c0a2aa7c608e238a12c3e3543 | refs/heads/master | 2022-01-15T22:12:37.164138 | 2017-02-24T09:20:19 | 2017-02-24T09:20:19 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,084 | py | # coding=utf-8
"""Resources test.
.. note:: This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
"""
__author__ = '... | [
"stanly3690@gmail.com"
] | stanly3690@gmail.com |
f5a9af21f3667cdee8a41a208bca46ea6b56f53f | 9dffa36a0b2ae8598d9020d70ffed9b1cc209e84 | /inverter_util.py | a6722fe6b6fc59a1836150165af4ba0183c60926 | [
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference",
"BSD-2-Clause"
] | permissive | cebudding/Lab_Rotation_1 | f5b9fc4bcdeb1aa673b329d97d1102c3a2bd67d3 | 5a731c9bef3a5b86436c1f1ceab2b8eb04b243a4 | refs/heads/master | 2020-09-28T21:31:21.413016 | 2019-12-09T13:10:01 | 2019-12-09T13:10:01 | 226,869,557 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 22,718 | py | import torch
import numpy as np
import torch.nn.functional as F
from utils import pprint, Flatten
def module_tracker(fwd_hook_func):
"""
Wrapper for tracking the layers throughout the forward pass.
Args:
fwd_hook_func: Forward hook function to be wrapped.
Returns:
Wrapped method.
... | [
"celineevianne@gmail.com"
] | celineevianne@gmail.com |
6bdc4df21afbf8fd9b980b1ac18578cfffd6e4e4 | 796c921e8e75e94737854f90835216c87d2dfc8e | /PracticeBackEnd.py | ffd679678b60e46dd657b6062db599a9ce8c9ec2 | [] | no_license | bsvonkin/Year9DesignCS4-PythonBS | e94f3df3cf59e1b4cae19a2fb9e39d02bed4e5c6 | fe465d54829eda2f741b90ce5150baf7a04f43ec | refs/heads/master | 2020-03-28T11:03:47.283334 | 2018-12-18T14:05:53 | 2018-12-18T14:05:53 | 148,173,357 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,040 | py | import tkinter as tk
root = tk.Tk()
root.title("Algebra Calculator")
def dab():
print("dab")
labUN = tk.Label(root, text = "Equation")
labUN.grid(row=1, column=0)
entUN = tk.Entry(root, bg="#F0F0F0")
entUN.grid(row=2, column=0)
btnSubmit = tk.Button(root, text = "Submit", command = dab)
btnSubmit.grid(... | [
"ben.svonkin@Y22-Design-Ben-Svonkin.local"
] | ben.svonkin@Y22-Design-Ben-Svonkin.local |
767d996c6f0d05e96bcc2fcacdde479d65e75b71 | 7601a6be6e581053820bc3fffd6864e19b1ef680 | /helloWorld/gurobiTest.py | 8e32ee5c39fb91d88fca15e07f9088a76dce0712 | [] | no_license | LucyBean/Part-III | 0a89a96f355be6b4af44753d74c9569293e772fc | cb753a01c6720269fb636725ce2a97c8d143c183 | refs/heads/master | 2020-08-01T22:38:58.500258 | 2017-02-23T14:32:36 | 2017-02-23T14:32:36 | 73,567,415 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,424 | py | '''
Created on Nov 11, 2016
@author: Lucy
'''
from gurobipy import Model, GRB, LinExpr
metabolites = ["Ru5P","FP2","F6P","GAP","R5P"]
revReactions = ["pgi","fba","rpi","rpe"]
irrevReactions = ["gap","zwf","pfk","fbp","prs"]
reactions = revReactions + irrevReactions
reactionsToInclude = ["prs","gap"]
reactionsToExclud... | [
"howobscene@msn.com"
] | howobscene@msn.com |
e693645cbd1ed303e80c309d0e7857d9a2248013 | e58dcad84f3151cff22d0cd881bb41cc43eee9fd | /Server/predict.py | 05f23f4fe804908f12d19af45c6b50a6006753d7 | [] | no_license | samdroid-apps/smart-light-system | 68bb4ddcc3669700ac6374e43b09f2de2e1f44a4 | 595443a90992b8339949a9877279781efaab3095 | refs/heads/master | 2021-01-20T10:30:33.635255 | 2017-08-28T12:30:00 | 2017-08-28T12:30:00 | 101,639,751 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 718 | py | import os
import json
from sklearn.externals import joblib
import typing as T
from learn import NOT_FOUND_RSSI
if os.path.isfile('model.pkl') and os.path.isfile('model.bssids.json'):
model = joblib.load('model.pkl')
with open('model.bssids.json') as f:
bssid_to_index = json.load(f)
else:
model = N... | [
"sam@sam.today"
] | sam@sam.today |
0169b1897bfbdf5de8a401d4e8fa088c6203bac7 | 81f2089aba838cdfb5d17b0a96c7917a57c8ae5c | /app.py | 861290a90845f9728f16d4a2192dac3ad87b4a27 | [] | no_license | cotraak/AI.content.aggregator | 731d3c89de8702d1e22662a23bebc5fc42c9b836 | 8608a15c97cf848970179ce2d65fceaf84422061 | refs/heads/main | 2023-01-30T14:32:47.675950 | 2020-12-11T05:22:37 | 2020-12-11T05:22:37 | 318,350,734 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 620 | py | import re
from flask import render_template, Flask
from rss import news, arxiv
app=Flask(__name__)
papers=arxiv().get_recent()
latest_news, news=news().get_recent()
@app.route('/')
def homepage():
return render_template('index.html', papers=papers[:20], temp_res=latest_news)
@app.route('/papers')
def paperspage... | [
"cotraak@Adityas-MacBook-Pro.local"
] | cotraak@Adityas-MacBook-Pro.local |
54e9c0cfbdd264fdd4f79302682d100a5b33fd11 | f5d1e8b54ddbc51a9ef1b868eee93096d9b0fbeb | /weapp/openapi/auth.py | cfbcd1a14628bc5a1673ff8b370dc4a3d2ef2dcc | [] | no_license | chengdg/weizoom | 97740c121724fae582b10cdbe0ce227a1f065ece | 8b2f7befe92841bcc35e0e60cac5958ef3f3af54 | refs/heads/master | 2021-01-22T20:29:30.297059 | 2017-03-30T08:39:25 | 2017-03-30T08:39:25 | 85,268,003 | 1 | 3 | null | null | null | null | UTF-8 | Python | false | false | 587 | py | # -*- coding: utf-8 -*-
__author__ = 'Administrator'
from core import resource
import wapi as api_resource
from core.jsonresponse import create_response
class Auth(resource.Resource):
"""
订单列表资源
"""
app = "openapi"
resource = "auth"
def post(request):
response = create_response(200)
resp... | [
"duhao@weizoom.com"
] | duhao@weizoom.com |
a78402b70c33a73889a5822a90a241cbbcf39467 | da1500e0d3040497614d5327d2461a22e934b4d8 | /third_party/jinja2/ext.py | c2df12d5592c4275135beffdb2194b22877c4654 | [
"BSD-3-Clause",
"GPL-1.0-or-later",
"LGPL-2.0-or-later",
"Apache-2.0",
"MIT"
] | permissive | youtube/cobalt | 34085fc93972ebe05b988b15410e99845efd1968 | acefdaaadd3ef46f10f63d1acae2259e4024d383 | refs/heads/main | 2023-09-01T13:09:47.225174 | 2023-09-01T08:54:54 | 2023-09-01T08:54:54 | 50,049,789 | 169 | 80 | BSD-3-Clause | 2023-09-14T21:50:50 | 2016-01-20T18:11:34 | null | UTF-8 | Python | false | false | 25,078 | py | # -*- coding: utf-8 -*-
"""
jinja2.ext
~~~~~~~~~~
Jinja extensions allow to add custom tags similar to the way django custom
tags work. By default two example extensions exist: an i18n and a cache
extension.
:copyright: (c) 2010 by the Jinja Team.
:license: BSD.
"""
from jinja2 import nod... | [
"dahlstrom@google.com"
] | dahlstrom@google.com |
b7ac6139378ae8a7c41afcd76fec64e7b8ee9df7 | c60f7950f87c66e044c19c7ecdd61ce9a6cb961a | /views/__init__.py | 0d7316e78843cd6be0d8c911a0ebb2761cd2b34a | [] | no_license | yifan-blog/webpy-demo | fb4d37b3273a5b9076c3466c3c8854c02ee022c8 | 4c4a2bf5a372284f38d6d47d065cb8c121662c82 | refs/heads/master | 2020-04-17T11:26:10.482684 | 2018-10-20T12:11:07 | 2018-10-20T12:11:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 261 | py | # -*- coding: utf-8 -*-
import web
# 用于渲染HTML模板
render = web.template.render('views/', cache = False) # 禁用模板缓存特性
# 给模板渲染环境增加全局变量, 这样模板之间就可以嵌套了
render._add_global(render, 'render') | [
"owenliang1990@gmail.com"
] | owenliang1990@gmail.com |
befc484720fc8b2dd7e72ad047976b06972d3b9b | 05526f4941be395c0d41b4eed16ede6ae45b5e3a | /src/ossify/tokenizer.py | 902357cd116b2634aebe40f9a5b4c593ae199181 | [
"BSD-3-Clause"
] | permissive | ndevenish/ossify | 940606d75932597aedac2e0377f1f18ee249a126 | 5045b0cee309093ad2ccf35a4b1d92c4bb2783f3 | refs/heads/master | 2022-07-14T19:58:55.616828 | 2020-05-09T00:28:19 | 2020-05-09T00:28:19 | 261,609,497 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 15,238 | py | import io
import re
import sys
import token
import tokenize
from token import tok_name
from tokenize import TokenInfo
from typing import Iterator, List
numchars = "0123456789"
reNamelike = re.compile(r"[A-Za-z_]")
reWhitespace = re.compile("[ \t\n]+")
reName = re.compile(r"[A-Za-z_]\w*")
reStringStart = re.compile(r'... | [
"ndevenish@gmail.com"
] | ndevenish@gmail.com |
5d607d29fe1245777fd78a219f24a7700613df36 | 8b23c6fe56daa648735cbbaa6e658a3ab6cf6899 | /tests/test_multibase.py | ba301734aac857eb63847f3fa072722e19607dad | [
"MIT"
] | permissive | JuFil/py-multibase | c229e7974c1372ced114ecccf1ae2ac1d69add7e | cb8770cc04e445b852d56f6e9e710618f7f83c77 | refs/heads/master | 2020-03-27T00:20:41.787840 | 2017-09-15T13:39:27 | 2017-09-15T13:39:27 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,220 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Tests for `multibase` package."""
import pytest
from morphys import ensure_bytes
from multibase import encode, decode, is_encoded
TEST_FIXTURES = (
('identity', 'yes mani !', '\x00yes mani !'),
('base2', 'yes mani !', '0111100101100101011100110010000001101101... | [
"dhruvbaldawa@gmail.com"
] | dhruvbaldawa@gmail.com |
84e0d64f73b6e5380c0421c9450b2d466891c522 | 3b73465e112dba0ab729bbf7d5bf6576882fd2b8 | /dataloaders/MRI_dataset.py | 2bbd30915d6c491030681249a87343b354310dbd | [] | no_license | Wugengxian/MRI | 65777cc74d420a57d1befd330a60cfb2696b1235 | 560cdf590659688ea260063dd66eab84cdd2b981 | refs/heads/main | 2023-05-07T23:35:15.575761 | 2021-05-26T23:03:45 | 2021-05-26T23:03:45 | 365,596,833 | 3 | 1 | null | 2021-05-11T13:55:53 | 2021-05-08T19:36:19 | Python | UTF-8 | Python | false | false | 1,529 | py | from torch.utils.data import Dataset
import numpy as np
from numpy import random
from torchvision.transforms import transforms
import dataloaders.custom_transforms as tr
from torch.utils.data import DataLoader
class MRI_dataset(Dataset):
def __init__(self):
super().__init__()
self.md = np.load("d... | [
"60342704+Wugengxian@users.noreply.github.com"
] | 60342704+Wugengxian@users.noreply.github.com |
af6f406c0e717181141f93fbe7e46f67df5c2931 | 2b18daffd0159e5bfb262626f6091239733a7d7e | /PGMF/script/focalisoseq.py | bb5623b706357028bd22a0f9ae71cd161a9258cc | [
"MIT"
] | permissive | haiwangyang/PGMF | df848b824303c8014686b2829c60acaae979629d | bb6b0db8004e552607ac5d740271bbf0e7ab5f5c | refs/heads/master | 2021-09-15T23:43:46.402598 | 2018-06-12T21:33:06 | 2018-06-12T21:33:06 | 115,026,607 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,390 | py | #!/usr/bin/env python
"""
Purpose:
Handling pacbio isoseq
"""
import sharedinfo
import re
import focalintersect
from pyfaidx import Fasta
import pysam
from collections import Counter
from sharedinfo import exist_file, get_lines
def summarize_polyA(fasta):
""" summarize polyA type AAAAAAAAA or TTTTTTTTTT or o... | [
"haiwangyang@gmail.com"
] | haiwangyang@gmail.com |
f5af7130c2c42bf1d02b6701385b69e55840ac6e | 1e703590bec8d2bb82045123ffc701cf0ca2a63e | /recipe_db/recipe_db_app/views.py | b71f3c26f57a55c471939841be11d7af3a98b7db | [] | no_license | mjrobbins18/Recipe_DB_Back | 1e1331b05a71716f9a77798fcfdcdd1e52021db0 | 5102d1bbc2af0d3a82ea56bfc3b690aa05e92753 | refs/heads/main | 2023-08-20T13:31:52.087773 | 2021-10-26T16:17:19 | 2021-10-26T16:17:19 | 409,214,236 | 1 | 0 | null | 2021-09-29T18:57:53 | 2021-09-22T13:24:22 | CSS | UTF-8 | Python | false | false | 7,797 | py | from django.shortcuts import render
from rest_framework import generics, status, permissions
from rest_framework_simplejwt.views import TokenObtainPairView
from rest_framework.parsers import MultiPartParser, FormParser
from rest_framework import status
from rest_framework.response import Response
from rest_framework.vi... | [
"maxrobbins88@gmail.com"
] | maxrobbins88@gmail.com |
8f2480325079e70cc37f56576b090057722b838f | 5800c906808d9c51eb48b2814e9c29ba4996908d | /TrazoDePoligonos_Rectangulo_MariaDelRosarioValentinMontiel_3601.py | b7b227a6e073aed6065804f5edf8c23537612d20 | [] | no_license | Rosario20-VM/Trazo-de-Poligonos | 5326418720728ebc921ad51bc1451c331204dd35 | aef602ffabd6d5bec2dede758003f75ea63978cb | refs/heads/master | 2023-05-07T15:26:30.033676 | 2021-06-02T22:57:02 | 2021-06-02T22:57:02 | 371,850,960 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,661 | py | #MARIA DEL ROSARIO VALENTIN MONTIEL
import matplotlib.pyplot as plt
def RectanguloDDA():
x1=2
y1=6
x2=10
y2=6
x3=2
y3=10
x4=2
y4=6
dx= abs(x2-x1)
dy= abs(y2-y1)
steps=0
color='r.'
if (dx)> (dy):
steps=(dx)
else:
steps=(dy)
xInc = float(dx / s... | [
"rosario6.mntl@gmail.com"
] | rosario6.mntl@gmail.com |
100259a17bad558578a1a3a506a259c32a830e29 | c83aa035d452505f20586dddafd88c3e5f0dc622 | /2020/PMC/PMC/PMC.py | f8b641d1e17df89b6a549fa6bd84b3f3ca67637f | [] | no_license | trenticle/Projects | 2650ec89025ca356d5e3eff81b3c3f2b12abc2aa | ecb4ded72118e355aa94433a1e30a6e97a3dfecd | refs/heads/master | 2021-06-21T07:59:32.488780 | 2021-01-02T06:46:23 | 2021-01-02T06:46:23 | 155,902,724 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 418 | py | student_grades = [9.1,8.8,7.5]
mysum = sum(student_grades)
length = len(student_grades)
mean = mysum / length
print(length)
max_value = max(student_grades)
print(max_value)
student_grades = [9.1, 8.8, 10.0, 7.7, 6.8, 8.0, 10.0, 8.1, 10.0, 9.9]
print(student_grades.count(10.0))
username = "Python3"
print(username... | [
"trenticle@LIVE.COM"
] | trenticle@LIVE.COM |
d99fcf4ac48e691d6dbc64be98ab7be92e67452b | 3570c4b8dd1792d595c32de27547214b63f95169 | /tests/test_example.py | c9ed82e2ebf6ff0543f1204dbf393575fc373778 | [
"Apache-2.0"
] | permissive | CS5331-GROUP-7/rest-api-development | ec0d484662f0cd8caa7e575cf8c22d0658bfe43e | 4d421497d2802fe1c5441bee1ea7d55d36df354e | refs/heads/master | 2021-09-14T11:29:08.671090 | 2018-05-12T13:38:55 | 2018-05-12T13:38:55 | 122,959,571 | 2 | 0 | Apache-2.0 | 2018-03-05T05:37:34 | 2018-02-26T11:21:47 | Python | UTF-8 | Python | false | false | 517 | py | import pytest
import json
from flask import Flask, url_for
from src.service.views import ENDPOINT_LIST
def test_get_index(client):
page = client.get(url_for('views.index')) # can use the endpoint(method) name here
assert page.status_code == 200 # response code
data = json.loads(page.data) # ... | [
"tanxs93@gmail.com"
] | tanxs93@gmail.com |
e797642929d74abf07f38be4d559a60c4edc39c4 | a7b07e14f58008e4c9567a9ae67429cedf00e1dc | /lib/jnpr/healthbot/swagger/models/rule_schema_variable.py | 630dceaecb69d32efa58bd7ea4450d2121bdd4cb | [
"Apache-2.0"
] | permissive | dmontagner/healthbot-py-client | 3750d8375bc4fa7bedcdbc6f85f17fb812c19ea9 | 0952e0a9e7ed63c9fe84879f40407c3327735252 | refs/heads/master | 2020-08-03T12:16:38.428848 | 2019-09-30T01:57:24 | 2019-09-30T01:57:24 | 211,750,200 | 0 | 0 | Apache-2.0 | 2019-09-30T01:17:48 | 2019-09-30T01:17:47 | null | UTF-8 | Python | false | false | 6,447 | py | # coding: utf-8
"""
Healthbot APIs
API interface for Healthbot application # noqa: E501
OpenAPI spec version: 1.0.0
Contact: healthbot-hackers@juniper.net
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
class RuleSchemaVa... | [
"nitinkr@juniper.net"
] | nitinkr@juniper.net |
e64142acb1d5ae1057cb0115cbd5acc17749fddf | 1ad512e9023e7ed43f8f3647733718ba65c20ce8 | /apps/organization/urls.py | 56bdc2ed1d6bf4eeb4d760e2f33f1943817437f2 | [] | no_license | caijunrong31/MxOnline2.7 | e660bfa0619c4ef94ce9da614388370ec4c74725 | a60054a2938fcc0707be4c0903df1afa75e9cbb0 | refs/heads/master | 2020-03-10T20:18:48.010733 | 2018-04-17T14:16:06 | 2018-04-17T14:16:06 | 129,567,829 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,135 | py | # _*_ coding: utf-8 _*_
__author__ = 'cai'
__date__ = '2017/12/3 11:18'
from django.conf.urls import url, include
from organization.views import OrgView, AddUserAskView, TeacherListView, OrgHomeView, OrgCourseView, OrgDescView, OrgTeacherView, AddFavView
from organization.views import TeacherDetailView
urlp... | [
"13113389477@163.com"
] | 13113389477@163.com |
c12a7e13c5304a8904fdf8469d845c43f43baafe | c5a8d48d902523e88e620e22930ba4dfd8578cdf | /api/journal/migrations/0028_invoice_status.py | d0785e46a7082a4cdb83eec6398572caa795544d | [] | no_license | stuartquin/soitgoes | 1f8cd5dbff2a33f3dd0e89025726c8ac605dbc8c | 30f619db560607847d092ec6a897484fea5f4db5 | refs/heads/master | 2023-05-31T15:49:52.484803 | 2023-05-19T08:45:10 | 2023-05-19T08:45:10 | 49,604,474 | 3 | 0 | null | 2020-03-23T11:51:00 | 2016-01-13T21:52:46 | JavaScript | UTF-8 | Python | false | false | 537 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.9.1 on 2017-03-25 16:56
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('journal', '0027_auto_20170325_1056'),
]
operations = [
migrations.AddField(
... | [
"stuart.quin@gmail.com"
] | stuart.quin@gmail.com |
f0435c5ea05ff27e76eb5d6133f40a45dacdc85a | 369838e937e11fecc4e97362f83e5f588961b614 | /poly_gen_anaylisis.py | 290c40e576a9c838daa48bcca650eb8d9aa5a220 | [] | no_license | abhishek-pes/CCBD-Polygon-Generator | 6a8559b1c7128c0dee272abaf0401ede80e0a48b | beb3249fb379994c72229374588dbfbb4661a2e9 | refs/heads/main | 2023-05-08T22:55:14.811871 | 2021-05-25T16:03:54 | 2021-05-25T16:03:54 | 367,890,885 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 3,462 | py | '''
currently this program works well while generating around 50-70 polygons and each polygon can have vertices from 10-500.
But as the number of vertices in polygons increase it becomes more star like.
The final wkt file generated can be plotted with the help of qgis software (open-source)
'''
from random import samp... | [
"abhishekmis40@gmail.com"
] | abhishekmis40@gmail.com |
94a1445b5d73052a0e9fbc2caed1e94ae674a0da | 4f2b9848ee1cf41017b424c7367a240f93625e86 | /doc/tutorial/config.py | cdb60e8b8cc1f8f18664a9d5edb55b488c038574 | [
"Apache-2.0"
] | permissive | martin-dostal-eli/python-icat | f5cc0e497376d7264db1af2bb9ad588e29a9bd7b | 8c882a3095f2dd7276a7c0edba44dc9b3ef4eedd | refs/heads/master | 2023-08-18T02:12:30.267009 | 2021-07-20T11:24:25 | 2021-07-20T11:24:25 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 252 | py | #! /usr/bin/python
from __future__ import print_function
import icat
import icat.config
config = icat.config.Config(needlogin=False, ids=False)
client, conf = config.getconfig()
print("Connect to %s\nICAT version %s" % (conf.url, client.apiversion))
| [
"rolf.krahl@helmholtz-berlin.de"
] | rolf.krahl@helmholtz-berlin.de |
c17852429364551ea37ca25d24443315fc54f521 | 89aced396640fed8960a05ad528c55ec6733da25 | /handler/file_handler.py | 927f9ed59e428988f4cfa06e806565deedfa966c | [] | no_license | jubileus/tornado | 33c439775ab12fb42235667f3027d98319a14325 | 94a8d65908a23ab6c4c653c7c54473a5ec7e081a | refs/heads/master | 2021-01-10T09:28:40.084949 | 2015-11-02T08:05:24 | 2015-11-02T08:05:24 | 45,165,814 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,423 | py | # coding=UTF-8
import os
from handler.base_handler import BaseHandler
__author__ = 'jubileus'
file_path = '/home/jubileus/'
class FileHandler(BaseHandler):
def data_received(self, chunk):
pass
def get(self):
self.render('file.html')
class UploadFileHandler(BaseHandler):
def data_rece... | [
"1509483682@qq.com"
] | 1509483682@qq.com |
78ae44a87cf973b283dc8f40c51244cc070b8456 | e8500b4a09882ee34af21bee4f522546f07ff7e9 | /src/michelson_kernel/docs.py | a0df3b3b380628618798ca4674e8446d2db70d9b | [
"MIT"
] | permissive | kaellis/pytezos | 71a8fa29f5d48fed1e62698fa65c32c162e440ef | ab88bb4138094fbe7fe6852f5a908423bf9e9d60 | refs/heads/master | 2023-08-31T19:03:19.877244 | 2021-11-02T03:40:00 | 2021-11-02T03:40:00 | 423,692,515 | 0 | 0 | MIT | 2021-11-02T03:40:01 | 2021-11-02T03:16:51 | null | UTF-8 | Python | false | false | 16,985 | py | docs = {
'ABS': 'ABS\nABS :: int : A => nat : A\nObtain the absolute value of an integer',
'ADD': 'ADD\n'
'ADD :: nat : nat : A => nat : A\n'
'ADD :: nat : int : A => int : A\n'
'ADD :: int : nat : A => int : A\n'
'ADD :: int : int : A => int : A\n'
'ADD :: timestamp : int : A => timestamp :... | [
"noreply@github.com"
] | kaellis.noreply@github.com |
964881a63aa70e592bbbea9c87df3c6f601420fc | afe57349119d3213a825999f26271c76df3ec871 | /aplib.py | 91067e8cdcc06c4cd8cc518271a9ff159243f8ae | [] | no_license | ActorExpose/aplib-ripper | 211af16de530404982975a1fb276de0bbbb08f9d | 11383396bec977d352574266999939bd000227bd | refs/heads/master | 2022-02-05T03:01:32.977564 | 2019-05-21T02:39:25 | 2019-05-21T02:39:25 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 11,869 | py | # this is a standalone single-file merge of aplib compression and decompression
# taken from my own library Kabopan http://code.google.com/p/kabopan/
# (no other clean-up or improvement)
# Ange Albertini, BSD Licence, 2007-2011
# from kbp\comp\_lz77.py ##################################################
def find_long... | [
"haddoc@marlinspike.local"
] | haddoc@marlinspike.local |
5c6bdf9b95a8cda74e2d9d3ad5074f0a002e7c12 | 17427e84a6d3e8c5e1d363d7824fa9ded9e0498d | /create_figs/scripts/gaussian.py | 9e040ecf99010b0fec87b52bb6819d679ff2c37d | [
"MIT"
] | permissive | avishvj/ts_gen | b4a685266dbc109b13fceb16e87eb699241c9212 | 8877ce9115f13ff1d9c72513d4c37ae782e23b32 | refs/heads/master | 2023-06-06T23:21:28.830917 | 2021-07-06T23:20:09 | 2021-07-06T23:20:09 | 326,278,858 | 0 | 0 | MIT | 2021-01-02T22:31:38 | 2021-01-02T22:00:47 | null | UTF-8 | Python | false | false | 8,269 | py |
import numpy as np
import openbabel
import pybel
class Gaussian(object):
"""
Class for reading data from Gaussian log files.
The attribute `input_file` represents the path where the input file for the
quantum job is located, the attribute `logfile` represents the path where
the log file containin... | [
"av1017@ic.ac.uk"
] | av1017@ic.ac.uk |
7a2fcbba659bb83f947490fc946a7ff3ba4665d2 | eefb06b0d8c8c98c1e9cfc4c3852d5c453eb5429 | /data/input/ARMmbed/htrun/mbed_host_tests/host_tests_plugins/host_test_plugins.py | 1c965fab88a3dc757f8bce97bec9d4293718641b | [] | no_license | bopopescu/pythonanalyzer | db839453bde13bf9157b76e54735f11c2262593a | 8390a0139137574ab237b3ff5fe8ea61e8a0b76b | refs/heads/master | 2022-11-22T02:13:52.949119 | 2019-05-07T18:42:52 | 2019-05-07T18:42:52 | 282,079,884 | 0 | 0 | null | 2020-07-23T23:46:09 | 2020-07-23T23:46:08 | null | UTF-8 | Python | false | false | 7,762 | py | """
mbed SDK
Copyright (c) 2011-2015 ARM Limited
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in wr... | [
"rares.begu@gmail.com"
] | rares.begu@gmail.com |
49fb226b675d489572ed2baae6a5f8788986cf41 | cf71ad17bc20b3b9fd5a8c5104512acbe9da813d | /slab/experiments/Hafnium/ExpLib/seq_expt_new.py | ad314bb754df8692de1782343d1370d845d36555 | [
"MIT"
] | permissive | SchusterLab/slab | 8c62c3246f29a500ad75602185eb703fcaa30e34 | b991c7de1dd5ded42c55dbc40fdf2f4de289db54 | refs/heads/master | 2023-01-29T06:29:35.621657 | 2022-09-09T18:10:08 | 2022-09-09T18:10:08 | 55,183,085 | 8 | 9 | null | 2021-08-06T17:21:52 | 2016-03-31T21:08:23 | Python | UTF-8 | Python | false | false | 2,195 | py | __author__ = 'Nelson'
from slab.experiments.General.run_experiment import *
from slab.experiments.Multimode.run_multimode_experiment import *
import numbers
from slab import *
import json
import gc
def update_dict(d, u):
for k, v in u.items():
if isinstance(v, collections.Mapping):
r = update... | [
"david.schuster@gmail.com"
] | david.schuster@gmail.com |
a43f87a27d0d128c1a43e0aa7aeecc80d141900e | 388a5a0371835cc0b57761cab40a83c20f9aefdb | /xici_spider.py | 66112f4af3a5bba22328fa5d4fe2cbdb09e91e8d | [] | no_license | ricardozhang1/crawl_xici_ip | 96fefa7ce7d7c3d2cc97871aec2f0f396646854f | 2ef5c8f57b81b07abd9d571ce9e7d1678dc0324d | refs/heads/master | 2021-05-16T15:02:04.588173 | 2018-03-22T04:00:15 | 2018-03-22T04:00:15 | 118,891,651 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,535 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import requests
import MySQLdb
import time
from scrapy import Selector
from utils.common import get_md5
user_agent = "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.84 Safari/537.36"
headers = {
'User-Age... | [
"noreply@github.com"
] | ricardozhang1.noreply@github.com |
45be5e89063ddcadd087f81db42d07dfaf520bff | cb056e2250f0130c0d0b965f2d6dd88ef8f74506 | /train.py | 599073aeeefb0f5c50bbba69c8f55b2494671b77 | [] | no_license | Dy1anT/AI-Sec-homework | 2da9b2b942634a1a3e3d8f0494eadda4f90049fc | 8fa8144d3b455a9b924dc071aa30a39d84d68e25 | refs/heads/main | 2023-08-16T20:16:44.397446 | 2021-10-08T04:37:46 | 2021-10-08T04:37:46 | 410,306,343 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,680 | py | import torch
import torch.nn as nn
import torch.optim as optim
import torchvision
import torchvision.transforms as transforms
import matplotlib.pyplot as plt
import argparse
import time
from model import ResNet18, Vgg16_Net
from utils import *
parser = argparse.ArgumentParser(description='AI Sec homework_1')
parser.ad... | [
"627756747@qq.com"
] | 627756747@qq.com |
5499c1d27c8ce008320d45fd388a3f8319c2ff87 | 9ab1cecff161cec8606165dc614bbfcb9bda2745 | /fnt2xml.py | 26ad74360718341adcb163181d42190317bb40d7 | [] | no_license | wowgeeker/fnt2xml | 4fb8ad532eecfb3299842fad46ff9080adcd317e | 72dab5bf6113b118789f5a0dbaef056ec0451568 | refs/heads/master | 2020-03-22T19:48:07.874948 | 2018-07-11T09:29:57 | 2018-07-11T09:29:57 | 140,551,648 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,789 | py | # -*- coding:utf-8 -*-
# author: nobody
# createdAt: 2018/7/11
input = 'jiesuan_num.fnt'
arr = input.split('.')
arr[0] += 'xml'
output = '.'.join(arr)
header = '<?xml version="1.0"?>'
import xml.etree.ElementTree as etree
root = etree.Element("font")
info = etree.SubElement(root, "info")
common = etree.SubElement(r... | [
"whuzouming@gmail.com"
] | whuzouming@gmail.com |
5957be3eebf4bcc847582b8b20f6771924155403 | 4c9580b2e09e2b000e27a1c9021b12cf2747f56a | /chapter05/chapter05_example01/chapter05_example01/settings.py | 6bdae198873c43cd8667c6b9aac8266fb69c6642 | [] | no_license | jzplyy/xiaoyue_mall | 69072c0657a6878a4cf799b8c8218cc7d88c8d12 | 4f9353d6857d1bd7dc54151ca8b34dcb4671b8dc | refs/heads/master | 2023-06-26T02:48:03.103635 | 2021-07-22T15:51:07 | 2021-07-22T15:51:07 | 388,514,311 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,368 | py | """
Django settings for chapter05_example01 project.
Generated by 'django-admin startproject' using Django 2.2.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.2/ref/settings... | [
"jzplyy@126.com"
] | jzplyy@126.com |
6a109be858f97838ec1b218c45ba9290bf5caf36 | dcc611cfe2f8525ade12bd2238748b0b036e6c47 | /pages/views.py | a5a07b7d93052b198aafedb08b1de868bcf67ecb | [] | no_license | tjtiv/SupplyFinder | 7df4efdb593a5c14697af6d1c3abe581870f0a21 | 313e8e78fc5ac273302152ff8e9386e1ae9cb943 | refs/heads/master | 2022-11-27T08:01:46.171098 | 2020-08-01T03:04:59 | 2020-08-01T03:04:59 | 282,994,167 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 125 | py | from django.shortcuts import render
def home_view(response, *args, **kwargs):
return render(response, "index.html", {})
| [
"ivtjt78@gmail.com"
] | ivtjt78@gmail.com |
e50221e7704c68fda8b8c2c1e3ea75b25e730961 | 94d9bdd6d6a1b7a7859b0b828c9592cf7f38cbc2 | /Python/SciPy/OperationsBetweenMatrices.py | 9799527b9b8667a076a4725dfdbab120e3731df8 | [] | no_license | EdelKearney/FileDump | afdb731a6dfdb21d789ebee29c12fb3812ddcf4a | 97399f0909b824c6b9fd5661a81614ed9b71cd25 | refs/heads/master | 2020-09-08T19:21:05.301808 | 2019-11-12T13:15:34 | 2019-11-12T13:15:34 | 221,220,547 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 237 | py | # -*- coding: utf-8 -*-
"""
Spyder Editor
This is a temporary script file.
"""
import numpy
import scipy.linalg
mu = 1/numpy.sqrt(2)
A = numpy.matrix([[mu, 0, mu], [0,1,0], [mu, 0, -mu]])
B = scipy.linalg.kron(A,A)
print(B[:,0:-1:2]) | [
"A00245506@student.ait.ie"
] | A00245506@student.ait.ie |
ef8495ed987b371d3c9c09347e179d7fee0cfd92 | 6320fef2ea7376c2b35f97f1a5af004e90f09098 | /1-2주차 실습(복습)/venv/Lib/site-packages/pygame/tests/test_utils/__init__.py | fd3ec69cb674929081e3d41837df1458fa33d018 | [] | no_license | Dplo1514/ploaistudy | 7aa08d7f71653748a9e32dcc09ee8f6cec0aaed9 | e35e42b1e5f0c90cc1e2a59993a1ef73d8872d0c | refs/heads/master | 2023-09-03T00:45:55.601651 | 2021-10-24T12:19:38 | 2021-10-24T12:19:38 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,442 | py | #################################### IMPORTS ###################################
is_pygame_pkg = __name__.startswith("pygame.tests.")
import tempfile, sys, pygame, time, os
################################################################################
# Python 3.x compatibility
try:
xrange_ = xrange
... | [
"dladlsgur3334@gmail.com"
] | dladlsgur3334@gmail.com |
20fa377820e22a72852c0ce92c6e7a078111b216 | cf28af03915775943c5ba087f4a641d9bd7a67c4 | /KNN_from_scratch.py | 10a16e935b92110e9eae061c9cfc1d44e06c8b6d | [] | no_license | c-lyons/data-science-from-scratch | a38c918545aad5403d4022dc416b76f632d4b592 | 409cad0e2438cea12b3ad8f1e78f00982ade628d | refs/heads/main | 2023-04-03T14:22:41.883304 | 2021-04-24T14:43:10 | 2021-04-24T14:43:10 | 361,186,359 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,388 | py | from sortedcontainers import SortedList
import numpy as np
import pandas as pd
from datetime import datetime
def get_data(limit=None):
print("Reading image data and transforming...")
df = pd.read_csv('data/mnist_sample.csv')
data = df.to_numpy()
np.random.shuffle(data)
X = data[:, 1:] / 255 # norma... | [
"lyonsconor@hotmail.com"
] | lyonsconor@hotmail.com |
53f85d5e77b251fd803da0cc317dc6dac3e3fd02 | b74e9be747c1a99fc5d67ca096157f512baf02ca | /tools/harness-automation/cases/reed_5_2_4.py | 151fa67c0fb6cee9b74e8e983fa7bb67a1aea761 | [
"BSD-3-Clause",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | amccool/openthread | 468838cebc083d234192926aacb0e3efc0a83463 | 1e9d3c1dbfd66aa48c4cbb1dda0b41c9f05fefc7 | refs/heads/master | 2021-01-16T23:03:46.503666 | 2016-09-06T03:21:05 | 2016-09-06T03:21:05 | 67,469,844 | 0 | 0 | BSD-3-Clause | 2019-11-01T20:11:16 | 2016-09-06T03:23:32 | C++ | UTF-8 | Python | false | false | 1,846 | py | #!/usr/bin/env python
#
# Copyright (c) 2016, Nest Labs, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this ... | [
"jonhui@nestlabs.com"
] | jonhui@nestlabs.com |
c0825be943e0bd4e2f219983d3ffeb0a9f9066ac | 5356098b5871eeded77626b9176f6cab3ea2bb66 | /Sample 14 -DATA Structures (SET).py | 7ac844d02c8ad4b70976165d7157398e74a969dc | [] | no_license | gxsoft/SkillShare---Python-3--Programming-in-Py-for-Beginners | ed6522489c2c608f2130d737930210ba80c4dcfd | 3908482c612e27f87f7111fc29ea86ceb3d6340c | refs/heads/master | 2020-05-17T12:12:02.901323 | 2019-05-11T14:35:18 | 2019-05-11T14:35:18 | 183,705,343 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 451 | py | """
Sample 14 -DATA Structures (SET).py
# ------------------------------------------
# Whats is SET?
#
Unique |
LISTS
TUPLES
DICTIONARIES
SETS
"""
A = {40, -2, 20, 13}
B = {4, 7, 10, 20}
print(A|B)
A.add(24)
print(A)
print(sorted(A))
A = [40, -2, 20, 13, 40]
print(... | [
"github@gxgro.com.ar"
] | github@gxgro.com.ar |
7b5c47ce2f3ccc6f8806a4f85dae1a998c6e8e45 | 03adcb1d526cb4dbaad05fbf140337a861fb3618 | /agent/forms.py | d4514300502d7f78e4c53ed12dddd4f681fc081f | [] | no_license | manish5122000/rc_loan | d55eb03b6924c9f4de4b3cfbeb98ac524fb72832 | 079cd824238d3703982d14178028eaeedcc109b5 | refs/heads/main | 2023-06-30T20:12:24.595517 | 2021-08-02T18:52:51 | 2021-08-02T18:52:51 | 392,059,061 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 979 | py | from django import forms
from django.contrib.auth.forms import UserCreationForm, AuthenticationForm, UsernameField, PasswordChangeForm, PasswordResetForm, SetPasswordForm
from django.contrib.auth.models import User
from adminss.models import Roles
from django.contrib.auth import password_validation
from django.utils.t... | [
"mauryamanish5122000@gmail.com"
] | mauryamanish5122000@gmail.com |
1839dffbf6f70b8e7aec0547cae7155ba0fad1b2 | 2a27a371c9effff38e2a070b603de93167d918de | /Problem7.py | f470f1482f3567c4dca9817f2c7c8f5c19141db0 | [] | no_license | tikipatel/Project-Euler | c25e4c9639014b512305d9d3590105bb0cc95854 | 277ba988c4d65d7b70f7d8350303982043a3322d | refs/heads/master | 2016-09-15T11:16:42.262177 | 2016-04-29T03:34:52 | 2016-04-29T03:34:52 | 26,097,578 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 419 | py | import time
import sievePrimes
def is_prime(n):
if n <= 3:
return n >= 2
if n % 2 == 0 or n % 3 == 0:
return False
for i in range(5, int(n ** 0.5) + 1, 6):
if n % i == 0 or n % (i + 2) == 0:
return False
return True
counter = 1
increment_me = 1
while(counter != 1000... | [
"pratikpatel@me.com"
] | pratikpatel@me.com |
16bae639bb18e64b6e9238ba7f2510be78015c6e | 99acd2459a58dd1ee549128f70044331f4178dd8 | /storebackend/product/views.py | 80cbd012255b74c2f77ca9d9b8915f3a2c834421 | [] | no_license | AaronM18/e-commerce-test | 355992a1fa985533418acc8ce0b9a22bfd195515 | 040495bd5c730fbfe3e45a7e6e9e88150db478c1 | refs/heads/main | 2023-04-27T23:30:51.082915 | 2021-05-20T04:15:38 | 2021-05-20T04:15:38 | 363,311,350 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,695 | py | from django.shortcuts import render
from django.http import Http404
from django.db.models import Q
from rest_framework.views import APIView
from rest_framework.response import Response
from rest_framework.decorators import api_view
from .models import Product, Category
from .serializer import ProductSerializer, Categ... | [
"aaron18mo@gmail.com"
] | aaron18mo@gmail.com |
913a809b21dce8f948f0e742c823d688bef2cbc7 | 6032f996f989d521dbdee23ce6c1fbd778d8e964 | /qanta/wikipedia/categories.py | b5dedd32b88990ad251a82da1ae4cf7fe424ea37 | [
"MIT"
] | permissive | npow/qb | 9af1c07afd10f6aad9dbcbdd9209c6fde0e4347f | 044e623d2cbda96209fa1fdedffefa2208c98755 | refs/heads/master | 2020-05-26T15:41:13.864334 | 2019-05-26T16:47:07 | 2019-05-26T16:47:07 | 188,290,907 | 0 | 0 | null | 2019-05-23T19:02:23 | 2019-05-23T19:02:23 | null | UTF-8 | Python | false | false | 1,525 | py | """
Process Wikipedia category links
"""
import json
import re
import csv
import click
import tqdm
@click.group()
def categorylinks_cli():
pass
@categorylinks_cli.command()
@click.argument('categories_csv')
@click.argument('out_jsonl')
def clean(categories_csv, out_jsonl):
with open(categories_csv) as in_f,... | [
"ski.rodriguez@gmail.com"
] | ski.rodriguez@gmail.com |
a6ed5a8a5d3336d2bf6c6ba243318cbfca4972e6 | 2e6b7c3a43c21d15f70a4f9f66180193f2b08113 | /LearnFixture/test_04.py | f0cbc229ad689caf0da9a867993f9a851b916115 | [] | no_license | 15619592320/ApiAutoTest | 9cbf858774419fb332e2a2d8af2671b980537425 | 75c0fa6b63902f6cb18de1bfc458facdb0f3ce5a | refs/heads/master | 2022-12-18T23:36:20.578922 | 2020-09-30T07:16:10 | 2020-09-30T07:16:10 | 299,828,683 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 224 | py | '''
fixture带返回值
'''
import pytest
@pytest.fixture()
def data():
return {"username":"root","pwd":"123456"}
def test_case01(data):
print(f"{data}")
print(f"{data['username']}")
print(f"{data['pwd']}") | [
"623060480@qq.com"
] | 623060480@qq.com |
322c9af3e783d219ef22bc3a5d7b31019499f926 | b85b323f12ddca5678d7cf33e2cc4ec53693f893 | /tests/conftest.py | ee4bd4f6cae00981757bd29bbb9e763912597417 | [
"MIT"
] | permissive | rapydo/do | d3168616ac2c7bfbe12ed34c5f932d0c567c79b4 | 6c23d7f7a747305e2acb37ac6e17686169b95dbf | refs/heads/3.0 | 2023-08-30T19:49:01.383844 | 2023-08-18T15:53:46 | 2023-08-18T15:53:46 | 91,668,796 | 12 | 12 | MIT | 2023-09-07T23:17:37 | 2017-05-18T08:31:26 | Python | UTF-8 | Python | false | false | 1,057 | py | import os
import pytest
from faker import Faker
# This fixture is execute before every test to create a new random folder
# To execute tests in an insulated environment
@pytest.fixture(autouse=True)
def create_folder() -> None:
# If you are already in a test folder
# (this is the case starting from the secon... | [
"noreply@github.com"
] | rapydo.noreply@github.com |
2cbb847c7b2c9cdd4feb96d32b116a46c2e068d2 | 1392a2180bf274fdf9ca05888162b19ce67407d5 | /app/tosca/model/template.py | ad243fec65e8c32616304802d994272e967c4022 | [] | no_license | di-unipi-socc/toskose-packager | 3ab170f20a02baceda276abef5346f7d43f1e476 | 4fda1baec7dd13f6c4372bf54e65de401f5fd408 | refs/heads/master | 2023-01-08T01:15:48.937136 | 2020-04-16T08:46:51 | 2020-04-16T08:46:51 | 166,801,812 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,859 | py | '''
Template module
'''
import six
import os
from .nodes import Container, Root, Software, Volume
class Template:
def __init__(self, name):
self._nodes = {}
self.name = name
self.description = 'No description.'
self._outputs = []
self.tmp_dir = None
self.manifest_... | [
"matteo.bogo@gmail.com"
] | matteo.bogo@gmail.com |
66011f93ef5d97fdf940d9b1412fc1b73b26d96f | b7ffe6c5269ebe4e539860aa6e6bbc682337b10d | /20190304/TCT_20190304_DongGeunLee.py | 2aa51f5940a6f8bf35c955cb8a24d92640139e61 | [] | no_license | hrkim28/TCT | eaa9f8b54f743db5c271d6fd8dbb1ed9d867a9a7 | b749a8b656a54f3470fa63e2c2e3854fca570720 | refs/heads/master | 2020-04-15T04:49:58.922737 | 2019-12-06T05:56:23 | 2019-12-06T05:56:23 | 164,397,901 | 9 | 7 | null | null | null | null | UTF-8 | Python | false | false | 278 | py | def is_pal(p_char):
return p_char == p_char[::-1]
p_input = input("문자 입력하세요 :")
if is_pal(p_input):
print('예제결과 :',0)
else:
# 회문체크 및 만들기
print('추가로직은 좀더 학습 후 도전해도록 하겠습니다.^^........')
| [
"yeloxen@naver.com"
] | yeloxen@naver.com |
992015df1a02e13ed26179b6b03e4a7a89c1dfcd | b872ceed9575f88ddc2fd483598bda1f80a13507 | /constants.py | 669a14e1c99df153542398bd95fddbb82a206ab9 | [] | no_license | betohurtado3/Pokemon | 4c734967a585aa74a95e70aad7dcc4d98d95c586 | 4cbad94ff5d4791c81b9787d58407d799d5adeed | refs/heads/master | 2023-01-05T13:45:00.024837 | 2020-11-11T03:22:12 | 2020-11-11T03:22:12 | 311,851,129 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 275 | py | #Constantes de status de pokemones
HP = "HP"
ATTACK = "Attack"
DEFENSE = "Defense"
SPATTACK = "SpAttack"
SPDEFENSE = "SpDefense"
SPEED = "Speed"
PHYSICAL = "physical"
SPECIAL = "special"
#constantes de comandos
DO_ATTACK = "attack"
DO_ATTACK_SELECTION = "selected_attack"
| [
"betohurtado3@hotmail.com"
] | betohurtado3@hotmail.com |
2b5fc5daf0ba6566ee675951754d379f94225f25 | c69451542ef9ffb6e3f12bcd99c3ea2fe84073ee | /SeedCast/Masters/migrations/0016_auto_20180923_1953.py | 5692b6dbf6ea0379e14d0dde59f77d7d3a7dc12b | [] | no_license | subhashpracs/IRRI-SEEDCAST | 50297cd51d0d8f862627c18f1be9186d2e20203f | 771cf9fb1db1fcf437221986e1db31e6c620c40c | refs/heads/master | 2020-03-29T14:44:20.439099 | 2018-09-23T22:51:09 | 2018-09-23T22:51:09 | 150,031,123 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 525 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2018-09-23 19:53
from __future__ import unicode_literals
import datetime
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('Masters', '0015_auto_20180923_1952'),
]
operations = [
migrat... | [
"sai@pracs.in"
] | sai@pracs.in |
665dcc52eba524df257caff6e50e0b2f063ee789 | ae65873c3584cef7139066b224daad04410af6d2 | /Top10Words.py | b6f4ffe80cc71c2040700a1f7c86913682066030 | [] | no_license | rajatkashyap/Python | 2240c7472d07803c460c7a55d570e20694b694f9 | f74c85c65b0e209a5f7ab25b653d42835222faaf | refs/heads/master | 2022-06-25T19:20:52.847498 | 2022-06-08T14:40:45 | 2022-06-08T14:40:45 | 145,714,257 | 0 | 0 | null | 2022-04-25T00:18:37 | 2018-08-22T13:39:14 | Python | UTF-8 | Python | false | false | 558 | py | f=open('UHC.txt')
dict={}
words=f.read().split()
for word in words:
w=word.lower()
dict[w]=dict.get(w,0)+1
#print dict
str_tups=[]
for k,v in dict.items():
str_tups.append((v,k))
#print str_tups
str_tups.sort(reverse=True)
print str_tups[:10]
keys=dict.keys()
values=dict.values()
#pr... | [
"rajatkashyap@Rajats-MBP.T-mobile.com"
] | rajatkashyap@Rajats-MBP.T-mobile.com |
9ad9f1f73f94769307e72df7e57956a71565790a | e741d661b1cbb1d48eff4adff3ce8d424b0b3aee | /meiduo_mall/apps/payment/apps.py | d314f1fe58cfc99b4a93ba784b8eadf87541370a | [
"MIT"
] | permissive | Tao-bug/meiduo_project | 09b3900ab7e1436ee3201c53461a9c119d1f56db | e3a24eac2c8231d0e27f6a7fa639dd36baa410b0 | refs/heads/master | 2022-07-16T02:18:22.319641 | 2019-11-12T13:54:23 | 2019-11-12T13:54:23 | 218,697,808 | 0 | 0 | MIT | 2022-07-01T00:55:01 | 2019-10-31T06:20:01 | JavaScript | UTF-8 | Python | false | false | 94 | py | from django.apps import AppConfig
class PaymentConfig(AppConfig):
name = 'apps.payment'
| [
"897384405@qq.com"
] | 897384405@qq.com |
2cfdb3060d28b139002d5a66203d6e2f8c2a6048 | be03e9eb173c04fea77a4a1eada01b1b74ef6b0d | /langevin/__init__.py | b3e5aef49577bc993b223f2eb404c5845c4fc881 | [
"MIT"
] | permissive | raickhr/langevin | b3ac6e76180114795bec6b3494b98dad202d89d3 | 3a197740404f4986aa9160e6a0a381861c65f22b | refs/heads/master | 2020-03-30T11:05:38.124589 | 2018-10-03T19:52:03 | 2018-10-03T19:52:03 | 151,152,923 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 153 | py | # -*- coding: utf-8 -*-
"""Top-level package for Langevin."""
__author__ = """Shikhar"""
__email__ = 'shikhar.rai@rochester.edu'
__version__ = '0.1.0'
| [
"shikhar.rai@rochester.edu"
] | shikhar.rai@rochester.edu |
c4623c36205ab3d912a96785be33eb4148c0fbd8 | 30602837319e2bff13fcf12f857071f375fcb56d | /Ironnano/admin.py | d7d646663afe81e855dd83038ecd1e997dc2b8ee | [] | no_license | Aaryan-Dambe/Hygenie | f9985cf86768c6151b23d775890fd1f6e9c56a95 | 73416a5812b478b847448a31e18798b16de03ca4 | refs/heads/main | 2023-04-13T00:09:25.043578 | 2021-01-09T18:28:53 | 2021-01-09T18:28:53 | 328,220,671 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 117 | py | from django.contrib import admin
from .models import profit
# Register your models here.
admin.site.register(profit)
| [
"76246356+Aaryan-Dambe@users.noreply.github.com"
] | 76246356+Aaryan-Dambe@users.noreply.github.com |
7277ac2eaabcf7b897836bbb6151f5572887f2ed | e00f7d486559fa465d1804e45ea9f7f0a589c675 | /CLI-Assign2.py | b67b44ca59f8d7fc45ee118a0ae9a5473270fcba | [] | no_license | dhairyaj99/Command-Line-Interface | 1ebd036adb21289fefa068026a077ebd85108d5d | 378d436dfc2e1e544e602f74b88622dda0b5f0a5 | refs/heads/master | 2022-09-05T17:10:26.823650 | 2020-05-20T20:19:38 | 2020-05-20T20:19:38 | 265,677,160 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,827 | py | from cmd import Cmd
import os
import sys
import fnmatch
class MyCLI(Cmd):
prompt = ">> "
def do_exit(self, args):
"""
Exits the system
"""
raise SystemExit()
def do_pwd(self, args):
"""
Prints current working directory of the shell
"""
cur... | [
"32658775+dhairyaj99@users.noreply.github.com"
] | 32658775+dhairyaj99@users.noreply.github.com |
851a8b37f8cd9c9d414e0f78a1e8279946ad3262 | fc424e605e7e969b65ab4a0100f6031ad8f8851c | /PixelDP_test_experiment/flags.py | da08ea3e3d97c5c042705fb13b23f5c9e6503bb6 | [] | no_license | XintongHao/Robust-CNN-with-Differential-Privacy | 42a346dfc105af45297df7c380b5b13e81ed9402 | cbf0ca34ca8c6589f7829af47bb50658d794fb89 | refs/heads/master | 2021-10-08T18:33:44.772149 | 2018-12-15T23:10:24 | 2018-12-15T23:10:24 | 160,233,609 | 6 | 0 | null | null | null | null | UTF-8 | Python | false | false | 774 | py | import os
import tensorflow as tf
FLAGS = tf.app.flags.FLAGS
tf.app.flags.DEFINE_string('dataset', 'cifar10', 'mnist, cifar10 or cifar100.')
tf.app.flags.DEFINE_string('mode', 'train', 'train or eval.')
tf.app.flags.DEFINE_string('data_path', os.path.join(os.path.expanduser("~"), 'datasets'),
... | [
"hxtong@bu.edu"
] | hxtong@bu.edu |
03616431f07baf1f3dbe3f0c765987f73126cd8f | b42785b660c9e62b10e1ee768076dd93deb97c7f | /tests/test_perms.py | 53cf2cee277a234741d7fdd8d67941311f7989a5 | [] | no_license | aphymi/pondbot-v2 | c50c5ca801734876f059294a7d611b28d01fe0b5 | 694f25d0b1ee8b749d3e24dd314b2b81aa8e2051 | refs/heads/master | 2023-04-09T22:16:24.816544 | 2020-07-23T22:10:31 | 2020-07-23T22:10:31 | 263,471,648 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,624 | py | from unittest import TestCase
import yaml
import permissions
from permissions import PermNode
class TestPermTrie(TestCase):
def test_trie_simple_eq(self):
self.assertTrue(PermNode(root=True) == PermNode(root=True))
self.assertTrue(
PermNode("a", tvalue=False) == PermNode("a", tvalue=False)
)
self.asser... | [
"aphymi@gmail.com"
] | aphymi@gmail.com |
037c0297e6528cdbf68ecb8b3295c9ce74f0598e | de24f83a5e3768a2638ebcf13cbe717e75740168 | /moodledata/vpl_data/143/usersdata/126/62651/submittedfiles/av2_p3_m2.py | 7d22e7aa5f8b510c2f6ca3d97182ffc3fc5c67bd | [] | no_license | rafaelperazzo/programacao-web | 95643423a35c44613b0f64bed05bd34780fe2436 | 170dd5440afb9ee68a973f3de13a99aa4c735d79 | refs/heads/master | 2021-01-12T14:06:25.773146 | 2017-12-22T16:05:45 | 2017-12-22T16:05:45 | 69,566,344 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 653 | py | # -*- coding: utf-8 -*-
def listadegraus(a):
b=[]
for i in range(0,len(a)-1,1):
if a[i]>a[i+1]:
cont=0
for i in range(a[i],a[i+1],-1):
cont=cont+1
b.insert(0,cont)
elif a[i]<a[i+1]:
cont=0
for i in range(a[i],a[i+1],1):
... | [
"rafael.mota@ufca.edu.br"
] | rafael.mota@ufca.edu.br |
414880acdba06fd961eab866c64febe2bd29e1a4 | f29460914100b8e89efc746a9a4f4acc15533dc3 | /clipboard_attendees.py | 807b347a9cb3ae3e893921b851f17d3d13b83129 | [] | no_license | sczeck/clipboard-formatting-note-aid | 8b289840236001af2c1461caead0a70fb8b3e363 | 219f01077a87c21fdfcf56567b0bd67ffa0787a9 | refs/heads/master | 2021-03-12T22:35:46.704935 | 2013-12-06T01:22:27 | 2013-12-06T01:22:27 | 14,970,200 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,452 | py | print 'hello attendee script is running'
import re
from Tkinter import Tk
r = Tk()
#r.withdraw()
txt = r.clipboard_get()
#for c in txt:
# print c
#r.destroy()
#r.clipboard_clear()
#r.clipboard_append('i can has clipboardz?')
#r.destroy()
#txt = """Mark A. Hubbard; Chad A. Sclavi <casclavi@spscommerce.com>; Anthony... | [
"sczeckgithub@gmail.com"
] | sczeckgithub@gmail.com |
8d27f573730b3ac854c292e5e16ce86dda2a5b4b | 20aeba6e9fd1add068b63d94d160343a65f539be | /GenomeComparison.spec | 43821ea00491bb94fa80adb356b6291f8a29371f | [
"MIT"
] | permissive | kbaseapps/GenomeProteomeComparison | 163ab32830eb3628321201acf4c451b330a2b720 | f96f62941820a793124a18fe6e655da33a562033 | refs/heads/master | 2022-06-01T12:48:01.978041 | 2020-05-01T20:50:27 | 2020-05-01T20:50:27 | 54,588,323 | 0 | 4 | MIT | 2020-05-01T20:50:29 | 2016-03-23T19:44:00 | Java | UTF-8 | Python | false | false | 2,509 | spec | module GenomeComparison {
/*
A workspace ID that references a Genome data object.
@id ws KBaseGenomes.Genome KBaseGenomeAnnotations.GenomeAnnotation
*/
typedef string ws_genome_id;
/*
int inner_pos - position of gene name in inner genome (see dataN field in ProteomeComparison
... | [
"rsutormin@lbl.gov"
] | rsutormin@lbl.gov |
b60b31e90f5028990f00bc5dfc1af0a8a4428248 | 67d7397c64435ee7df782c3091709672cb6bcd1b | /dataFabricScripts/iRODS/usageScripts/SingleZone/usageFromICAT.py | ff39bdbd96d8fb08a7f4224868ded6404931ebeb | [] | no_license | nesi/ARCS-systems | 6984c88c9d1f7d966a79fc0f4c917b66e9d49396 | 79d41318e56730293435abe4ac4310e771f8e474 | refs/heads/master | 2020-05-17T15:48:32.048320 | 2012-12-08T07:03:09 | 2012-12-08T07:03:09 | 41,837,318 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,107 | py | #!/usr/bin/python
import pgdb, sys
import os
import xml.dom.minidom
# ------------------------------------------------------------
# Assuming:
# - the DB name is ICAT
# - the owner of ICAT is rods
# ------------------------------------------------------------
class StatsExporter:
def __init__(self, _zone):
... | [
"kai.lu@arcs.org.au"
] | kai.lu@arcs.org.au |
2d26d02539e1e4894e20095347999b7d5f48a0bd | bbe96b7552494b6baf4e84d6cd84fe9cb8192eb8 | /src/data/data_class.py | 074a6af2b213eb5e5033db83c39726fa314db432 | [
"MIT"
] | permissive | FFFinale/DeepFeatureIV | 889fe63a5b38f92474cbf7845c9a2a920406dcdd | 54b04e9e9e4c88d4859ea65d34ceb69dd1b58bc2 | refs/heads/master | 2022-12-29T16:24:50.134938 | 2020-10-17T06:26:55 | 2020-10-17T06:26:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,588 | py | from typing import NamedTuple, Optional
import numpy as np
import torch
class TrainDataSet(NamedTuple):
treatment: np.ndarray
instrumental: np.ndarray
covariate: Optional[np.ndarray]
outcome: np.ndarray
structural: np.ndarray
class TestDataSet(NamedTuple):
treatment: np.ndarray
covariate... | [
""
] | |
25358c69ffe54ebd92674d7e9523c7316fbd6bfc | aa86784b429c01778342dc60e29d3b3a1356d481 | /Exam2675.py | 18930967c09b0007213753c803bc5e3288396149 | [] | no_license | kayjayk/algorithm-solution | 7997be6143c84a72ab9ff3bb59d03e9037bc1b29 | e529b7aa1cfa2c261a3adaedc2d8c3809003bf39 | refs/heads/master | 2022-12-10T17:53:17.033617 | 2020-09-05T17:19:18 | 2020-09-05T17:19:18 | 269,100,954 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 238 | py | import sys
T = int(sys.stdin.readline())
for i in range(T):
tmp = sys.stdin.readline().split(sep=' ')
R = int(tmp[0])
S = tmp[1].rstrip()
P = ''
for j in range(len(S)):
P += S[j]*R
print(P) | [
"noreply@github.com"
] | kayjayk.noreply@github.com |
d0c2b78d51b03c7a8c71a2765db09f2024018358 | 44dd70bab754a258bb2de9e4de05271ced7cc5f7 | /project/urls.py | dbb3fe6a0e59a7923797e466b4f4e3861286fd8a | [] | no_license | GruborIvan/MovieBackend | b841982746f81a126b7b7a97469ff93609af6053 | dc9a8306b403bff15aed9e07306b0884ac6a08f1 | refs/heads/master | 2023-05-01T11:47:08.958461 | 2021-05-14T14:15:58 | 2021-05-14T14:15:58 | 357,474,886 | 0 | 0 | null | 2021-05-14T14:15:59 | 2021-04-13T08:13:06 | Python | UTF-8 | Python | false | false | 460 | py | from django.contrib import admin
from django.urls import path,include
from rest_framework_simplejwt.views import TokenObtainPairView,TokenRefreshView
urlpatterns = [
path('',include('myapi.urls')),
path('',include('user_watchlist.urls')),
path('',include('reactions.urls')),
path('admin/', admin.site.ur... | [
"ivan.grubor@gmail.com"
] | ivan.grubor@gmail.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.